/**
 * Zip80 PWA Styles
 * Mobile-first CSS with dark theme base
 * 
 * WHY: Optimized for mobile touch interaction and consistent with Zip80 desktop aesthetic
 */

/* ===== CSS Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== CSS Variables ===== */
:root {
    /* Colors - Zip80 Dark Theme */
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2d2d2d;
    --bg-card: #1e1e1e;

    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --accent-primary: #d4a853;
    --accent-secondary: #b8922e;
    --accent-success: #4ade80;
    --accent-danger: #f87171;

    --border-color: #333333;
    --border-radius: 12px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;

    /* Safe areas for notched phones */
    --safe-area-top: env(safe-area-inset-top, 0);
    --safe-area-bottom: env(safe-area-inset-bottom, 0);
}

/* ===== Base Styles ===== */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
}

/* ===== App Header ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--safe-area-top);
    z-index: 100;
}

.app-header h1 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
}

/* WHY: Small version tag lets user confirm they're on the latest PWA build */
.version-badge {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    vertical-align: super;
    letter-spacing: 0;
}

/* WHY: Connectivity dot shows green/red based on API reachability.
   Uses navigator.onLine baseline + actual Drive/Gemini call results. */
.connectivity-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    transition: background-color 0.3s ease;
}

.connectivity-dot.online {
    background-color: var(--accent-success);
    box-shadow: 0 0 4px var(--accent-success);
}

.connectivity-dot.offline {
    background-color: var(--accent-danger);
    box-shadow: 0 0 4px var(--accent-danger);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--accent-secondary);
}

/* WHY: Large touch-friendly biometric button — prominent enough that users notice it,
   with a distinct visual treatment to differentiate from the regular unlock button */
.btn-biometric {
    width: 100%;
    padding: var(--space-md);
    font-size: 1.1rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.btn-biometric:hover,
.btn-biometric:active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-biometric:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* WHY: Small unobtrusive link to forget saved password — center-aligned under quick actions */
.btn-forget {
    display: block;
    margin: var(--space-md) auto 0;
    font-size: 0.8rem;
    opacity: 0.6;
}

.btn-forget:hover,
.btn-forget:active {
    opacity: 1;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:active {
    background: var(--bg-tertiary);
}

/* ===== Screens ===== */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.screen.hidden {
    display: none !important;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 80px;
    /* Space for bottom nav */
}

/* ===== Loading Screen ===== */
.loading-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Auth Screen ===== */
.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
    gap: var(--space-md);
}

.logo-container {
    margin-bottom: var(--space-lg);
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
}

/* WHY: Actual icon image on auth screen — matches the installed app icon */
.app-logo-icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
}

.auth-container h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.auth-container p {
    color: var(--text-secondary);
}

.auth-note {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--space-md);
}

#btn-google-signin {
    width: 100%;
    max-width: 280px;
    padding: var(--space-md);
    margin-top: var(--space-lg);
}

/* ===== Vault Screen ===== */
.vault-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    gap: var(--space-md);
}

.vault-container input {
    width: 100%;
    max-width: 280px;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.vault-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

#btn-unlock {
    width: 100%;
    max-width: 280px;
    padding: var(--space-md);
}

/* ===== Dashboard Screen ===== */
#dashboard-screen {
    padding: var(--space-md);
    gap: var(--space-lg);
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    text-align: center;
}

.balance-label {
    display: block;
    font-size: var(--font-size-sm);
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: var(--space-xs);
}

.balance-amount {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--bg-primary);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:active {
    background: var(--bg-tertiary);
    transform: scale(0.98);
}

.action-icon {
    font-size: var(--font-size-xl);
}

/* WHY: Push notification toggle — permanent row on dashboard for
   enabling/disabling push notifications (shared notes + payment reminders) */
