﻿/*
 ============================================================
 Legal Assistant Platform
 Authored & Architected by: 
    Hany Awad Farag Gerges
 All rights reserved © 2026
 ============================================================
*/


@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1a3a52;
    --primary-light: #2d5573;
    --primary-dark: #0f2538;
    --accent: #b8956a;
    --accent-light: #d4b895;
    --accent-dark: #9d7d52;
    --bg-main: #fafbfc;
    --bg-card: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-elevated: #fcfdfd;
    --text-primary: #1a202c;
    --text-secondary: #c4a47c;
    --text-muted: #718096;
    --success: #059669;
    --info: #0891b2;
    --warning: #d97706;
    --danger: #dc2626;
    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
@font-face {
    font-family: 'Tajawal';
    src: url('/fonts/tajawal/Tajawal-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('/fonts/tajawal/Tajawal-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('/fonts/tajawal/Tajawal-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
    direction: rtl;
    color: var(--text-primary);
    line-height: 1.65;
    font-weight: 400;
}

.navbar {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    padding: 0;
    backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

    .navbar .container {
        padding: 0.75rem 1.5rem;
    }

.navbar-brand {
    font-weight: 800;
    font-size: 1.375rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

    .navbar-brand:hover {
        transform: translateY(-1px);
        opacity: 0.9;
    }

    .navbar-brand i {
        background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-size: 1.625rem;
        filter: drop-shadow(0 2px 4px rgba(184, 149, 106, 0.2));
    }

.navbar-nav {
    gap: 0.25rem;
}

    .navbar-nav .nav-item {
        position: relative;
    }

    .navbar-nav .nav-link {
        font-weight: 600;
        font-size: 0.9375rem;
        padding: 0.625rem 1.125rem;
        color: var(--text-secondary);
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: var(--radius-md);
        position: relative;
        letter-spacing: -0.01em;
    }

        .navbar-nav .nav-link::before {
            content: '';
            position: absolute;
            bottom: 0;
            right: 50%;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
            transition: all 0.3s ease;
            border-radius: 2px;
        }

        .navbar-nav .nav-link:hover {
            color: white;
            background: linear-gradient(135deg, rgba(26, 58, 82, 0.06) 0%, rgba(184, 149, 106, 0.06) 100%);
            transform: translateY(-1px);
        }

            .navbar-nav .nav-link:hover::before {
                width: 80%;
                right: 10%;
            }

        .navbar-nav .nav-link.active {
            color: var(--primary);
            background: linear-gradient(135deg, rgba(26, 58, 82, 0.08) 0%, rgba(184, 149, 106, 0.08) 100%);
            box-shadow: inset 0 0 0 1px rgba(26, 58, 82, 0.1);
        }

        .navbar-nav .nav-link i {
            margin-left: 0.375rem;
            font-size: 0.875rem;
            transition: transform 0.3s ease;
        }

        .navbar-nav .nav-link:hover i {
            transform: scale(1.1);
        }

.dropdown-toggle::after {
    margin-right: 0.5rem;
    border: none;
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-lg);
    padding: 0.625rem;
    margin-top: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    min-width: 220px;
    animation: dropdownSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: bold;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.01em;
}

    .dropdown-item:hover {
        background: linear-gradient(135deg, rgba(26, 58, 82, 0.08) 0%, rgba(184, 149, 106, 0.08) 100%);
        color: var(--primary);
        transform: translateX(4px);
        padding-right: 1.25rem;
    }

    .dropdown-item:active {
        background: linear-gradient(135deg, rgba(26, 58, 82, 0.12) 0%, rgba(184, 149, 106, 0.12) 100%);
    }

    .dropdown-item i {
        width: 1.25rem;
        text-align: center;
        color: var(--accent);
        transition: all 0.2s ease;
    }

    .dropdown-item:hover i {
        transform: scale(1.15);
        color: var(--primary);
    }

.dropdown-divider {
    margin: 0.625rem 0;
    border-color: var(--border-light);
    opacity: 0.8;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.1);
        outline: none;
    }

    .navbar-toggler:hover {
        background: var(--bg-secondary);
    }

.navbar-toggler-icon {
    width: 1.5rem;
    height: 1.5rem;
    /*background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 58, 82, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");*/
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

.hero-section {
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

    .hero-section i {
        color: var(--primary);
        opacity: 0.08;
        margin-bottom: 2rem;
    }

    .hero-section h1 {
        font-weight: 800;
        color: var(--primary);
        margin-bottom: 1.5rem;
        letter-spacing: -0.02em;
        font-size: 2.5rem;
    }

    .hero-section p {
        color: var(--text-secondary);
        font-size: 1.125rem;
        font-weight: 400;
        line-height: 1.75;
        max-width: 700px;
        margin: 0 auto 2.5rem;
    }

    .hero-section .btn {
        padding: 1rem 2.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        transition: all 0.25s ease;
        border: none;
    }

        .hero-section .btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

.card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: var(--bg-card);
}

    .card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-3px);
        border-color: var(--border-color);
    }

.card-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.card i.fa-3x {
    opacity: 0.12;
    color: var(--primary);
}

.bg-light .card-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.bg-light ul {
    padding-right: 1.5rem;
    margin-bottom: 0;
}

.bg-light li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-weight: 400;
}

