html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at 17% 18%, rgba(28, 113, 198, 0.38), transparent 34%), radial-gradient(circle at 90% 78%, rgba(0, 194, 218, 0.22), transparent 30%), linear-gradient(135deg, #06101e 0%, #081727 46%, #06202c 100%);
    font-family: 'Segoe UI', sans-serif;
    color: #dce8f6;
    display: flex;
    flex-direction: column;
}

    body.app-layout {
        padding-top: 70px;
    }

    body.auth-layout,
    body.app-layout {
        background: radial-gradient(circle at 16% 20%, rgba(26, 112, 203, 0.42), transparent 34%), radial-gradient(circle at 88% 80%, rgba(0, 198, 224, 0.24), transparent 31%), linear-gradient(135deg, #06101e 0%, #081727 48%, #06202c 100%) !important;
        background-attachment: fixed;
    }

    body.auth-layout {
        overflow-x: hidden;
    }

    body.app-layout::before {
        background: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
        background-size: 72px 72px;
        content: "";
        inset: 0;
        opacity: 0.55;
        pointer-events: none;
        position: fixed;
        z-index: -1;
    }

.main-content {
    flex: 1;
    padding: 30px;
}

.navbar {
    background: rgba(5, 13, 26, 0.88);
    border-bottom: 1px solid rgba(126, 172, 211, 0.14);
    backdrop-filter: blur(16px);
}

.navbar-brand {
    font-size: 24px;
    letter-spacing: 1px;
}

.card {
    background: rgba(12, 24, 42, 0.88);
    border: 1px solid rgba(126, 172, 211, 0.14);
    border-radius: 8px;
    color: #e7f0fb;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-dark {
    background: #0f172a;
    border: none;
}

    .btn-dark:hover {
        background: #1e293b;
    }

.footer {
    background: rgba(5, 13, 26, 0.9);
    border-top: 1px solid rgba(126, 172, 211, 0.14);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.container,
.container-fluid {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-size: 16px;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
}

h2 {
    font-size: 1.5rem;
    font-weight: 750;
}

h3,
h4,
h5 {
    font-weight: 700;
}

p,
label,
span,
input,
select,
button,
table {
    font-size: 1rem;
}

.form-control,
.form-select {
    min-height: 52px;
    border-radius: 8px;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-link {
    font-size: 0.98rem;
    margin-right: 8px;
}

.alert {
    border-radius: 8px;
}

.container {
    max-width: 1320px;
}

.welcome-panel,
.tool-intro {
    align-items: stretch;
    background: rgba(9, 22, 39, 0.9);
    border: 1px solid rgba(126, 172, 211, 0.16);
    border-radius: 8px;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 360px;
    margin-bottom: 28px;
    padding: 32px;
}

    .welcome-panel p,
    .tool-intro p {
        color: #9fb1c8;
        font-size: 1.08rem;
        margin-bottom: 0;
    }

.eyebrow {
    color: #35d4ff;
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.quick-start-box,
.example-box,
.guide-panel,
.glossary-panel,
.soft-panel {
    background: rgba(13, 28, 49, 0.82);
    border: 1px solid rgba(126, 172, 211, 0.16);
    border-radius: 8px;
}

.quick-start-box,
.example-box {
    padding: 22px;
}

    .quick-start-box ol {
        margin-bottom: 0;
        padding-left: 1.25rem;
    }

.scenario-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 28px;
}

.scenario-card {
    background: rgba(13, 28, 49, 0.88);
    border: 1px solid rgba(126, 172, 211, 0.16);
    border-left: 6px solid #2563eb;
    border-radius: 8px;
    color: #eaf6ff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 230px;
    padding: 22px;
    text-decoration: none;
}

    .scenario-card:hover {
        border-color: rgba(58, 208, 255, 0.55);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
        color: #ffffff;
    }

    .scenario-card i {
        font-size: 1.7rem;
    }

    .scenario-card span {
        color: #8ca2bc;
        font-size: 0.95rem;
    }

    .scenario-card strong {
        font-size: 1.35rem;
    }

    .scenario-card p {
        color: #9fb1c8;
        margin-bottom: 0;
    }

.accent-blue {
    border-left-color: #2563eb;
}

.accent-green {
    border-left-color: #16a34a;
}

.accent-yellow {
    border-left-color: #ca8a04;
}

.accent-teal {
    border-left-color: #0d9488;
}

.accent-gray {
    border-left-color: #64748b;
}

.accent-red {
    border-left-color: #dc2626;
}

.glossary-panel {
    display: grid;
    gap: 24px;
    grid-template-columns: 320px 1fr;
    padding: 28px;
}

.glossary-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

    .glossary-list div,
    .guide-item {
        background: rgba(9, 22, 39, 0.76);
        border: 1px solid rgba(126, 172, 211, 0.16);
        border-radius: 8px;
        padding: 16px;
    }

        .glossary-list p,
        .guide-item p {
            color: #9fb1c8;
            margin: 6px 0 0;
        }

.page-shell {
    max-width: 1440px;
}

.guide-panel {
    padding: 22px;
    top: 24px;
}

.guide-item + .guide-item {
    margin-top: 12px;
}

.soft-panel {
    padding: 18px;
}

.method-explainer {
    background: rgba(20, 184, 239, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 8px;
    color: #9ee8ff;
    margin-top: 10px;
    padding: 12px 14px;
}

.help-dot {
    align-items: center;
    background: #e0f2fe;
    border-radius: 999px;
    color: #075985;
    cursor: help;
    display: inline-flex;
    font-size: 0.78rem;
    height: 20px;
    justify-content: center;
    margin-left: 4px;
    width: 20px;
}

.form-text {
    color: #93a8bf;
}

.login-screen {
    align-items: center;
    background: linear-gradient(90deg, rgba(7, 17, 31, 0.2), rgba(7, 17, 31, 0.76)), radial-gradient(circle at 18% 20%, rgba(34, 132, 226, 0.44), transparent 34%), radial-gradient(circle at 91% 78%, rgba(0, 211, 255, 0.24), transparent 32%), linear-gradient(135deg, #06101e 0%, #081727 52%, #06202c 100%);
    display: grid;
    gap: clamp(32px, 5vw, 72px);
    grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
    min-height: 100vh;
    overflow-x: hidden;
    padding: clamp(28px, 5vw, 72px);
    position: relative;
}

    .login-screen::before {
        background: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
        background-size: 72px 72px;
        content: "";
        inset: 0;
        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
        position: absolute;
        pointer-events: none;
    }

.login-hero,
.login-card {
    position: relative;
    z-index: 1;
}

.login-hero {
    justify-self: end;
    max-width: 880px;
    width: 100%;
}

.login-badge {
    align-items: center;
    background: rgba(28, 48, 77, 0.76);
    border: 1px solid rgba(100, 180, 255, 0.16);
    border-radius: 999px;
    color: #d7e8f8;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 800;
    gap: 10px;
    letter-spacing: 0.24em;
    padding: 10px 18px;
}

    .login-badge span {
        background: #36cfff;
        border-radius: 999px;
        box-shadow: 0 0 20px rgba(54, 207, 255, 0.9);
        height: 12px;
        width: 12px;
    }

.login-hero h1 {
    color: #ffffff;
    font-size: clamp(2.75rem, 5.1vw, 5.2rem);
    letter-spacing: 0;
    line-height: 1.02;
    margin: 34px 0 22px;
    max-width: 780px;
}

    .login-hero h1 strong {
        color: #7ee7ff;
        display: block;
    }

.login-hero p {
    color: #c0ccdd;
    font-size: clamp(1.05rem, 1.35vw, 1.22rem);
    line-height: 1.65;
    max-width: 680px;
}

.login-feature-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(32px, 4vw, 52px);
    max-width: 850px;
}

    .login-feature-grid article {
        background: linear-gradient(180deg, rgba(18, 35, 60, 0.88), rgba(12, 24, 42, 0.88));
        border: 1px solid rgba(126, 172, 211, 0.16);
        border-radius: 8px;
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
        min-height: 184px;
        padding: 22px;
    }

    .login-feature-grid i {
        align-items: center;
        background: linear-gradient(135deg, #35bfff, #6bf2ff);
        border-radius: 8px;
        color: #06101e;
        display: inline-flex;
        height: 42px;
        justify-content: center;
        margin-bottom: 18px;
        width: 42px;
    }

    .login-feature-grid h2 {
        color: #ffffff;
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .login-feature-grid p {
        color: #aebed1;
        font-size: 0.94rem;
        line-height: 1.55;
        margin: 0;
    }

.login-card {
    background: linear-gradient(180deg, rgba(7, 16, 31, 0.94), rgba(5, 12, 25, 0.94));
    border: 1px solid rgba(126, 172, 211, 0.18);
    border-radius: 8px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
    justify-self: start;
    max-width: 460px;
    padding: clamp(28px, 3.2vw, 40px);
    width: 100%;
}

.login-card-heading span {
    color: #7e9bb8;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    margin-bottom: 12px;
}

.login-card-heading h2 {
    color: #ffffff;
    font-size: clamp(1.9rem, 2.4vw, 2.35rem);
    margin-bottom: 12px;
}

.login-card-heading p {
    color: #9fb1c8;
    line-height: 1.55;
    margin-bottom: 28px;
}

.login-form {
    display: grid;
    gap: 18px;
}

    .login-form label,
    .login-options {
        color: #dce8f6;
        font-weight: 700;
    }

    .login-form input {
        background: rgba(18, 30, 50, 0.94);
        border: 1px solid rgba(126, 172, 211, 0.14);
        border-radius: 8px;
        color: #ffffff;
        min-height: 56px;
        outline: none;
        padding: 0 18px;
        width: 100%;
    }

        .login-form input:focus {
            border-color: rgba(75, 214, 255, 0.72);
            box-shadow: 0 0 0 4px rgba(53, 207, 255, 0.08);
        }

.password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    margin-top: 8px;
}

    .password-field input {
        border-radius: 8px 0 0 8px;
    }

    .password-field button {
        background: rgba(18, 30, 50, 0.94);
        border: 1px solid rgba(126, 172, 211, 0.14);
        border-left: 0;
        border-radius: 0 8px 8px 0;
        color: #77dcff;
        font-weight: 800;
        padding: 0 18px;
    }

.login-options {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

    .login-options label {
        align-items: center;
        display: inline-flex;
        gap: 10px;
    }

    .login-options input {
        accent-color: #32c9ff;
        height: 18px;
        min-height: auto;
        width: 18px;
    }

    .login-options a,
    .guest-entry a,
    .login-register a {
        color: #72dfff;
        font-weight: 800;
        text-decoration: none;
    }

.login-submit {
    background: linear-gradient(135deg, #27bfff, #6aefff);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(29, 195, 255, 0.2);
    color: #07111f;
    font-size: 1.12rem;
    font-weight: 900;
    min-height: 58px;
}

.login-register {
    background: rgba(12, 24, 42, 0.72);
    border: 1px solid rgba(126, 172, 211, 0.12);
    border-radius: 8px;
    color: #c5d2e2;
    margin-top: 14px;
    padding: 14px 16px;
    text-align: center;
}

    .login-register span {
        margin-right: 4px;
    }

/* ── Guest entry block ──────────────────────────── */
.guest-entry {
    background: linear-gradient(135deg, rgba(14, 30, 54, 0.92), rgba(8, 20, 38, 0.92));
    border: 1px solid rgba(53, 207, 255, 0.28);
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(53, 207, 255, 0.06) inset, 0 8px 28px rgba(0, 0, 0, 0.24);
    color: #c5d2e2;
    display: flex;
    gap: 16px;
    margin-top: 18px;
    padding: 18px 20px;
    align-items: flex-start;
}

.guest-entry-icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(53, 207, 255, 0.18), rgba(106, 239, 255, 0.08));
    border: 1px solid rgba(53, 207, 255, 0.22);
    border-radius: 8px;
    color: #60deff;
    display: flex;
    flex-shrink: 0;
    font-size: 1.15rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.guest-entry-body {
    flex: 1;
}

.guest-entry-label {
    color: #ffffff;
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.guest-entry-body p {
    color: #8fa5be;
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0 0 12px;
}

.guest-entry-btn {
    background: linear-gradient(135deg, rgba(39, 191, 255, 0.16), rgba(106, 239, 255, 0.08));
    border: 1px solid rgba(53, 207, 255, 0.32);
    border-radius: 6px;
    color: #60deff;
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 8px 14px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .guest-entry-btn:hover {
        background: linear-gradient(135deg, rgba(39, 191, 255, 0.28), rgba(106, 239, 255, 0.16));
        border-color: rgba(53, 207, 255, 0.56);
        color: #9ef4ff;
    }

.login-validation ul {
    margin-bottom: 18px;
}

.login-validation,
.login-validation li {
    color: #fda4af;
}

@media (max-width: 991.98px) {
    .welcome-panel,
    .tool-intro,
    .glossary-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .scenario-grid,
    .glossary-list {
        grid-template-columns: 1fr;
    }

    .login-screen {
        grid-template-columns: 1fr;
        overflow: auto;
        padding: 28px;
    }

    .login-feature-grid {
        grid-template-columns: 1fr;
    }

    .login-hero,
    .login-card {
        justify-self: center;
    }

        .login-hero h1 {
            font-size: clamp(2.35rem, 10vw, 4rem);
        }

    .login-card {
        max-width: 620px;
        width: 100%;
    }
}

/* ══════════════════════════════════════════════
   LIGHT MODE THEME
   ══════════════════════════════════════════════ */
body.light-mode {
    background: radial-gradient(circle at 17% 18%, rgba(59, 130, 246, 0.12), transparent 34%), radial-gradient(circle at 90% 78%, rgba(6, 182, 212, 0.10), transparent 30%), linear-gradient(135deg, #f0f6ff 0%, #e8f0fb 46%, #f0fbff 100%);
    color: #1e3a5f;
}

    body.light-mode.auth-layout,
    body.light-mode.app-layout {
        background: radial-gradient(circle at 16% 20%, rgba(59, 130, 246, 0.14), transparent 34%), radial-gradient(circle at 88% 80%, rgba(6, 182, 212, 0.12), transparent 31%), linear-gradient(135deg, #f0f6ff 0%, #e8f0fb 48%, #f0fbff 100%) !important;
    }

        body.light-mode.app-layout::before {
            background: linear-gradient(rgba(30, 58, 95, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 58, 95, 0.04) 1px, transparent 1px);
            background-size: 72px 72px;
        }

    /* Navbar - light */
    body.light-mode .navbar {
        background: rgba(255, 255, 255, 0.92) !important;
        border-bottom: 1px solid rgba(59, 130, 246, 0.18) !important;
    }

    body.light-mode .navbar-brand {
        color: #1d6fa6 !important;
    }

    body.light-mode .nav-link {
        color: #2d5f8a !important;
    }

        body.light-mode .nav-link:hover {
            color: #0369a1 !important;
        }

    body.light-mode .logout-btn {
        color: #2d5f8a !important;
    }

        body.light-mode .logout-btn:hover {
            color: #0369a1 !important;
        }

    body.light-mode .navbar-toggler-icon {
        filter: invert(0.6) sepia(1) saturate(3) hue-rotate(180deg);
    }

    /* Cards - light */
    body.light-mode .card {
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(59, 130, 246, 0.18);
        color: #1e3a5f;
    }

    /* Footer - light */
    body.light-mode .footer {
        background: rgba(255, 255, 255, 0.92);
        border-top: 1px solid rgba(59, 130, 246, 0.14);
        color: #2d5f8a;
    }

        body.light-mode .footer h5 {
            color: #1e3a5f;
        }

    /* Panels - light */
    body.light-mode .welcome-panel,
    body.light-mode .tool-intro {
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(59, 130, 246, 0.18);
    }

        body.light-mode .welcome-panel p,
        body.light-mode .tool-intro p {
            color: #4b78a8;
        }

    body.light-mode .quick-start-box,
    body.light-mode .example-box,
    body.light-mode .guide-panel,
    body.light-mode .glossary-panel,
    body.light-mode .soft-panel {
        background: rgba(240, 248, 255, 0.90);
        border: 1px solid rgba(59, 130, 246, 0.18);
    }

    body.light-mode .glossary-list div,
    body.light-mode .guide-item {
        background: rgba(255, 255, 255, 0.82);
        border: 1px solid rgba(59, 130, 246, 0.16);
    }

        body.light-mode .glossary-list p,
        body.light-mode .guide-item p {
            color: #4b78a8;
        }

    /* Scenario cards - light */
    body.light-mode .scenario-card {
        background: rgba(255, 255, 255, 0.90);
        border: 1px solid rgba(59, 130, 246, 0.18);
        color: #1e3a5f;
    }

        body.light-mode .scenario-card:hover {
            border-color: rgba(6, 182, 212, 0.6);
            box-shadow: 0 18px 45px rgba(59, 130, 246, 0.12);
            color: #0f2d4e;
        }

        body.light-mode .scenario-card span {
            color: #5585a8;
        }

        body.light-mode .scenario-card p {
            color: #4b78a8;
        }

    /* Eyebrow - light */
    body.light-mode .eyebrow {
        color: #0369a1;
    }

    /* Form controls - light */
    body.light-mode .form-control,
    body.light-mode .form-select {
        background: #ffffff;
        border: 1px solid rgba(59, 130, 246, 0.32);
        color: #1e3a5f;
    }

        body.light-mode .form-control:focus,
        body.light-mode .form-select:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }

    body.light-mode .form-text {
        color: #5585a8;
    }

    /* Method explainer - light */
    body.light-mode .method-explainer {
        background: rgba(6, 182, 212, 0.08);
        border: 1px solid rgba(6, 182, 212, 0.30);
        color: #0c6a8a;
    }

    /* Help dot - light */
    body.light-mode .help-dot {
        background: #dbeafe;
        color: #1d4ed8;
    }

    /* Tables - light */
    body.light-mode table,
    body.light-mode .table {
        color: #1e3a5f;
    }

    body.light-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
        background-color: rgba(59, 130, 246, 0.05);
    }

    body.light-mode .table thead th {
        background: rgba(219, 234, 254, 0.8);
        color: #1d4ed8;
        border-color: rgba(59, 130, 246, 0.2);
    }

    /* Alerts - light */
    body.light-mode .alert-info {
        background: rgba(186, 230, 253, 0.5);
        border-color: rgba(6, 182, 212, 0.4);
        color: #075985;
    }

    body.light-mode .alert-success {
        background: rgba(187, 247, 208, 0.5);
        border-color: rgba(22, 163, 74, 0.4);
        color: #15803d;
    }

    body.light-mode .alert-warning {
        background: rgba(254, 243, 199, 0.6);
        border-color: rgba(202, 138, 4, 0.4);
        color: #854d0e;
    }

    body.light-mode .alert-danger {
        background: rgba(254, 226, 226, 0.6);
        border-color: rgba(220, 38, 38, 0.4);
        color: #991b1b;
    }

    /* Btn overrides - light */
    body.light-mode .btn-dark {
        background: #1e3a5f;
        color: #ffffff;
    }

        body.light-mode .btn-dark:hover {
            background: #1d4ed8;
        }

    /* Login screen - light */
    body.light-mode .login-screen {
        background: linear-gradient(90deg, rgba(240, 246, 255, 0.3), rgba(240, 246, 255, 0.8)), radial-gradient(circle at 18% 20%, rgba(59, 130, 246, 0.18), transparent 34%), radial-gradient(circle at 91% 78%, rgba(6, 182, 212, 0.14), transparent 32%), linear-gradient(135deg, #f0f6ff 0%, #e8f0fb 52%, #f0fbff 100%);
    }

    body.light-mode .login-card {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.96));
        border: 1px solid rgba(59, 130, 246, 0.22);
        box-shadow: 0 30px 90px rgba(59, 130, 246, 0.14);
    }

    body.light-mode .login-card-heading span {
        color: #5585a8;
    }

    body.light-mode .login-card-heading h2 {
        color: #1e3a5f;
    }

    body.light-mode .login-card-heading p {
        color: #4b78a8;
    }

    body.light-mode .login-form label,
    body.light-mode .login-options {
        color: #1e3a5f;
    }

    body.light-mode .login-form input {
        background: rgba(248, 252, 255, 0.96);
        border: 1px solid rgba(59, 130, 246, 0.22);
        color: #1e3a5f;
    }

        body.light-mode .login-form input:focus {
            border-color: rgba(59, 130, 246, 0.7);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
        }

    body.light-mode .password-field button {
        background: rgba(248, 252, 255, 0.96);
        border: 1px solid rgba(59, 130, 246, 0.22);
        color: #0369a1;
    }

    body.light-mode .login-options a,
    body.light-mode .guest-entry a,
    body.light-mode .login-register a {
        color: #1d6fa6;
    }

    body.light-mode .login-badge {
        background: rgba(219, 234, 254, 0.76);
        border: 1px solid rgba(59, 130, 246, 0.20);
        color: #1e3a5f;
    }

    body.light-mode .login-hero h1 {
        color: #0f2d4e;
    }

        body.light-mode .login-hero h1 strong {
            color: #0369a1;
        }

    body.light-mode .login-hero p {
        color: #2d5f8a;
    }

    body.light-mode .login-feature-grid article {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.90), rgba(240, 248, 255, 0.90));
        border: 1px solid rgba(59, 130, 246, 0.18);
    }

    body.light-mode .login-feature-grid h2 {
        color: #1e3a5f;
    }

    body.light-mode .login-feature-grid p {
        color: #4b78a8;
    }

    body.light-mode .login-register {
        background: rgba(219, 234, 254, 0.5);
        border: 1px solid rgba(59, 130, 246, 0.16);
        color: #2d5f8a;
    }

    body.light-mode .guest-entry {
        background: linear-gradient(135deg, rgba(219, 234, 254, 0.60), rgba(207, 250, 254, 0.60));
        border: 1px solid rgba(59, 130, 246, 0.28);
        color: #2d5f8a;
    }

    body.light-mode .guest-entry-icon {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.08));
        border: 1px solid rgba(59, 130, 246, 0.22);
        color: #0369a1;
    }

    body.light-mode .guest-entry-label {
        color: #1e3a5f;
    }

    body.light-mode .guest-entry-body p {
        color: #5585a8;
    }

    body.light-mode .guest-entry-btn {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(6, 182, 212, 0.08));
        border: 1px solid rgba(59, 130, 246, 0.30);
        color: #0369a1;
    }

        body.light-mode .guest-entry-btn:hover {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(6, 182, 212, 0.14));
            border-color: rgba(59, 130, 246, 0.55);
            color: #1d4ed8;
        }

    body.light-mode .login-validation,
    body.light-mode .login-validation li {
        color: #dc2626;
    }


/* ══════════════════════════════════════════════
   DARK MODE: Fix text-muted & other dark Bootstrap classes
   ══════════════════════════════════════════════ */

/* In dark mode, Bootstrap's .text-muted renders as dark gray (#6c757d)
   which is unreadable on dark backgrounds — override to light muted */
body:not(.light-mode) .text-muted,
body:not(.light-mode) .text-secondary {
    color: #8ab4d4 !important;
}

body:not(.light-mode) small.text-muted,
body:not(.light-mode) .small.text-muted {
    color: #7aa3c0 !important;
}

/* Dropdown menus in dark mode */
body:not(.light-mode) .dropdown-menu {
    background: rgba(10, 20, 38, 0.97);
    border: 1px solid rgba(126, 172, 211, 0.18);
}

body:not(.light-mode) .dropdown-item {
    color: #c8dff2;
}

    body:not(.light-mode) .dropdown-item:hover,
    body:not(.light-mode) .dropdown-item:focus {
        background: rgba(53, 207, 255, 0.12);
        color: #ffffff;
    }

/* Table text in dark mode */
body:not(.light-mode) .table {
    color: #dce8f6;
}

    body:not(.light-mode) .table th,
    body:not(.light-mode) .table td {
        border-color: rgba(126, 172, 211, 0.14);
        color: #dce8f6;
    }

        body:not(.light-mode) .table td.text-muted,
        body:not(.light-mode) .table th.text-muted {
            color: #8ab4d4 !important;
        }

body:not(.light-mode) .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(126, 172, 211, 0.05);
    color: #dce8f6;
}

