/* Credential Hub Mobile View - 1:1 Bitwarden Parity */
:root {
    --bg-main: #070d18;
    --bg-surface: #0d1624;
    --bg-card: #0e1726;
    --bg-hover: #131f33;
    --border-color: rgba(255, 255, 255, 0.09);
    --border-focus: #38bdf8;
    --primary-blue: #3b82f6;
    --primary-blue-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --purple-primary: #8b5cf6;
    --purple-hover: #7c3aed;
    --danger-red: #ef4444;
    --danger-red-hover: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    user-select: none;
}

/* Full Width Viewport (full width across desktop, naturally responsive on phones) */
.mobile-viewport {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

/* PWA Install Banner / Button */
.pwa-install-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.15));
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    padding: 9px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 999;
}

.pwa-install-banner.hidden {
    display: none !important;
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #f8fafc;
    font-weight: 500;
}

.pwa-banner-left .material-icons {
    color: #a78bfa;
    font-size: 20px;
}

.pwa-install-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: all 0.15s ease;
}

.pwa-install-btn:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    transform: translateY(-1px);
}

.pwa-dismiss-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-dismiss-btn:hover {
    color: #f8fafc;
}

/* ─────────────────────────────────────────────────────────────
   PULL-TO-REFRESH INDICATOR (NATIVE MOBILE PULL & SPIN)
   ───────────────────────────────────────────────────────────── */
html, body {
    overscroll-behavior-y: contain;
}

.tab-view {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.tab-view.ptr-pulling {
    transition: none !important;
}

.ptr-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
    transform: translateY(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}

.ptr-indicator.pulling {
    transition: none !important;
    opacity: 1;
}

.ptr-indicator.ready {
    color: #38bdf8;
}

.ptr-indicator.refreshing {
    transform: translateY(0px) !important;
    opacity: 1 !important;
    transition: transform 0.25s ease !important;
    color: #38bdf8;
}

.ptr-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0d1624;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.ptr-indicator.ready .ptr-icon-wrap {
    background: #0f1d38;
    border-color: #38bdf8;
    color: #38bdf8;
}

.ptr-icon {
    font-size: 18px;
    transition: transform 0.1s ease;
}

.ptr-indicator.ready .ptr-icon {
    transform: rotate(180deg);
}

.ptr-indicator.refreshing .ptr-icon {
    animation: ptrSpin 0.75s linear infinite;
}

@keyframes ptrSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   AUTH OVERLAY (BITWARDEN 1:1 LOGIN FLOW)
   ───────────────────────────────────────────────────────────── */
.aquax-auth-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-main);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    animation: fadeIn 0.2s ease-out;
}

.aquax-auth-overlay.hidden {
    display: none !important;
}

.bw-auth-topbar {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-main);
}

.bw-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bw-auth-brand .bw-shield-icon {
    font-size: 24px;
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.15);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.25);
}

.bw-auth-brand .bw-brand-text {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.bw-auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 40px;
}

.bw-auth-card {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    animation: bwCardFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bwCardFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bw-auth-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.bw-vault-safe-icon {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #4c1d95, #1e1b4b);
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bw-vault-safe-icon span {
    font-size: 32px;
    color: #a78bfa;
}

.bw-waving-hand-icon {
    width: 62px;
    height: 62px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    animation: bwWavingHand 2s infinite ease-in-out;
}

@keyframes bwWavingHand {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(14deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(14deg); }
    80% { transform: rotate(-4deg); }
}

.bw-auth-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
    margin: 0 0 18px 0;
    letter-spacing: -0.4px;
}

.bw-auth-subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    margin-top: -10px;
    margin-bottom: 20px;
    word-break: break-all;
}

.bw-auth-form {
    display: flex;
    flex-direction: column;
}

.bw-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.bw-input-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: #cbd5e1;
}

.bw-input-group label .req {
    color: #ef4444;
}

.bw-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bw-input-wrapper .bw-input {
    width: 100%;
    padding: 11px 40px 11px 40px;
    background: #070d14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.bw-input-wrapper .bw-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
    background: #0d0a18;
}

.bw-input-icon {
    position: absolute;
    left: 12px;
    color: #64748b;
    font-size: 18px;
    pointer-events: none;
}

.bw-password-eye {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.bw-password-eye:hover {
    color: #cbd5e1;
}

.bw-password-eye .material-icons {
    font-size: 18px;
}

.bw-checkbox-group {
    margin-bottom: 18px;
}

.bw-checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #cbd5e1;
    user-select: none;
}

