:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px 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);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #334155;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* ==================== LOGIN PAGE ====================*/
.login-page {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.login-page.active {
    display: flex;
}

.login-container {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: 800;
    box-shadow: var(--shadow-lg);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form {
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    padding: 0;
    display: inline-block;
    transition: all 0.2s;
}

.back-btn:hover {
    color: var(--primary-dark);
}

.back-btn:active {
    transform: scale(0.95);
}

/* ==================== APP CONTAINER ====================*/
.app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 80px;
}

/* ==================== HEADER ====================*/
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.icon-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.balance-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.balance-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 500;
}

.balance-amount {
    font-size: 28px;
    font-weight: 700;
}

/* ==================== CARDS & GRID ====================*/
.card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 12px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 10px;
}

.stat-icon.income {
    background: #d1fae5;
}

.stat-icon.expense {
    background: #fee2e2;
}

.stat-icon.debt {
    background: #fef3c7;
}

.stat-icon.receivable {
    background: #dbeafe;
}

.stat-icon.warning {
    background: #fecaca;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.stat-value.income {
    color: var(--success);
}

.stat-value.expense {
    color: var(--danger);
}

.stat-value.debt {
    color: var(--warning);
}

.stat-value.receivable {
    color: var(--info);
}

.stat-value.warning {
    color: var(--warning);
}

/* ==================== MENU ====================*/
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0 16px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:hover {
    background: var(--surface-2);
}

.menu-item:active {
    background: var(--surface-2);
    transform: scale(0.95);
}

.menu-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.menu-item:hover .menu-icon {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.menu-label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    color: var(--text);
}

/* ==================== LISTS ====================*/
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child {
    border-bottom: none;
}

.list-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.list-amount {
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.list-amount.income {
    color: var(--success);
}

.list-amount.expense {
    color: var(--danger);
}

/* ==================== BUTTONS ====================*/
.btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-xs);
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    opacity: 0.95;
}

.btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: var(--shadow);
}

.btn-success:hover {
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: var(--shadow);
}

.btn-danger:hover {
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--surface-2);
    border-color: var(--primary);
}

.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 90;
    transition: all 0.2s;
}

.fab:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.fab:active {
    transform: scale(0.95);
}

/* ==================== FORMS ====================*/
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-xs);
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* ==================== BOTTOM NAV ====================*/
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    border: none;
    background: none;
    font-size: inherit;
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
}

/* ==================== PAGE ====================*/
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ==================== MODAL ====================*/
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--surface);
    width: 100%;
    max-width: 430px;
    max-height: 90vh;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--surface-2);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 20px;
}

/* ==================== BADGE & CHART ====================*/
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
    padding: 10px 0;
    overflow-x: auto;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 6px 6px 0 0;
    min-height: 10px;
    position: relative;
    transition: height 0.5s ease;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ==================== TOGGLE ====================*/
.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.toggle-switch {
    width: 50px;
    height: 28px;
    background: var(--border);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* ==================== EMPTY & WALLET ====================*/
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 16px;
}

.wallet-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-sm);
    padding: 16px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
}

.wallet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wallet-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.wallet-balance {
    font-size: 24px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.wallet-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.wallet-btn {
    flex: 1;
    min-width: 60px;
    padding: 8px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.wallet-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wallet-btn:active {
    transform: scale(0.95);
}

/* ==================== TRANSFER & REPORT ====================*/
.transfer-arrow {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    margin: 8px 0;
}

.report-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 12px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.report-item:last-child {
    border-bottom: none;
}

.report-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.report-value {
    font-size: 16px;
    font-weight: 700;
}

.report-value.positive {
    color: var(--success);
}

.report-value.negative {
    color: var(--danger);
}

/* ==================== TABS & SEARCH ====================*/
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border-radius: var(--radius-xs);
    margin: 0 16px 16px;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.search-bar {
    margin: 0 16px 12px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: var(--radius-xs);
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
}

/* ==================== INVOICE PREVIEW ====================*/
.invoice-preview {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    margin: 16px;
}

.invoice-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.invoice-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 800;
    box-shadow: var(--shadow-lg);
}

.invoice-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.invoice-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.invoice-section {
    margin-bottom: 16px;
}

.invoice-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
    padding: 8px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.invoice-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-2);
}

.invoice-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border);
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.invoice-total-row.final {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ==================== SCROLLBAR ====================*/
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==================== PRINT STYLES ====================*/
@media print {
    .header,
    .bottom-nav,
    .fab,
    .modal-overlay,
    .no-print {
        display: none !important;
    }

    .app {
        max-width: 100%;
        padding-bottom: 0;
    }

    .invoice-preview {
        border: 1px solid #000;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    body {
        background: white;
    }

    .page {
        display: block !important;
    }
}

/* ==================== RESPONSIVE DESIGN ====================*/
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .header {
        padding: 16px;
    }

    .balance-amount {
        font-size: 24px;
    }

    .login-container {
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal {
        max-height: 95vh;
    }

    .tabs {
        margin: 0 12px 12px;
    }

    .card {
        margin: 12px 12px;
    }

    .wallet-actions {
        flex-direction: column;
    }

    .wallet-btn {
        min-width: unset;
    }
}

@media (min-width: 768px) {
    .app {
        max-width: 768px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .menu-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .card {
        margin: 16px auto;
        max-width: 700px;
    }

    .login-container {
        padding: 40px 32px;
    }
}

@media (max-width: 600px) and (orientation: landscape) {
    .app {
        padding-bottom: 60px;
    }

    .bottom-nav {
        padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
    }

    .nav-label {
        display: none;
    }

    .nav-icon {
        font-size: 24px;
    }

    .header {
        padding: 12px;
        border-radius: 0 0 8px 8px;
    }

    .balance-amount {
        font-size: 20px;
    }
}

/* ==================== DARK MODE ENHANCEMENTS ====================*/
[data-theme="dark"] .login-container {
    background: var(--surface);
}

[data-theme="dark"] .modal {
    background: var(--surface);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--surface);
    color: var(--text);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* ==================== UTILITY CLASSES ====================*/
.no-print {
    print: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.p-8 {
    padding: 8px;
}

.p-12 {
    padding: 12px;
}

.p-16 {
    padding: 16px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.cursor-pointer {
    cursor: pointer;
}

.transition {
    transition: all 0.2s;
}

/* ==================== ADDITIONAL ANIMATIONS ====================*/
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* ==================== ACCESSIBILITY ====================*/
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== FOCUS VISIBLE ====================*/
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==================== DISABLED STATE ====================*/
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== PLACEHOLDER ====================*/
::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ==================== SELECTION ====================*/
::selection {
    background: var(--primary);
    color: white;
}
