:root {
    /* Color Palette - Dark Premium */
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #6366f1;
    /* Indigo */
    --accent-secondary: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --border-color: #334155;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    /* Desktop app feel */
    -webkit-tap-highlight-color: transparent;
    /* Remove blue tap highlight */
}

#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    transition: var(--transition-normal);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.logo i {
    color: var(--accent-primary);
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    margin-bottom: var(--spacing-xs);
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links li.active a {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-links li.active a {
    background-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.user-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info span {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

#logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: var(--spacing-xs);
    transition: var(--transition-fast);
}

#logout-btn:hover {
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.top-bar {
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-primary);
    /* Ensure opaque when sticky */
}

.top-bar h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

#content-area {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.auth-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.auth-overlay.active .auth-card {
    transform: translateY(0);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-toggle a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Loading */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 2rem;
    color: var(--accent-primary);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.card {
    background-color: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.card .amount {
    font-size: 2rem;
    font-weight: 700;
}

.card.balance .amount {
    color: var(--text-primary);
}

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

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

/* --- Mobile & Responsive Styles --- */

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    /* Below sidebar, above content */
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(2px);
}

/* Show overlay when sidebar is open */
body.sidebar-open .mobile-overlay {
    opacity: 1;
    pointer-events: all;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    font-size: 1.2rem;
    padding: 0.5rem;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.mobile-menu-btn:active {
    transform: scale(0.98);
    /* Tactile feedback */
}

/* Auth Updates */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
    /* Space for icon */
}

.password-toggle {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--accent-primary);
}

.text-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.text-link.small {
    font-size: 0.85rem;
}

.auth-view {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Responsive Breakpoints */
@media (max-width: 768px) {

    /* Layout */
    #app {
        flex-direction: column;
    }

    /* Prevent scrolling when menu is open */
    body.sidebar-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Sidebar (Native Drawer Upgrade) */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        z-index: 2000;
        /* High z-index */
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
        /* Deep shadow */
        flex-direction: column;
        padding-top: max(var(--spacing-md), env(safe-area-inset-top));
        /* Safe Area */
        overflow-y: auto;
        align-items: stretch;
        background-color: var(--bg-sidebar);
        /* Ensure opacity */
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        /* Heavy/Native feel */
    }

    /* Open State (Controls Sidebar via Body Class) */
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Overlay (Controls Overlay via Body Class) */
    body.sidebar-open .mobile-overlay {
        opacity: 1;
        pointer-events: all;
    }

    /* Refined Overlay Style */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        /* Glass */
        z-index: 1999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .logo span,
    .user-profile {
        display: flex;
    }

    .nav-links {
        display: block;
        margin-top: 2rem;
        margin-left: 0;
        gap: 0;
    }

    .nav-links li {
        margin-bottom: 0.5rem;
    }

    .nav-links a span {
        display: inline;
        /* Show text */
    }

    /* Top Bar */
    .mobile-menu-btn {
        display: block;
    }

    .hide-mobile {
        display: none;
    }

    .top-bar h1 {
        font-size: 1.2rem;
    }

    /* Content Area */
    #content-area {
        padding: var(--spacing-sm);
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        /* Force single column */
    }

    /* Tables */
    .transaction-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 0.8rem;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    /* Touch Targets */
    .btn,
    .nav-links a,
    .form-group input,
    .form-group select {
        min-height: 44px;
        /* Apple Human Interface Guidelines */
    }
}