.bw-checkbox-container input {
    accent-color: #8b5cf6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.bw-hint-row {
    margin-top: -8px;
    margin-bottom: 18px;
    text-align: right;
}

.bw-hint-row a {
    color: #a78bfa;
    font-size: 12.5px;
    text-decoration: none;
}

.bw-hint-row a:hover {
    text-decoration: underline;
}

.bw-auth-error-msg {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 12.5px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

.bw-auth-success-msg {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-size: 12.5px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

.bw-btn-primary {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: 1px solid #8b5cf6;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.bw-btn-primary:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.bw-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #475569;
    font-size: 12px;
}

.bw-divider::before,
.bw-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bw-divider span {
    padding: 0 12px;
}

.bw-secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bw-secondary-actions .bw-btn-secondary {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.bw-secondary-actions .bw-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.bw-secondary-actions .bw-btn-secondary .material-icons {
    font-size: 16px;
    color: #60a5fa;
}

.bw-auth-footer-link {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.bw-auth-footer-link a,
.bw-create-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.bw-auth-footer-link a:hover,
.bw-create-link:hover {
    text-decoration: underline;
}

.bw-auth-page-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bw-auth-page-footer .highlight {
    color: #60a5fa;
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────
   MAIN VAULT VIEW & SUBVIEWS (1:1 POPUP OVERLAY MATCH)
   ───────────────────────────────────────────────────────────── */
.tab-view {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-main);
}

.tab-view.active {
    display: flex;
}

/* HEADER */
.header {
    padding: 14px 16px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-main);
    flex-shrink: 0;
}

.header-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-new {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-new:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-header-icon {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.btn-header-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
    overflow: hidden;
    user-select: none;
    flex-shrink: 0;
    position: relative;
}

.avatar-circle:hover {
    transform: scale(1.06);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    pointer-events: none;
}

/* SEARCH & FILTER CONTROLS */
.controls-row {
    padding: 0 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    flex: 1;
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.search-box:focus-within {
    border-color: #38bdf8;
    background: #101c2e;
}

.search-box .material-icons {
    font-size: 18px;
    color: #94a3b8;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 13.5px;
    font-family: inherit;
}

.search-input::placeholder {
    color: #64748b;
}

.btn-tune {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-tune:hover, .btn-tune.active {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    background: #101c2e;
}

.filter-selectors {
    display: flex;
    gap: 6px;
}

.filter-pill-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.filter-pill {
    width: 100%;
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    background: #101c2e;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.filter-pill .label-left {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
}

.filter-pill .label-left span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-pill .material-icons {
    font-size: 15px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* FILTER DROPDOWN MENUS */
.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 220px;
    max-width: 260px;
    max-height: 270px;
    overflow-y: auto;
    background: #080f1e;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 250;
}

.filter-dropdown-menu.show {
    display: flex;
}

.filter-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}
.filter-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.filter-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.filter-dropdown-item:hover {
    background: #131e33;
}

.filter-dropdown-item.selected {
    background: #17243c;
    border-color: #3b82f6;
}

.filter-dropdown-item .material-icons {
    font-size: 17px;
    color: #94a3b8;
}

.filter-dropdown-item.selected .material-icons {
    color: #38bdf8;
}

.filter-dropdown-item .folder-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.filter-dropdown-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 6px 10px 2px 10px;
}

.filter-dropdown-subitem {
    padding-left: 20px !important;
    font-size: 12px !important;
    color: #94a3b8;
}

/* SCROLLABLE CONTENT BODY */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 80px;
}

.content-body::-webkit-scrollbar {
    width: 5px;
}
.content-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 8px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #f8fafc;
}

.section-info-icon {
    font-size: 15px;
    color: #38bdf8;
    cursor: help;
}

.section-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

/* CARDS LIST */
.vault-item-card {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.vault-item-card:hover {
    background: #101c2e;
    border-color: rgba(255, 255, 255, 0.15);
}

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
}

.item-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #131f33;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-icon-box .material-icons {
    font-size: 20px;
    color: #94a3b8;
}

.item-meta {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-sub {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.item-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.item-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.item-action-btn .material-icons {
    font-size: 18px;
}

/* CARD CONTEXT MENU (1:1 BITWARDEN) */
.card-context-menu {
    position: fixed;
    z-index: 99999;
    background: #111a2e;
    border: 1px solid #1e293b;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 4px 10px rgba(0, 0, 0, 0.4);
    width: 185px;
    padding: 6px 0;
    display: none;
    flex-direction: column;
    user-select: none;
    animation: menuFadeIn 0.12s ease-out;
}

.card-context-menu.show {
    display: flex;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.card-context-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: #f8fafc;
    cursor: pointer;
    margin: 2px 5px;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
}

.card-context-item:hover, .card-context-item.active {
    background: #1e2d4a;
    color: #ffffff;
    outline: 1.5px solid #3b82f6;
}

.card-context-item.danger {
    color: #f87171;
}

.card-context-item.danger:hover {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    outline: none;
}

.card-upgrade-badge {
    background: rgba(6, 182, 212, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* BOTTOM NAVBAR */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #080f1c;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 100;
}

.nav-tab {
    flex: 1;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.15s ease;
}

.nav-tab:hover {
    color: #cbd5e1;
}

.nav-tab.active {
    color: #38bdf8;
}

.nav-tab .material-icons {
    font-size: 20px;
}

.nav-tab .nav-text {
    font-size: 11px;
    font-weight: 600;
}

/* TOAST NOTIFICATION */
.toast-notify {
    position: fixed;
    bottom: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #f8fafc;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 999999;
}

.toast-notify.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────────────────────
   VIEW LOGIN / DETAILS (1:1 BITWARDEN)
   ───────────────────────────────────────────────────────────── */
.detail-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 2px;
}

.detail-field-row {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.detail-field-value {
    font-size: 13.5px;
    color: #f8fafc;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.detail-password-mask {
    font-family: monospace;
    letter-spacing: 2px;
}

.detail-link {
    color: #38bdf8;
    text-decoration: none;
}

.detail-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.detail-action-btn .material-icons {
    font-size: 18px;
}

.edit-fav-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.edit-fav-btn.active { color: #fbbf24; }
.edit-fav-btn:hover { color: #fbbf24; }

/* ─────────────────────────────────────────────────────────────
   EDIT LOGIN VIEW (1:1 BITWARDEN)
   ───────────────────────────────────────────────────────────── */
.edit-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 14px 0 6px 2px;
}

.edit-card {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.edit-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.edit-label {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
}

.edit-label .req {
    color: #ef4444;
}

.edit-input-wrap {
    display: flex;
    align-items: center;
    background: #080f1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.edit-input-wrap:focus-within {
    border-color: #38bdf8;
}

.edit-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 9px 12px;
    color: #f8fafc;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
}

.edit-input.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.edit-input-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.edit-input-btn:hover {
    color: #ffffff;
}

.edit-input-btn .material-icons {
    font-size: 18px;
}

.edit-select {
    width: 100%;
    background: transparent;
    border: none;
    padding: 9px 12px;
    color: #f8fafc;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.edit-hint {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}

.edit-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #cbd5e1;
    cursor: pointer;
}

.edit-checkbox-row input {
    accent-color: #3b82f6;
}

.edit-add-link {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    transition: color 0.15s;
}

.edit-add-link:hover {
    color: #60a5fa;
}

.edit-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: #080f1c;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.edit-btn-save {
    flex: 2;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.edit-btn-save:hover {
    background: #2563eb;
}

.edit-btn-cancel {
    flex: 1;
    background: #1e293b;
    color: #cbd5e1;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.edit-btn-cancel:hover {
    background: #334155;
    color: #ffffff;
}

.edit-btn-delete {
    background: #1e293b;
    color: #f87171;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.edit-btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ─────────────────────────────────────────────────────────────
   GENERATOR VIEW (1:1 BITWARDEN)
   ───────────────────────────────────────────────────────────── */
.gen-segment-bar {
    display: flex;
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 12px;
}

.gen-segment-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.gen-segment-btn.active {
    background: #1e293b;
    color: #ffffff;
}

.gen-display-box {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gen-pass-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #38bdf8;
    word-break: break-all;
    flex: 1;
    padding-right: 12px;
    line-height: 1.4;
}

.gen-pass-text .digit {
    color: #60a5fa;
}

.gen-pass-text .separator {
    color: #f87171;
    font-weight: 700;
}

.gen-pass-text .special {
    color: #f87171;
}

.gen-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gen-action-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.gen-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.2px;
}

.gen-card {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 2px;
    display: block;
}

.form-input-dark {
    width: 100%;
    background: #080f1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    color: #f8fafc;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.form-input-dark:focus {
    border-color: #38bdf8;
}

.form-select-dark {
    width: 100%;
    background: #080f1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
    color: #f8fafc;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.form-helper-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.4;
}

.gen-include-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    margin-bottom: 4px;
}

.form-checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #cbd5e1;
    cursor: pointer;
}

.form-checkbox-row input {
    accent-color: #3b82f6;
}

.gen-min-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   SETTINGS VIEW
   ───────────────────────────────────────────────────────────── */
.settings-card {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
    user-select: none;
}

.settings-card:hover {
    background: #111d2e;
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

.settings-card:active {
    transform: scale(0.99);
    background: #16253b;
}

.settings-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: #f8fafc;
}

.settings-card-left .material-icons {
    font-size: 19px;
    color: #cbd5e1;
}

.settings-card .chevron {
    font-size: 18px;
    color: #64748b;
}

/* ─────────────────────────────────────────────────────────────
   BACKUP SETTINGS (1:1 WITH BETTERBASE)
   ───────────────────────────────────────────────────────────── */
.backup-settings-section {
    margin-top: 24px;
    margin-bottom: 24px;
}
.backup-settings-card {
    border: 1px solid rgba(249, 115, 22, 0.28);
    background: rgba(249, 115, 22, 0.04);
    border-radius: 10px;
    padding: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.backup-settings-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
}
.backup-card-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.backup-icon-wrapper {
    width: 38px;
    height: 38px;
    background: rgba(249, 115, 22, 0.14);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    flex-shrink: 0;
    margin-top: 2px;
}
.backup-content {
    flex: 1;
    min-width: 0;
}
.backup-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 4px;
}
.backup-description {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 12px;
}
.backup-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-backup-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-family: inherit;
}
.btn-backup-action:hover {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.4);
    color: #fff;
}
.btn-backup-action:active {
    transform: scale(0.97);
}

