/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glass-hover: rgba(255, 255, 255, 0.2);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-primary-dark: #4f46e5;
    --accent-success: #10b981;
    --accent-success-light: #34d399;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-danger-light: #f87171;
    --accent-info: #06b6d4;

    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-danger: linear-gradient(135deg, #ef4444, #f59e0b);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    --gradient-bg: linear-gradient(135deg, #0a0e1a 0%, #1a1040 50%, #0a0e1a 100%);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --sidebar-width: 260px;
    --header-height: 70px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* ===== Auth Screen ===== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-glow);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 6px;
    font-size: 26px;
}

.auth-card p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.auth-hint {
    display: block;
    margin-top: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary-light);
}

/* ===== Layout ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-glass);
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-glass);
    text-align: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: var(--shadow-glow);
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-logo-text span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: -2px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 16px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.nav-item.active {
    color: white;
    font-weight: 600;
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item i, .nav-item span {
    position: relative;
    z-index: 1;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

/* ===== Header ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent-primary-light);
    font-size: 20px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.1;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-glass-hover);
}

.stat-card.revenue::before { background: var(--accent-success); }
.stat-card.expense::before { background: var(--accent-danger); }
.stat-card.clients::before { background: var(--accent-info); }
.stat-card.net::before { background: var(--accent-primary); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-bottom: 16px;
}

.stat-card.revenue .stat-icon { background: var(--gradient-success); }
.stat-card.expense .stat-icon { background: var(--gradient-danger); }
.stat-card.clients .stat-icon { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.stat-card.net .stat-icon { background: var(--gradient-primary); }

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary-light);
    padding: 14px 16px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    border-bottom: 2px solid var(--border-glass);
    font-size: 13px;
}

tbody td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
    transition: var(--transition);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-glass-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

tfoot td {
    padding: 14px 16px;
    text-align: center;
    font-weight: 700;
    color: var(--accent-primary-light);
    background: rgba(99, 102, 241, 0.1);
    border-top: 2px solid var(--accent-primary);
    font-size: 15px;
}

/* ===== Forms ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--accent-primary-light);
    font-size: 14px;
}

.form-control {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.05);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
    position: relative;
    z-index: 5;
}

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

select.form-control:focus {
    z-index: 20;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
    border: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.tab {
    flex: 1;
    padding: 10px 20px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 120px;
    border: none;
    background: transparent;
    font-family: 'Cairo', sans-serif;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== Month Selector ===== */
.month-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.daily-report-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 320px;
}

.daily-report-period {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.daily-report-period .form-control {
    height: 64px;
    border-radius: 14px;
    font-size: 34px;
    text-align: center;
    background: linear-gradient(145deg, rgba(18, 24, 47, 0.95), rgba(13, 20, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.daily-report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.daily-report-actions #dailyDay {
    min-width: 90px;
    max-width: 100px;
}

.month-selector select,
.month-selector input {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.month-selector select:focus,
.month-selector input:focus {
    border-color: var(--accent-primary);
}

/* ===== Badge ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success-light);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger-light);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-info);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
    border-color: var(--accent-danger);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
    border-right: 3px solid;
}

.toast.success { border-right-color: var(--accent-success); }
.toast.error { border-right-color: var(--accent-danger); }
.toast.warning { border-right-color: var(--accent-warning); }
.toast.info { border-right-color: var(--accent-info); }

.toast i {
    font-size: 20px;
}

.toast.success i { color: var(--accent-success); }
.toast.error i { color: var(--accent-danger); }
.toast.warning i { color: var(--accent-warning); }
.toast.info i { color: var(--accent-info); }

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Page Sections ===== */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* ===== Search Box ===== */
.search-box {
    position: relative;
    max-width: 350px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-primary);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Client Selector ===== */
.client-selector {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.client-selector .form-group {
    flex: 1;
    min-width: 250px;
}

/* ===== Debt Summary ===== */
.debt-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.debt-card {
    background: var(--gradient-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.debt-card .debt-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.debt-card .debt-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.debt-card.total .debt-value { color: var(--accent-info); }
.debt-card.paid .debt-value { color: var(--accent-success); }
.debt-card.remaining .debt-value { color: var(--accent-danger-light); }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Export Buttons ===== */
.export-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-buttons .btn {
    font-size: 12px;
    padding: 8px 16px;
}

/* ===== Actions Column ===== */
.actions-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Mobile Toggle ===== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-right: 0;
        padding: 20px 16px;
        padding-top: 70px;
    }

    .page-title {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .card {
        padding: 16px;
    }

    .daily-report-controls {
        width: 100%;
        min-width: 0;
    }

    .daily-report-period {
        grid-template-columns: 1fr;
    }

    .daily-report-period .form-control {
        height: 56px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Autocomplete ===== */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1200;
    display: none;
}

.autocomplete-list.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-glass);
}

.autocomplete-item:hover {
    background: var(--bg-glass-hover);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* ===== Print ===== */
@media print {
    .sidebar, .mobile-toggle, .btn, .tabs, .form-grid, .page-header .btn-group {
        display: none !important;
    }
    .main-content {
        margin: 0;
        padding: 20px;
    }
    body {
        background: white;
        color: #333;
    }
    .card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    thead th {
        background: #f5f5f5;
        color: #333;
    }
    tbody td, tfoot td {
        color: #333;
    }
}
