/* ============================================================
   ADSBG Password Manager

   Design language: precision instrument.
   A vault should feel machined, not decorated. Deep navy carried
   from the brand mark, a single mint accent that only ever marks
   what matters, and monospace wherever the user reads a secret
   character by character.
   ============================================================ */

:root {
    /* Ground - taken from the logo tile gradient */
    --bg-void:      #060b16;
    --bg-primary:   #0a1122;
    --bg-secondary: #101c33;
    --bg-card:      #0e1830;
    --bg-raised:    #16233f;

    /* One accent. Mint, from the peak in the mark. */
    --accent:       #1fbf92;
    --accent-bright:#7de8c8;
    --accent-hover: #26d3a3;
    --accent-dim:   rgba(31, 191, 146, 0.14);
    --accent-line:  rgba(31, 191, 146, 0.32);

    --border:       rgba(255, 255, 255, 0.09);
    --border-strong:rgba(255, 255, 255, 0.16);

    --text-primary: #e8edf5;
    --text-second:  #a8b6cc;
    --text-muted:   #6b7c96;

    --success:      #34d399;
    --danger:       #f4726a;
    --warning:      #f5a623;

    --radius:       10px;
    --radius-lg:    16px;

    --shadow-md:    0 8px 24px -8px rgba(0,0,0,0.6);
    --shadow-lg:    0 24px 64px -16px rgba(0,0,0,0.75);

    --font-ui:      'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

    --ease:         cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
    font-family: var(--font-ui);
    background: var(--bg-void);
    color: var(--text-primary);
    height: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Atmosphere: two soft light sources echoing the logo glows, so the
   large dark areas have depth instead of reading as flat black. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(70rem 50rem at 88% -8%, rgba(31,191,146,0.13), transparent 60%),
        radial-gradient(60rem 45rem at -10% 95%, rgba(45,90,160,0.16), transparent 62%),
        linear-gradient(170deg, var(--bg-primary) 0%, var(--bg-void) 100%);
}
#app { position: relative; z-index: 1; height: 100%; }

::selection { background: var(--accent-dim); color: var(--accent-bright); }

/* Scrollbars, so they stop looking like a different application */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }

/* ===== AUTH ============================================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    position: relative;
    background: linear-gradient(160deg, rgba(22,35,63,0.82), rgba(14,24,48,0.92));
    backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 424px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow-lg);
    animation: card-in 0.7s var(--ease) both;
}
/* A hairline of accent along the top edge - the one bright line on the page */
.auth-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, transparent, var(--accent-line) 30%, var(--accent-bright) 50%, var(--accent-line) 70%, transparent);
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

/* Staggered reveal: the card settles, then its contents arrive in order */
.auth-card > * { animation: rise 0.55s var(--ease) both; }
.auth-card > *:nth-child(1) { animation-delay: 0.10s; }
.auth-card > *:nth-child(2) { animation-delay: 0.16s; }
.auth-card > *:nth-child(3) { animation-delay: 0.21s; }
.auth-card > *:nth-child(4) { animation-delay: 0.26s; }
.auth-card > *:nth-child(5) { animation-delay: 0.30s; }
.auth-card > *:nth-child(6) { animation-delay: 0.34s; }
.auth-card > *:nth-child(7) { animation-delay: 0.37s; }
.auth-card > *:nth-child(8) { animation-delay: 0.40s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.auth-logo { display: flex; justify-content: center; margin-bottom: 2px; }
.auth-logo img {
    display: block;
    border-radius: 18px;
    box-shadow: 0 12px 32px -12px rgba(31,191,146,0.5);
}

.auth-title {
    font-size: 21px;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
}
.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.55;
    margin-top: -8px;
}
.auth-footer {
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-footer p { font-size: 13px; color: var(--text-second); }
.auth-footer a { color: var(--accent-bright); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ===== VAULT LAYOUT ====================================== */
.vault-layout { display: grid; grid-template-columns: 236px 1fr auto; height: 100vh; overflow: hidden; }

.sidebar {
    background: rgba(14,24,48,0.72);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 0 12px;
    overflow-y: auto;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 11px;
    padding: 0 18px 18px;
    font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.sidebar-mark { border-radius: 7px; flex-shrink: 0; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }

.nav-item {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px;
    border-radius: var(--radius);
    font-size: 13.5px; font-family: var(--font-ui);
    color: var(--text-second);
    cursor: pointer; border: none; background: none;
    width: 100%; text-align: left;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
a.nav-item { text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,0.045); color: var(--text-primary); }
.nav-item.active { background: var(--accent-dim); color: var(--accent-bright); }
/* Active marker, drawn rather than coloured - reads as a machined notch */
.nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 50%;
    width: 2px; height: 18px;
    background: var(--accent-bright);
    border-radius: 0 2px 2px 0;
    transform: translateY(-50%);
}
.nav-icon { font-size: 15px; opacity: 0.9; }
.nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.07);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10.5px; padding: 2px 7px; border-radius: 20px;
}

