
:root {
    --brand-navy: #0f2f63;
    --brand-blue: #156fd1;
    --brand-cyan: #1fa7e1;
    --brand-gold: #e5b221;
    --text-900: #172b4d;
    --text-700: #42526e;
    --text-500: #6b778c;
    --border: #dfe6ef;
    --border-strong: #cad5e2;
    --surface: #ffffff;
    --surface-soft: #f6f9fc;
    --surface-muted: #eef3f8;
    --success-text: #1d6f42;
    --success-bg: #eaf7ef;
    --warning-text: #9c6200;
    --warning-bg: #fff5df;
    --danger-text: #a33a3a;
    --danger-bg: #fdecec;
    --info-bg: #edf5ff;
    --shadow-sm: 0 4px 12px rgba(15, 47, 99, 0.05);
    --shadow-md: 0 12px 28px rgba(15, 47, 99, 0.08);
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --sidebar-width: 296px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: #f4f7fb;
    color: var(--text-900);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
}

a:hover {
    color: var(--brand-navy);
}

img {
    max-width: 100%;
}

input,
select,
textarea,
button {
    font: inherit;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.btnx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--brand-blue);
    color: #ffffff;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btnx:hover {
    background: var(--brand-navy);
    color: #ffffff;
}

.btnx.btn-soft {
    background: #ffffff;
    color: var(--text-900);
    border-color: var(--border-strong);
    box-shadow: none;
}

.btnx.btn-soft:hover {
    background: var(--surface-soft);
    color: var(--text-900);
}

.form-control,
.form-select {
    min-height: 48px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    color: var(--text-900);
    background: #ffffff;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(21, 111, 209, 0.6);
    box-shadow: 0 0 0 4px rgba(21, 111, 209, 0.12);
}

.form-label,
label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-900);
    font-weight: 700;
}

.field-note,
.form-note {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-500);
}

.alert {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 13px 14px;
    font-weight: 600;
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(29, 111, 66, 0.12);
    color: var(--success-text);
}

.alert-danger {
    background: var(--danger-bg);
    border-color: rgba(163, 58, 58, 0.12);
    color: var(--danger-text);
}

.dash-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: var(--brand-navy);
    color: #ffffff;
}

.brand-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
}

.brand-link:hover {
    color: #ffffff;
}

.brand-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background: #ffffff;
    padding: 6px;
    display: grid;
    place-items: center;
}

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

.brand-copy small {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

.brand-copy strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
}

.brand-copy span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.side-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.52);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sidebar-nav .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 16px;
}

.sidebar-helper {
    margin-top: auto;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-helper h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
}

.sidebar-helper p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    line-height: 1.7;
}

.sidebar-helper .helper-accent {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(229, 178, 33, 0.16);
    color: #ffd76c;
    font-size: 12px;
    font-weight: 700;
}

.content-wrap {
    flex: 1;
    min-width: 0;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-700);
    font-size: 13px;
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px 10px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.topbar-user strong {
    display: block;
    font-size: 14px;
}

.topbar-user span {
    display: block;
    font-size: 13px;
    color: var(--text-500);
}

.topbar-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--surface-muted);
    color: var(--brand-navy);
    font-weight: 700;
}

.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.hero-content {
    max-width: 760px;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    color: var(--text-900);
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.2;
    font-weight: 800;
}

.hero-description {
    margin: 10px 0 0;
    color: var(--text-700);
    font-size: 15px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-actions .hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-700);
    font-size: 13px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.cardx {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.cardx small {
    display: block;
    margin-bottom: 12px;
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cardx strong {
    display: block;
    margin-bottom: 8px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text-900);
}

.cardx p {
    margin: 0;
    color: var(--text-500);
    font-size: 14px;
    line-height: 1.6;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
}


.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.copy-row input {
    font-weight: 600;
}

.metric-list {
    display: grid;
    gap: 14px;
}

.metric-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.metric-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 700;
}

.metric-item span {
    display: block;
    color: var(--text-500);
    font-size: 13px;
    line-height: 1.6;
}

.metric-value {
    flex-shrink: 0;
    color: var(--text-900);
    font-size: 18px;
    font-weight: 800;
}

.info-strip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.info-strip-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--info-bg);
    color: var(--brand-blue);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 16px;
}

.info-strip h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
}

