:root {
    --bg: #f3f7f2;
    --surface: #ffffff;
    --surface-alt: #00994a;
    --border: rgba(0, 102, 56, 0.10);
    --text: #17332a;
    --muted: #61746c;
    --primary: #00994a;
    --primary-dark: #006b34;
    --accent: #c5c93c;
    --success: #1f8c5c;
    --shadow: 0 24px 50px rgba(9, 59, 35, 0.10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(0, 153, 74, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #18a75c);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: rgba(0, 153, 74, 0.22);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.btn-warning {
    background: linear-gradient(135deg, #d9dd57, #c5c93c);
    border-color: transparent;
    color: #13462d;
}

.btn-warning:hover,
.btn-warning:focus {
    background: linear-gradient(135deg, #e2e56a, #ced248);
    color: #13462d;
}

.auth-shell {
    min-height: 100vh;
}

.auth-wrapper {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
}

.login-shell {
    width: min(1440px, 100%);
}

.login-panel {
    position: relative;
    padding: 18px;
    border-radius: 36px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.70), rgba(255, 255, 255, 0.42));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 40px 80px rgba(15, 39, 66, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px);
}

.login-copy,
.login-card,
.surface-card,
.metric-card,
.hero-panel,
.error-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-copy {
    padding: 40px;
    background:
        linear-gradient(135deg, rgba(0, 153, 74, 0.96), rgba(0, 107, 52, 0.96)),
        var(--primary-dark);
    color: #fff;
}

.login-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.login-copy p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
}

.eyebrow,
.section-kicker,
.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 700;
}