.push-section {
    margin: 0 var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.push-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.push-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.push-icon {
    font-size: var(--font-size-lg);
}

.push-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.push-status {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.push-status.active {
    color: var(--accent-success);
}

.btn-push-toggle {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid var(--accent-primary);
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-push-toggle:active {
    background: rgba(212, 168, 83, 0.15);
}

.btn-push-toggle.enabled {
    background: rgba(74, 222, 128, 0.15);
    border-color: var(--accent-success);
    color: var(--accent-success);
}

.push-buttons {
    display: flex;
    gap: var(--space-xs);
}

.btn-push-test {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn-push-test:active {
    background: var(--bg-tertiary);
}

/* Transactions Section */
.transactions-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.transaction-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.transaction-desc {
    font-weight: 500;
}

.transaction-category {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.income {
    color: var(--accent-success);
}

.transaction-amount.expense {
    color: var(--accent-danger);
}

/* ===== AI Chat Screen ===== */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* WHY: Full height minus nav bar for proper scroll behavior */
    height: calc(100vh - 120px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    /* WHY: Smooth scroll for auto-scroll on new messages */
    scroll-behavior: smooth;
}

/* --- Chat Message Bubbles --- */
.chat-msg {
    max-width: 85%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    line-height: 1.5;
    font-size: var(--font-size-sm);
    word-wrap: break-word;
    animation: msgFadeIn 0.2s ease-out;
}

@keyframes msgFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg-user {
    align-self: flex-end;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-bottom-right-radius: 4px;
}

.chat-msg-assistant {
    align-self: flex-start;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-msg-error {
    align-self: center;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
    font-size: var(--font-size-sm);
    text-align: center;
    max-width: 90%;
}

.chat-msg-thinking {
    align-self: flex-start;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* --- Thinking Dots Animation --- */
.thinking-dots span {
    animation: dotBlink 1.4s infinite;
    animation-fill-mode: both;
}

.thinking-dots span:nth-child(1) {
    animation-delay: 0s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBlink {

    0%,
    80%,
    100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

/* --- Markdown Rendering in Messages --- */
.chat-msg-assistant strong {
    color: var(--accent-primary);
}

.chat-msg-assistant code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.chat-msg-assistant ul {
    padding-left: var(--space-md);
    margin: var(--space-xs) 0;
}

.chat-msg-assistant li {
    margin-bottom: var(--space-xs);
}

/* --- Action Confirmation Card --- */
.action-confirm {
    /* WHY: Visual distinction for confirmable actions */
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    margin-top: var(--space-sm);
}

.action-summary {
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.action-buttons {
    display: flex;
    gap: var(--space-sm);
}

.btn-confirm {
    flex: 1;
    background: var(--accent-success);
    color: var(--bg-primary);
    font-weight: 600;
    padding: var(--space-sm) var(--space-md);
}

.btn-confirm:active {
    opacity: 0.8;
}

.btn-cancel {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: var(--space-sm) var(--space-md);
}

.btn-cancel:active {
    background: var(--bg-tertiary);
}

/* --- Attachment Preview --- */
/* WHY: Shows a chip above the input with the filename + remove button */
.attachment-preview {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.attachment-name {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
}

.attachment-remove:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* WHY: Small attachment indicator shown in user's message bubble */
.attach-label {
    display: block;
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-top: var(--space-xs);
}

/* --- Chat Input --- */
.chat-input-container {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* WHY: Attach button styled as a simple icon button next to the text input */
.btn-attach {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: var(--space-sm);
    opacity: 0.7;
    transition: opacity 0.15s;
}

.btn-attach:hover,
.btn-attach:active {
    opacity: 1;
}

#chat-input {
    flex: 1;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

#chat-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

#btn-send {
    /* WHY: Compact send button for mobile */
    min-width: 64px;
    padding: var(--space-sm) var(--space-md);
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-xs);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-btn.active {
    color: var(--accent-primary);
}

.nav-icon {
    font-size: var(--font-size-lg);
}

/* ===== Update Banner ===== */
/* WHY: Shown when a new service worker is detected. User taps to apply
   the update — this triggers skipWaiting + reload for the new version. */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-primary);
    z-index: 200;
    animation: bannerSlideIn 0.3s ease-out;
}

.update-banner span {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.btn-update {
    padding: var(--space-xs) var(--space-md);
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
}

.btn-update:active {
    background: var(--accent-secondary);
}

@keyframes bannerSlideIn {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
}

/* ===== Responsive ===== */
@media (min-width: 480px) {
    .balance-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .quick-actions {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ===== Google Sign-In Button ===== */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: #fff;
    color: #333;
    font-weight: 500;
}

.btn-google:hover,
.btn-google:active {
    background: #f5f5f5;
}

.google-icon {
    width: 20px;
    height: 20px;
}

.app-logo-placeholder {
    width: 80px;
    height: 80px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 24px;
    font-weight: 700;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* ===== PWA Install Banner ===== */
/* WHY: Custom install prompt on auth screen — more visible than the
   browser's default mini-infobar. Shows on Android/desktop via
   beforeinstallprompt, and on iOS with manual instructions. */
.install-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    animation: fadeInUp 0.4s ease-out;
}

.btn-install {
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    font-weight: 600;
    font-size: var(--font-size-base);
    border-radius: 24px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-install:active {
    transform: scale(0.96);
}

.install-hint {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Header Right ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.vault-name {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Vault List Screen ===== */
.vault-list-container {
    padding: var(--space-md);
}

.vault-list-container h2 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-lg);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
}

.user-email {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.vault-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.vault-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
}

.vault-item:active {
    background: var(--bg-tertiary);
    transform: scale(0.98);
}

.vault-icon {
    font-size: var(--font-size-xl);
}

.vault-info {
    flex: 1;
}

.vault-name {
    font-weight: 500;
}

.vault-date {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ===== Vault Password Screen ===== */
.vault-icon-large {
    font-size: 64px;
    margin-bottom: var(--space-md);
}

.vault-container form {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.password-hint {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
}

.error-text {
    font-size: var(--font-size-sm);
    color: var(--accent-danger);
    text-align: center;
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-md);
}

.btn-text:hover,
.btn-text:active {
    color: var(--text-primary);
}

/* WHY: Browse Drive button stands out slightly from the vault list
   to hint at its different purpose (opening Picker vs. selecting a listed vault) */
.browse-drive-btn {
    width: 100%;
    text-align: center;
    padding: var(--space-md);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-top: var(--space-md);
    transition: all 0.2s ease;
}

.browse-drive-btn:hover,
.browse-drive-btn:active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
}

/* ===== Accounts Section ===== */
.accounts-section {
    margin-top: var(--space-md);
}

.accounts-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.account-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.account-icon {
    font-size: var(--font-size-xl);
}

.account-name {
    flex: 1;
    font-weight: 500;
}

.account-balance {
    font-weight: 600;
}

.account-balance.positive {
    color: var(--accent-success);
}

.account-balance.negative {
    color: var(--accent-danger);
}

/* ===== Loading & Empty States ===== */
.loading-text,
.empty-text {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--space-xl);
}

/* ===== Chat Welcome ===== */
.chat-welcome {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
}

.chat-welcome p {
    margin-bottom: var(--space-sm);
}

.chat-hint {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-style: italic;
}

/* ===== Balance Negative State ===== */
.balance-amount.negative {
    color: var(--accent-danger) !important;
}