/**
 * MonTrack - Custom Styles
 * Aplikasi Pencatat Keuangan Pribadi
 * Support Dark & Light Mode
 */

/* ==========================================
   CSS Variables / Design Tokens - Dark Mode (Default)
   ========================================== */
:root {
    /* Theme Mode */
    --theme-mode: dark;

    /* Primary Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-rgb: 99, 102, 241;

    /* Secondary Colors */
    --secondary: #8b5cf6;
    --accent: #06b6d4;

    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --success-rgb: 16, 185, 129;
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-rgb: 239, 68, 68;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-rgb: 245, 158, 11;
    --info: #3b82f6;
    --info-rgb: 59, 130, 246;

    /* Dark Theme Colors */
    --bg-body: #0f172a;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-sidebar: #0f172a;
    --bg-input: #0f172a;

    /* Glass Effect */
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(148, 163, 184, 0.1);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    /* Border & Shadow */
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px var(--primary-glow);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-theme: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --sidebar-width: 280px;
    --topbar-height: 70px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ==========================================
   Light Mode Variables
   ========================================== */
[data-theme="light"] {
    --theme-mode: light;

    /* Light Theme Colors */
    --bg-body: #f8fafc;
    --bg-dark: #f1f5f9;
    --bg-darker: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-input: #ffffff;

    /* Glass Effect Light */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(148, 163, 184, 0.2);

    /* Text Colors Light */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;

    /* Border & Shadow Light */
    --border-color: rgba(148, 163, 184, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    /* Primary adjustments for light mode */
    --primary-glow: rgba(99, 102, 241, 0.2);
}

/* Badge Theme Colors */
.badge {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==========================================
   Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-theme), color var(--transition-theme);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* ==========================================
   Theme Toggle Button
   ========================================== */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    padding: 4px;
}

.theme-toggle:hover {
    border-color: var(--primary);
}

.theme-toggle-slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(28px);
}

.theme-toggle-icons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 6px;
    font-size: 0.875rem;
}

.theme-toggle-icons .icon-moon {
    color: var(--text-muted);
}

.theme-toggle-icons .icon-sun {
    color: var(--warning);
}

[data-theme="light"] .theme-toggle-icons .icon-moon {
    color: var(--text-muted);
}

[data-theme="light"] .theme-toggle-icons .icon-sun {
    color: var(--warning);
}

/* ==========================================
   Sidebar
   ========================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition-normal), background-color var(--transition-theme);
}

[data-theme="light"] .sidebar {
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.sidebar-brand i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand:hover {
    color: var(--primary-light);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-header {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.menu-item {
    margin: 0.25rem 0.75rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.menu-link i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.menu-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.menu-item.active .menu-link {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   Main Content Area
   ========================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.top-navbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem 0 1.5rem;
    /* Reduced right padding for elements closer to edge */
    z-index: 100;
    transition: background-color var(--transition-theme);
}

.sidebar-toggle-btn {
    padding: 0.5rem;
    margin-right: 0.5rem;
    color: var(--text-primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.page-content {
    padding: 1.5rem;
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

/* ==========================================
   Cards
   ========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    border: none;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color) 0%, transparent 100%);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-card .stat-change {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card.success {
    --card-color: var(--success);
}

.stat-card.danger {
    --card-color: var(--danger);
}

.stat-card.primary {
    --card-color: var(--primary);
}

.stat-card.warning {
    --card-color: var(--warning);
}

.stat-card.info {
    --card-color: var(--info);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--success-rgb), 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success) 100%);
    color: white;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--danger-rgb), 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-light) 0%, var(--danger) 100%);
    color: white;
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--warning-rgb), 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--warning) 100%);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-light {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-outline-danger {
    border: 1px solid var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

/* ==========================================
   Forms
   ========================================== */
.form-control,
.form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-input);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.form-check-input {
    background-color: var(--bg-input);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ==========================================
   Tables (DataTables)
   ========================================== */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-darker);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

.table-dark {
    --bs-table-bg: var(--bg-darker);
    --bs-table-color: var(--text-primary);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    border-radius: var(--radius-sm) !important;
    margin: 0 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* ==========================================
   Progress Bars
   ========================================== */
.progress {
    background: var(--bg-darker);
    border-radius: var(--radius-lg);
    height: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg);
    transition: width var(--transition-slow);
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--success) 0%, #059669 100%);
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, var(--warning) 0%, #d97706 100%);
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, var(--danger) 0%, #dc2626 100%);
}

/* ==========================================
   Badges
   ========================================== */
.badge {
    border-radius: var(--radius-xl);
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge.bg-success-soft {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success);
}

.badge.bg-danger-soft {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger);
}