.vault-main { display: flex; flex-direction: column; overflow: hidden; }

.topbar {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,17,34,0.5);
    backdrop-filter: blur(12px);
}
.search-wrap {
    flex: 1; display: flex; align-items: center; gap: 9px;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 14px;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.search-wrap:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-icon { opacity: 0.55; font-size: 13px; }
.search-input { flex: 1; background: none; border: none; outline: none; color: var(--text-primary); font-size: 13.5px; font-family: var(--font-ui); }
.search-input::placeholder { color: var(--text-muted); }

.status-bar { padding: 8px 20px; font-size: 12.5px; font-weight: 500; }
.status-bar.success { background: rgba(52,211,153,0.12); color: var(--success); border-bottom: 1px solid rgba(52,211,153,0.24); }
.status-bar.error   { background: rgba(244,114,106,0.12); color: var(--danger);  border-bottom: 1px solid rgba(244,114,106,0.24); }

/* ===== ITEM LIST ========================================= */
.item-list { flex: 1; overflow-y: auto; padding: 10px; }
.item-card {
    display: flex; align-items: center; gap: 13px;
    padding: 11px 13px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    margin-bottom: 3px;
    transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.item-card:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.item-card.selected { background: var(--accent-dim); border-color: var(--accent-line); }
.item-icon {
    font-size: 19px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, var(--bg-raised), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: 11px;
    flex-shrink: 0;
}
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.item-actions { display: flex; align-items: center; gap: 5px; opacity: 0; transition: opacity 0.16s var(--ease); }
.item-card:hover .item-actions, .item-card.selected .item-actions { opacity: 1; }
.fav-star { color: var(--warning); font-size: 13px; }

/* ===== DETAIL PANEL ====================================== */
.detail-panel {
    width: 348px;
    border-left: 1px solid var(--border);
    background: rgba(14,24,48,0.72);
    backdrop-filter: blur(16px);
    display: flex; flex-direction: column; overflow-y: auto;
    animation: slide-in 0.32s var(--ease) both;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.detail-header { display: flex; align-items: center; gap: 13px; padding: 20px; border-bottom: 1px solid var(--border); }
.detail-icon { font-size: 26px; }
.detail-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.detail-type { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 500; margin-top: 2px; }
.close-btn { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.16s; }
.close-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.detail-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.detail-field label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 500; margin-bottom: 7px; }
.field-value {
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 13.5px;
}
.field-value span { flex: 1; word-break: break-all; }
.field-value.notes { align-items: flex-start; white-space: pre-wrap; line-height: 1.6; }
/* Secrets are read character by character - monospace is not decoration here */
.monospace { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }
.uri-link { color: var(--accent-bright); text-decoration: none; font-size: 13px; word-break: break-all; }
.uri-link:hover { text-decoration: underline; }
.detail-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

/* ===== MODAL ============================================= */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(4,8,16,0.72);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; padding: 20px;
    animation: fade 0.2s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: linear-gradient(160deg, rgba(22,35,63,0.96), rgba(14,24,48,0.99));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 460px;
    max-height: 88vh; display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: card-in 0.34s var(--ease) both;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.modal-body { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== FORMS ============================================= */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 12px; color: var(--text-second); font-weight: 500; letter-spacing: 0.01em; }
.form-control {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 14px; font-family: var(--font-ui);
    outline: none; width: 100%;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); background: rgba(0,0,0,0.4); }
input[type="password"].form-control { font-family: var(--font-mono); letter-spacing: 0.08em; }
/* Only the typed secret is monospaced - a spaced-out placeholder just looks broken */
input[type="password"].form-control::placeholder { font-family: var(--font-ui); letter-spacing: normal; }
.code-input::placeholder { letter-spacing: 0.2em; opacity: 0.4; }
textarea.form-control { resize: vertical; min-height: 84px; line-height: 1.6; }

.input-with-toggle { position: relative; display: flex; align-items: center; }
.input-with-toggle .form-control { flex: 1; padding-right: 44px; }
.toggle-btn {
    position: absolute; right: 6px;
    background: none; border: none; cursor: pointer;
    padding: 6px 8px; font-size: 15px; color: var(--text-muted);
    border-radius: 6px; transition: all 0.16s;
}
.toggle-btn:hover { background: rgba(255,255,255,0.06); }

/* Password strength - a gauge, not a rainbow */
.password-strength { display: flex; align-items: center; gap: 11px; margin-top: 2px; }
.strength-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 3px; transition: width 0.4s var(--ease), background 0.3s; }
.strength-fill.weak   { background: var(--danger); }
.strength-fill.fair   { background: var(--warning); }
.strength-fill.good   { background: #8fd694; }
.strength-fill.strong { background: linear-gradient(90deg, var(--accent), var(--accent-bright)); }
.strength-label { font-size: 11px; font-weight: 600; min-width: 46px; text-transform: uppercase; letter-spacing: 0.07em; }
.strength-label.weak   { color: var(--danger); }
.strength-label.fair   { color: var(--warning); }
.strength-label.good   { color: #8fd694; }
.strength-label.strong { color: var(--accent-bright); }

.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-second); cursor: pointer; }
.checkbox-row input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