body:not(.light-mode) .table thead th {
    background: rgba(9, 20, 38, 0.9);
    color: #7ee7ff;
    border-color: rgba(126, 172, 211, 0.18);
}

/* Card header bg-dark in dark mode */
body:not(.light-mode) .card-header.bg-dark {
    background: rgba(5, 13, 26, 0.95) !important;
    border-bottom: 1px solid rgba(126, 172, 211, 0.14);
}

/* Light mode: dropdown menus */
body.light-mode .dropdown-menu {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

body.light-mode .dropdown-item {
    color: #1e3a5f;
}

    body.light-mode .dropdown-item:hover,
    body.light-mode .dropdown-item:focus {
        background: rgba(59, 130, 246, 0.08);
        color: #0369a1;
    }

/* Light mode: override card-header bg-dark */
body.light-mode .card-header.bg-dark {
    background: rgba(219, 234, 254, 0.80) !important;
    color: #1e3a5f !important;
}

    body.light-mode .card-header.bg-dark .text-white,
    body.light-mode .card-header.bg-dark h1,
    body.light-mode .card-header.bg-dark h2,
    body.light-mode .card-header.bg-dark h3,
    body.light-mode .card-header.bg-dark h4,
    body.light-mode .card-header.bg-dark h5,
    body.light-mode .card-header.bg-dark p {
        color: #1e3a5f !important;
    }

    body.light-mode .card-header.bg-dark .eyebrow {
        color: #0369a1 !important;
    }

/* Light mode: table text */
body.light-mode .table td,
body.light-mode .table th {
    border-color: rgba(59, 130, 246, 0.12);
}

/* ══════════════════════════════════════════════
   THEME TOGGLE BUTTON — make it prominent/visible
   ══════════════════════════════════════════════ */

/* Dark mode toggle: glowing cyan pill — clearly visible */
#theme-toggle {
    align-items: center;
    background: linear-gradient(135deg, rgba(53, 207, 255, 0.20), rgba(106, 239, 255, 0.12));
    border: 1.5px solid rgba(53, 207, 255, 0.65);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(53, 207, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #7ee7ff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 700;
    gap: 6px;
    padding: 6px 16px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

    #theme-toggle:hover {
        background: linear-gradient(135deg, rgba(53, 207, 255, 0.35), rgba(106, 239, 255, 0.22));
        border-color: rgba(53, 207, 255, 0.90);
        box-shadow: 0 0 20px rgba(53, 207, 255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
        color: #c2f5ff;
    }

/* Light mode toggle: blue pill with shadow */
body.light-mode #theme-toggle {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(6, 182, 212, 0.10));
    border: 1.5px solid rgba(59, 130, 246, 0.55);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.22), 0 1px 4px rgba(0, 0, 0, 0.08);
    color: #0369a1;
}

    body.light-mode #theme-toggle:hover {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.26), rgba(6, 182, 212, 0.18));
        border-color: rgba(59, 130, 246, 0.80);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35), 0 1px 4px rgba(0, 0, 0, 0.08);
        color: #1d4ed8;
    }