.badge.bg-warning-soft {
    background: rgba(var(--warning-rgb), 0.15);
    color: var(--warning);
}

.badge.bg-primary-soft {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

.badge.bg-info-soft {
    background: rgba(var(--info-rgb), 0.15);
    color: var(--info);
}

/* ==========================================
   Chart Container
   ========================================== */
.chart-container {
    position: relative;
    height: 300px;
}

/* ==========================================
   Insight Cards
   ========================================== */
.insight-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    transition: all var(--transition-normal);
}

.insight-card:hover {
    background: var(--bg-card-hover);
}

.insight-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.insight-card h6 {
    color: var(--text-primary);
    font-weight: 600;
}

.insight-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Breakdown List */
.breakdown-list {
    font-size: 0.875rem;
}

.breakdown-list .border-bottom {
    border-color: var(--border-color) !important;
}

.breakdown-list:last-child .border-bottom {
    border-bottom: none !important;
}

/* ==========================================
   Dropdown Menu
   ========================================== */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.dropdown-item.text-danger:hover {
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
}

.dropdown-header {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 0.25rem 0;
}

/* ==========================================
   Modal
   ========================================== */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.btn-close {
    opacity: 0.5;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.btn-close:hover {
    opacity: 1;
}

/* ==========================================
   Alerts
   ========================================== */
.alert {
    border-radius: var(--radius-md);
    border: none;
}

.alert-danger {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger);
}

.alert-warning {
    background: rgba(var(--warning-rgb), 0.15);
    color: var(--warning);
}

.alert-success {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success);
}

.alert-info {
    background: rgba(var(--info-rgb), 0.15);
    color: var(--info);
}

/* ==========================================
   Landing Page Styles
   ========================================== */
.landing-page {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Landing Navbar */
.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.landing-navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.landing-navbar .navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.landing-navbar .navbar-brand i {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-navbar .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color var(--transition-fast);
}

.landing-navbar .nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: heroGradient 20s ease infinite;
}

