/* ========================================
   SpendWise - Global Design System
   ======================================== */

:root {
    --primary: #4338CA;
    --primary-light: #6366F1;
    --primary-dark: #3730A3;
    --primary-50: #EEF2FF;
    --primary-100: #E0E7FF;
    --sidebar-bg: #1E1B4B;
    --sidebar-hover: #312E81;
    --sidebar-active: #4338CA;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-main: #F3F4F6;
    --bg-white: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.2s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ========== Auth Error & Spinner ========== */

.auth-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 500;
    animation: fadeInUp 0.3s ease;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   Auth Pages Shared
   ======================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #F0F0FF 0%, #E8EAF6 30%, #F5F5F5 70%, #EDE7F6 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    border-radius: 50%;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 2;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.15rem;
}

.auth-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.auth-header-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.7;
    transition: var(--transition);
}

.auth-header-link:hover { opacity: 1; }

.auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card-icon {
    width: 56px;
    height: 56px;
    background: var(--sidebar-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 26px;
}

.auth-card h1 {
    text-align: center;
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label a {
    text-transform: none;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0;
}

.form-label a:hover { text-decoration: underline; }

.form-input-wrap {
    position: relative;
}

.form-input-wrap .material-icons-outlined {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.form-input-wrap .toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 20px;
    padding: 0;
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input.no-icon { padding-left: 14px; }

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 22px;
}

.checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-wrap label {
    font-size: 0.84rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active { transform: translateY(0); }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    color: var(--text-primary);
}

.btn-google:hover {
    background: var(--bg-main);
    border-color: var(--text-muted);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

.auth-footer {
    text-align: center;
    padding: 24px 40px;
    z-index: 2;
}

.auth-footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.auth-footer-links a {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.auth-footer-links a:hover { color: var(--primary); }

.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 0 0;
    font-size: 0.78rem;
    color: var(--success);
    font-weight: 500;
}

/* ====== OTP Page ====== */

.otp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sidebar-bg);
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 auto 14px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 28px;
}

.otp-input {
    width: 50px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    transition: var(--transition);
    color: var(--text-primary);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.resend-wrap {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.resend-wrap .resend-btn {
    font-weight: 700;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.resend-timer {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 600;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    margin-top: 16px;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover { color: var(--primary); }

/* ========================================
   Dashboard Layout (Sidebar + Content)
   ======================================== */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 8px;
    text-decoration: none;
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.sidebar-logo .logo-text {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-logo .logo-sub {
    color: rgba(255,255,255,0.4);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,0.9);
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: white;
    font-weight: 600;
}

.sidebar-link .material-icons-outlined { font-size: 21px; }

.sidebar-user {
    padding: 16px 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.sidebar-user-info .name {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-user-info .plan {
    color: rgba(255,255,255,0.4);
    font-size: 0.72rem;
}

/* ====== Main Content ====== */

.main-content {
    flex: 1;
    margin-left: 230px;
    padding: 28px 32px;
    min-height: 100vh;
    background: var(--bg-main);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.page-header .page-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 4px;
}

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

.btn-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-new:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-icon-sm {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.btn-icon-sm:hover { border-color: var(--primary); color: var(--primary); }

/* ====== Stat Cards ====== */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card.primary-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.stat-card .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card.primary-card .stat-label { color: rgba(255,255,255,0.7); }

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.stat-card .stat-change {
    font-size: 0.78rem;
    font-weight: 500;
}

.stat-card .stat-change.positive { color: var(--success); }
.stat-card.primary-card .stat-change.positive { color: #86EFAC; }
.stat-card .stat-change.negative { color: var(--danger); }

.stat-card .stat-bar {
    height: 4px;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.stat-card .stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 1s ease;
}

.stat-card.primary-card .stat-bar { background: rgba(255,255,255,0.2); }
.stat-card.primary-card .stat-bar-fill { background: white; }

/* ====== Cards / Sections ====== */

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 .material-icons-outlined {
    font-size: 22px;
    color: var(--primary);
}

.card-header-link {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.card-header-link:hover { text-decoration: underline; }

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.content-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* ====== Quick Add (Dashboard) ====== */

.quick-add h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-add .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-add .form-group-sm { margin-bottom: 12px; }

.quick-add .form-group-sm label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}

.quick-add .form-group-sm input,
.quick-add .form-group-sm select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: inherit;
    background: white;
    color: var(--text-primary);
    transition: var(--transition);
}

.quick-add .form-group-sm input:focus,
.quick-add .form-group-sm select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.btn-add-transaction {
    width: 100%;
    padding: 11px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 4px;
    transition: var(--transition);
}

.btn-add-transaction:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ====== Transaction List ====== */

.transaction-list { list-style: none; }

.transaction-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.transaction-item:last-child { border-bottom: none; }

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 14px;
    flex-shrink: 0;
}

.transaction-icon.groceries { background: #FEF3C7; color: #D97706; }
.transaction-icon.transport { background: #DBEAFE; color: #2563EB; }
.transaction-icon.income { background: #D1FAE5; color: #059669; }
.transaction-icon.entertainment { background: #EDE9FE; color: #7C3AED; }
.transaction-icon.utilities { background: #FEE2E2; color: #DC2626; }
.transaction-icon.housing { background: #E0E7FF; color: #4338CA; }
.transaction-icon.health { background: #CFFAFE; color: #0891B2; }
.transaction-icon.food { background: #FCE7F3; color: #DB2777; }

.transaction-info { flex: 1; }

.transaction-info .name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.transaction-info .category {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.transaction-meta { text-align: right; }

.transaction-meta .amount {
    font-weight: 700;
    font-size: 0.92rem;
}

.transaction-meta .amount.negative { color: var(--text-primary); }
.transaction-meta .amount.positive { color: var(--success); }

.transaction-meta .method {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.date-divider {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 0 6px;
}

.load-more-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.load-more-btn:hover { background: var(--primary-50); border-radius: var(--radius); }

/* ====== Search & Filters Bar ====== */

.filters-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-family: inherit;
    background: white;
    transition: var(--transition);
    position: relative;
}

.search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-wrap .material-icons-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
}

.search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-family: inherit;
    background: white;
    transition: var(--transition);
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.filter-btn {
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: white;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ====== Pagination ====== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.disabled { opacity: 0.3; cursor: default; }

.page-dots { color: var(--text-muted); font-size: 0.85rem; padding: 0 2px; }

/* ========================================
   Analytics Page
   ======================================== */

.time-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius);
}

.time-tab {
    padding: 7px 16px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.time-tab.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.time-tab:hover:not(.active) { background: rgba(0,0,0,0.04); }

.chart-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(180deg, rgba(99,102,241,0.05) 0%, rgba(99,102,241,0) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 0 20px 30px;
}

.chart-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 30px;
}

.chart-line svg { width: 100%; height: 100%; }

.chart-x-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Donut chart */
.donut-chart {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    position: relative;
}

.donut-chart svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.donut-chart .center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-chart .center-text .amount {
    font-size: 1.1rem;
    font-weight: 700;
}

.donut-chart .center-text .label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ====== Budget Progress ====== */

.budget-category {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
}

.budget-category:last-child { border-bottom: none; }

.budget-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.budget-cat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.budget-cat-info { flex: 1; }

.budget-cat-info .cat-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.budget-cat-info .cat-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.budget-cat-amounts {
    text-align: right;
}

.budget-cat-amounts .spent {
    font-weight: 700;
    font-size: 0.92rem;
}

.budget-cat-amounts .total {
    color: var(--text-muted);
    font-weight: 400;
}

.budget-cat-amounts .pct {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.budget-cat-amounts .pct.critical { color: var(--danger); font-weight: 600; }

.budget-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
}

.budget-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.budget-bar-fill.blue { background: var(--primary); }
.budget-bar-fill.green { background: var(--success); }
.budget-bar-fill.red { background: var(--danger); }
.budget-bar-fill.orange { background: var(--warning); }

.smart-tip {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-top: 16px;
    font-size: 0.84rem;
    color: var(--primary-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.smart-tip .material-icons-outlined { font-size: 20px; flex-shrink: 0; }

/* ========================================
   Savings Page
   ======================================== */

.savings-goals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.savings-goal-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
    transition: var(--transition);
    cursor: pointer;
}

.savings-goal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.goal-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.goal-image .goal-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.goal-details {
    padding: 16px;
}

.goal-details h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.goal-details .goal-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.goal-amounts {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.goal-amt {
    background: var(--bg-main);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
}

.goal-amt.target { color: var(--text-secondary); }

.goal-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.goal-add-funds {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.goal-add-funds:hover { text-decoration: underline; }

.create-goal-card {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 280px;
}

.create-goal-card:hover { border-color: var(--primary); background: var(--primary-50); }

.create-goal-card .material-icons-outlined {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
}

.create-goal-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.create-goal-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.contributions-table {
    width: 100%;
    border-collapse: collapse;
}

.contributions-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.contributions-table td {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.contributions-table .goal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.contributions-table .status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--success);
}

.view-all-link {
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    padding: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.view-all-link:hover { color: var(--primary); }

/* ========================================
   Settings Page
   ======================================== */

.settings-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.settings-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
}

.settings-avatar .online-dot {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.settings-profile-info .pname {
    font-size: 1.15rem;
    font-weight: 700;
}

.settings-profile-info .ptype {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.settings-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.settings-field input,
.settings-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--border-light);
    color: var(--text-primary);
    transition: var(--transition);
}

.settings-field input:focus,
.settings-field select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.notification-item:last-child { border-bottom: none; }

.notification-item .notif-info .notif-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.notification-item .notif-info .notif-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Toggle switch */
.toggle-switch {
    width: 48px;
    height: 26px;
    background: var(--border);
    border-radius: 26px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch.active { background: var(--primary); }

.toggle-switch .toggle-dot {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active .toggle-dot { left: 25px; }

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.btn-discard {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-save {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ====== Daily chart bars ====== */

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 140px;
    padding-top: 10px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 28px;
    border-radius: 4px 4px 0 0;
    background: var(--primary-100);
    transition: height 0.8s ease, background 0.3s;
    cursor: pointer;
}

.bar:hover, .bar.active { background: var(--primary); }

.bar-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ====== USD selector, etc. ====== */

.currency-select {
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    color: var(--text-secondary);
}

/* ====== Responsive ====== */

@media (max-width: 1100px) {
    .content-grid { grid-template-columns: 1fr; }
    .savings-goals-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { width: 200px; }
    .main-content { margin-left: 200px; padding: 20px; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .settings-fields { grid-template-columns: 1fr; }
}

/* ====== Toast Notifications ====== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--success);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

.toast .material-icons-outlined { font-size: 22px; }
.toast.success .material-icons-outlined { color: var(--success); }
.toast.error .material-icons-outlined { color: var(--danger); }

.toast .toast-msg { font-size: 0.88rem; font-weight: 500; }

/* ====== Modals ====== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.3s ease;
}

.modal h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.modal .form-group { margin-bottom: 16px; }

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    padding: 10px 20px;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-cancel:hover { background: var(--bg-main); }

/* ====== Select dropdown styling ====== */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px !important;
}

/* Niceties */
::selection {
    background: var(--primary-100);
    color: var(--primary-dark);
}

input::selection {
    background: var(--primary-100);
}

/* ========================================
   Import Transaction Modal
   ======================================== */

.import-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 40, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

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

.import-modal {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 1040px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.import-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    transition: var(--transition);
    z-index: 10;
}

.import-close:hover { background: var(--bg-main); color: var(--text-primary); }

/* Header */
.import-modal-header {
    padding: 36px 40px 24px;
    border-bottom: 1px solid var(--border-light);
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.12));
    border: 1px solid rgba(99,102,241,0.25);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.success-badge {
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(5,150,105,0.12));
    border-color: rgba(16,185,129,0.3);
    color: var(--success);
}

.import-modal-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.import-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 560px;
    line-height: 1.6;
}

/* Body layout */
.import-modal-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding: 28px 40px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 18px;
    padding: 56px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-main);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.04);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

.drop-zone:hover { border-color: var(--primary-light); }

.drop-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: var(--shadow-md);
    color: var(--primary);
    font-size: 28px;
}

.drop-zone h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.drop-zone p { font-size: 0.85rem; color: var(--text-muted); }

.drop-btns {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-browse:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Info Cards */
.import-right { display: flex; flex-direction: column; gap: 16px; }

.import-info-card {
    background: #F8F9FF;
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: 16px;
    padding: 20px;
}

.import-info-card.dark {
    background: var(--sidebar-bg);
    border-color: transparent;
    color: white;
}

.info-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(99,102,241,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 12px;
}

.import-info-card.dark .info-card-icon {
    background: rgba(255,255,255,0.1);
    color: white;
}

.import-info-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.import-info-card.dark h4 { color: white; }

.import-info-card p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.import-info-card.dark p { color: rgba(255,255,255,0.65); }

.info-card-tags { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }

.info-tag {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--primary);
    text-transform: uppercase;
}

/* Feature tiles */
.import-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--border-light);
}

.import-feature {
    padding: 24px 32px;
    border-right: 1px solid var(--border-light);
    transition: var(--transition);
}

.import-feature:last-child { border-right: none; }
.import-feature:hover { background: var(--bg-main); }

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-50);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 12px;
}

.import-feature h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.import-feature p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }

/* ====== Review Table ====== */

.review-table-wrap {
    padding: 0 40px;
    max-height: 380px;
    overflow-y: auto;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.review-table thead th {
    text-align: left;
    padding: 12px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: white;
}

.review-table tbody tr { border-bottom: 1px solid var(--border-light); }
.review-table tbody tr:last-child { border-bottom: none; }
.review-table tbody tr:hover td { background: #FAFAFA; }

.review-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.review-input {
    width: 100%;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.84rem;
    padding: 6px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.review-input:hover { border-color: var(--border); background: white; }
.review-input:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.review-input.amt-inp { text-align: right; font-weight: 600; }

.review-select {
    width: 100%;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.84rem;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    appearance: auto;
}

.review-select:hover { border-color: var(--border); background: white; }
.review-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.row-del-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    margin: 0 auto;
}

.row-del-btn:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

/* Import Actions */
.import-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 40px;
    border-top: 1px solid var(--border-light);
    background: #FAFAFA;
}

.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-row:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.btn-back-import {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-import:hover { border-color: var(--text-primary); color: var(--text-primary); }

.btn-confirm-import {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm-import:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-confirm-import:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Loading row in transaction list */
.tx-loading {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px;
    color: var(--text-muted);
    justify-content: center;
    font-size: 0.9rem;
}

.tx-loading .spinner {
    border-color: rgba(67,56,202,0.2);
    border-top-color: var(--primary);
}

/* ========================================
   Landing Page
   ======================================== */

.lp-wrap {
    min-height: 100vh;
    background: #080a0f;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.lp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 60px;
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(8,10,15,0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.lp-brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.lp-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lp-signin {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.lp-signin:hover { color: #fff; }

.lp-cta {
    background: #22c55e;
    color: #000;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.lp-cta:hover { background: #16a34a; transform: translateY(-1px); }

.lp-hero {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 72px 60px 80px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 65px);
}

.lp-hero-text {
    flex: 1.1;
    max-width: 580px;
}

.lp-title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.14;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.lp-tagline {
    font-size: 0.98rem;
    line-height: 1.8;
    margin-bottom: 16px;
    font-weight: 400;
}
.lp-tagline span { color: #22c55e; font-weight: 500; }

.lp-desc {
    color: rgba(255,255,255,0.5);
    font-size: 0.93rem;
    line-height: 1.85;
    margin-bottom: 38px;
}

.lp-hero-btn {
    display: inline-block;
    background: #22c55e;
    color: #000;
    padding: 14px 34px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 32px rgba(34,197,94,0.28);
}
.lp-hero-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 0 44px rgba(34,197,94,0.38);
}

.lp-hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lp-features {
    padding: 80px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-features-title {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.lp-feature-card {
    background: #0f1117;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 28px 26px;
    transition: border-color 0.22s, transform 0.22s;
    cursor: default;
}
.lp-feature-card:hover {
    border-color: rgba(34,197,94,0.35);
    transform: translateY(-5px);
}

.lp-feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.lp-feature-icon .material-icons-outlined { font-size: 22px; color: #000; }

.lp-feature-card h3 {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.lp-feature-card p {
    font-size: 0.865rem;
    color: rgba(255,255,255,0.48);
    line-height: 1.75;
}

.lp-footer {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 28px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 14px;
}

.lp-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.lp-footer-copy {
    color: rgba(255,255,255,0.35);
    font-size: 0.82rem;
}

.lp-footer-links { display: flex; gap: 20px; }
.lp-footer-links a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}
.lp-footer-links a:hover { color: #22c55e; }

@media (max-width: 900px) {
    .lp-nav { padding: 16px 28px; }
    .lp-hero { flex-direction: column; padding: 52px 28px 60px; min-height: auto; text-align: center; }
    .lp-hero-text { max-width: 100%; }
    .lp-hero-visual { display: none; }
    .lp-features { padding: 52px 28px; }
    .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-footer { padding: 24px 28px; flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
    .lp-features-grid { grid-template-columns: 1fr; }
    .lp-title { font-size: 2rem; }
}