/* ===== BUTTONS =========================================== */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, var(--accent), #17a67d);
    color: #04150f;
    border: none; border-radius: 9px;
    padding: 11px 20px;
    font-size: 13.5px; font-weight: 600; font-family: var(--font-ui);
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 6px 18px -8px rgba(31,191,146,0.7);
    transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), filter 0.16s;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(31,191,146,0.8); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-primary.btn-sm { padding: 8px 15px; font-size: 12.5px; }

.btn-outline {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    border-radius: 9px; padding: 9px 16px;
    font-size: 13px; font-family: var(--font-ui); font-weight: 500;
    cursor: pointer; transition: all 0.16s var(--ease);
}
.btn-outline:hover { border-color: var(--accent-line); color: var(--accent-bright); background: var(--accent-dim); }
.btn-outline.btn-sm { padding: 7px 13px; font-size: 12px; }

.btn-danger-outline {
    background: none; border: 1px solid rgba(244,114,106,0.32);
    color: var(--danger); border-radius: 9px; padding: 9px 16px;
    font-size: 13px; font-family: var(--font-ui); cursor: pointer;
    transition: all 0.16s var(--ease);
}
.btn-danger-outline:hover { background: rgba(244,114,106,0.12); border-color: var(--danger); }

.icon-btn {
    background: none; border: none; cursor: pointer;
    padding: 5px 7px; border-radius: 7px;
    font-size: 14px; color: var(--text-muted);
    transition: all 0.16s var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--accent-bright); }

/* ===== ALERTS ============================================ */
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13px; line-height: 1.55; }
.alert-danger  { background: rgba(244,114,106,0.11); color: #ffb0aa; border: 1px solid rgba(244,114,106,0.28); }
.alert-warning { background: rgba(245,166,35,0.10); color: #ffd08a; border: 1px solid rgba(245,166,35,0.26); }

/* ===== STATES ============================================ */
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-muted); padding: 60px 20px; text-align: center; font-size: 13.5px; }
.loading-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--text-muted); font-size: 13px; }
.redirect-msg { color: var(--text-muted); text-align: center; padding: 40px; }