@keyframes heroGradient {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(2%, 2%) rotate(1deg);
    }

    50% {
        transform: translate(0, 4%) rotate(0deg);
    }

    75% {
        transform: translate(-2%, 2%) rotate(-1deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.hero-image {
    position: relative;
    z-index: 1;
    animation: fadeInRight 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-mockup {
    max-width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(var(--primary-rgb), 0.2);
    border: 1px solid var(--border-color);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeInUp 0.6s ease 0.5s forwards;
    opacity: 0;
}

.hero-stat {
    text-align: left;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--bg-dark);
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: var(--primary);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* How It Works Section */
.how-section {
    padding: 100px 0;
    background: var(--bg-darker);
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-description {
    color: var(--text-secondary);
}

.step-connector {
    position: absolute;
    top: 30px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.3;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-light {
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.cta-section .btn-light:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

/* Footer */
.landing-footer {
    background: var(--bg-darker);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-brand i {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
}

/* ==========================================
   Auth Pages
   ========================================== */
.guest-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

.guest-layout::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-card .card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
}

/* ==========================================
   Saving Goals Cards
   ========================================== */
.goal-card {
    position: relative;
    border: none;
    overflow: hidden;
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--goal-color, var(--primary)) 0%, var(--goal-color-light, var(--primary-light)) 100%);
}

.goal-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
}

.goal-progress {
    height: 10px;
    border-radius: var(--radius-xl);
}

.goal-progress .progress-bar {
    background: linear-gradient(90deg, var(--goal-color, var(--primary)) 0%, var(--goal-color-light, var(--primary-light)) 100%);
}

/* ==========================================
   Transaction List
   ========================================== */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.transaction-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.transaction-icon.income {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success);
}

.transaction-icon.expense {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger);
}

.transaction-info {
    flex: 1;
    min-width: 0;
}

.transaction-title {
    font-weight: 500;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-category {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.transaction-amount {
    text-align: right;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

.transaction-amount strong {
    font-weight: 600;
    display: block;
}

.transaction-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ==========================================
   Report Insights Card
   ========================================== */
.insight-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
}

.insight-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.insight-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.insight-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.insight-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.insight-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.insight-trend.up {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success);
}

.insight-trend.down {
    background: rgba(var(--danger-rgb), 0.15);
    color: var(--danger);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* ==========================================
   List Group
   ========================================== */
.list-group-item {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.list-group-item:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

/* ==========================================
   Gradient Backgrounds
   ========================================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%) !important;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
    }

    .hero-stats {
        gap: 2rem;
    }

    .step-connector {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .auth-card {
        margin: 0 -0.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .hero-stat {
        text-align: center;
    }

    .hero-stat-value {
        font-size: 1.25rem;
    }

    .hero-stat-label {
        font-size: 0.65rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .top-navbar {
        padding: 0 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .transaction-item {
        flex-wrap: wrap;
    }

    .transaction-amount {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
        padding-left: 60px;
    }
}

/* ==========================================
   Dark Mode Text Overrides
   Ensure all text is readable in dark mode
   ========================================== */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .h5,
[data-theme="dark"] .h6 {
    color: #ffffff;
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] label {
    color: inherit;
}

[data-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-body {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-black {
    color: #f8fafc !important;
}

[data-theme="dark"] .navbar-brand,
[data-theme="dark"] .hero-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .feature-title,
[data-theme="dark"] .step-title,
[data-theme="dark"] .cta-title,
[data-theme="dark"] .footer-title {
    color: #ffffff;
}

[data-theme="dark"] .hero-description,
[data-theme="dark"] .section-description,
[data-theme="dark"] .feature-description,
[data-theme="dark"] .step-description,
[data-theme="dark"] .footer-description {
    color: #94a3b8;
}

[data-theme="dark"] .modal-title,
[data-theme="dark"] .modal-body,
[data-theme="dark"] .offcanvas-title,
[data-theme="dark"] .offcanvas-body {
    color: #f8fafc;
}

[data-theme="dark"] .dropdown-item {
    color: #f8fafc;
}

[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: #94a3b8;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #f8fafc;
}

[data-theme="dark"] .nav-link {
    color: #94a3b8;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #f8fafc;
}

/* Gradient Text */
.text-gradient,
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Bootstrap component overrides for dark mode */
[data-theme="dark"] .accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: var(--bg-card-hover);
    color: var(--primary);
}

[data-theme="dark"] .accordion-body {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .toast {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .popover {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .popover-body {
    color: var(--text-primary);
}

/* Ensure form elements have proper text color */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    color: #f8fafc;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #64748b;
}

/* Ensure table text is readable */
[data-theme="dark"] .table {
    color: #f8fafc;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    color: inherit;
}

/* ==========================================
   FORCE ALL TEXT WHITE IN DARK MODE
   ========================================== */

/* Force all text elements to be white in dark mode */
[data-theme="dark"] body {
    color: #f8fafc !important;
}

[data-theme="dark"] * {
    --bs-body-color: #f8fafc;
}

/* Override Bootstrap text utilities */
[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .text-secondary {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .text-body-secondary {
    color: #94a3b8 !important;
}

[data-theme="dark"] .text-body-tertiary {
    color: #64748b !important;
}

/* Force card content to be white */
[data-theme="dark"] .card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer,
[data-theme="dark"] .card-text,
[data-theme="dark"] .card-title {
    color: #f8fafc;
}

/* Force stat cards */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .stat-card .stat-value,
[data-theme="dark"] .stat-card .stat-label,
[data-theme="dark"] .stat-icon {
    color: #f8fafc;
}

/* Force dashboard elements */
[data-theme="dark"] .fs-1,
[data-theme="dark"] .fs-2,
[data-theme="dark"] .fs-3,
[data-theme="dark"] .fs-4,
[data-theme="dark"] .fs-5,
[data-theme="dark"] .fs-6 {
    color: inherit;
}

/* Force transaction items */
[data-theme="dark"] .transaction-item,
[data-theme="dark"] .transaction-title,
[data-theme="dark"] .transaction-category {
    color: #f8fafc;
}

[data-theme="dark"] .transaction-category {
    color: #94a3b8;
}

/* Force insight cards */
[data-theme="dark"] .insight-card,
[data-theme="dark"] .insight-title,
[data-theme="dark"] .insight-value,
[data-theme="dark"] .insight-description {
    color: #f8fafc;
}

[data-theme="dark"] .insight-title {
    color: #94a3b8;
}

/* Force goal cards */
[data-theme="dark"] .goal-card {
    color: #f8fafc;
}

/* Force form labels and text */
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-text {
    color: #cbd5e1;
}

/* Force small text */
[data-theme="dark"] small,
[data-theme="dark"] .small {
    color: #94a3b8;
}

/* Force fw-bold, fw-semibold */
[data-theme="dark"] .fw-bold,
[data-theme="dark"] .fw-semibold,
[data-theme="dark"] .fw-medium,
[data-theme="dark"] strong,
[data-theme="dark"] b {
    color: inherit;
}

/* Force empty state */
[data-theme="dark"] .empty-state,
[data-theme="dark"] .empty-state-title,
[data-theme="dark"] .empty-state-text {
    color: #f8fafc;
}

[data-theme="dark"] .empty-state-text {
    color: #94a3b8;
}

/* Force rupiah / currency display */
[data-theme="dark"] [class*="rupiah"],
[data-theme="dark"] .currency,
[data-theme="dark"] .amount,
[data-theme="dark"] .nominal {
    color: #f8fafc;
}

/* Force display classes */
[data-theme="dark"] .display-1,
[data-theme="dark"] .display-2,
[data-theme="dark"] .display-3,
[data-theme="dark"] .display-4,
[data-theme="dark"] .display-5,
[data-theme="dark"] .display-6 {
    color: #f8fafc;
}

/* Force lead text */
[data-theme="dark"] .lead {
    color: #cbd5e1;
}

/* Force list items */
[data-theme="dark"] li,
[data-theme="dark"] ul,
[data-theme="dark"] ol {
    color: inherit;
}

/* Force alert text */
[data-theme="dark"] .alert {
    color: inherit;
}

/* Force figure caption */
[data-theme="dark"] .figure-caption {
    color: #94a3b8;
}

/* Override any inline dark text */
[data-theme="dark"] [style*="color: #1D222A"],
[data-theme="dark"] [style*="color:#1D222A"],
[data-theme="dark"] [style*="color: #1d222a"],
[data-theme="dark"] [style*="color:#1d222a"],
[data-theme="dark"] [style*="color: black"],
[data-theme="dark"] [style*="color:black"],
[data-theme="dark"] [style*="color: #000"],
[data-theme="dark"] [style*="color:#000"] {
    color: #f8fafc !important;
}

/* Print Styles */
@media print {

    .sidebar,
    .top-navbar,
    .btn,
    .no-print,
    .theme-toggle {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ==========================================
   Pricing Section
   ========================================== */
.pricing-section {
    padding: 5rem 0;
    background: var(--bg-darker);
}

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, var(--bg-card) 100%);
}

.pricing-card .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pricing-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-price {
    margin-bottom: 0.5rem;
}

.pricing-price .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.pricing-price .period {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-footer {
    margin-top: auto;
}

/* ==========================================
   Mobile Bottom Navigation
   ========================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-width: 60px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-item span {
    font-size: 0.65rem;
    font-weight: 500;
}

.mobile-nav-item.add-btn {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 0;
    margin-top: -20px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.mobile-nav-item.add-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.mobile-nav-item.add-btn i {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.mobile-nav-item.add-btn span {
    display: none;
}

@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: block;
    }

    /* Add padding to page content to account for bottom nav */
    .page-content {
        padding-bottom: 80px;
    }
}

/* ==========================================
   Payment Option Styles
   ========================================== */
.payment-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.payment-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.payment-option .form-check-input:checked~.form-check-label {
    color: var(--primary);
}

.payment-option:has(.form-check-input:checked) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* ==========================================
   Accordion Styles
   ========================================== */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.accordion-button::after {
    filter: brightness(0) saturate(100%) invert(50%);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary);
}

.accordion-body {
    background: var(--bg-card);
    color: var(--text-secondary);
}

/* ==========================================
   Demo Slider Section
   ========================================== */
.demo-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-darker) 100%);
    position: relative;
    overflow: hidden;
}

.demo-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.demo-slider-container {
    max-width: 1000px;
    margin: 0 auto;
}

.demo-slider-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.demo-carousel-inner {
    border-radius: var(--radius-xl);
}

.demo-slide {
    position: relative;
}

.demo-image {
    width: 100%;
    height: auto;
    display: block;
}

.demo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

.demo-caption-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.demo-caption h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    font-size: 1.25rem;
}

.demo-caption p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Demo Controls */
.demo-control {
    width: 50px;
    height: 50px;
    background: var(--bg-card) !important;
    border-radius: var(--radius-md);
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
}

.demo-control:hover {
    background: var(--primary) !important;
}

.carousel-control-prev.demo-control {
    left: -70px;
}

.carousel-control-next.demo-control {
    right: -70px;
}

.demo-control-icon {
    width: auto;
    height: auto;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.demo-control:hover .demo-control-icon {
    color: white;
}

/* Demo Indicators */
.demo-indicators {
    bottom: -40px;
}

.demo-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    margin: 0 6px;
    opacity: 1;
}

.demo-indicators button.active {
    background: var(--primary);
    width: 30px;
    border-radius: var(--radius-full);
}

/* Demo Thumbnails */
.demo-thumbnails {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 4rem;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.demo-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 140px;
}

.demo-thumb:hover,
.demo-thumb.active {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.demo-thumb.active {
    background: rgba(99, 102, 241, 0.1);
}

.demo-thumb img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.demo-thumb span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.demo-thumb.active span,
.demo-thumb:hover span {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .carousel-control-prev.demo-control {
        left: 10px;
    }

    .carousel-control-next.demo-control {
        right: 10px;
    }

    .demo-control {
        background: rgba(var(--primary-rgb), 0.9) !important;
    }

    .demo-control-icon {
        color: white;
    }
}

@media (max-width: 768px) {
    .demo-section {
        padding: 4rem 0;
    }

    .demo-caption {
        padding: 1rem;
    }

    .demo-caption h5 {
        font-size: 1rem;
    }

    .demo-caption p {
        font-size: 0.8rem;
        display: none;
    }

    .demo-thumbnails {
        margin-top: 3rem;
    }

    .demo-thumb {
        width: 70px;
        padding: 0.35rem;
    }

    .demo-thumb img {
        height: 40px;
    }

    .demo-thumb span {
        font-size: 0.65rem;
    }
}

/* ==========================================
   Enhanced Mobile Responsive Styles
   ========================================== */

/* Tablet - Medium screens */
@media (max-width: 991.98px) {

    /* Hide sidebar by default on tablet/mobile */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Full width content */
    .main-content {
        margin-left: 0;
    }

    /* Show sidebar toggle button */
    .sidebar-toggle,
    .sidebar-toggle-btn {
        display: flex !important;
    }

    /* Show overlay when sidebar is open */
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

    /* Adjust page content padding */
    .page-content {
        padding: 1rem;
    }
}

/* Mobile - Small screens */
@media (max-width: 767.98px) {

    /* Header/Navbar adjustments - Better proportions */
    .top-navbar {
        height: 56px;
        padding: 0 0.5rem 0 0.75rem;
        /* Minimal right padding to push elements to edge */
        gap: 0.5rem;
    }

    /* Page title in navbar - hide for cleaner look */
    .top-navbar h4,
    .top-navbar .h4,
    .top-navbar h5,
    .top-navbar .h5,
    .page-title-mobile {
        display: none !important;
        /* Hide title on mobile for cleaner header */
    }

    /* Better spacing in navbar container */
    .top-navbar .d-flex {
        gap: 0.4rem !important;
        /* Tighter gap for more compact layout */
    }

    /* Right section container - push to edge */
    .top-navbar>.d-flex.align-items-center:last-child {
        margin-right: -0.25rem;
        /* Negative margin to push elements closer to edge */
    }

    /* Align items container */
    .top-navbar>.d-flex.align-items-center {
        flex: 1;
        justify-content: space-between;
    }

    /* Sidebar toggle button - better sizing */
    .sidebar-toggle-btn {
        padding: 0.4rem 0.5rem;
        margin-right: 0;
        flex-shrink: 0;
    }

    .sidebar-toggle-btn i {
        font-size: 1.35rem;
    }

    /* Language badge - compact */
    .top-navbar .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        font-weight: 600;
        flex-shrink: 0;
    }

    /* Theme toggle - proportional sizing */
    .theme-toggle {
        width: 50px;
        height: 26px;
        flex-shrink: 0;
    }

    .theme-toggle-slider {
        width: 20px;
        height: 20px;
    }

    [data-theme="light"] .theme-toggle-slider {
        transform: translateX(24px);
    }

    .theme-toggle-icons {
        font-size: 0.7rem;
        padding: 0 5px;
    }

    /* User avatar - consistent sizing */
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* User avatar image */
    .top-navbar img.rounded-circle {
        width: 32px !important;
        height: 32px !important;
        border-width: 2px !important;
    }

    /* Notification icon - better sizing */
    .top-navbar .bi-bell {
        font-size: 1.25rem !important;
    }

    /* Hide health score on mobile */
    .top-navbar .d-none.d-lg-flex {
        display: none !important;
    }

    /* Dropdown buttons */
    .top-navbar .btn-primary.btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .top-navbar .btn-primary.btn-sm i {
        font-size: 0.9rem;
    }

    /* Chevron icon */
    .top-navbar .bi-chevron-down {
        font-size: 0.7rem !important;
    }

    /* User dropdown container - ensure it's on the right */
    .top-navbar>.d-flex.align-items-center:last-child {
        margin-left: auto;
    }

    /* User dropdown button - compact on mobile */
    .top-navbar .dropdown:last-child .btn {
        gap: 0.4rem !important;
    }

    /* Hide username text on very small screens, keep avatar only */
    .top-navbar .dropdown:last-child .d-none.d-md-block {
        display: none !important;
    }

    /* Dropdown menu */
    .dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        left: 5% !important;
        right: 5% !important;
        width: 90% !important;
        transform: none !important;
        max-height: 70vh;
    }

    /* Page content with proper bottom spacing */
    .page-content {
        padding: 0.75rem;
        /* Bottom nav disabled - normal padding */
    }

    /* Cards responsive */
    .card {
        border-radius: var(--radius-md);
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    /* Stat cards on mobile */
    .stat-card .stat-value {
        font-size: 1.35rem;
    }

    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
    }

    /* Forms */
    .form-control,
    .form-select {
        padding: 0.65rem 0.85rem;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    /* Tables */
    .table-responsive {
        font-size: 0.875rem;
    }

    .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.7rem;
    }

    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    /* DataTables adjustments */
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none !important;
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: center !important;
        margin-top: 0.5rem;
    }

    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-body {
        padding: 1rem;
    }

    /* Alerts */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    /* Sidebar full screen on mobile */
    .sidebar {
        width: 100%;
        max-width: 320px;
    }

    .sidebar-header {
        padding: 1rem;
    }

    .sidebar-brand {
        font-size: 1.25rem;
    }

    .menu-link {
        padding: 0.875rem 1rem;
    }

    /* Row/Column spacing */
    .row.g-4 {
        --bs-gutter-y: 1rem;
        --bs-gutter-x: 0.75rem;
    }

    /* Profile page adjustments */
    .user-avatar.mx-auto[style*="120px"] {
        width: 100px !important;
        height: 100px !important;
        font-size: 2rem !important;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {

    /* Even more compact header */
    .top-navbar {
        height: 60px;
        padding: 0 0.35rem 0 0.65rem;
        /* Minimal right padding for edge positioning */
    }

    /* Hide some elements */
    .top-navbar h4,
    .top-navbar .h4,
    .top-navbar h5,
    .top-navbar .h5,
    .page-title-mobile {
        font-size: 0.85rem;
        max-width: 110px;
    }

    /* Smaller gaps */
    .top-navbar .d-flex {
        gap: 0.3rem !important;
    }

    /* Right section - maximize edge positioning */
    .top-navbar>.d-flex.align-items-center:last-child {
        margin-right: -0.15rem;
    }

    /* Sidebar toggle - compact */
    .sidebar-toggle-btn {
        padding: 0.35rem 0.4rem;
        margin-right: 0.25rem;
    }

    .sidebar-toggle-btn i {
        font-size: 1.25rem;
    }

    /* Language badge - more compact */
    .top-navbar .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.45rem;
    }

    /* Theme toggle - compact but still usable */
    .theme-toggle {
        width: 48px;
        height: 26px;
    }

    .theme-toggle-slider {
        width: 20px;
        height: 20px;
    }

    [data-theme="light"] .theme-toggle-slider {
        transform: translateX(22px);
    }

    .theme-toggle-icons {
        font-size: 0.65rem;
        padding: 0 4px;
    }

    /* User avatar - compact */
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    /* User avatar image */
    .top-navbar img.rounded-circle {
        width: 30px !important;
        height: 30px !important;
    }

    /* Notification icon */
    .top-navbar .bi-bell {
        font-size: 1.15rem !important;
    }

    /* Make action buttons icon-only on very small screens */
    .btn-sm .d-none-xs {
        display: none !important;
    }

    /* Smaller page content */
    .page-content {
        padding: 0.5rem;
        /* Bottom nav disabled - normal padding */
    }

    /* Stacked buttons */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .btn-group-mobile .btn {
        width: 100%;
    }

    /* Cards tighter */
    .card-body {
        padding: 0.75rem;
    }

    /* Stat cards stacked */
    .stat-card .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem !important;
    }

    .stat-card .stat-icon {
        margin: 0 auto;
    }
}

/* ==========================================
   Mobile Bottom Navigation (DISABLED)
   Uncomment this section if you want to re-enable mobile bottom navigation
   ========================================== */
/* 
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 100%;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
}

.mobile-bottom-nav .nav-link i {
    font-size: 1.35rem;
}

.mobile-bottom-nav .nav-link span {
    font-size: 0.65rem;
    font-weight: 600;
}

.mobile-bottom-nav .nav-link:hover,
.mobile-bottom-nav .nav-link.active {
    color: var(--primary);
}

.mobile-bottom-nav .nav-link.active i {
    transform: scale(1.08);
}

.mobile-bottom-nav .nav-add {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.mobile-bottom-nav .nav-add .add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.35);
    transition: all 0.2s ease;
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
}

.mobile-bottom-nav .nav-add .add-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.45);
}

@media (max-width: 767.98px) {
    .mobile-bottom-nav {
        display: block;
    }
}
*/

/* ==========================================
   Touch-friendly improvements
   ========================================== */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .card:hover {
        border-color: var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .btn:hover {
        transform: none;
    }

    /* Larger touch targets */
    .menu-link {
        min-height: 48px;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
    }

    .form-check-input {
        width: 1.25em;
        height: 1.25em;
    }

    /* Active states instead of hover */
    .btn:active {
        transform: scale(0.97);
    }

    .card:active {
        border-color: var(--primary);
    }
}

/* ==========================================
   Safe area (for notched devices) - DISABLED
   Uncomment if mobile bottom nav is re-enabled
   ========================================== */
/*
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
        height: calc(65px + env(safe-area-inset-bottom));
    }

    .page-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}
*/