/* ─────────────────────────────────────────────────────────────
   SUBSCRIPTION VIEW (1:1 BITWARDEN PARITY)
   ───────────────────────────────────────────────────────────── */
.sub-nav-tabs {
    display: flex;
    gap: 22px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #070d18;
    position: sticky;
    top: 0;
    z-index: 5;
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sub-nav-tabs::-webkit-scrollbar {
    display: none;
}
.sub-nav-tab {
    padding: 10px 2px 11px;
    font-size: 13.5px;
    font-weight: 500;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}
.sub-nav-tab:hover {
    color: #cbd5e1;
}
.sub-nav-tab.active {
    color: #38bdf8;
    font-weight: 600;
    border-bottom: 2px solid #38bdf8;
}
.sub-content-panel {
    display: none;
}
.sub-content-panel.active {
    display: block;
}
.sub-pricing-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.btn-sub-upgrade-primary {
    width: 100%;
    border-radius: 8px;
    padding: 11px 16px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    margin-bottom: 18px;
    transition: background 0.15s ease;
    font-family: inherit;
}
.btn-sub-upgrade-primary:hover {
    background: #1d4ed8;
}
.btn-sub-upgrade-secondary {
    width: 100%;
    border-radius: 8px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    margin-bottom: 18px;
    transition: background 0.15s ease;
    font-family: inherit;
}
.btn-sub-upgrade-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.sub-feature-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 13px;
    color: #cbd5e1;
}
.sub-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}
.sub-check {
    color: #38bdf8;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}
.btn-sub-pill {
    border-radius: 20px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}
.btn-sub-pill:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ─────────────────────────────────────────────────────────────
   SEND VIEW
   ───────────────────────────────────────────────────────────── */
.send-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
}