.row {
    padding: 1.5rem;
    margin: 0;
    max-width: 1600px;
    margin-right: auto;
    margin-left: auto;
}

.subscription-info {
    color: black;
}

    .subscription-info .container {
        max-width: 1600px;
    }

    .subscription-info .row {
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: space-around;
    }

    .subscription-info .col-md-4 {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.625rem;
        font-size: 0.9375rem;
        position: relative;
        padding: 0.5rem !important;
        flex-direction: column;
        text-align: center;
    }

    .subscription-info strong {
        color: var(--accent);
        font-weight: 600;
    }

    .subscription-info span {
        font-weight: 700;
        color: #ffffff;
    }

    .subscription-info .col-md-4:not(:last-child)::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 50%;
        width: 1px;
        background: rgba(0, 0, 0, 0.1);
        color: #ffffff;
    }

.chat-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    height: calc(100vh - 180px);
    min-height: 600px;
    position: relative;
}

    .chat-card .card-header {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
        border: none;
        /*padding: 1rem 1.5rem;*/
        border-bottom: 2px solid var(--accent);
        flex-shrink: 0;
    }

        .chat-card .card-header h5 {
            font-weight: 700;
            font-size: 1.125rem;
            margin: 0;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 0.625rem;
            letter-spacing: -0.01em;
        }

            .chat-card .card-header h5 i {
                font-size: 1.25rem;
                color: var(--accent-light);
            }

        .chat-card .card-header .d-flex {
            gap: 0.75rem;
        }

    .chat-card .card-body {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 0;
        background: var(--bg-secondary);
        overflow: hidden;
        position: relative;
    }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem 1.5rem;
    scroll-behavior: smooth;
    background: var(--bg-secondary);
    padding-bottom: 2rem;
}

    .chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: transparent;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 10px;
    }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

