/**
 * Theme System - Dark & Light Mode
 * Responsive Design Styles
 */

:root {
    /* Dark Mode (Default) */
    --primary: #55fbad;
    --bg: #060606;
    --card: #0e0f12;
    --muted: #9ea3b0;
    --border: rgba(85, 251, 173, 0.3);
    --glow: 0 0 20px rgba(85, 251, 173, 0.45), 0 0 50px rgba(85, 251, 173, 0.25);
    --sidebar-bg: rgba(14, 15, 18, 0.95);
    --text: #f5f6fa;
    --text-muted: #9ea3b0;
    --danger: #ff6b6b;
    --warning: #ffc107;
    --success: #55fbad;
}

[data-theme="light"] {
    /* Light Mode */
    --primary: #00a86b;
    --bg: #ffffff;
    --card: #f8f9fa;
    --muted: #6c757d;
    --border: rgba(0, 168, 107, 0.2);
    --glow: 0 0 10px rgba(0, 168, 107, 0.2);
    --sidebar-bg: rgba(248, 249, 250, 0.98);
    --text: #212529;
    --text-muted: #6c757d;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    box-shadow: var(--glow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(85, 251, 173, 0.6);
}

[data-theme="light"] .theme-toggle {
    box-shadow: 0 0 10px rgba(0, 168, 107, 0.3);
}

[data-theme="light"] .theme-toggle:hover {
    box-shadow: 0 0 20px rgba(0, 168, 107, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    body.cookie-bar-visible .theme-toggle {
        bottom: 130px;
    }

    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    .cookie-consent-actions .btn {
        flex: 1;
    }
}

/* Mobile Sidebar Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 20px 15px !important;
    }
    
    /* Adjust sidebar for mobile */
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
}

/* Responsive Tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Responsive Cards */
@media (max-width: 768px) {
    .stats-grid,
    .balance-cards {
        grid-template-columns: 1fr !important;
    }
    
    .card {
        padding: 20px !important;
    }
}

/* Responsive Forms */
@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-box,
    .filter-select {
        width: 100%;
    }
}

/* Responsive Modals */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        max-width: 95%;
    }
}

/* Responsive Top Bar */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .page-title {
        font-size: 1.5rem !important;
    }
    
    .btn {
        width: 100%;
    }
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .nav-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
}

/* Responsive History Items */
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .history-amount {
        text-align: left;
        width: 100%;
    }
}

/* Responsive Action Buttons */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .theme-toggle,
    .mobile-menu-toggle,
    .btn,
    .action-buttons {
        display: none;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