.spinner { width: 15px; height: 15px; border: 2px solid rgba(0,0,0,0.25); border-top-color: currentColor; border-radius: 50%; animation: spin 0.65s linear infinite; display: inline-block; }
.spinner-lg { width: 38px; height: 38px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.text-muted  { color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.text-danger { color: var(--danger); font-size: 12px; }
.text-body   { color: var(--text-second); font-size: 13.5px; line-height: 1.65; margin-bottom: 13px; }

/* ===== SECURITY / 2FA ==================================== */
.settings-container { min-height: 100vh; display: flex; justify-content: center; padding: 44px 20px; overflow-y: auto; }
.settings-card {
    width: 100%; max-width: 640px; height: fit-content;
    background: linear-gradient(160deg, rgba(22,35,63,0.8), rgba(14,24,48,0.92));
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 34px;
    box-shadow: var(--shadow-lg);
    animation: card-in 0.6s var(--ease) both;
}
.settings-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.settings-header h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }

.step { display: flex; gap: 17px; padding: 24px 0; border-top: 1px solid var(--border); }
.step:first-of-type { border-top: none; padding-top: 8px; }
.step-number {
    flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%;
    background: var(--accent-dim); color: var(--accent-bright);
    border: 1px solid var(--accent-line);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; font-family: var(--font-mono);
}
.step-body { flex: 1; min-width: 0; }
.step-body h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }

.qr-holder { display: inline-block; padding: 13px; background: #fff; border-radius: 12px; margin-bottom: 14px; box-shadow: var(--shadow-md); }
.secret-box { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.32); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; margin-bottom: 6px; }
.secret-box code { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.06em; word-break: break-all; color: var(--accent-bright); }

.recovery-codes {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 9px;
    background: rgba(0,0,0,0.32); border: 1px solid var(--border);
    border-radius: 11px; padding: 15px; margin-bottom: 13px;
}
.recovery-codes code { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--text-primary); }
.recovery-actions { display: flex; gap: 9px; margin-bottom: 15px; }

.code-input {
    font-family: var(--font-mono); font-size: 21px; letter-spacing: 0.42em;
    text-align: center; max-width: 210px; margin-bottom: 14px; padding-left: 20px;
}

.success-state { text-align: center; padding: 26px 0; }
.success-icon {
    width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%;
    background: var(--accent-dim); color: var(--accent-bright);
    border: 1px solid var(--accent-line);
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    box-shadow: 0 0 32px -6px rgba(31,191,146,0.45);
}
.success-state h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }

/* ===== RESPONSIVE ======================================== */
@media (max-width: 900px) {
    .vault-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .sidebar { flex-direction: row; align-items: center; border-right: none; border-bottom: 1px solid var(--border); padding: 10px 12px; overflow-x: auto; overflow-y: hidden; }
    .sidebar-logo { border-bottom: none; margin: 0 12px 0 0; padding: 0; white-space: nowrap; }
    .sidebar-nav { flex-direction: row; padding: 0; gap: 4px; }
    .sidebar-footer { border-top: none; flex-direction: row; padding: 0 0 0 8px; margin-left: auto; }
    .nav-item { white-space: nowrap; padding: 8px 11px; }
    .nav-item.active::before { display: none; }
    .nav-badge { display: none; }
    .detail-panel { position: fixed; inset: 0; width: 100%; z-index: 60; }
}
@media (max-width: 520px) {
    .auth-card { padding: 30px 22px 24px; border-radius: 16px; }
    .settings-card { padding: 24px 18px; }
    .step { gap: 12px; }
    .recovery-codes { grid-template-columns: repeat(2, 1fr); }
    .code-input { font-size: 18px; letter-spacing: 0.3em; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