.welcome-message {
    text-align: center;
    padding: 4rem 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

    .welcome-message i {
        color: var(--primary);
        opacity: 0.1;
        margin-bottom: 1.5rem;
    }

    .welcome-message h5 {
        font-weight: 700;
        color: var(--text-primary);
        margin-top: 1.25rem;
        font-size: 1.375rem;
        margin-bottom: 0.75rem;
        letter-spacing: -0.01em;
    }

    .welcome-message p {
        color: var(--text-muted);
        font-weight: 400;
        font-size: 1rem;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    display: flex;
    margin-bottom: 2rem;
    animation: slideInRight 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    align-items: flex-start;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    font-size: 1.25rem;
}

.user-message .message-icon {
    background: var(--primary);
    color: #ffffff;
}

.assistant-message .message-icon {
    background: var(--accent);
    color: #ffffff;
}

.error-message .message-icon {
    background: var(--danger);
    color: #ffffff;
}

.warning-message .message-icon {
    background: var(--warning);
    color: #ffffff;
}

.message-content {
    flex: 1;
    background: var(--bg-card);
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    line-height: 1.8;
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 1rem;
    max-width: calc(100% - 66px);
}

    .message-content:hover {
        box-shadow: var(--shadow-sm);
    }

.user-message .message-content {
    background: var(--bg-elevated);
    border-left: 3px solid var(--primary);
}

.assistant-message .message-content {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
}

.warning-message .message-content {
    background: #fef3c7;
    border-left: 3px solid var(--warning);
}

.error-message .message-content {
    background: #fee2e2;
    border-left: 3px solid var(--danger);
}

.message-content h4 {
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    border-right: 3px solid var(--accent);
    padding-right: 0.875rem;
    font-size: 1.00rem;
    letter-spacing: -0.01em;
}

.message-content h5 {
    color: var(--primary);
    margin-top: 1.25rem;
    margin-bottom: 0.875rem;
    font-weight: 700;
    border-right: 3px solid var(--accent);
    padding-right: 0.875rem;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.message-content h6 {
    color: var(--primary);
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    border-right: 3px solid var(--accent);
    padding-right: 0.875rem;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.message-content strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.message-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.message-content ul,
.message-content ol {
    margin: 1.25rem 0;
    padding-right: 1.75rem;
}

.message-content li {
    margin: 0.75rem 0;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.75;
}

    .message-content li::marker {
        color: var(--accent);
        font-weight: 600;
    }

.message-content p {
    margin: 1rem 0;
    text-align: justify;
    font-weight: 400;
    color: var(--text-secondary);
}

.message-content code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.message-time {
    display: block;
    margin-top: 0.875rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

.emoji {
    font-size: 0.75em;
    margin-right: 0.375rem;
    display: inline-block;
}

.input-group {
    padding: 0.50rem 0.5rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

#questionInput {
    resize: none;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    font-family: 'Tajawal', sans-serif;
    font-weight: 400;
    box-shadow: var(--shadow-xs);
    color: var(--text-primary);
    line-height: 1.65;
    flex: 1;
    min-height: 140px;
    max-height: 300px;
}

    #questionInput::placeholder {
        color: var(--text-muted);
    }

    #questionInput:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(26, 58, 82, 0.1);
        outline: none;
        background: var(--bg-card);
    }

#sendBtn {
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    background: var(--primary);
    border: none;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    font-family: 'Tajawal', sans-serif;
    color: #ffffff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    cursor: pointer;
    align-self: flex-end;
    min-height: 56px;
    white-space: nowrap;
}

    #sendBtn:hover:not(:disabled) {
        background: var(--primary-light);
        box-shadow: var(--shadow-lg);
        transform: translateY(-1px);
    }

    #sendBtn:active:not(:disabled) {
        transform: scale(0.98);
    }

    #sendBtn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

#clearChat {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Tajawal', sans-serif;
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    cursor: pointer;
}

    #clearChat:hover {
        background: rgba(255, 255, 255, 0.25);
    }

.sources-card {
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
    height: calc(100vh - 180px);
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

    .sources-card .card-header {
        background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
        border: none;
        padding: 1rem 1.5rem;
        border-bottom: 2px solid var(--primary);
    }

        .sources-card .card-header h5 {
            font-weight: 700;
            font-size: 1.125rem;
            margin: 0;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 0.625rem;
            letter-spacing: -0.01em;
        }

            .sources-card .card-header h5 i {
                font-size: 1.25rem;
            }

    .sources-card .card-body {
        padding: 1.25rem;
        overflow-y: auto;
        background: var(--bg-secondary);
        flex: 1;
    }

        .sources-card .card-body::-webkit-scrollbar {
            width: 6px;
        }

        .sources-card .card-body::-webkit-scrollbar-track {
            background: transparent;
        }

        .sources-card .card-body::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 10px;
        }

            .sources-card .card-body::-webkit-scrollbar-thumb:hover {
                background: var(--text-muted);
            }