/* ══════════════════════════════════════════════
   THEME TOGGLE BUTTON — prominent & animated (v2)
   ══════════════════════════════════════════════ */

@keyframes toggle-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(53,207,255,0.45), 0 0 22px rgba(53,207,255,0.20), 0 2px 8px rgba(0,0,0,0.35);
    }

    50% {
        box-shadow: 0 0 18px rgba(53,207,255,0.70), 0 0 36px rgba(53,207,255,0.35), 0 2px 8px rgba(0,0,0,0.35);
    }
}

@keyframes toggle-pulse-light {
    0%, 100% {
        box-shadow: 0 0 8px rgba(59,130,246,0.35), 0 2px 10px rgba(59,130,246,0.18);
    }

    50% {
        box-shadow: 0 0 16px rgba(59,130,246,0.55), 0 2px 14px rgba(59,130,246,0.30);
    }
}

#theme-toggle {
    align-items: center !important;
    animation: toggle-pulse 2.8s ease-in-out infinite !important;
    background: linear-gradient(135deg, rgba(53,207,255,0.30), rgba(106,239,255,0.18)) !important;
    border: 2px solid rgba(53,207,255,0.85) !important;
    border-radius: 999px !important;
    color: #e0f9ff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    gap: 7px !important;
    letter-spacing: 0.02em !important;
    margin-left: 12px !important;
    padding: 7px 18px !important;
    text-shadow: 0 0 8px rgba(53,207,255,0.6) !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease !important;
    white-space: nowrap !important;
}

    #theme-toggle:hover {
        animation: none !important;
        background: linear-gradient(135deg, rgba(53,207,255,0.50), rgba(106,239,255,0.32)) !important;
        border-color: #35cfff !important;
        box-shadow: 0 0 28px rgba(53,207,255,0.65), 0 0 8px rgba(53,207,255,0.4), 0 2px 8px rgba(0,0,0,0.3) !important;
        color: #ffffff !important;
        transform: scale(1.06) !important;
    }

    #theme-toggle:active {
        transform: scale(0.97) !important;
    }