.login-highlights {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.login-highlights article {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.login-highlights strong,
.login-card h2,
.surface-head h4,
.hero-panel h3,
.error-card h3 {
    display: block;
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.login-card {
    padding: 32px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.login-auth-card {
    background:
        radial-gradient(circle at top right, rgba(197, 201, 60, 0.22), transparent 36%),
        linear-gradient(180deg, rgba(0, 107, 52, 0.98), rgba(0, 153, 74, 0.94));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.10);
}

.login-auth-card::before,
.login-register-card::before {
    content: "";
    position: absolute;
    inset: -80px auto auto -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.login-register-card {
    background:
        radial-gradient(circle at top right, rgba(0, 153, 74, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.94));
}

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

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.login-title {
    margin: 10px 0 4px;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.login-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.65;
}

.login-trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.login-trust-item {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.82rem;
    font-weight: 600;
}

.login-form {
    position: relative;
    z-index: 1;
    margin-top: 28px;
}

.login-auth-card .form-label {
    color: rgba(255, 255, 255, 0.9);
}

.login-auth-card .form-control {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.login-auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.login-auth-card .form-control:focus {
    border-color: rgba(197, 201, 60, 0.85);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 0.25rem rgba(197, 201, 60, 0.16);
    color: #fff;
}

.login-auth-card .btn-primary {
    background: linear-gradient(135deg, #d9dd57, #c5c93c);
    border-color: transparent;
    color: #13462d;
    font-weight: 700;
    box-shadow: 0 18px 32px rgba(197, 201, 60, 0.24);
}

.login-auth-card .btn-primary:hover,
.login-auth-card .btn-primary:focus {
    background: linear-gradient(135deg, #e2e56a, #ced248);
    color: #13462d;
}

.login-side-note {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.login-side-note strong {
    color: #fff;
}

.login-side-note span {
    color: rgba(255, 255, 255, 0.72);
}

.login-link {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
    text-decoration: none;
}

.login-link:hover,
.login-link:focus {
    color: #fff;
    text-decoration: underline;
}

.login-register-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.login-register-head p {
    max-width: 680px;
}

.login-register-badge {
    min-width: 240px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(0, 153, 74, 0.09), rgba(197, 201, 60, 0.12));
    border: 1px solid rgba(0, 153, 74, 0.08);
}

.login-register-badge strong,
.login-register-badge span {
    display: block;
}

.login-register-badge strong {
    margin-bottom: 6px;
}

.login-error-card {
    background: linear-gradient(180deg, #fff8f8, #fff);
    border-color: rgba(176, 43, 43, 0.12);
}

.pill,
.status-chip,
.user-role {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
}

.pill {
    color: var(--primary);
    background: rgba(15, 76, 129, 0.12);
}

.demo-access {
    margin-top: 24px;
}

.demo-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.demo-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.app-wrapper {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(0, 107, 52, 0.98), rgba(0, 153, 74, 0.96)),
        var(--surface-alt);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 201, 60, 0.55) rgba(255, 255, 255, 0.08);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-block--logo-only {
    justify-content: center;
    min-height: 84px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent), #e2e56a);
    color: #13462d;
    box-shadow: 0 18px 30px rgba(22, 73, 42, 0.22);
    font-size: 1.3rem;
    font-weight: 800;
}

.brand-logo {
    display: block;
    width: 148px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.brand-title {
    margin: 0;
    font-size: 1.4rem;
}

.user-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.user-role {
    width: fit-content;
    background: rgba(197, 201, 60, 0.16);
    color: #f6f8bd;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    transition: 0.25s ease;
}

.nav-pill:hover,
.nav-pill.active {
    color: #fff;
    background: rgba(197, 201, 60, 0.14);
    box-shadow: inset 0 0 0 1px rgba(197, 201, 60, 0.18);
}

.nav-pill-icon {
    color: var(--accent);
    font-size: 1rem;
}

.sidebar-nav {
    padding-bottom: 16px;
}

.sidebar::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(197, 201, 60, 0.55);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(197, 201, 60, 0.75);
}

.content-area {
    padding: 28px;
}

.topbar,
.hero-panel,
.surface-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.topbar {
    margin-bottom: 20px;
    align-items: center;
}

.section-title {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.topbar-action {
    margin: 0;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 1.15rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    border: 0;
    box-shadow: 0 18px 30px rgba(0, 107, 52, 0.18);
}

.topbar-logout:hover,
.topbar-logout:focus {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #18a75c);
}

.topbar-logout i {
    color: var(--accent);
}

.hero-panel,
.surface-card,
.error-card {
    padding: 28px;
}

.hero-badge {
    min-width: 240px;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 153, 74, 0.08), rgba(197, 201, 60, 0.12));
    border: 1px solid rgba(0, 153, 74, 0.08);
}

.hero-badge strong,
.hero-badge span {
    display: block;
}

.metric-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 201, 60, 0.14), transparent 70%);
    pointer-events: none;
}

.metric-card span,
.metric-card small,
.mini-tile p,
.surface-card p,
.hero-panel p {
    color: var(--muted);
}

.surface-card .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(0, 153, 74, 0.03);
    --bs-table-hover-bg: rgba(0, 153, 74, 0.05);
    margin-bottom: 0;
}

.surface-card .table thead th {
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom-width: 1px;
}

.surface-card .table > :not(caption) > * > * {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-color: rgba(0, 102, 56, 0.08);
}

.surface-card .badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.55em 0.8em;
}

.surface-card .btn-sm {
    border-radius: 12px;
}

.metric-card strong {
    display: block;
    margin: 12px 0 8px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.metric-card__top,
.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.metric-card__icon,
.section-heading__icon,
.hero-badge__icon,
.mini-tile__icon,
.timeline-item__icon,
.feature-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 153, 74, 0.12), rgba(197, 201, 60, 0.18));
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.mini-tile__icon {
    margin-bottom: 12px;
}

.hero-badge__icon {
    margin-bottom: 12px;
}

.timeline,
.feature-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.timeline-item,
.feature-list li,
.mini-tile {
    padding: 18px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(15, 39, 66, 0.06);
}

.feature-list {
    padding-left: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.mini-tile.emphasis {
    background: linear-gradient(180deg, rgba(197, 201, 60, 0.16), rgba(197, 201, 60, 0.05));
}

.list-stack,
.conversation-stack {
    display: grid;
    gap: 14px;
}

.message-list-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(15, 39, 66, 0.06);
    color: inherit;
    text-decoration: none;
}

