:root {
    color-scheme: light;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    --primary-900: #0d2f50;
    --primary-800: #103a63;
    --primary-600: #154a7c;
    --primary-500: #1a5690;
    --primary-100: #e6f0ff;
    --accent-500: #f6ae2d;
    --accent-600: #e09713;
    --bg-page: #f4f6fb;
    --bg-card: #ffffff;
    --border-subtle: #e2e8f0;
    --text-primary: #1b2333;
    --text-muted: #6b7280;
    --success-bg: #e6f7f0;
    --success-text: #1d7050;
    --danger-bg: #ffe8e8;
    --danger-text: #b42318;
    --warning-bg: #fff7e6;
    --warning-text: #b76b00;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 30px 45px -35px rgba(16, 58, 99, 0.5);
    --shadow-hover: 0 32px 55px -36px rgba(24, 82, 138, 0.55);
}

html.page--auth {
    font-size: 16px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 22% 20%, rgba(252, 252, 252, 0.75), transparent 55%),
        radial-gradient(circle at 78% 20%, rgba(238, 238, 238, 0.65), transparent 60%);


    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}

html.page--auth body {
    min-height: 100vh;
    padding: clamp(3rem, 5vh + 1.5rem, 5rem) clamp(1.4rem, 5vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 22% 25%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(circle at 78% 18%, rgba(255, 218, 175, 0.48), transparent 65%),
        linear-gradient(135deg, #fafbff 0%, #f5f6fb 100%);


    position: relative;
    overflow: hidden;
    isolation: isolate;
}

html.page--auth body::before,
html.page--auth body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

html.page--auth body::before {
    width: 520px;
    height: 520px;
    top: -220px;
    left: -180px;
    background: radial-gradient(circle, rgba(30, 79, 130, 0.55) 0%, rgba(30, 79, 130, 0) 70%);
    opacity: 0.4;
}

html.page--auth body::after {
    width: 640px;
    height: 640px;
    right: -200px;
    bottom: -260px;
    background: radial-gradient(circle, rgba(246, 174, 45, 0.55) 0%, rgba(246, 174, 45, 0) 70%);
    opacity: 0.32;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

p {
    margin: 0 0 1rem;
    color: var(--text-muted);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--primary-500);
}

.site-header {
    background: linear-gradient(90deg, var(--primary-800), var(--primary-600));
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: 0 20px 40px -30px rgba(9, 28, 51, 0.7);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand__name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.nav {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.85rem;
}

.nav__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex: 1;
    flex-wrap: wrap;
}

.nav__link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 16px;
}

.nav__link:hover,
.nav__link--active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.nav__action {
    margin-left: 0.5rem;
}

.nav__action .btn {
    font-size: 12px;
}

.layout-main {
    flex: 1;
    padding: 2.5rem 2rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.page--auth .layout-main {
    flex: 0 0 auto;
    max-width: 460px;
    width: min(100%, 460px);
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
    background: transparent;
}

.page--auth .layout-main > * {
    width: 100%;
}

.flash {
    padding: 0.95rem 1.2rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.flash--success {
    background: var(--success-bg);
    color: var(--success-text);
}

.flash--error {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stack--sm {
    gap: 0.75rem;
}

.stack--lg {
    gap: 1.5rem;
}

.stack--xl {
    gap: 2rem;
}

.stack--center {
    align-items: center;
    text-align: center;
}

.stack--horizontal {
    flex-direction: row;
}

.stack--spread {
    justify-content: space-between;
    align-items: center;
}

.stack--horizontal.stack--spread {
    flex-wrap: wrap;
    gap: 1rem;
}

.justify-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.inline-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 0.75rem; }
.mt-md { margin-top: 20px; }
.mt-lg { margin-top: 1.75rem; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 0.75rem; }
.mb-md { margin-bottom: 1.25rem; }
.mb-lg { margin-bottom: 1.75rem; }

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

.grid-span-full {
    grid-column: 1 / -1;
}

.card--narrow {
    max-width: 680px;
    margin: 0 auto;
}

.card--mini {
    max-width: 350px;
    margin: 0 auto;
}

.card--wide {
    max-width: 780px;
    margin: 0 auto;
}

.logo {
    display: block;
    height: auto;
}

.logo--sm {
    width: 96px;
}

.logo--md {
    width: 140px;
}

.logo--lg {
    width: 104px;
}

.auth-login {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: clamp(2.75rem, 4vw + 1.6rem, 3.4rem) clamp(2.25rem, 5vw, 3.2rem);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 36px 70px -40px rgba(11, 45, 82, 0.68);
    backdrop-filter: blur(18px);
    isolation: isolate;
    overflow: hidden;
    gap: 2px;
    font-size: 1rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.auth-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 86, 144, 0.14), rgba(246, 174, 45, 0.18));
    z-index: -2;
}

.auth-login::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    top: -190px;
    right: -150px;
    background: radial-gradient(circle, rgba(246, 174, 45, 0.4) 0%, rgba(246, 174, 45, 0) 65%);
    z-index: -1;
    opacity: 0.85;
    transform: rotate(-12deg);
}