.info-strip p {
    margin: 0;
    color: var(--text-500);
    font-size: 14px;
    line-height: 1.7;
}

.table-wrap {
    overflow: auto;
}

.tablex {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.tablex thead th {
    padding: 0 16px 14px;
    text-align: left;
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.tablex tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: #ffffff;
}

.tablex tbody tr:last-child td {
    border-bottom: none;
}

.table-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-title {
    font-weight: 700;
    color: var(--text-900);
}

.table-meta {
    color: var(--text-500);
    font-size: 13px;
}

.amount-cell {
    font-weight: 700;
    color: var(--text-900);
}

.badgex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    min-height: 30px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    background: var(--info-bg);
    color: var(--brand-blue);
}

.badgex.qualified,
.badgex.active,
.badgex.transferred {
    background: var(--success-bg);
    color: var(--success-text);
}

.badgex.pending,
.badgex.pending_review {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.badgex.rejected,
.badgex.disabled,
.badgex.cancelled {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.badgex.converted {
    background: var(--info-bg);
    color: var(--brand-blue);
}

.empty-state {
    border: 1px dashed var(--border-strong);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    background: var(--surface-soft);
}

.empty-state h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-900);
}

.empty-state p {
    margin: 0;
    color: var(--text-500);
    line-height: 1.7;
}

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

.form-grid .span-2 {
    grid-column: span 2;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 20px;
}

.profile-summary {
    display: grid;
    gap: 20px;
}

.profile-card {
    padding: 24px;
}

.profile-card .avatar-lg {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: var(--surface-muted);
    color: var(--brand-navy);
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 700;
}

.profile-card h3 {
    margin: 18px 0 6px;
    font-size: 22px;
    font-weight: 800;
}

.profile-card p {
    margin: 0;
    color: var(--text-500);
    line-height: 1.7;
}

.profile-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.profile-list-item {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.profile-list-item:first-child {
    padding-top: 0;
    border-top: none;
}

.profile-list-item small {
    display: block;
    margin-bottom: 4px;
    color: var(--text-500);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.profile-list-item strong {
    display: block;
    font-weight: 700;
    color: var(--text-900);
}

.section-spacer {
    height: 16px;
}

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

.auth-aside {
    padding: 36px;
    background: var(--brand-navy);
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
}

.auth-brand:hover {
    color: #ffffff;
}

.auth-brand .brand-logo-wrap {
    width: 72px;
    height: 72px;
}

.auth-aside-content {
    margin-top: 48px;
}

.auth-pill {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-aside h1 {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
}

.auth-aside p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 15px;
    line-height: 1.8;
}

.auth-feature-list {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 36px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-box {
    width: min(100%, 560px);
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.auth-card-body {
    padding: 32px;
}

.auth-title-row {
    margin-bottom: 24px;
}

.auth-title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: var(--text-900);
}

.auth-subtitle {
    margin: 10px 0 0;
    color: var(--text-500);
    line-height: 1.75;
}

.auth-links,
.inline-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.bottom-nav {
    display: none;
}

.mini-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 15px;
    border-radius: 12px;
    background: rgba(23, 43, 77, 0.96);
    color: #ffffff;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .dash-shell {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .content-wrap {
        padding: 18px 18px 92px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .bottom-nav {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 14px;
        z-index: 99;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-md);
    }

    .bottom-nav a {
        display: grid;
        justify-items: center;
        gap: 6px;
        padding: 8px 6px;
        border-radius: 12px;
        color: var(--text-500);
        font-size: 12px;
        font-weight: 700;
    }

    .bottom-nav a.active {
        background: var(--surface-soft);
        color: var(--brand-blue);
    }

    .bottom-nav .nav-icon {
        font-size: 16px;
        line-height: 1;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        padding: 28px 22px;
    }

    .auth-feature-list {
        margin-top: 32px;
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .stats-grid,
    .form-grid,
    .copy-row {
        grid-template-columns: 1fr;
    }

    .form-grid .span-2 {
        grid-column: span 1;
    }

    .panel-header,
    .panel-body,
    .auth-card-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .panel-body {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .topbar-user,
    .auth-links,
    .inline-links {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-user {
        gap: 10px;
    }

    .content-wrap {
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-main {
        padding: 24px 14px;
    }
}
