:root {
    --bg: #08111f;
    --bg-2: #0d1728;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(255, 255, 255, 0.09);
    --surface-solid: #111c2f;
    --border: rgba(255, 255, 255, 0.10);
    --text: #e8f0fb;
    --muted: #a5b6d1;
    --title: #f8fbff;
    --primary: #5eead4;
    --primary-2: #60a5fa;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow-lg: 0 25px 80px rgba(0, 0, 0, 0.30);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.18);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container-max: 1280px;
    --header-bg: rgba(5, 12, 24, 0.84);
    --header-border: rgba(255, 255, 255, 0.08);
    --page-gradient: radial-gradient(circle at 15% 15%, rgba(94, 234, 212, 0.12), transparent 18%), radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.14), transparent 18%), radial-gradient(circle at 60% 80%, rgba(167, 139, 250, 0.10), transparent 18%), linear-gradient(180deg, #07111f 0%, #0a1628 42%, #07111f 100%);
}

html[data-theme="light"] {
    --bg: #f5f8fc;
    --bg-2: #eef3f9;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-2: rgba(255, 255, 255, 0.96);
    --surface-solid: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --text: #172033;
    --muted: #5b6b83;
    --title: #0f172a;
    --primary: #0ea5a4;
    --primary-2: #2563eb;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow-lg: 0 25px 80px rgba(15, 23, 42, 0.12);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --header-bg: rgba(255, 255, 255, 0.82);
    --header-border: rgba(15, 23, 42, 0.08);
    --page-gradient: radial-gradient(circle at 15% 15%, rgba(14, 165, 164, 0.10), transparent 18%), radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.10), transparent 18%), radial-gradient(circle at 60% 80%, rgba(124, 58, 237, 0.08), transparent 18%), linear-gradient(180deg, #f6f9fc 0%, #edf3f9 45%, #f6f9fc 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-gradient);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.container {
    max-width: var(--container-max);
}