.auth-login:hover {
    transform: translateY(-6px);
    box-shadow: 0 44px 85px -40px rgba(9, 28, 51, 0.72);
}

.auth-login .logo--md {
    width: clamp(150px, 26vw, 170px);
    filter: drop-shadow(0 18px 28px rgba(15, 60, 104, 0.25));
}

.auth-login__tagline {
    gap: 2px;
}

.auth-login__tagline p {
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(16, 58, 99, 0.78);
}

.auth-login__intro {
    margin-bottom: 0;
    font-size: 10px;
    color: var(--text-primary);
    font-weight: 500;
}

.auth-login__sign-in {
    margin-top: 18px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-login__sign-in .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: auto;
    min-width: 0;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-login__sign-in + .muted {
    margin-top: 8px;
}

.auth-login__sign-in .btn:hover {
    transform: translateY(-1px);
}

.auth-login .muted {
    margin: 0;
    font-size: 10px;
    line-height: 1.2;
    color: rgba(27, 35, 51, 0.7);
}

.auth-login .muted + .muted {
    margin-top: 2px;
}

.auth-login .muted:last-of-type {
    line-height: 1.1;
    color: rgba(27, 35, 51, 0.7);
}

@media (max-width: 680px) {
    html.page--auth body {
        padding: 2.8rem 1.2rem;
    }

    .auth-login {
        padding: 2.4rem 1.8rem;
        border-radius: 22px;
    }

    .auth-login__intro {
        font-size: 1rem;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card--flat {
    box-shadow: none;
    border: 1px solid var(--border-subtle);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.page-title {
    margin: 0;
    font-size: 30px;
    font-size: 2.727rem;
    letter-spacing: -0.02em;
}

.page-subtitle {
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-600);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -18px rgba(26, 86, 144, 0.8);
}

.btn--outline {
    background: transparent;
    color: var(--primary-600);
    border: 1px solid rgba(26, 86, 144, 0.4);
}

.btn--stone {
    background: #f1f5f9;
    color: var(--text-primary);
}

.btn--accent {
    background: var(--accent-500);
    color: #212631;
}

.btn--danger {
    background: #ef4444;
}

.btn--microsoft {
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid rgba(0, 0, 0, 0.16);
    padding: 0.55rem 1rem;
    gap: 0.6rem;
    border-radius: 6px;
    box-shadow: 0 10px 24px -22px rgba(0, 0, 0, 0.55);
}

.btn--microsoft:hover {
    background: #f5f5f5;
    box-shadow: 0 14px 26px -20px rgba(0, 0, 0, 0.6);
}

.btn--microsoft:focus-visible {
    outline: 3px solid rgba(0, 120, 212, 0.35);
    outline-offset: 3px;
}

.btn--microsoft .btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 6px 18px -16px rgba(0, 0, 0, 0.6);
}

.btn--microsoft .btn__text {
    color: inherit;
    font-size: 12px;
    line-height: 1.2;
}

.btn--success {
    background: #1b5e20;
}

.btn--sm {
    padding: 0.5rem 0.9rem;
    font-size: 12px;
}

.btn--xs {
    padding: 0.45rem 0.85rem;
    font-size: 12px;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid--gap-lg {
    gap: 1.75rem;
}

.grid--gap-xl {
    gap: 2rem;
}

.grid--two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--stretch {
    align-items: stretch;
}

.muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--text-primary);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-danger {
    color: var(--danger-text);
}

.text-success {
    color: var(--success-text);
}

.text-sm {
    font-size: 1rem;
    line-height: 1.45;
}

.fw-semibold {
    font-weight: 600;
}

form {
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 1.2rem 1.5rem;
}

.form-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid--balanced {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 1.5rem 2rem;
    align-items: start;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

.field-display {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-subtle);
    background-color: var(--bg-page);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.field-display__helper {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.threshold-panel {
    padding: 1.5rem;
}

.threshold-panel__grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(260px, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
}

.threshold-panel__input .input {
    width: 100%;
}

.threshold-panel__helper {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    display: block;
}

.threshold-panel__status {
    border: 1px dashed var(--border-subtle);
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 100%;
}

.threshold-panel__status-label {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.threshold-panel__status-value {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.threshold-panel__status-value strong {
    font-size: 1.05rem;
    padding-left: 0.15rem;
}

.threshold-panel__actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}

.threshold-panel__actions .btn {
    min-width: 140px;
}

@media (max-width: 960px) {
    .threshold-panel__grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 640px) {
    .threshold-panel {
        padding: 1.25rem;
    }

    .threshold-panel__grid {
        grid-template-columns: 1fr;
    }

    .threshold-panel__actions {
        align-items: stretch;
    }

    .threshold-panel__actions .btn {
        width: 100%;
    }
}

.input,
.select,
.textarea {
    font-size: 12px;
}

.form-field--action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.form-field--action > .btn {
    align-self: flex-end;
}

.form-field__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.form-field--action .form-field__actions {
    width: 100%;
}

.form-label--ghost {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(26, 86, 144, 0.12);
    outline: none;
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-actions--start {
    justify-content: flex-start;
}

.form-actions--center {
    justify-content: center;
}

.data-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.data-toolbar--compact {
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.data-toolbar--compact .input,
.data-toolbar--compact .select {
    flex: 0 1 auto;
    max-width: none;
    min-width: 0;
}

.data-toolbar--compact .btn {
    flex: 0 0 auto;
}

.data-toolbar--wrap {
    flex-wrap: wrap;
}

.data-toolbar--aligned {
    align-items: flex-end;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.table-scroll::-webkit-scrollbar {
    height: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(26, 86, 144, 0.35);
    border-radius: 3px;
}

.table-scroll--compact {
    overflow-x: auto;
    max-width: 100%;
}

.data-table--compact th,
.data-table--compact td {
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
}

.custom-admin-table {
    font-size: 1rem;
}

.data-table--compact select,
.data-table--compact input {
    font-size: 1rem;
    padding: 0.45rem 0.6rem;
}

.data-table--compact select {
    min-width: 140px;
}

.data-table--compact .btn {
    font-size: 12px;
    padding: 0.4rem 0.75rem;
}

.data-table thead {
    background: var(--primary-800);
    color: #fff;
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table tbody tr:hover {
    background: rgba(26, 86, 144, 0.05);
}

.data-table td[data-align="right"] {
    text-align: right;
}

.data-table td.text-center {
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
}

.badge--success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge--danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.badge--warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.badge--muted {
    background: #edf2f7;
    color: var(--text-muted);
}

.list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.section-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}

.stat-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    background: linear-gradient(135deg, rgba(26, 86, 144, 0.12), rgba(246, 174, 45, 0.08));
    border: 1px solid rgba(26, 86, 144, 0.08);
    box-shadow: var(--shadow-card);
}

.stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card__dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-600);
    box-shadow: 0 0 0 6px rgba(26, 86, 144, 0.15);
}

.stat-card__body {
    display: grid;
    gap: 0.35rem;
}

.stat-card__value {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.stat-card__label {
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card__hint {
    color: var(--text-muted);
    font-size: 1rem;
}

.stat-card__link {
    justify-self: end;
    font-weight: 600;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(26, 86, 144, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -20px rgba(26, 86, 144, 0.7);
}

.stat-card--tone-primary {
    background: linear-gradient(135deg, rgba(16, 58, 99, 0.14), rgba(26, 86, 144, 0.06));
}

.stat-card--tone-warning {
    background: linear-gradient(135deg, rgba(246, 174, 45, 0.2), rgba(246, 174, 45, 0.08));
}

.stat-card--tone-accent {
    background: linear-gradient(135deg, rgba(16, 58, 99, 0.08), rgba(246, 174, 45, 0.22));
}

.stat-card--tone-success {
    background: linear-gradient(135deg, rgba(29, 112, 80, 0.18), rgba(29, 112, 80, 0.08));
}

.stat-card--tone-warning .stat-card__dot {
    background: var(--accent-500);
    box-shadow: 0 0 0 6px rgba(246, 174, 45, 0.25);
}

.stat-card--tone-accent .stat-card__dot {
    background: var(--accent-600);
    box-shadow: 0 0 0 6px rgba(224, 151, 19, 0.3);
}

.stat-card--tone-success .stat-card__dot {
    background: var(--success-text);
    box-shadow: 0 0 0 6px rgba(29, 112, 80, 0.25);
}

.hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero__title {
    font-size: 30px;
    font-size: 2.727rem;
    margin: 0;
}

.hero__subtitle {
    color: var(--text-muted);
    max-width: 520px;
}

.hero__welcome-name {
    font-weight: 700;
    color: var(--primary-600);
    display: inline-block;
    margin-left: 0.25rem;
}

.hero__image {
    width: 104px;
    height: auto;
}

.loan-request {
    gap: 2.2rem;
}

.loan-request__hero {
    display: grid;
    gap: 1.6rem;
    padding: 2.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 86, 144, 0.08);
    background: linear-gradient(135deg, rgba(26, 86, 144, 0.08), rgba(255, 255, 255, 0.75));
    box-shadow: var(--shadow-card);
}

.loan-request__header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.loan-request__hero-body {
    display: grid;
    gap: 0.65rem;
    flex: 1 1 auto;
}

.loan-request__hero-actions {
    display: flex;
    margin-left: auto;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    align-self: flex-start;
}

.loan-request__eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-600);
}

.loan-request__title {
    margin: 0;
    font-size: 30px;
    font-size: 2.727rem;
    letter-spacing: -0.02em;
}

.loan-request__subtitle {
    margin: 0;
    max-width: 680px;
    color: var(--text-muted);
}

.loan-request__meta {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.loan-request__meta-item {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 86, 144, 0.12);
    box-shadow: 0 16px 28px -26px rgba(15, 76, 214, 0.4);
}

.loan-request__meta-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.loan-request__meta-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.loan-request__hero-actions {
    display: flex;
    justify-content: flex-end;
}

.loan-form {
    padding: 2.4rem;
    gap: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(26, 86, 144, 0.12);
    box-shadow: var(--shadow-card);
}

.form-section {
    padding: 1.8rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 86, 144, 0.1);
    background: linear-gradient(135deg, rgba(248, 250, 255, 0.92), #ffffff);
    box-shadow: 0 18px 36px -30px rgba(15, 76, 214, 0.3);
}

.form-section__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.form-section__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(26, 86, 144, 0.12);
    color: var(--primary-600);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-section__title {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.015em;
}

.form-section__subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    max-width: 520px;
}

.input--soft {
    background: #f1f5f9;
    color: var(--text-muted);
}

.input--soft:focus {
    background: #ffffff;
    color: var(--text-primary);
}

.loan-form__notes {
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(26, 86, 144, 0.25);
    background: rgba(26, 86, 144, 0.06);
    display: grid;
    gap: 0.4rem;
}

.loan-form__note {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.loan-form__cta {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.loan-form__cta .btn {
    min-width: 160px;
}

.loan-form__cta--inline {
    justify-content: flex-start;
    gap: 1rem;
    align-items: center;
}

.loan-form__cta--inline .btn {
    min-width: 0;
}

.form-layered {
    display: grid;
    gap: 1.5rem;
}

.form-layered__row {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-inline-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-inline-control .select,
.form-inline-control .ts-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.form-inline-control .ts-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    min-height: 44px;
    padding: 0 0.85rem;
    font-size: 13px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
}

.form-inline-control .btn {
    flex: 0 0 auto;
    align-self: center;
}

.form-inline-control .ts-control input {
    flex: 1 1 150px;
    min-width: 120px;
    font-size: 13px;
    height: 28px;
    padding: 0;
    margin: 0;
}

@media (max-width: 900px) {
    .form-grid--balanced {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .loan-form__cta--inline {
        flex-direction: column;
        align-items: stretch;
    }

    .loan-form {
        padding: 1.8rem;
    }

    .loan-request__hero {
        padding: 2rem;
    }

    .loan-request__header {
        flex-direction: column;
        align-items: stretch;
    }

    .loan-request__hero-actions {
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .loan-request__meta {
        grid-template-columns: 1fr;
    }

    .loan-form__cta {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .loan-form__cta .btn {
        width: 100%;
        min-width: 0;
    }
}

.inventory-form {
    padding: 2.4rem;
    gap: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(246, 174, 45, 0.18);
    background: linear-gradient(140deg, rgba(255, 250, 240, 0.82), #ffffff);
    box-shadow: var(--shadow-card);
}

.inventory-form__notes {
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(246, 174, 45, 0.4);
    background: rgba(246, 174, 45, 0.08);
    display: grid;
    gap: 0.4rem;
}

.inventory-form__note {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.inventory-form__cta {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.inventory-form__cta .btn {
    min-width: 160px;
}

@media (max-width: 900px) {
    .inventory-form {
        padding: 1.9rem;
    }

    .inventory-form__cta {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .inventory-form__cta .btn {
        width: 100%;
        min-width: 0;
    }
}

.asset-create {
    gap: 2.2rem;
}

.asset-create__hero {
    display: grid;
    gap: 1.6rem;
    padding: 2.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(21, 74, 124, 0.18);
    background: linear-gradient(145deg, rgba(21, 74, 124, 0.14), #f7fbff);
    box-shadow: 0 26px 50px -32px rgba(21, 74, 124, 0.55);
}

.asset-create__hero-body {
    display: grid;
    gap: 0.65rem;
}

.asset-create__eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-600);
}

.asset-create__title {
    margin: 0;
    font-size: 30px;
    font-size: 2.727rem;
    letter-spacing: -0.02em;
}

.asset-create__subtitle {
    margin: 0;
    max-width: 620px;
    color: var(--text-muted);
}

.asset-create__meta {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.asset-create__meta-item {
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(21, 74, 124, 0.18);
    box-shadow: 0 16px 32px -28px rgba(21, 74, 124, 0.45);
}

.asset-create__meta-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.asset-create__meta-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.asset-form {
    padding: 2.4rem;
    gap: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(21, 74, 124, 0.14);
    background: linear-gradient(140deg, rgba(239, 246, 255, 0.9), #ffffff);
    box-shadow: var(--shadow-card);
}

.asset-form__cta {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.asset-form__cta .btn {
    min-width: 160px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    .asset-form {
        padding: 1.9rem;
    }

    .asset-create__hero {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .asset-create__meta {
        grid-template-columns: 1fr;
    }

    .asset-form__cta {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .asset-form__cta .btn {
        width: 100%;
        min-width: 0;
    }
}

.dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    background:
        radial-gradient(circle at 12% 18%, rgba(26, 86, 144, 0.12), transparent 60%),
        radial-gradient(circle at 82% 24%, rgba(246, 174, 45, 0.14), transparent 65%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.dashboard-panels {
    display: grid;
    gap: 2rem;
}

.module-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(26, 86, 144, 0.08), rgba(255, 255, 255, 0.75));
    border: 1px solid rgba(26, 86, 144, 0.08);
    box-shadow: var(--shadow-card);
}

.module-hero__content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: flex-start;
}

.module-hero__body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 620px;
}

.module-hero__title {
    margin: 0;
    font-size: 30px;
    font-size: 2.727rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.module-hero__subtitle {
    margin: 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.module-hero__badges {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.module-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    justify-content: flex-end;
}

.actions-tray {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.actions-tray--wrap {
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.actions-tray > form {
    margin: 0;
}

.actions-tray__label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.actions-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.actions-panel__label {
    font-weight: 600;
    color: var(--text-primary);
}

.actions-panel__buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.timeline {
    border-left: 2px solid rgba(26, 86, 144, 0.15);
    padding-left: 1.2rem;
    margin: 0;
    list-style: none;
}

.timeline__item {
    margin-bottom: 1.1rem;
    position: relative;
}

.timeline__item::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-500);
    border: 2px solid #fff;
    position: absolute;
    left: -1.7rem;
    top: 0.4rem;
    box-shadow: 0 0 0 4px rgba(246, 174, 45, 0.25);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2.5rem 1rem;
}

.footer {
    background: rgba(16, 58, 99, 0.92);
    color: rgba(255, 255, 255, 0.75);
    padding: 1.2rem 2rem;
    text-align: center;
    font-size: 1rem;
}

.ms-logo {
    width: 20px;
    height: 20px;
    display: block;
}

.ms-logo rect {
    rx: 0.6;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
}

.panel-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.panel-link {
    font-weight: 600;
    color: var(--primary-600);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 1rem;
}

.panel-link::after {
    content: '>';
    font-size: 1rem;
}

.panel-link:hover {
    opacity: 0.75;
}

.panel-section {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.panel-section:first-of-type {
    padding-top: 0.5rem;
    border-top: 0;
}

.panel-section__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-list__item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.insight-list__main {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.insight-list__title {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.insight-list__meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(26, 86, 144, 0.12);
    color: var(--primary-600);
}

.pill--danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.pill--accent {
    background: rgba(246, 174, 45, 0.18);
    color: var(--accent-600);
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.activity-list__content {
    flex: 1;
    min-width: 0;
}

.activity-list__title {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-list__meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.activity-list__status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
    text-align: right;
}

.activity-list__date {
    font-size: 1rem;
    color: var(--text-muted);
}

.dashboard-actions {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 86, 144, 0.12);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 18px 35px -32px rgba(26, 86, 144, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-link:hover {
    transform: translateY(-2px);
    border-color: rgba(26, 86, 144, 0.25);
    box-shadow: 0 24px 40px -30px rgba(26, 86, 144, 0.65);
}

.quick-link__title {
    font-weight: 600;
    color: var(--text-primary);
}

.quick-link__desc {
    color: var(--text-muted);
    font-size: 1rem;
}

.quick-link__arrow {
    margin-top: auto;
    font-weight: 600;
    color: var(--primary-600);
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-card {
        grid-template-columns: auto 1fr;
    }

    .stat-card__link {
        justify-self: start;
        margin-top: 0.35rem;
    }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-hero__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-hero__title {
        font-size: 30px;
        font-size: 2.727rem;
    }

    .module-hero__actions {
        width: 100%;
    }

    .actions-tray {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .actions-tray--wrap {
        justify-content: flex-start;
    }

    .activity-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-list__status {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    .dashboard-actions {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}















.auth-login__gap {
    height: 20px;
}







/* Inventory modal overrides */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 9999;
}
.modal.is-active {
    display: flex;
}
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 47, 80, 0.75);
    backdrop-filter: blur(4px);
}
.modal__content {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 40px 80px -30px rgba(13, 47, 80, 0.55);
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: fadeInScale 0.25s ease;
    z-index: 1;
}
.modal__content--narrow {
    max-width: 460px;
}
.modal__header,
.modal__footer {
    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.modal__footer {
    border-top: 1px solid var(--border-subtle);
    border-bottom: none;
    justify-content: flex-end;
}
.modal__body {
    padding: 1.6rem;
}
.modal__description {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.modal__form {
    display: grid;
    gap: 1.25rem;
}
.modal__form-grid {
    display: grid;
    gap: 1rem 1.25rem;
}
.modal__form-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: flex-start;
}
.modal__form-grid--vendor {
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.9fr);
    grid-template-areas:
        "vendor-intro vendor-intro"
        "vendor-name vendor-contact"
        "vendor-phone vendor-email"
        "vendor-address vendor-address";
    align-items: start;
}
.modal__form-grid .form-field {
    margin: 0;
}
.modal__form-grid .form-field--full {
    grid-column: 1 / -1;
}
.modal__form-grid textarea {
    min-height: 120px;
}
.modal__form-grid--vendor .form-field--vendor-address textarea {
    min-height: 180px;
    width: 79%;
}
@media (max-width: 720px) {
    .modal__form-grid--vendor {
        grid-template-columns: 1fr;
        grid-template-areas:
            "vendor-intro"
            "vendor-name"
            "vendor-contact"
            "vendor-phone"
            "vendor-email"
            "vendor-address";
    }
}
.modal__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}
.modal__close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}
.modal__close:hover {
    color: var(--text-primary);
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
body.modal-open {
    overflow: hidden;
}
#addVendorModal .modal__content {
    max-width: 640px;
}
#addVendorModal .modal__body {
    padding: 1.5rem 1.75rem;
}
#addVendorModal .form-field--vendor-name { grid-area: vendor-name; }
#addVendorModal .form-field--vendor-contact { grid-area: vendor-contact; }
#addVendorModal .form-field--vendor-phone { grid-area: vendor-phone; }
#addVendorModal .form-field--vendor-email { grid-area: vendor-email; }
#addVendorModal .form-field--vendor-address { grid-area: vendor-address; }
.input--uppercase {
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
#addVendorModal .form-field--vendor-intro { grid-area: vendor-intro; }