#sourcesList {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    #sourcesList p.text-muted {
        text-align: center;
        padding: 3rem 1.25rem;
        color: var(--text-muted);
        font-size: 0.9375rem;
    }

.list-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-group-item {
    border: 1px solid var(--border-light);
    border-right: 3px solid var(--accent);
    margin-bottom: 0;
    padding: 1rem 1.125rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: var(--bg-card);
    box-shadow: var(--shadow-xs);
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
}

    .list-group-item:hover {
        background: var(--bg-elevated);
        box-shadow: var(--shadow-sm);
        border-right-color: var(--primary);
    }

    .list-group-item h6 {
        margin-bottom: 0.375rem;
        font-weight: 600;
        color: var(--primary);
        font-size: 0.9375rem;
        letter-spacing: -0.01em;
    }

    .list-group-item small {
        display: block;
        /*color: var(--text-muted);*/
        font-size: 0.8125rem;
        margin-top: 0.25rem;
        line-height: 1.5;
    }

    .list-group-item .d-flex {
        gap: 0.625rem;
    }

    .list-group-item i {
        color: var(--accent);
        opacity: 0.8;
    }

#loadingIndicator {
    padding: 1.5rem;
    animation: fadeIn 0.4s ease-out;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
    border-color: var(--primary);
    border-right-color: transparent;
}

#loadingIndicator p {
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.typing-indicator {
    display: inline-flex;
    gap: 0.375rem;
    align-items: center;
}

    .typing-indicator span {
        width: 8px;
        height: 8px;
        background: var(--primary);
        border-radius: 50%;
        animation: typing 1.4s ease-in-out infinite;
    }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.usage-status-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    backdrop-filter: blur(10px);
}

.usage-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.usage-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.usage-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.notification {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 320px;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-md);
}

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.02);
}

    footer p {
        color: var(--text-secondary);
        font-weight: 400;
        font-size: 0.9375rem;
    }

.alert {
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    font-size: 0.9375rem;
}

    .alert i {
        font-size: 1.125rem;
    }

.alert-success {
    background: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border-color: var(--danger);
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: #cffafe;
    border-color: var(--info);
    color: #164e63;
}

.btn-close {
    margin-right: auto;
}

.bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
}
@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 1820px;
    }
}

@media (max-width: 1200px) {
    .row {
        padding: 0.45rem;
    }
}

@media (max-width: 992px) {
    .chat-card,
    .sources-card {
        min-height: 550px;
        height: auto;
    }

    .sources-card {
        margin-top: 1.5rem;
    }

    .subscription-info {
        flex-direction: column;
        gap: 1rem;
    }

        .subscription-info .col-md-4 {
            font-size: 0.9rem;
            padding: 0.75rem 1rem !important;
            color: #ffffff;
            width: 100%;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

            .subscription-info .col-md-4:last-child {
                border-bottom: none;
            }

        .subscription-info .col-md-4::after {
            display: none;
        }
}

@media (max-width: 768px) {
    .row {
        padding: 1rem;
    }
    .chat-card .card-header h5 {
        font-size: 0;
    }

        .chat-card .card-header h5 i {
            font-size: 1.25rem;
        }
    .chat-card,
    .sources-card {
        border-radius: var(--radius-lg);
        min-height: 500px;
        height: auto;
    }

        .chat-card .card-header,
        .sources-card .card-header {
            padding: 1rem 1.25rem;
        }

            .sources-card .card-header h5 {
                font-size: 1rem;
            }

    .chat-messages {
        padding: 1.5rem 1rem;
    }

    .input-group {
        padding: 0.85rem 0.85rem;
        gap: 0.75rem;
    }

    #questionInput {
        padding: 0.85rem 0.85rem;
        font-size: 0.9375rem;
        min-height: 120px;
    }

    #sendBtn {
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
    }

    .message-icon {
        width: 38px;
        height: 38px;
        font-size: 1.125rem;
        margin-right: 1rem;
    }

    .message-content {
        padding: 1.25rem 1.5rem;
        font-size: 0.9375rem;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }

        .hero-section h1 {
            font-size: 2rem;
        }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.875rem;
    }

    .subscription-info {
/*        margin-bottom: 1.25rem;
        padding: 1rem 0;
*/    }

        .subscription-info .col-md-4 {
            font-size: 0.75rem;
            padding: 0.375rem;
            flex-direction: column;
            text-align: center;
            color: #ffffff;
        }
}