body.light-mode #theme-toggle {
    animation: toggle-pulse-light 2.8s ease-in-out infinite !important;
    background: linear-gradient(135deg, #3b82f6, #0ea5e9) !important;
    border: 2px solid #2563eb !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

    body.light-mode #theme-toggle:hover {
        animation: none !important;
        background: linear-gradient(135deg, #2563eb, #0284c7) !important;
        border-color: #1d4ed8 !important;
        box-shadow: 0 0 20px rgba(59,130,246,0.55), 0 4px 16px rgba(59,130,246,0.30) !important;
        color: #ffffff !important;
        transform: scale(1.06) !important;
    }

/* ══════════════════════════════════════════════
   FINANCE TABLE — custom styled table
   Matches the light/dark design in the UI screenshots
   ══════════════════════════════════════════════ */

.finance-table-wrap {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(126, 172, 211, 0.18);
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    color: #dce8f6;
    background: transparent;
    margin: 0;
}

/* Header row */
.finance-table thead tr {
    background: linear-gradient(135deg, #0d1f38 0%, #0a1a30 100%);
    border-bottom: 2px solid rgba(56, 189, 248, 0.25);
}

.finance-table thead th {
    padding: 14px 18px;
    font-weight: 700;
    color: #7ee7ff;
    text-align: right;
    white-space: nowrap;
    border: none;
    font-size: 0.97rem;
}

.finance-table thead th:first-child {
    text-align: left;
}

/* Body rows */
.finance-table tbody tr {
    background: rgba(10, 22, 40, 0.70);
    border-bottom: 1px solid rgba(126, 172, 211, 0.10);
    transition: background 0.15s ease;
}

.finance-table tbody tr:hover {
    background: rgba(35, 100, 180, 0.13);
}

.finance-table tbody td {
    padding: 14px 18px;
    text-align: right;
    border: none;
    color: #dce8f6;
    font-size: 0.98rem;
}

.finance-table tbody td:first-child {
    text-align: left;
    font-weight: 700;
    color: #b8d4ef;
}

/* Total / footer row */
.finance-table tfoot tr {
    background: #0a1520;
    border-top: 2px solid rgba(56, 189, 248, 0.22);
}

.finance-table tfoot td {
    padding: 14px 18px;
    text-align: right;
    font-weight: 800;
    font-size: 1rem;
    color: #dce8f6;
    border: none;
}

.finance-table tfoot td:first-child {
    text-align: left;
    color: #ffffff;
}

/* Positive / Negative values */
.finance-table .val-positive {
    color: #4ade80;
    font-weight: 700;
}

.finance-table .val-negative {
    color: #f87171;
    font-weight: 700;
}

.finance-table .val-total-positive {
    color: #34d399;
    font-weight: 800;
}

.finance-table .val-total-negative {
    color: #f87171;
    font-weight: 800;
}

/* Status badge */
.badge-status-positive {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 5px 13px;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-status-positive::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #86efac;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(134, 239, 172, 0.8);
}

.badge-status-negative {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dc2626;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 5px 13px;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-status-negative::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fca5a5;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(252, 165, 165, 0.8);
}

/* ── LIGHT MODE overrides ── */
body.light-mode .finance-table-wrap {
    border: 1px solid rgba(59, 130, 246, 0.18);
}

body.light-mode .finance-table {
    color: #1e3a5f;
}

body.light-mode .finance-table thead tr {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-bottom: 2px solid rgba(59, 130, 246, 0.22);
}

body.light-mode .finance-table thead th {
    color: #1d4ed8;
}

body.light-mode .finance-table tbody tr {
    background: #ffffff;
    border-bottom: 1px solid rgba(59, 130, 246, 0.09);
}

body.light-mode .finance-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

body.light-mode .finance-table tbody td {
    color: #1e3a5f;
}

body.light-mode .finance-table tbody td:first-child {
    color: #2d5f8a;
}

body.light-mode .finance-table tfoot tr {
    background: #1e293b;
    border-top: 2px solid rgba(59, 130, 246, 0.20);
}

body.light-mode .finance-table tfoot td {
    color: #dce8f6;
}

body.light-mode .finance-table tfoot td:first-child {
    color: #ffffff;
}

body.light-mode .finance-table .val-positive {
    color: #16a34a;
}

body.light-mode .finance-table .val-negative {
    color: #dc2626;
}

body.light-mode .finance-table .val-total-positive {
    color: #15803d;
}

body.light-mode .finance-table .val-total-negative {
    color: #b91c1c;
}

/* Unified table theme: white body in both light/dark modes, matching finance samples */
.finance-table-wrap,
.table-responsive.finance-table-wrap {
    border: 1.5px solid #8aa4bd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

body:not(.light-mode) .finance-table-wrap,
body:not(.light-mode) .table-responsive.finance-table-wrap {
    border-color: #2f5472 !important;
    background: #ffffff !important;
}

body.light-mode table.table,
body.light-mode table.finance-table,
body:not(.light-mode) table.table,
body:not(.light-mode) table.finance-table,
body.light-mode table.cashflow-table,
body:not(.light-mode) table.cashflow-table,
body.light-mode table.mh-table,
body:not(.light-mode) table.mh-table {
    --bs-table-bg: #ffffff;
    --bs-table-color: #0f172a;
    --bs-table-striped-bg: #ffffff;
    --bs-table-striped-color: #0f172a;
    --bs-table-hover-bg: #f3f7fb;
    --bs-table-hover-color: #0f172a;
    background: #ffffff !important;
    border: 1px solid #cfd9e3 !important;
    border-color: #cfd9e3 !important;
    border-collapse: collapse !important;
    color: #0f172a !important;
    margin-bottom: 0 !important;
}

body:not(.light-mode) table.table,
body:not(.light-mode) table.finance-table,
body:not(.light-mode) table.cashflow-table,
body:not(.light-mode) table.mh-table {
    border-color: #d7e0e8 !important;
}

body.light-mode table.table thead th,
body.light-mode table.finance-table thead th,
body.light-mode table.cashflow-table thead th,
body.light-mode table.mh-table > thead > tr > th {
    background: #dfeaf7 !important;
    border: 1px solid #c1d2e3 !important;
    color: #1f4f91 !important;
    font-weight: 800 !important;
}

body:not(.light-mode) table.table thead th,
body:not(.light-mode) table.finance-table thead th,
body:not(.light-mode) table.cashflow-table thead th,
body:not(.light-mode) table.mh-table > thead > tr > th {
    background: #081729 !important;
    border: 1px solid #20364c !important;
    color: #7ee7ff !important;
    font-weight: 800 !important;
}

body.light-mode table.table tbody tr,
body.light-mode table.finance-table tbody tr,
body.light-mode table.cashflow-table tbody tr,
body.light-mode table.mh-table > tbody > tr,
body:not(.light-mode) table.table tbody tr,
body:not(.light-mode) table.finance-table tbody tr,
body:not(.light-mode) table.cashflow-table tbody tr,
body:not(.light-mode) table.mh-table > tbody > tr {
    background: #ffffff !important;
    border-bottom: 1px solid #d7e0e8 !important;
}

body.light-mode table.table tbody td,
body.light-mode table.table tbody th,
body.light-mode table.finance-table tbody td,
body.light-mode table.finance-table tbody th,
body.light-mode table.cashflow-table tbody td,
body.light-mode table.cashflow-table tbody th,
body.light-mode table.mh-table > tbody > tr > td,
body:not(.light-mode) table.table tbody td,
body:not(.light-mode) table.table tbody th,
body:not(.light-mode) table.finance-table tbody td,
body:not(.light-mode) table.finance-table tbody th,
body:not(.light-mode) table.cashflow-table tbody td,
body:not(.light-mode) table.cashflow-table tbody th,
body:not(.light-mode) table.mh-table > tbody > tr > td {
    background: #ffffff !important;
    border: 1px solid #d7e0e8 !important;
    border-color: #d7e0e8 !important;
    color: #0f172a !important;
    font-weight: 500 !important;
}

body.light-mode table.table tbody tr:hover,
body.light-mode table.finance-table tbody tr:hover,
body.light-mode table.cashflow-table tbody tr:hover,
body.light-mode table.mh-table > tbody > tr:hover,
body:not(.light-mode) table.table tbody tr:hover,
body:not(.light-mode) table.finance-table tbody tr:hover,
body:not(.light-mode) table.cashflow-table tbody tr:hover,
body:not(.light-mode) table.mh-table > tbody > tr:hover {
    background: #f3f7fb !important;
}

body.light-mode table.table tbody tr:hover > *,
body.light-mode table.finance-table tbody tr:hover > *,
body.light-mode table.cashflow-table tbody tr:hover > *,
body.light-mode table.mh-table > tbody > tr:hover > *,
body:not(.light-mode) table.table tbody tr:hover > *,
body:not(.light-mode) table.finance-table tbody tr:hover > *,
body:not(.light-mode) table.cashflow-table tbody tr:hover > *,
body:not(.light-mode) table.mh-table > tbody > tr:hover > * {
    background: #f3f7fb !important;
    color: #0f172a !important;
}

body.light-mode table.table tbody td:first-child,
body.light-mode table.finance-table tbody td:first-child,
body.light-mode table.cashflow-table tbody td:first-child,
body.light-mode table.mh-table > tbody > tr > td:first-child,
body:not(.light-mode) table.table tbody td:first-child,
body:not(.light-mode) table.finance-table tbody td:first-child,
body:not(.light-mode) table.cashflow-table tbody td:first-child,
body:not(.light-mode) table.mh-table > tbody > tr > td:first-child {
    color: #0b1220 !important;
    font-weight: 800 !important;
}

body.light-mode table.table tfoot,
body.light-mode table.finance-table tfoot,
body:not(.light-mode) table.table tfoot,
body:not(.light-mode) table.finance-table tfoot {
    background: #262b31 !important;
    border-top: 1.5px solid #3a424c !important;
}

body.light-mode table.table tfoot tr,
body.light-mode table.finance-table tfoot tr,
body:not(.light-mode) table.table tfoot tr,
body:not(.light-mode) table.finance-table tfoot tr {
    background: #262b31 !important;
}

body.light-mode table.table tfoot td,
body.light-mode table.table tfoot th,
body.light-mode table.finance-table tfoot td,
body.light-mode table.finance-table tfoot th,
body:not(.light-mode) table.table tfoot td,
body:not(.light-mode) table.table tfoot th,
body:not(.light-mode) table.finance-table tfoot td,
body:not(.light-mode) table.finance-table tfoot th {
    background: #262b31 !important;
    border: 1px solid #3a424c !important;
    border-color: #3a424c !important;
    color: #e8eef7 !important;
    font-weight: 800 !important;
}

/* cashflow-table tfoot — trắng ở cả 2 chế độ, chữ đậm nổi bật */
body.light-mode table.cashflow-table tfoot,
body.light-mode table.cashflow-table tfoot tr,
body:not(.light-mode) table.cashflow-table tfoot,
body:not(.light-mode) table.cashflow-table tfoot tr {
    background: #ffffff !important;
}

body.light-mode table.cashflow-table tfoot td,
body.light-mode table.cashflow-table tfoot th {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 900 !important;
    border-top: 2px solid #94a3b8 !important;
    border-color: #e2e8f0 !important;
}

body:not(.light-mode) table.cashflow-table tfoot td,
body:not(.light-mode) table.cashflow-table tfoot th {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 900 !important;
    border-top: 2px solid #94a3b8 !important;
    border-color: #cbd5e1 !important;
}

body.light-mode table.table .text-danger,
body.light-mode table.finance-table .text-danger,
body.light-mode table.cashflow-table .text-danger,
body:not(.light-mode) table.table .text-danger,
body:not(.light-mode) table.finance-table .text-danger,
body:not(.light-mode) table.cashflow-table .text-danger,
body.light-mode table.table .val-negative,
body.light-mode table.finance-table .val-negative,
body:not(.light-mode) table.table .val-negative,
body:not(.light-mode) table.finance-table .val-negative,
body.light-mode table.table .val-total-negative,
body.light-mode table.finance-table .val-total-negative,
body:not(.light-mode) table.table .val-total-negative,
body:not(.light-mode) table.finance-table .val-total-negative {
    color: #b92f43 !important;
}

body.light-mode table.table .text-success,
body.light-mode table.finance-table .text-success,
body.light-mode table.cashflow-table .text-success,
body:not(.light-mode) table.table .text-success,
body:not(.light-mode) table.finance-table .text-success,
body:not(.light-mode) table.cashflow-table .text-success,
body.light-mode table.table .val-positive,
body.light-mode table.finance-table .val-positive,
body:not(.light-mode) table.table .val-positive,
body:not(.light-mode) table.finance-table .val-positive,
body.light-mode table.table .val-total-positive,
body.light-mode table.finance-table .val-total-positive,
body:not(.light-mode) table.table .val-total-positive,
body:not(.light-mode) table.finance-table .val-total-positive {
    color: #087f5b !important;
}

/* =============================================
   TEAM SECTION – thành viên & phân công
   ============================================= */

.team-section {
    background: rgba(9, 22, 39, 0.9);
    border: 1px solid rgba(126, 172, 211, 0.16);
    border-radius: 12px;
    margin-top: 28px;
    padding: 32px;
}

.team-header {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.team-header-icon {
    background: linear-gradient(135deg, #1a56db 0%, #0e9f9f 100%);
    border-radius: 12px;
    color: #fff;
    flex-shrink: 0;
    font-size: 1.5rem;
    height: 52px;
    line-height: 52px;
    text-align: center;
    width: 52px;
}

.team-header h2 {
    color: #dce8f6;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.team-header p {
    color: #7fa2c0;
    font-size: 0.95rem;
    margin: 0;
}

.team-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.team-card {
    align-items: center;
    background: rgba(13, 28, 52, 0.85);
    border: 1px solid rgba(126, 172, 211, 0.18);
    border-radius: 10px;
    display: flex;
    gap: 16px;
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    border-color: rgba(53, 212, 255, 0.4);
    box-shadow: 0 4px 24px rgba(53, 212, 255, 0.08);
    transform: translateY(-2px);
}

.team-avatar {
    align-items: center;
    border-radius: 50%;
    display: flex;
    flex-shrink: 0;
    height: 56px;
    justify-content: center;
    width: 56px;
}

.avatar-blue  { background: linear-gradient(135deg, #1a56db, #3b82f6); }
.avatar-green { background: linear-gradient(135deg, #057a55, #0e9f6e); }
.avatar-teal  { background: linear-gradient(135deg, #0694a2, #06b6d4); }

.team-stt {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.team-name {
    color: #e2eefa;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-class {
    color: #6b8cae;
    font-size: 0.82rem;
}

.team-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.role-badge {
    align-items: center;
    border-radius: 20px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 5px;
    letter-spacing: 0.02em;
    padding: 3px 10px;
}

.role-controller { background: rgba(26, 86, 219, 0.22); border: 1px solid rgba(59, 130, 246, 0.45); color: #7dafff; }
.role-view       { background: rgba(6, 148, 162, 0.20); border: 1px solid rgba(6, 182, 212, 0.40); color: #5de0f5; }
.role-model      { background: rgba(5, 122, 85, 0.22);  border: 1px solid rgba(14, 159, 110, 0.40); color: #4ecca3; }

/* ── Light-mode overrides ── */
body.light-mode .team-section {
    background: #f0f5ff;
    border-color: rgba(59, 130, 246, 0.18);
}

body.light-mode .team-header h2 { color: #0f172a; }
body.light-mode .team-header p  { color: #475569; }

body.light-mode .team-card {
    background: #fff;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
}

body.light-mode .team-card:hover {
    border-color: rgba(26, 86, 219, 0.5);
    box-shadow: 0 4px 20px rgba(26, 86, 219, 0.1);
}

body.light-mode .team-name  { color: #0f172a; }
body.light-mode .team-class { color: #64748b; }

body.light-mode .role-controller { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
body.light-mode .role-view       { background: #ecfeff; border-color: #67e8f9; color: #0e7490; }
body.light-mode .role-model      { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }

/* ── Navbar: 3 menu công cụ luôn hiển thị (không collapse) ── */
.navbar-tools-always {
    gap: 0;
    flex-shrink: 1;
    min-width: 0;
}

.navbar-tools-always .nav-link {
    white-space: nowrap;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

/* Light mode */
body.light-mode .navbar-tools-always .nav-link {
    color: #1e3a5f;
}

body.light-mode .navbar-tools-always .nav-link:hover {
    color: #1a56db;
}

/* ── Password strength bar ─────────────────────────────── */
.password-strength-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: -0.25rem;
}

.password-strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-label {
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

/* Light mode */
body.light-mode .password-strength-bar {
    background: rgba(0,0,0,0.1);
}

/* ── Guest banner ─────────────────────────────────────────────── */
.guest-banner {
    background: linear-gradient(90deg, #1e3a5f 0%, #1a3353 100%);
    border-bottom: 1px solid rgba(99,160,255,0.25);
    padding: 0;
    position: sticky;
    top: 60px;
    z-index: 1020;
}

.guest-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 9px 20px;
}

.guest-banner-icon {
    color: #63a0ff;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.guest-banner-text {
    flex: 1;
    font-size: 0.855rem;
    color: rgba(210, 225, 255, 0.92);
    line-height: 1.5;
}

.guest-banner-link {
    color: #7ec8ff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    margin: 0 2px;
    transition: color 0.15s;
}

.guest-banner-link:hover {
    color: #aedaff;
}

.guest-banner-close {
    background: none;
    border: none;
    color: rgba(180, 205, 255, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
    transition: color 0.15s;
    line-height: 1;
}

.guest-banner-close:hover {
    color: rgba(210, 225, 255, 0.95);
}

/* Light mode overrides */
body.light-mode .guest-banner {
    background: linear-gradient(90deg, #ddeeff 0%, #cce5ff 100%);
    border-bottom: 1px solid rgba(0, 100, 200, 0.18);
}

body.light-mode .guest-banner-icon {
    color: #1a6fd4;
}

body.light-mode .guest-banner-text {
    color: #1a3a60;
}

body.light-mode .guest-banner-link {
    color: #0d5bb5;
}

body.light-mode .guest-banner-link:hover {
    color: #0a44a0;
}

body.light-mode .guest-banner-close {
    color: rgba(20, 60, 120, 0.5);
}

body.light-mode .guest-banner-close:hover {
    color: rgba(10, 40, 90, 0.85);
}

/* ── Team card detailed layout ── */
.team-grid-detailed {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
}

.team-card-detailed {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.team-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 14px;
}

.team-card-tasks {
    padding: 0 20px 18px;
    border-top: 1px solid rgba(126, 172, 211, 0.12);
    margin-top: 2px;
    padding-top: 14px;
}

.task-role-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
}

.task-label-controller {
    background: rgba(26, 86, 219, 0.18);
    color: #7dafff;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.task-label-model {
    background: rgba(5, 122, 85, 0.18);
    color: #4ecca3;
    border: 1px solid rgba(14, 159, 110, 0.3);
}

.task-label-view {
    background: rgba(6, 148, 162, 0.18);
    color: #5de0f5;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-list li {
    font-size: 0.83rem;
    color: #8aaac8;
    padding-left: 14px;
    position: relative;
    line-height: 1.45;
}

.task-list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: #4d8fcc;
    font-weight: 700;
}

/* Light mode overrides for detailed cards */
body.light-mode .team-card-tasks {
    border-top-color: rgba(59, 130, 246, 0.12);
}

body.light-mode .task-label-controller {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

body.light-mode .task-label-model {
    background: #ecfdf5;
    color: #065f46;
    border-color: #6ee7b7;
}

body.light-mode .task-label-view {
    background: #ecfeff;
    color: #0e7490;
    border-color: #67e8f9;
}

body.light-mode .task-list li {
    color: #4b6a8a;
}

body.light-mode .task-list li::before {
    color: #2563eb;
}
