/* ===== ROOT VARIABLES ===== */
:root {
  --primary: #1a5276;
  --primary-light: #2e86c1;
  --primary-pale: #eaf2fb;
  --accent: #148f77;
  --accent-light: #e8f8f5;
  --amber: #d68910;
  --amber-light: #fef9e7;
  --rose: #c0392b;
  --rose-light: #fdedec;
  --white: #ffffff;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --sidebar-w: 72px;
  --sidebar-w-open: 230px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf2fb 0%, #f0f9f6 50%, #fef9e7 100%);
}
.login-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.blob2 { width: 300px; height: 300px; background: var(--accent); bottom: -80px; right: -60px; animation-delay: -3s; }
.blob3 { width: 250px; height: 250px; background: var(--amber); top: 50%; right: 20%; animation-delay: -6s; }
@keyframes blobFloat { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(20px,-20px) scale(1.05); } 66% { transform: translate(-10px,15px) scale(0.96); } }

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: fadeUp 0.6s ease;
}
@keyframes fadeUp { from { opacity:0; transform: translateY(30px); } to { opacity:1; transform: translateY(0); } }

.login-logo { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.logo-icon { width: 52px; height: 52px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; }
.logo-icon svg { width: 32px; height: 32px; }
.logo-text h1 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--primary); line-height: 1.2; }
.logo-text span { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.05em; }
.login-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 2rem; margin-top: 0.5rem; padding: 0.4rem 0.8rem; background: var(--primary-pale); border-radius: 6px; display: inline-block; }
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 1rem; pointer-events: none; }
.input-wrap input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; transition: border-color var(--transition), box-shadow var(--transition); background: #fafbfc; }
.input-wrap input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 4px rgba(46,134,193,0.12); background: white; }
.toggle-pass { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 1rem; }
.login-error { font-size: 0.82rem; color: var(--rose); background: var(--rose-light); padding: 0.5rem 0.75rem; border-radius: 6px; display: none; }
.btn-login { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.9rem; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all var(--transition); letter-spacing: 0.02em; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,82,118,0.3); }
.btn-login svg { width: 18px; height: 18px; }
.login-note { font-size: 0.75rem; color: var(--text-light); text-align: center; margin-top: 1.5rem; }

