/* Vaultify - Secure Command Center Theme */

:root {
    --vf-bg-0: #f4f7ff;
    --vf-bg-1: #e8edff;
    --vf-surface: rgba(255, 255, 255, 0.92);
    --vf-surface-strong: #ffffff;
    --vf-border: rgba(46, 70, 156, 0.15);
    --vf-text-0: #101739;
    --vf-text-1: #3f4a76;
    --vf-brand-500: #2b4fd3;
    --vf-brand-400: #1e8bff;
    --vf-brand-700: #1a2f77;
    --vf-brand-violet: #5a1edc;
    --vf-success: #11945a;
    --vf-warning: #b58012;
    --vf-danger: #c13c56;
    --vf-info: #0e8cae;
    --vf-shadow-soft: 0 12px 30px rgba(29, 53, 130, 0.12);
    --vf-shadow-strong: 0 20px 50px rgba(23, 37, 95, 0.22);
    --vf-radius-lg: 18px;
    --vf-radius-md: 12px;
    --vf-radius-sm: 10px;
    --vf-speed-fast: 0.18s;
    --vf-speed-normal: 0.28s;
    --vf-gradient-brand: linear-gradient(130deg, #1e8bff 0%, #2b4fd3 48%, #5a1edc 100%);
    --vf-gradient-bg: radial-gradient(circle at top right, #d8e7ff 0%, #edf2ff 35%, #f8faff 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--vf-text-0);
    font-family: 'Segoe UI', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
    background: var(--vf-gradient-bg);
}

a {
    color: var(--vf-brand-500);
}

.vf-app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.vf-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.2rem 1rem;
    background: linear-gradient(195deg, #102056 0%, #1a2f77 42%, #3c2fa0 100%);
    color: #eaf0ff;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.vf-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.45rem;
    margin-bottom: 1.15rem;
    text-decoration: none;
    color: inherit;
}

.vf-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.12);
}

.vf-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vf-brand-name {
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 1.07rem;
}

.vf-brand-sub {
    display: block;
    color: rgba(229, 237, 255, 0.75);
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.vf-nav-group {
    margin-top: 0.9rem;
}

.vf-nav-label {
    margin: 0.2rem 0.45rem 0.55rem;
    font-size: 0.67rem;
    color: rgba(212, 225, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.vf-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(233, 240, 255, 0.86);
    text-decoration: none;
    padding: 0.58rem 0.68rem;
    border-radius: 10px;
    font-weight: 500;
    transition: background-color var(--vf-speed-fast), transform var(--vf-speed-fast), color var(--vf-speed-fast);
}

.vf-nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: translateX(1px);
}

.vf-nav-link.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.vf-nav-link i {
    font-size: 0.94rem;
}

.vf-sidebar-actions {
    margin-top: 1.1rem;
    display: grid;
    gap: 0.45rem;
}

.vf-sidebar-action {
    border: 1px solid rgba(240, 246, 255, 0.35);
    color: #f0f6ff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.52rem 0.68rem;
    font-size: 0.86rem;
    text-align: left;
    text-decoration: none;
    transition: background-color var(--vf-speed-fast);
}

.vf-sidebar-action:hover {
    background: rgba(255, 255, 255, 0.18);
}

.vf-main-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.vf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--vf-border);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.vf-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
}

.vf-mobile-brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #172d74;
    padding: 2px;
}

.vf-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: auto;
}

.vf-top-btn {
    border: 1px solid var(--vf-border);
    background: #fff;
    color: var(--vf-text-1);
    border-radius: 999px;
    font-size: 0.87rem;
    font-weight: 600;
    padding: 0.43rem 0.78rem;
    text-decoration: none;
    transition: transform var(--vf-speed-fast), box-shadow var(--vf-speed-fast);
}

.vf-top-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(26, 47, 119, 0.16);
}

.vf-top-btn-primary {
    color: #ffffff;
    border-color: transparent;
    background: var(--vf-gradient-brand);
}

.vf-content {
    padding: 1.45rem;
}

.vf-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.vf-page-title {
    margin: 0;
    font-size: clamp(1.32rem, 1.3vw + 1rem, 1.76rem);
    font-weight: 730;
    letter-spacing: -0.015em;
}

.vf-page-subtitle {
    margin: 0.25rem 0 0;
    color: var(--vf-text-1);
    font-size: 0.9rem;
}

.vf-hero-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    border-radius: var(--vf-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(125deg, rgba(30, 139, 255, 0.18), rgba(90, 30, 220, 0.14));
    box-shadow: var(--vf-shadow-soft);
}

