/* ============================================
   Ledger - Modern Finance App Theme
   Background: #003934 | Accent: #d7df23 | Text: #ffffff
   ============================================ */

:root {
    /* Brand Colors */
    --ledger-primary: #d7df23;
    --ledger-primary-dark: #b8bf1e;
    --ledger-primary-light: #e4eb5c;
    --ledger-primary-rgb: 215, 223, 35;
    
    --ledger-bg-dark: #003934;
    --ledger-bg-darker: #002a26;
    --ledger-bg-darkest: #001f1c;
    
    /* Neutral Colors */
    --ledger-white: #ffffff;
    --ledger-black: #000000;
    --ledger-gray-50: #f8fafa;
    --ledger-gray-100: #f0f4f4;
    --ledger-gray-200: #e0e7e6;
    --ledger-gray-300: #c5d1d0;
    --ledger-gray-400: #9aadab;
    --ledger-gray-500: #6b8583;
    --ledger-gray-600: #4a6462;
    --ledger-gray-700: #334846;
    --ledger-gray-800: #1f2f2e;
    --ledger-gray-900: #0f1a19;
    
    /* Semantic Colors */
    --ledger-success: #10b981;
    --ledger-success-light: #34d399;
    --ledger-warning: #f59e0b;
    --ledger-warning-light: #fbbf24;
    --ledger-danger: #ef4444;
    --ledger-danger-light: #f87171;
    --ledger-info: #3b82f6;
    --ledger-info-light: #60a5fa;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(var(--ledger-primary-rgb), 0.3);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Light Mode (Default) */
[data-theme="light"], :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafa;
    --bg-tertiary: #f0f4f4;
    --bg-card: #ffffff;
    --text-primary: #0f1a19;
    --text-secondary: #4a6462;
    --text-muted: #6b8583;
    --border-color: #e0e7e6;
    --border-light: #f0f4f4;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f1a19;
    --bg-secondary: #1a2928;
    --bg-tertiary: #243736;
    --bg-card: #1a2928;
    --text-primary: #ffffff;
    --text-secondary: #c5d1d0;
    --text-muted: #9aadab;
    --border-color: #334846;
    --border-light: #243736;
}

/* ============================================
   Base Styles
   ============================================ */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--ledger-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--ledger-primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-brand { color: var(--ledger-primary); }
.text-success { color: var(--ledger-success); }
.text-warning { color: var(--ledger-warning); }
.text-danger { color: var(--ledger-danger); }

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background-color: var(--ledger-primary);
    color: var(--ledger-bg-dark);
    border-color: var(--ledger-primary);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--ledger-primary-light);
    border-color: var(--ledger-primary-light);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-outline {
    background-color: transparent;
    color: var(--ledger-primary);
    border-color: var(--ledger-primary);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--ledger-primary);
    color: var(--ledger-bg-dark);
}

.btn-danger {
    background-color: var(--ledger-danger);
    color: white;
    border-color: var(--ledger-danger);
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--ledger-danger-light);
    border-color: var(--ledger-danger-light);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-xl {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
}

.btn-icon {
    padding: 0.625rem;
    width: 2.75rem;
    height: 2.75rem;
}

.btn-icon-sm {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--ledger-primary);
    box-shadow: 0 0 0 3px rgba(var(--ledger-primary-rgb), 0.15);
}

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

.form-control:disabled {
    background-color: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control.is-invalid {
    border-color: var(--ledger-danger);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b8583' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 3rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--ledger-primary);
    cursor: pointer;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--ledger-danger);
    margin-top: 0.375rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* Stat Card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--ledger-primary);
    box-shadow: var(--shadow-md);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 1.25rem;
}

.stat-card-icon.primary {
    background-color: rgba(var(--ledger-primary-rgb), 0.15);
    color: var(--ledger-primary);
}

.stat-card-icon.success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--ledger-success);
}

.stat-card-icon.warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--ledger-warning);
}

.stat-card-icon.danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--ledger-danger);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.stat-card-change.positive {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--ledger-success);
}

.stat-card-change.negative {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--ledger-danger);
}

/* ============================================
   Navigation - Navbar
   ============================================ */

.navbar {
    background-color: var(--ledger-bg-dark);
    padding: 0 1.5rem;
    height: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    height: 5rem;
    width: auto;
}

.navbar-brand-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--ledger-white);
    letter-spacing: -0.025em;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--ledger-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--ledger-primary);
    background-color: rgba(var(--ledger-primary-rgb), 0.1);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--transition);
}

.navbar-btn-ghost {
    color: var(--ledger-white);
    background: transparent;
    border: none;
}

.navbar-btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-btn-primary {
    color: var(--ledger-bg-dark);
    background-color: var(--ledger-primary);
    border: none;
}

.navbar-btn-primary:hover {
    background-color: var(--ledger-primary-light);
}

/* Theme Toggle */
.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--ledger-white);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - 5.5rem);
    position: fixed;
    left: 0;
    top: 5.5rem;
    overflow-y: auto;
    padding: 1.5rem 0;
    transition: transform var(--transition-slow);
    z-index: 900;
}

.sidebar-section {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.sidebar-menu-item {
    margin: 0.125rem 0.75rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}

.sidebar-menu-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-menu-link.active {
    background-color: rgba(var(--ledger-primary-rgb), 0.1);
    color: var(--ledger-primary);
}

.sidebar-menu-link.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.5rem;
    background-color: var(--ledger-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-menu-link i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: var(--ledger-primary);
    color: var(--ledger-bg-dark);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: calc(100vh - 5.5rem);
    transition: margin var(--transition-slow);
}

.main-content-full {
    margin-left: 0;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-card);
}

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

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: left;
}