.message-list-item:hover {
    border-color: rgba(15, 76, 129, 0.18);
    box-shadow: 0 10px 25px rgba(15, 39, 66, 0.06);
}

.message-bubble {
    max-width: 100%;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(15, 39, 66, 0.06);
}

.message-bubble-associate {
    background: #f8fbff;
}

.message-bubble-staff {
    background: linear-gradient(180deg, rgba(15, 76, 129, 0.08), rgba(15, 76, 129, 0.03));
}

.empty-state {
    padding: 26px;
    border-radius: 20px;
    background: #f8fbff;
    border: 1px dashed rgba(15, 39, 66, 0.12);
    text-align: center;
}

.flash-stack {
    margin-bottom: 20px;
}

.error-card {
    max-width: 720px;
    margin: 40px auto;
}

.code-preview {
    padding: 18px;
    border-radius: 16px;
    background: #f8fbff;
}

.digital-card {
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(15, 76, 129, 0.98), rgba(7, 27, 48, 0.96)),
        #0b243d;
    color: #fff;
    box-shadow: 0 24px 50px rgba(15, 39, 66, 0.18);
}

.digital-card__header,
.digital-card__body,
.digital-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 24px 28px;
}

.digital-card__header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.digital-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(212, 166, 61, 0.18);
    color: #ffe19d;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.digital-card__avatar {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    flex: 0 0 auto;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent), #ffcf70);
    color: #102841;
    font-size: 2rem;
    font-weight: 800;
}

.digital-card__body {
    align-items: center;
}

.digital-card__info {
    flex: 1 1 auto;
}

.digital-card__info h5 {
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.digital-card__info p,
.digital-card__footer span {
    color: rgba(255, 255, 255, 0.82);
}

.digital-card__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.partner-logo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(15, 39, 66, 0.08);
    background: #fff;
}

.partner-logo-lg {
    width: 120px;
    height: 120px;
}

.associate-form .form-control,
.associate-form .form-select,
.associate-form .form-check-input {
    border-radius: 14px;
    border-color: rgba(15, 39, 66, 0.12);
}

.associate-form .form-control,
.associate-form .form-select {
    padding: 0.85rem 1rem;
}

.associate-form .form-label {
    font-weight: 600;
    color: var(--text);
}

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

.notice-card {
    padding: 22px;
    border-radius: 20px;
    background: #f8fbff;
    border: 1px solid rgba(15, 39, 66, 0.06);
}

.notice-card .mini-tile__icon {
    margin-bottom: 10px;
}

.notice-card h5 {
    margin-bottom: 12px;
}

.notice-card ul {
    margin: 0;
    padding-left: 18px;
}

.notice-card-warning {
    background: linear-gradient(180deg, rgba(212, 166, 61, 0.14), rgba(212, 166, 61, 0.04));
}

.fenaj-download a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.fenaj-download a:hover {
    text-decoration: underline;
}

.form-card-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(15, 39, 66, 0.06);
}

.consent-box {
    padding: 18px 20px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(15, 39, 66, 0.06);
}

.associate-form .invalid-feedback {
    display: block;
}

.associate-form .form-control[type="file"] {
    padding: 0.75rem 1rem;
}

.modal-content {
    border: 0;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.modal-header,
.modal-body {
    padding: 24px 28px;
}

@media (max-width: 991.98px) {
    .login-panel,
    .app-wrapper {
        grid-template-columns: 1fr;
    }

    .login-register-head {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
    }

    .topbar,
    .hero-panel,
    .surface-head,
    .demo-head {
        flex-direction: column;
    }

    .notice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .auth-wrapper,
    .content-area,
    .sidebar {
        padding: 18px;
    }

    .login-card,
    .login-copy,
    .surface-card,
    .hero-panel,
    .metric-card {
        padding: 20px;
    }

    .login-panel {
        padding: 10px;
        border-radius: 24px;
    }

    .login-brand {
        align-items: flex-start;
    }

    .login-register-badge {
        min-width: 0;
        width: 100%;
    }

    .digital-card__header,
    .digital-card__body,
    .digital-card__footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
}
