:root {
    --dpx-bg: #f4f7fb;
    --dpx-card: #ffffff;
    --dpx-primary: #0b1f3a;
    --dpx-accent: #2563eb;
    --dpx-soft: #e8f0ff;
    --dpx-muted: #64748b;
    --dpx-border: #dbe3ef;
}

body {
    background: var(--dpx-bg);
    color: #122033;
}

.app-navbar {
    background: linear-gradient(135deg, #06152b, #0b1f3a 55%, #123c7c);
    box-shadow: 0 10px 30px rgba(10, 20, 40, .18);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
}

.hero-card, .app-card {
    background: var(--dpx-card);
    border: 1px solid var(--dpx-border);
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, .08);
}

.hero-title {
    font-size: clamp(2.1rem, 4vw, 4rem);
    letter-spacing: -0.05em;
    line-height: .98;
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #0f172a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card {
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--dpx-border);
    padding: 1rem;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.vault-item-card {
    border: 1px solid var(--dpx-border);
    background: #fff;
    border-radius: 18px;
    padding: 1rem;
    transition: transform .16s ease, box-shadow .16s ease;
}

.vault-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .10);
}

.type-pill {
    font-size: .75rem;
    border-radius: 999px;
    padding: .2rem .55rem;
    background: var(--dpx-soft);
    color: #174ea6;
}

.secret-field {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: .55rem .7rem;
    word-break: break-all;
}

.lock-panel {
    max-width: 640px;
    margin-inline: auto;
}

.copy-btn {
    white-space: nowrap;
}

.empty-state {
    border: 2px dashed #cbd5e1;
    border-radius: 22px;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--dpx-muted);
    background: rgba(255,255,255,.7);
}

.password-strength-bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.password-strength-bar > span {
    display: block;
    height: 100%;
    width: 0;
    transition: width .2s ease;
    background: #2563eb;
}

.app-footer {
    background: #fff;
}

@media (max-width: 576px) {
    .vault-grid { grid-template-columns: 1fr; }
}

.otp-input {
    letter-spacing: .35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.progress-bar {
    transition: width .2s ease;
}

.font-monospace {
    word-break: break-all;
}

.backup-log {
    min-height: 120px;
    max-height: 260px;
    overflow: auto;
    padding: 1rem;
    border-radius: 0.75rem;
    background: #0f172a;
    color: #dbeafe;
    font-size: 0.875rem;
}

.recovery-code {
    letter-spacing: 0.04em;
    user-select: all;
}

/* v0.3.1 - folders, tags and security health */
.folder-badge,
.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border: 1px solid var(--dpx-border);
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .78rem;
    line-height: 1.2;
}

.tag-badge {
    background: #eef6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.folder-badge:hover,
.tag-badge:hover {
    filter: brightness(.97);
}

.vault-item-card.sensitivity-high {
    border-left: 5px solid #f59e0b;
}

.vault-item-card.sensitivity-critical {
    border-left: 5px solid #dc2626;
}

.health-progress {
    height: 1.25rem;
    border-radius: 999px;
    overflow: hidden;
}

.mini-metric {
    border: 1px solid var(--dpx-border);
    border-radius: 16px;
    padding: .85rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.mini-metric span {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
}

.mini-metric small {
    color: var(--dpx-muted);
}


/* v0.4.0 - operations, preferences and report */
.theme-dark {
    background: #0f172a;
    color: #e5e7eb;
}

.theme-dark .app-card,
.theme-dark .stat-card,
.theme-dark .modal-content,
.theme-dark .app-footer {
    background: #111827;
    color: #e5e7eb;
    border-color: #334155;
}

.theme-dark .text-muted,
.theme-dark .form-text {
    color: #94a3b8 !important;
}

.theme-dark .form-control,
.theme-dark .form-select,
.theme-dark .input-group-text {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #334155;
}

.theme-dark .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e5e7eb;
    --bs-table-border-color: #334155;
}

.vault-item-card.vault-item-compact {
    padding: .9rem;
}

.vault-item-card.vault-item-compact .h5 {
    font-size: 1rem;
    margin-top: .6rem !important;
}

.status-filter.active {
    box-shadow: inset 0 0 0 1px currentColor;
}

@media print {
    .app-navbar,
    .app-footer,
    .btn,
    #reportLock {
        display: none !important;
    }
    main.container-fluid {
        padding: 0 !important;
    }
    .app-card,
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}


/* v0.5.0 - attachments and saved TOTP */
.totp-field {
    border: 1px solid rgba(37, 99, 235, .18);
    background: rgba(37, 99, 235, .04);
    border-radius: 12px;
    padding: .75rem;
}

.totp-code {
    letter-spacing: .08em;
    font-weight: 800;
}

.attachment-row:last-child {
    border-bottom: 0 !important;
}

.theme-dark .totp-field {
    background: rgba(59, 130, 246, .12);
    border-color: #334155;
}

.theme-dark .bg-light-subtle {
    background: #0b1220 !important;
    border-color: #334155 !important;
}


/* v0.8.0 - brand assets and security polish */
.brand-logo-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    padding: 2px;
    box-shadow: 0 8px 18px rgba(2, 6, 23, .18);
}

.brand-logo-horizontal {
    max-width: min(360px, 100%);
    height: auto;
    display: block;
}

.login-logo {
    max-width: 260px;
    height: auto;
}

.security-kpi {
    border-radius: 18px;
    border: 1px solid var(--dpx-border);
    background: #fff;
    padding: 1rem;
}

.theme-dark .security-kpi {
    background: #111827;
    border-color: #334155;
}