.table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background-color: rgba(var(--ledger-primary-rgb), 0.15);
    color: var(--ledger-primary-dark);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--ledger-success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--ledger-warning);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--ledger-danger);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--ledger-info);
}

.badge-neutral {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ============================================
   Progress Bar
   ============================================ */

.progress {
    height: 0.5rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-lg {
    height: 0.75rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--ledger-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.success { background-color: var(--ledger-success); }
.progress-bar.warning { background-color: var(--ledger-warning); }
.progress-bar.danger { background-color: var(--ledger-danger); }

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--ledger-success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--ledger-danger);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--ledger-warning);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--ledger-info);
}

/* ============================================
   Modal
   ============================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1051;
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 10rem);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   Dropdown
   ============================================ */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 12rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all var(--transition);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

.dropdown-item i {
    color: var(--text-muted);
    font-size: 1rem;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* ============================================
   Avatar
   ============================================ */

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background-color: var(--ledger-primary);
    color: var(--ledger-bg-dark);
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
}

.avatar-xl {
    width: 5rem;
    height: 5rem;
    font-size: 1.5rem;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--text-muted);
    max-width: 24rem;
    margin: 0 auto 1.5rem;
}

/* ============================================
   Utilities
   ============================================ */

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Margin */
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Text */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Border */
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }
.border { border: 1px solid var(--border-color); }
.border-0 { border: none; }

/* ============================================
   Landing Page Specific Styles
   ============================================ */

.landing-navbar {
    background-color: var(--ledger-bg-dark) !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.landing-navbar .navbar-brand img {
    height: 6rem;
}

/* Force dark theme for landing page sections regardless of theme */
.hero,
.features,
.pricing,
.cta-section,
.footer {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.6);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--ledger-bg-dark) 0%, var(--ledger-bg-darker) 50%, var(--ledger-bg-darkest) 100%);
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(var(--ledger-primary-rgb), 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(var(--ledger-primary-rgb), 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(var(--ledger-primary-rgb), 0.15);
    border: 1px solid rgba(var(--ledger-primary-rgb), 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ledger-primary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.hero-title span {
    color: var(--ledger-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ledger-primary);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-image {
    position: relative;
}

.hero-mockup {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hero-mockup-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-mockup-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: var(--radius-full);
}

.hero-mockup-dot.red { background-color: #ff5f56; }
.hero-mockup-dot.yellow { background-color: #ffbd2e; }
.hero-mockup-dot.green { background-color: #27ca40; }

.hero-mockup-content {
    background: var(--ledger-bg-darkest);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.hero-mockup-balance {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-mockup-balance-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-mockup-balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ledger-white);
    margin-top: 0.25rem;
}

.hero-mockup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.hero-mockup-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 1rem;
}

.hero-mockup-stat-label {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-mockup-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ledger-white);
    margin-top: 0.25rem;
}

.hero-mockup-stat-value.income { color: var(--ledger-success); }
.hero-mockup-stat-value.expense { color: var(--ledger-danger); }

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--ledger-bg-dark) 0%, var(--ledger-bg-darker) 100%);
}

.features .section-title,
.features .feature-title {
    color: #ffffff;
}

.features .section-subtitle,
.features .feature-description {
    color: rgba(255, 255, 255, 0.7);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background-color: rgba(var(--ledger-primary-rgb), 0.1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ledger-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--ledger-primary);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--ledger-primary);
    transform: translateY(-4px);
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ledger-bg-dark), var(--ledger-bg-darker));
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--ledger-primary);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--ledger-bg-darker) 0%, var(--ledger-bg-dark) 100%);
}

.pricing .section-title {
    color: #ffffff;
}

.pricing .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.pricing-container {
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    transition: all var(--transition);
}

.pricing-card:hover {
    border-color: var(--ledger-primary);
}

.pricing-card.featured {
    border-color: var(--ledger-primary);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    background: rgba(255, 255, 255, 0.05);
}

.pricing-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 1rem;
    background-color: var(--ledger-primary);
    color: var(--ledger-bg-dark);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.pricing-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.pricing-price {
    margin-bottom: 1.5rem;
}

.pricing-amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
}

.pricing-currency {
    font-size: 1.5rem;
    vertical-align: top;
    color: #ffffff;
}

.pricing-period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
}

.pricing-features li i {
    color: var(--ledger-success);
    font-size: 1rem;
    margin-top: 0.125rem;
}

.pricing-features li.disabled {
    color: rgba(255, 255, 255, 0.4);
}

.pricing-features li.disabled i {
    color: var(--text-muted);
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--ledger-bg-dark) 0%, var(--ledger-bg-darker) 100%);
    text-align: center;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ledger-white);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    background-color: var(--ledger-bg-darkest);
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand img {
    height: 5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--ledger-white);
}

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

.auth-page {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg, var(--ledger-bg-dark) 0%, var(--ledger-bg-darker) 50%, var(--ledger-bg-darkest) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(var(--ledger-primary-rgb), 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.auth-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.auth-left-logo {
    height: 8rem;
    margin-bottom: 2rem;
}

.auth-left-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ledger-white);
    margin-bottom: 1rem;
}

.auth-left-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.auth-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background-color: var(--bg-primary);
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-form-subtitle {
    color: var(--text-muted);
}

.auth-form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.auth-form-footer a {
    color: var(--ledger-primary);
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

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

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .navbar {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .hero {
        padding: 5rem 1rem 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .auth-page {
        flex-direction: column;
    }
    
    .auth-left {
        padding: 2rem;
        min-height: auto;
    }
    
    .auth-right {
        padding: 2rem 1.5rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--ledger-white);
    cursor: pointer;
    border-radius: var(--radius);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-nav {
        display: none;
    }
}