.send-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 14px;
    margin-bottom: 6px;
}

.send-subtitle {
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.5;
    max-width: 320px;
    margin-bottom: 20px;
}

.btn-send-main {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-send-main:hover {
    background: #2563eb;
}

/* EMPTY STATE GENERIC */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}

.empty-state .material-icons {
    font-size: 40px;
    color: #475569;
    margin-bottom: 8px;
}

.empty-state-title {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.empty-state-desc {
    font-size: 12px;
    color: #64748b;
}

/* ─────────────────────────────────────────────────────────────
   CREDENTIAL MANAGER (MOBILE VIEW LAYOUT)
   ───────────────────────────────────────────────────────────── */
.cm-chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cm-chips-scroll::-webkit-scrollbar {
    display: none;
}

.cm-chip-btn {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.cm-chip-btn:hover {
    background: #17243c;
    color: #f8fafc;
    border-color: rgba(56, 189, 248, 0.3);
}

.cm-chip-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: #38bdf8;
    font-weight: 600;
}

.cm-site-card {
    background: #0d1624;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 13px 14px;
    margin-bottom: 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.cm-site-card:hover {
    background: #101c2e;
    border-color: rgba(255, 255, 255, 0.15);
}

.cm-site-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}

.cm-site-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.cm-site-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #38bdf8;
}