.vf-hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #173178;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(30, 80, 211, 0.2);
}

.vf-command-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vf-command-action {
    border: 1px solid rgba(19, 56, 158, 0.22);
    background: rgba(255, 255, 255, 0.94);
    color: var(--vf-brand-700);
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 650;
    padding: 0.42rem 0.75rem;
    text-decoration: none;
}

.vf-command-action.is-primary {
    color: #fff;
    border-color: transparent;
    background: var(--vf-gradient-brand);
}

.vf-metric-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.vf-metric-card {
    border-radius: var(--vf-radius-md);
    padding: 1rem;
    border: 1px solid transparent;
    box-shadow: var(--vf-shadow-soft);
    background: var(--vf-surface-strong);
    animation: vf-rise var(--vf-speed-normal) ease both;
}

.vf-metric-eyebrow {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vf-text-1);
    font-weight: 700;
}

.vf-metric-value {
    margin: 0.3rem 0 0;
    font-size: clamp(1.26rem, 1.2vw + 0.9rem, 1.9rem);
    font-weight: 760;
    line-height: 1.1;
}

.vf-metric-meta {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--vf-text-1);
}

.vf-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.6rem;
}

.vf-metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    color: #fff;
}

.vf-tone-primary { border-color: rgba(30, 139, 255, 0.24); }
.vf-tone-primary .vf-metric-icon { background: linear-gradient(140deg, #1e8bff, #2b4fd3); }
.vf-tone-success { border-color: rgba(17, 148, 90, 0.3); }
.vf-tone-success .vf-metric-icon { background: linear-gradient(140deg, #13ae69, #0e7f4d); }
.vf-tone-info { border-color: rgba(14, 140, 174, 0.3); }
.vf-tone-info .vf-metric-icon { background: linear-gradient(140deg, #18b6d5, #0e8cae); }
.vf-tone-danger { border-color: rgba(193, 60, 86, 0.3); }
.vf-tone-danger .vf-metric-icon { background: linear-gradient(140deg, #e95e7a, #b93753); }

.vf-panel {
    border-radius: var(--vf-radius-lg);
    border: 1px solid var(--vf-border);
    background: var(--vf-surface);
    box-shadow: var(--vf-shadow-soft);
    overflow: hidden;
}

.vf-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1rem 0.8rem;
    border-bottom: 1px solid rgba(44, 70, 162, 0.1);
}

.vf-panel-title {
    margin: 0;
    font-size: 1.03rem;
    font-weight: 700;
}

.vf-panel-sub {
    margin: 0.2rem 0 0;
    color: var(--vf-text-1);
    font-size: 0.84rem;
}

.vf-data-table-wrap {
    overflow-x: auto;
}

.vf-data-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.vf-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf2ff;
    color: #2d3b70;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.71rem;
    font-weight: 700;
    border: 0;
    padding: 0.72rem 0.8rem;
    white-space: nowrap;
}

.vf-data-table tbody td {
    border: 0;
    border-top: 1px solid rgba(29, 52, 128, 0.08);
    padding: 0.73rem 0.8rem;
    vertical-align: middle;
    color: #203062;
    font-size: 0.91rem;
}

.vf-data-table tbody tr {
    transition: background-color var(--vf-speed-fast);
}

.vf-data-table tbody tr:hover {
    background: rgba(217, 229, 255, 0.25);
}

.vf-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    border-radius: 999px;
    padding: 0.22rem 0.58rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.vf-pill-success { background: rgba(17, 148, 90, 0.16); color: #0c6940; border: 1px solid rgba(17, 148, 90, 0.23); }
.vf-pill-warning { background: rgba(181, 128, 18, 0.16); color: #83590d; border: 1px solid rgba(181, 128, 18, 0.24); }
.vf-pill-danger { background: rgba(193, 60, 86, 0.16); color: #8e2e44; border: 1px solid rgba(193, 60, 86, 0.24); }
.vf-pill-info { background: rgba(14, 140, 174, 0.16); color: #0e647c; border: 1px solid rgba(14, 140, 174, 0.22); }
.vf-pill-neutral { background: rgba(63, 74, 118, 0.12); color: #3d4a79; border: 1px solid rgba(63, 74, 118, 0.2); }

.vf-in-progress {
    position: relative;
}

.vf-in-progress::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2b4fd3;
    display: inline-block;
    animation: vf-pulse 1.2s infinite ease-in-out;
}

.vf-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.vf-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--vf-border);
    color: #3350ae;
    background: #fff;
    text-decoration: none;
}

.vf-btn-icon:hover {
    background: #f3f6ff;
}

.vf-btn-danger {
    color: #a5354f;
    border-color: rgba(193, 60, 86, 0.3);
}

.vf-form-panel {
    border-radius: var(--vf-radius-md);
    border: 1px solid var(--vf-border);
    background: #fff;
    box-shadow: var(--vf-shadow-soft);
    padding: 0.95rem;
}

.vf-empty {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--vf-text-1);
}

.vf-empty .bi {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.65;
}

.font-monospace {
    font-size: 0.86em;
}

.alert {
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:focus-visible,
a:focus,
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(43, 79, 211, 0.18) !important;
    border-color: rgba(43, 79, 211, 0.45) !important;
}

.btn {
    font-weight: 600;
}

.vf-logout-btn {
    border: 1px solid rgba(45, 66, 146, 0.2);
    background: #fff;
    color: var(--vf-text-1);
    border-radius: 999px;
    font-size: 0.85rem;
    padding: 0.38rem 0.65rem;
}

.vf-mobile-nav {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--vf-border);
    padding: 0.5rem 1rem 0.85rem;
}

.vf-mobile-nav .vf-nav-link {
    color: #1f316b;
    border: 1px solid transparent;
}

.vf-mobile-nav .vf-nav-link:hover,
.vf-mobile-nav .vf-nav-link.is-active {
    border-color: rgba(31, 60, 160, 0.2);
    background: rgba(226, 236, 255, 0.5);
    color: #183178;
}

.login-page-body {
    background: radial-gradient(circle at top right, #dde8ff 0%, #eef3ff 35%, #f8faff 100%);
}

.login-content-panel {
    position: relative;
    border: 1px solid rgba(46, 70, 156, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--vf-shadow-soft);
    padding: 1.35rem 1.15rem;
}

.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.26rem 0.62rem;
    border: 1px solid rgba(43, 79, 211, 0.24);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #1a3f9b;
    background: rgba(221, 233, 255, 0.64);
}

.login-headline {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw, 2.1rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 760;
    color: #101739;
}

.login-copy {
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: #394673;
    max-width: 58ch;
}

.login-feature-grid {
    margin-top: 1rem;
    display: grid;
    gap: 0.65rem;
}

.login-feature-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: start;
    gap: 0.6rem;
    border: 1px solid rgba(46, 70, 156, 0.12);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 12px;
    padding: 0.62rem 0.72rem;
}

.login-feature-item i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--vf-gradient-brand);
}

.login-feature-item h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.login-feature-item p {
    margin: 0.18rem 0 0;
    font-size: 0.84rem;
    color: #49588d;
}

.login-credit {
    margin-top: 0.85rem;
    font-size: 0.87rem;
    color: #465789;
}

.login-credit a {
    font-weight: 700;
    text-decoration: none;
}

.login-credit a:hover {
    text-decoration: underline;
}

.login-card-modern {
    border: 1px solid rgba(46, 70, 156, 0.14);
    border-radius: 16px;
    box-shadow: var(--vf-shadow-strong);
    overflow: hidden;
}

.login-brand-top {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-brand-top img {
    width: min(260px, 76%);
    height: auto;
}

.login-form-title {
    font-size: 1.45rem;
    font-weight: 760;
    letter-spacing: -0.015em;
    color: #1a275a;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
}

@keyframes vf-rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vf-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 1199.98px) {
    .vf-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .vf-app-shell {
        grid-template-columns: 1fr;
    }

    .vf-sidebar {
        display: none;
    }

    .vf-content {
        padding: 1rem;
    }

    .login-content-panel {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .vf-metric-grid {
        grid-template-columns: 1fr;
    }

    .vf-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .vf-topbar-right .vf-top-btn {
        display: none;
    }

    .vf-data-table thead {
        display: none;
    }

    .vf-data-table,
    .vf-data-table tbody,
    .vf-data-table tr,
    .vf-data-table td {
        display: block;
        width: 100%;
    }

    .vf-data-table tbody tr {
        border-top: 1px solid rgba(29, 52, 128, 0.1);
        padding: 0.4rem 0;
    }

    .vf-data-table tbody td {
        border-top: 0;
        padding: 0.34rem 0.9rem;
    }

    .vf-data-table tbody td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.67rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #5b6a9b;
        margin-bottom: 0.17rem;
        font-weight: 700;
    }

    .vf-row-actions {
        justify-content: flex-start;
        padding-top: 0.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