@media (max-width: 576px) {
    .welcome-message {
        padding: 2.5rem 1rem;
    }

        .welcome-message h5 {
            font-size: 1.25rem;
        }

        .welcome-message p {
            font-size: 0.9375rem;
        }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .message {
        margin-bottom: 1.5rem;
    }

    .message-icon {
        width: 36px;
        height: 36px;
        margin-right: 0.875rem;
        font-size: 1rem;
    }

    #questionInput {
        min-height: 100px;
        font-size: 0.9375rem;
    }

    #sendBtn {
        padding: 0.875rem 1.25rem;
        min-height: 50px;
    }

    .message-content {
        padding: 1.125rem 1.25rem;
        font-size: 0.9375rem;
    }

    .input-group {
        padding: 1rem;
    }
}
/*Footer*/

/* Footer Modern Styles */
.footer-modern {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 3px solid var(--accent);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-logo-section {
    display: flex;
    flex-direction: column;
    /*gap: 1rem;*/
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    direction: ltr;
}

.logo-icon-footer {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

    .logo-icon-footer::before {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        background: var(--accent-light);
        border-radius: 50%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 15px rgba(184, 149, 106, 0.4);
    }

    .logo-icon-footer::after {
        content: 'AI';
        position: absolute;
        color: white;
        font-size: 14px;
        font-weight: bold;
        z-index: 1;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

.logo-text-footer {
    text-align: left;
    line-height: 1;
}

    .logo-text-footer h1 {
        font-size: 28px;
        background: linear-gradient(135deg, #ffffff 0%, var(--accent-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 800;
        letter-spacing: -0.5px;
        margin: 0;
    }

    .logo-text-footer p {
        color: rgba(255, 255, 255, 0.7);
        font-size: 11px;
        margin: 2px 0 0 0;
        font-weight: 500;
    }
.footer-brand {
    font-weight: 800;
    font-size: 1.375rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}
.footer-description {
    color: #ffffff;
    font-size: 0.85rem;
    /*font-weight: 800;*/
    margin: 0;
}

.footer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .footer-links h6,
    .footer-contact h6 {
        color: var(--accent-light);
        font-weight: 700;
        font-size: 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 2px solid var(--accent);
        padding-bottom: 0.5rem;
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
        padding: 0.25rem 0;
    }

        .footer-links a:hover {
            color: var(--accent-light);
            padding-right: 0.5rem;
        }

    .footer-contact p {
        color: rgba(255, 255, 255, 0.85);
        font-size: 0.9rem;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .footer-contact i {
        color: var(--accent-light);
        font-size: 0.875rem;
    }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

    .footer-bottom p {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.875rem;
        margin: 0;
    }

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .logo-text-footer h1 {
        font-size: 24px;
    }

    .logo-icon-footer {
        width: 45px;
        height: 45px;
    }
}
.chat-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 600px;
}

    .chat-card .card-body {
        display: flex;
        flex-direction: column;
        height: 95%;
        overflow: hidden;
    }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    scroll-behavior: smooth;
}

.input-group {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    z-index: 10;
    flex-shrink: 0;
}