.page-shell {
    min-height: calc(100vh - 180px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.navbar {
    min-height: 84px;
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    color: var(--title) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    border: 1px solid var(--border);
    padding: 5px;
    box-shadow: var(--shadow-md);
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.brand-text {
    font-size: 1.05rem;
    color: var(--title);
}

.navbar .nav-link {
    color: var(--muted) !important;
    font-weight: 600;
    padding: .65rem .9rem !important;
    border-radius: 12px;
    transition: .2s ease;
}

    .navbar .nav-link:hover,
    .navbar .nav-link:focus {
        color: var(--title) !important;
        background: rgba(255,255,255,.06);
    }

html[data-theme="light"] .navbar .nav-link:hover,
html[data-theme="light"] .navbar .nav-link:focus {
    background: rgba(15,23,42,.05);
}

.nav-toggle {
    border: 1px solid var(--border);
    background: var(--surface);
}

.header-actions .btn,
.header-actions .form-select,
.theme-btn {
    min-height: 40px;
    border-radius: 12px;
}

.action-btn,
.theme-btn {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

    .action-btn:hover,
    .theme-btn:hover {
        border-color: rgba(94, 234, 212, 0.4);
        transform: translateY(-1px);
    }

.lang-switch {
    min-width: 128px;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #07111f;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
}

.btn-outline-light {
    color: var(--text);
    border-color: var(--border);
    background: transparent;
}

    .btn-outline-light:hover {
        color: var(--title);
        background: var(--surface-2);
        border-color: var(--border);
    }

.hero-section {
    padding: 6rem 0 4rem;
}

.section-pad {
    padding: 5rem 0;
}

.content-card,
.hero-card,
.metric-card,
.form-panel,
.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hero-card,
.form-panel,
.table-card {
    overflow: hidden;
}

.metric-card {
    padding: 1.2rem;
}

.icon-box {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.14), rgba(96, 165, 250, 0.18));
    border: 1px solid var(--border);
    color: var(--title);
    font-size: 1.35rem;
}

.public-surface {
    background: var(--surface-solid);
    color: var(--text);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.text-secondary-soft,
.footer-muted {
    color: var(--muted) !important;
}

.form-panel {
    padding: 1.6rem;
}

.form-control,
.form-select,
textarea.form-control {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 14px;
    padding: .8rem .95rem;
    box-shadow: none;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] textarea.form-control {
    background: rgba(255,255,255,.85);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    color: var(--text);
    background: rgba(255,255,255,.06);
    border-color: rgba(94, 234, 212, 0.55);
    box-shadow: 0 0 0 .2rem rgba(94, 234, 212, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--title);
}

.alert {
    border-radius: 16px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .site-footer {
    background: rgba(255,255,255,.35);
}

.admin-shell {
    background: #f4f7fb;
    color: #111827;
}

.admin-sidebar {
    background: linear-gradient(180deg, #0f172a, #111827);
}

.table-card {
    background: #fff;
    color: #111827;
    padding: 1.2rem;
}

    .table-card .table {
        color: #111827;
    }

    .table-card .text-secondary {
        color: #64748b !important;
    }

.testimonial-card {
    height: 100%;
}

.display-4,
h1, h2, h3, h4, h5, h6 {
    color: var(--title);
    letter-spacing: -0.02em;
}

.navbar-nav .btn-primary,
.navbar-nav .btn-outline-light,
.header-actions .btn-primary,
.header-actions .btn-outline-light,
.header-actions .btn-success {
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .header-actions {
        padding-top: 1rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 4rem 0 3rem;
    }

    .section-pad {
        padding: 4rem 0;
    }

    .brand-text {
        font-size: .95rem;
    }
}
.notfound-section {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    padding: 5rem 0;
}

.notfound-wrap {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
}

.notfound-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
    pointer-events: none;
}

.notfound-glow-a {
    top: -40px;
    left: -60px;
    background: rgba(94, 234, 212, 0.18);
}

.notfound-glow-b {
    right: -40px;
    bottom: -40px;
    background: rgba(96, 165, 250, 0.18);
}

.notfound-card {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    border-radius: 32px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

    .notfound-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 18% 22%, rgba(94, 234, 212, 0.10), transparent 18%), radial-gradient(circle at 82% 18%, rgba(96, 165, 250, 0.12), transparent 18%), radial-gradient(circle at 50% 100%, rgba(167, 139, 250, 0.10), transparent 25%);
        pointer-events: none;
    }

.notfound-code {
    position: relative;
    z-index: 1;
    font-size: clamp(4.8rem, 16vw, 9rem);
    line-height: .92;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    color: var(--title);
    text-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.notfound-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
}

.notfound-title {
    position: relative;
    z-index: 1;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.notfound-text {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto 1.75rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.notfound-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .9rem;
    margin-bottom: 1.5rem;
}

.notfound-links {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

    .notfound-links a {
        color: var(--muted);
        font-weight: 600;
        transition: color .2s ease, transform .2s ease;
    }

        .notfound-links a:hover {
            color: var(--title);
            transform: translateY(-1px);
        }

@media (max-width: 767px) {
    .notfound-card {
        padding: 2.2rem 1.2rem;
        border-radius: 24px;
    }

    .notfound-actions {
        flex-direction: column;
    }

        .notfound-actions .btn {
            width: 100%;
        }

    .notfound-links {
        flex-direction: column;
        gap: .65rem;
    }
}

body.rtl {
    direction: rtl;
    text-align: right;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

    body.rtl .brand-wrap,
    body.rtl .navbar,
    body.rtl .header-actions,
    body.rtl .footer-brand,
    body.rtl .notfound-links,
    body.rtl .notfound-actions {
        direction: rtl;
    }

    body.rtl .navbar-nav {
        padding-right: 0;
    }

    body.rtl .text-lg-end {
        text-align: left !important;
    }

@media (min-width: 992px) {
    body.rtl .text-lg-end {
        text-align: left !important;
    }
}
.lang-switch,
.form-select {
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

html[data-theme="dark"] .lang-switch,
html[data-theme="dark"] .form-select {
    background-color: rgba(255,255,255,.08);
    color: var(--text);
    border-color: var(--border);
}

    html[data-theme="dark"] .lang-switch option,
    html[data-theme="dark"] .form-select option {
        background-color: #0f172a;
        color: #e8f0fb;
    }

html[data-theme="light"] .lang-switch option,
html[data-theme="light"] .form-select option {
    background-color: #ffffff;
    color: #172033;
}
.badge-soft {
    display: inline-flex;
    align-items: center;
    padding: .45rem .75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .82rem;
    border: 1px solid transparent;
}

    .badge-soft.pending {
        background: rgba(245, 158, 11, 0.15);
        color: #f59e0b;
    }

    .badge-soft.approved {
        background: rgba(34, 197, 94, 0.15);
        color: #16a34a;
    }

    .badge-soft.rejected {
        background: rgba(239, 68, 68, 0.15);
        color: #ef4444;
    }

    .badge-soft.reviewing,
    .badge-soft.discussion {
        background: rgba(59, 130, 246, 0.15);
        color: #2563eb;
    }


.auth-section {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    padding: 4.5rem 0;
}

.auth-shell {
    max-width: 1120px;
    margin: 0 auto;
}

.auth-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-side {
    position: relative;
    padding: 2.4rem;
    min-height: 100%;
    background: radial-gradient(circle at 18% 18%, rgba(94, 234, 212, 0.16), transparent 18%), radial-gradient(circle at 85% 15%, rgba(96, 165, 250, 0.18), transparent 20%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

    .auth-side h2,
    .auth-side h3 {
        margin-bottom: 1rem;
    }

    .auth-side .auth-points {
        display: grid;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .auth-side .auth-point {
        display: flex;
        gap: .9rem;
        align-items: flex-start;
    }

        .auth-side .auth-point .icon-box {
            flex: 0 0 auto;
            width: 50px;
            height: 50px;
        }

.auth-form-wrap {
    padding: 2.4rem;
    background: transparent;
}

    .auth-form-wrap .form-panel {
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

.auth-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: .6rem;
}

.auth-lead {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: 1.2rem;
}

    .auth-links a {
        color: var(--muted);
        font-weight: 600;
    }

        .auth-links a:hover {
            color: var(--title);
        }

.auth-help {
    color: var(--muted);
    font-size: .95rem;
}

@media (max-width: 991px) {
    .auth-side,
    .auth-form-wrap {
        padding: 1.5rem;
    }
}