:root {
    --ev-navy: #102a43;
    --ev-navy-soft: #1f3a56;
    --ev-teal: #0f766e;
    --ev-teal-soft: #e6f4f1;
    --ev-ink: #1f2937;
    --ev-muted: #64748b;
    --ev-surface: #ffffff;
    --ev-canvas: #f4f7fa;
    --ev-border: #dbe3ec;
    --ev-radius: 1rem;
    --ev-shadow: 0 18px 45px rgba(16, 42, 67, .08);
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ev-canvas);
    color: var(--ev-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4 {
    letter-spacing: -.02em;
    color: var(--ev-navy);
}

a {
    color: var(--ev-teal);
}

a:hover {
    color: #0b5d57;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 1100;
    padding: .6rem 1rem;
    background: var(--ev-navy);
    color: #fff;
    border-radius: .5rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    color: #fff;
}

:focus-visible {
    outline: 3px solid rgba(15, 118, 110, .45);
    outline-offset: 2px;
}

.navbar {
    backdrop-filter: saturate(180%) blur(12px);
    background-color: rgba(255, 255, 255, .96) !important;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .7rem;
    background: linear-gradient(135deg, var(--ev-navy), var(--ev-teal));
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 8px 18px rgba(15, 118, 110, .25);
}

.brand-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--ev-navy);
    letter-spacing: -.02em;
}

.brand-tagline {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ev-muted);
    font-weight: 600;
}

.navbar .nav-link {
    color: var(--ev-navy-soft);
    font-weight: 600;
    border-radius: .5rem;
    padding: .5rem .75rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background: var(--ev-teal-soft);
    color: var(--ev-teal);
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-eyebrow {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ev-teal);
    font-weight: 700;
}

.page-title {
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 800;
    margin-bottom: .35rem;
}

.page-lead {
    color: var(--ev-muted);
    max-width: 62ch;
    margin-bottom: 0;
}

.card {
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    box-shadow: 0 8px 26px rgba(16, 42, 67, .05);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--ev-border);
    font-weight: 700;
    color: var(--ev-navy);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.auth-shell {
    max-width: 1040px;
    margin: 0 auto;
}

.auth-card {
    overflow: hidden;
    border: 0;
    box-shadow: var(--ev-shadow);
}

.auth-aside {
    background:
        radial-gradient(circle at 20% 15%, rgba(15, 118, 110, .55), transparent 45%),
        linear-gradient(145deg, var(--ev-navy), #0b3b4a 70%);
    color: #fff;
    padding: 2.25rem;
}

.auth-aside .brand-mark {
    background: rgba(255, 255, 255, .14);
    box-shadow: none;
}

.auth-aside h1 {
    color: #fff;
    font-weight: 800;
}

.auth-aside p {
    color: rgba(255, 255, 255, .82);
}

.auth-aside .auth-points {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.auth-aside .auth-points li {
    padding: .45rem 0 .45rem 1.5rem;
    position: relative;
    color: rgba(255, 255, 255, .88);
}

.auth-aside .auth-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .95rem;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #5eead4;
}

.auth-form {
    padding: 2.25rem;
    background: var(--ev-surface);
}

.form-label {
    font-weight: 600;
    color: var(--ev-navy-soft);
}

.form-control,
.form-select {
    border-radius: .65rem;
    border-color: var(--ev-border);
    padding: .65rem .8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ev-teal);
    box-shadow: 0 0 0 .25rem rgba(15, 118, 110, .15);
}

.btn {
    border-radius: .65rem;
    font-weight: 600;
}

.btn-primary {
    background: var(--ev-teal);
    border-color: var(--ev-teal);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #0b5d57;
    border-color: #0b5d57;
}

.btn-outline-primary {
    color: var(--ev-teal);
    border-color: var(--ev-teal);
}

.btn-outline-primary:hover {
    background: var(--ev-teal);
    border-color: var(--ev-teal);
}

.table {
    --bs-table-border-color: var(--ev-border);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .85rem .9rem;
    vertical-align: middle;
}

.table thead th {
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ev-muted);
    font-weight: 700;
    background: #f8fafc;
}

.table-responsive {
    border-radius: .9rem;
    border: 1px solid var(--ev-border);
    background: var(--ev-surface);
}

.badge {
    font-weight: 600;
    padding: .4em .65em;
    border-radius: .45rem;
}

.badge-soft-success { background: #dcfce7; color: #166534; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-danger  { background: #fee2e2; color: #991b1b; }
.badge-soft-info    { background: #e0f2fe; color: #075985; }
.badge-soft-muted   { background: #e2e8f0; color: #334155; }

.empty-state {
    text-align: center;
    padding: 3rem 1.25rem;
    border: 1px dashed var(--ev-border);
    border-radius: var(--ev-radius);
    background: var(--ev-surface);
}

.empty-state .empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ev-teal-soft);
    color: var(--ev-teal);
    font-weight: 800;
}

.stat-card {
    background: var(--ev-surface);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    padding: 1rem 1.15rem;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ev-navy);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ev-muted);
    font-weight: 700;
}

.detail-list dt {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ev-muted);
    font-weight: 700;
}

.detail-list dd {
    margin-bottom: 1rem;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: .75rem;
    padding: 1rem;
    overflow-x: auto;
    font-size: .85rem;
}

.app-footer {
    background: #fff;
    flex-shrink: 0;
}

.recovery-codes {
    list-style: none;
    padding: 0;
    display: grid;
    gap: .5rem;
}

.recovery-codes li {
    background: #f8fafc;
    border: 1px solid var(--ev-border);
    border-radius: .65rem;
    padding: .65rem .9rem;
    text-align: center;
}

@media (min-width: 576px) {
    .w-sm-auto {
        width: auto !important;
    }
}

@media (max-width: 575.98px) {
    .auth-aside,
    .auth-form {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.55rem;
    }

    .table-responsive {
        font-size: .9rem;
    }
}