/* Transaction List */
.transaction-list {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.transaction-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

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

.tx-content {
    background-color: var(--bg-secondary);
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem;
    transition: background-color 0.2s ease;
}

.transaction-item:hover .tx-content {
    background-color: rgba(255, 255, 255, 0.02);
}

.tx-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tx-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tx-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tx-desc {
    font-weight: 500;
    color: var(--text-primary);
}

.tx-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tx-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.tx-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

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

.tx-amount.expense {
    color: var(--text-primary);
}

.tx-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.transaction-item:hover .tx-actions {
    opacity: 1;
}

.badge {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    color: var(--danger);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--border-color);
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-modal:hover {
    color: var(--text-primary);
}

/* Helper to close modal when clicking outside */
/* Note: JS logic needed for this, skipping for MVP CSS-only */
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

/* Swipe Gestures */
.transaction-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.tx-content {
    background-color: var(--bg-secondary);
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease;
}

.swipe-action {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: var(--danger);
    display: none;
    /* Hidden by default, shown on swipe */
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    pointer-events: none;
    /* Don't block clicks when hidden */
}

.transaction-item.swiped .swipe-action {
    display: flex;
    /* Show when swiped */
    pointer-events: auto;
    /* Enable clicks when visible */
}

.transaction-item.swiped .tx-content {
    transform: translateX(-80px);
    /* Reveal delete action */
}

/* ========================================
   GOALS FEATURE
   ======================================== */

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

.goal-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.goal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    margin: 0;
}

/* ========================================
   BUDGETS FEATURE
   ======================================== */

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

.budget-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.budget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.budget-card.budget-good {
    border-left: 4px solid var(--success);
}

.budget-card.budget-warning {
    border-left: 4px solid #FFA500;
}

.budget-card.budget-exceeded {
    border-left: 4px solid var(--danger);
}

.progress-good {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.progress-warning {
    background: linear-gradient(90deg, #FFA500, #FF8C00);
}

.progress-exceeded {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* ========================================
   THEME CUSTOMIZATION
   ======================================== */

.theme-selector-container {
    margin: 1rem 0;
}

.theme-selector-container label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.theme-selector {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.theme-selector:hover {
    border-color: var(--accent-primary);
}

.theme-selector:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.theme-selector option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========================================
   ANALYTICS DASHBOARD
   ======================================== */

.analytics-container {
    max-width: 1400px;
    margin: 0 auto;
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.summary-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-value {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    min-height: 350px;
}

.chart-card-full {
    grid-column: 1 / -1;
    min-height: 300px;
}

.chart-card canvas,
.chart-card-full canvas {
    max-height: 300px;
}

/* ========================================
   NOTIFICATIONS
   ======================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(500px);
        opacity: 0;
    }

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

.notification-fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(500px);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.notification-content i {
    font-size: 1.25rem;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-success i {
    color: var(--success);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

.notification-warning i {
    color: var(--warning);
}

.notification-danger {
    border-left: 4px solid var(--danger);
}

.notification-danger i {
    color: var(--danger);
}

.notification-info {
    border-left: 4px solid var(--accent-primary);
}

.notification-info i {
    color: var(--accent-primary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: var(--text-primary);
}

/* Checkbox Styling */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--accent-primary);
}

/* ========================================
   GUIDE & PRIVACY PAGES (SPA PORT)
   ======================================== */

.guide-layout {
    display: flex;
    gap: var(--spacing-lg);
    position: relative;
    max-width: 1200px;
    /* Match container-max */
    margin: 0 auto;
}

/* Sticky Sidebar */
.guide-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    /* Relative to content-area logic */
    height: fit-content;
    padding: var(--spacing-md);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.guide-sidebar h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-sidebar ul {
    list-style: none;
    padding: 0;
}

.guide-sidebar li {
    margin-bottom: var(--spacing-xs);
}

.guide-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
}

.guide-sidebar a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
}

.guide-content {
    flex: 1;
    /* Ensure it doesn't overflow */
    min-width: 0;
}

.guide-content article {
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
}

.guide-content h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.guide-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

.guide-content hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 3rem 0;
}

/* Tip Box - Matches Notifications style */
.tip-box {
    background: rgba(16, 185, 129, 0.1);
    /* Emerald tint */
    border-left: 4px solid var(--accent-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin: 2rem 0;
}

.tip-box h4 {
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.tip-box p,
.tip-box ol {
    color: var(--text-primary);
    margin-bottom: 0;
}

/* Step List */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-num {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--accent-primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    padding-top: 0.2rem;
    color: var(--text-secondary);
}

/* Policy Styles */
.policy-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.policy-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.policy-container p,
.policy-container li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

/* Responsive */
@media (max-width: 900px) {
    .guide-layout {
        flex-direction: column;
    }

    .guide-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .policy-container {
        padding: 1.5rem;
    }
}