/* ===== APP LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}
.sidebar:hover { width: var(--sidebar-w-open); }

.sidebar-header { display: flex; align-items: center; gap: 0.85rem; padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); overflow: hidden; white-space: nowrap; min-height: 72px; }
.sidebar-logo { width: 36px; height: 36px; flex-shrink: 0; color: rgba(255,255,255,0.9); }
.sidebar-logo svg { width: 36px; height: 36px; }
.sidebar-brand { opacity: 0; transition: opacity var(--transition); }
.sidebar:hover .sidebar-brand { opacity: 1; }
.brand-name { display: block; font-family: 'Playfair Display', serif; font-size: 1rem; color: white; font-weight: 700; line-height: 1.2; }
.brand-sub { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.6); font-weight: 400; }

.sidebar-nav { flex: 1; padding: 1rem 0; display: flex; flex-direction: column; gap: 0.25rem; overflow: hidden; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 0;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.nav-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: white; transform: scaleY(0); transition: transform var(--transition); border-radius: 0 2px 2px 0; }
.nav-item:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-item.active { color: white; background: rgba(255,255,255,0.15); }
.nav-item.active::before { transform: scaleY(1); }
.nav-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform var(--transition); }
.nav-item:hover .nav-icon { transform: scale(1.15); }
.nav-icon svg { width: 20px; height: 20px; }
.nav-label { font-size: 0.88rem; font-weight: 500; opacity: 0; transition: opacity var(--transition); }
.sidebar:hover .nav-label { opacity: 1; }

.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 0.75rem; overflow: hidden; white-space: nowrap; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.user-details { opacity: 0; transition: opacity var(--transition); flex: 1; min-width: 0; }
.sidebar:hover .user-details { opacity: 1; }
.user-name { display: block; font-size: 0.82rem; color: white; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.btn-logout { background: rgba(255,255,255,0.1); border: none; color: rgba(255,255,255,0.7); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); opacity: 0; }
.sidebar:hover .btn-logout { opacity: 1; }
.btn-logout:hover { background: rgba(255,255,255,0.2); color: white; }
.btn-logout svg { width: 16px; height: 16px; }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; padding: 2rem; transition: margin-left var(--transition); }

/* ===== TAB CONTENT ===== */
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.page-header h2 { font-family: 'Playfair Display', serif; font-size: 1.7rem; color: var(--primary); font-weight: 700; }
.page-header p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.header-filters { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 0.3rem; }
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-group input[type="date"],
.filter-group select { padding: 0.5rem 0.75rem; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 0.85rem; background: white; cursor: pointer; transition: border-color var(--transition); }
.filter-group input[type="date"]:focus,
.filter-group select:focus { border-color: var(--primary-light); }
.btn-clear { padding: 0.5rem 1rem; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: all var(--transition); margin-top: 1.3rem; }
.btn-clear:hover { border-color: var(--primary-light); color: var(--primary); }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 1rem; transition: all var(--transition); border: 1px solid var(--border); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-card.primary .stat-icon { background: var(--primary-pale); color: var(--primary); }
.stat-card.green .stat-icon { background: var(--accent-light); color: var(--accent); }
.stat-card.amber .stat-icon { background: var(--amber-light); color: var(--amber); }
.stat-card.rose .stat-icon { background: var(--rose-light); color: var(--rose); }
.stat-info { flex: 1; min-width: 0; }
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ===== CHARTS ===== */
.charts-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.chart-card { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.chart-card.large { }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.chart-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.chart-badge { font-size: 0.72rem; background: var(--primary-pale); color: var(--primary); padding: 0.2rem 0.6rem; border-radius: 20px; font-weight: 600; }
.chart-wrap { position: relative; height: 260px; }
.chart-wrap canvas { max-height: 260px; }

/* ===== TABLES ===== */
.doctor-table-card, .table-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 0.75rem; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.badge { background: var(--primary-pale); color: var(--primary); font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 20px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafd; padding: 0.85rem 1rem; text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 0.9rem 1rem; font-size: 0.88rem; color: var(--text); border-bottom: 1px solid #f1f5f9; }
.data-table tbody tr:hover { background: #fafbff; }
.data-table tbody tr:last-child td { border-bottom: none; }
.loading-row { text-align: center; color: var(--text-muted); padding: 3rem 1rem !important; font-style: italic; }

/* Progress bar in table */
.progress-wrap { display: flex; align-items: center; gap: 0.75rem; }
.progress-bar { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; min-width: 80px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--accent)); border-radius: 4px; transition: width 0.8s ease; }
.progress-pct { font-size: 0.8rem; font-weight: 600; color: var(--primary); min-width: 36px; }

/* ===== BUTTONS ===== */
.btn-primary { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.2rem; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,82,118,0.3); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.2rem; background: white; color: var(--primary); border: 2px solid var(--primary-light); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-secondary:hover { background: var(--primary-pale); }
.btn-secondary svg { width: 16px; height: 16px; }
.btn-danger { padding: 0.35rem 0.7rem; background: var(--rose-light); color: var(--rose); border: 1px solid #f5c6c2; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.btn-danger:hover { background: var(--rose); color: white; }

/* ===== DOCTORS GRID ===== */
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.doctor-card { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all var(--transition); display: flex; flex-direction: column; gap: 0.75rem; }
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.doctor-avatar { width: 52px; height: 52px; background: linear-gradient(135deg, var(--primary-pale), #d6eaf8); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.doctor-card-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.doctor-card-phone { font-size: 0.82rem; color: var(--text-muted); }
.doctor-card-count { font-size: 0.82rem; background: var(--primary-pale); color: var(--primary); padding: 0.25rem 0.6rem; border-radius: 20px; font-weight: 600; display: inline-block; }
.doctor-card-actions { display: flex; gap: 0.5rem; margin-top: 0.25rem; }

/* ===== SEARCH INPUT ===== */
.search-input { padding: 0.6rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 0.88rem; background: white; transition: border-color var(--transition); width: 220px; }
.search-input:focus { border-color: var(--primary-light); }

/* ===== SEARCHABLE DOCTOR DROPDOWN ===== */
.searchable-select-wrap { position: relative; }
.searchable-select-wrap input { width: 100%; padding: 0.6rem 0.85rem; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 0.88rem; transition: border-color var(--transition); }
.searchable-select-wrap input:focus { border-color: var(--primary-light); }
.doctor-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: white; border: 2px solid var(--primary-light); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); max-height: 200px; overflow-y: auto; z-index: 200; display: none; }
.doctor-dropdown.open { display: block; }
.doctor-option { padding: 0.7rem 1rem; cursor: pointer; font-size: 0.88rem; transition: background var(--transition); display: flex; align-items: center; justify-content: space-between; }
.doctor-option:hover { background: var(--primary-pale); }
.doctor-option-phone { font-size: 0.78rem; color: var(--text-muted); }
.selected-doctor-phone { font-size: 0.82rem; color: var(--accent); font-weight: 600; margin-top: 0.4rem; padding: 0.3rem 0.6rem; background: var(--accent-light); border-radius: 6px; display: none; }

/* ===== REPORTS CARD ===== */
.reports-card { background: white; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.reports-filters { margin-bottom: 2rem; }
.reports-filters h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; }
.filters-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.filters-row .filter-group input,
.filters-row .filter-group select { min-width: 140px; }

.report-preview { background: var(--bg); border-radius: var(--radius-sm); padding: 1.5rem; margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; border: 2px dashed var(--border); }
.preview-stats { }
.preview-value { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.preview-label { font-size: 0.82rem; color: var(--text-muted); }
.btn-preview { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.4rem; background: white; border: 2px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: all var(--transition); color: var(--text); }
.btn-preview:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-preview svg { width: 18px; height: 18px; }

.download-section h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; }
.download-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-download { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; border: 2px solid var(--border); border-radius: var(--radius); background: white; cursor: pointer; transition: all var(--transition); flex: 1; min-width: 200px; }
.btn-download:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-download.pdf:hover { border-color: #e74c3c; }
.btn-download.csv:hover { border-color: var(--accent); }
.download-icon { font-size: 2rem; }
.download-info { flex: 1; text-align: left; }
.download-type { display: block; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.download-desc { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.download-arrow { width: 20px; height: 20px; color: var(--text-muted); }
.report-table-wrap { margin-top: 2rem; }
.report-table-wrap h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

/* ===== MODALS ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: var(--radius-lg); width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal.small { max-width: 340px; }
@keyframes modalIn { from { opacity:0; transform: scale(0.85) translateY(20px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-close { background: var(--bg); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.modal-close:hover { background: var(--rose-light); color: var(--rose); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }
.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea { width: 100%; padding: 0.65rem 0.85rem; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; transition: border-color var(--transition); }
.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus { border-color: var(--primary-light); }
.phone-input-wrap { display: flex; align-items: center; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color var(--transition); }
.phone-input-wrap:focus-within { border-color: var(--primary-light); }
.phone-prefix { padding: 0.65rem 0.85rem; background: var(--bg); color: var(--primary); font-weight: 600; font-size: 0.88rem; white-space: nowrap; border-right: 1px solid var(--border); flex-shrink: 0; }
.phone-input-wrap input { border: none; outline: none; padding: 0.65rem 0.75rem; flex: 1; min-width: 0; font-size: 0.88rem; }
.btn-cancel { padding: 0.6rem 1.2rem; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; cursor: pointer; color: var(--text-muted); transition: all var(--transition); }
.btn-cancel:hover { border-color: var(--text-muted); color: var(--text); }
.form-error { font-size: 0.82rem; color: var(--rose); background: var(--rose-light); padding: 0.5rem 0.75rem; border-radius: 6px; display: none; }
.form-error.show { display: block; }

/* ===== DOWNLOAD CHOICE ===== */
.download-choice-wrap { display: flex; gap: 1rem; justify-content: center; }
.choice-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem 1rem; border: 2px solid var(--border); border-radius: var(--radius); background: white; cursor: pointer; transition: all var(--transition); font-weight: 600; color: var(--text); font-size: 0.9rem; }
.choice-btn:hover { border-color: var(--primary-light); background: var(--primary-pale); color: var(--primary); transform: translateY(-2px); }
.choice-icon { font-size: 2.5rem; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 2rem; right: 2rem; padding: 0.85rem 1.5rem; background: var(--text); color: white; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 9999; opacity: 0; transform: translateY(20px); transition: all 0.3s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--accent); }
.toast.error { background: var(--rose); }
.toast.info { background: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .main-content { padding: 1rem; margin-left: var(--sidebar-w); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: var(--sidebar-w); }
  .sidebar:hover { width: var(--sidebar-w-open); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 2rem 1.5rem; }
  .download-buttons { flex-direction: column; }
}

/* ===== 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-muted); }