.cm-site-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-site-category-tag {
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
}

.cm-site-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cm-site-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.cm-action-link-btn {
    margin-left: auto;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.cm-action-link-btn:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
}

.cm-matching-login-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 3px 8px;
    border-radius: 6px;
}

.cm-btn-mini {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.cm-btn-mini:hover {
    color: #f8fafc;
}

.cm-relative-site-row {
    transition: all 0.15s ease;
}

.cm-relative-site-row:hover {
    background: rgba(56, 189, 248, 0.08) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    transform: translateY(-1px);
}

.cm-relative-site-row:active {
    transform: translateY(0);
}


/* ─────────────────────────────────────────────────────────────
   AUTHENTICATOR (TOTP) VIEW
   ───────────────────────────────────────────────────────────── */

.auth-timer-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: #060c18;
}

.auth-timer-ring-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.auth-timer-ring {
    width: 38px;
    height: 38px;
    transform: rotate(-90deg);
}

.auth-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 3;
}

.auth-ring-progress {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.4s;
}

.auth-ring-progress.danger { stroke: #f87171; }

.auth-timer-seconds {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1;
}

.auth-timer-label {
    font-size: 12px;
    color: #64748b;
}

.auth-search-row {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #060c18;
}

.totp-card {
    display: flex;
    align-items: center;
    background: #0d1624;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 14px 16px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    gap: 14px;
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
}

.totp-card:active {
    background: rgba(56,189,248,0.06);
    border-color: rgba(56,189,248,0.25);
}

.totp-card-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 0 2px 0 0;
    transition: width 1s linear;
}

.totp-card-progress.danger {
    background: linear-gradient(90deg, #f87171, #fb923c);
}

.totp-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.totp-info {
    flex: 1;
    min-width: 0;
}

.totp-account-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.totp-issuer {
    font-size: 11.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.totp-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #38bdf8;
    line-height: 1;
    transition: color 0.3s;
    user-select: all;
}

.totp-code.danger { color: #f87171; }
.totp-code.copied { color: #22c55e; }

.totp-copy-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.totp-copy-btn:hover { background: rgba(255,255,255,0.06); color: #f8fafc; }
.totp-copy-btn.copied { color: #22c55e; }

.auth-empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 32px;
    width: 100%;
}

.auth-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 8px;
}

.auth-empty-sub {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 20px;
}

.auth-empty-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-empty-btn:hover { background: #2563eb; }

/* ─────────────────────────────────────────────────────────────
   QR SCANNER MODAL
   ───────────────────────────────────────────────────────────── */

.qr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: qrOverlayIn 0.2s ease;
}

@keyframes qrOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.qr-modal {
    background: #0d1624;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: qrSheetIn 0.25s cubic-bezier(0.32,0.72,0,1);
}

@keyframes qrSheetIn {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.qr-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.qr-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

.qr-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qr-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 32px 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 150px;
}

.qr-drop-zone.drag-over {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.06);
}

.qr-drop-text {
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    text-align: center;
}

.qr-drop-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.qr-canvas {
    width: 100%;
    max-height: 180px;
    border-radius: 10px;
    background: #060c18;
}

.qr-result-section {
    background: rgba(56,189,248,0.07);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qr-result-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.qr-result-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #38bdf8;
    word-break: break-all;
}

.qr-result-issuer {
    font-size: 12px;
    color: #94a3b8;
}

.qr-apply-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    align-self: flex-start;
    transition: background 0.2s;
}

.qr-apply-btn:hover { background: #2563eb; }

.qr-error-msg {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.25);
    color: #f87171;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
}

.qr-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.qr-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e1;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.qr-footer-btn:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.18);
}
