body { font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: linear-gradient(180deg, #0f172a, #111827); color: #fff; padding: 16px; }
.sidebar nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar a { color: #e5e7eb; text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; transition: background 0.15s ease, color 0.15s ease; font-weight: 500; }
.sidebar a:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
.sidebar-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #9ca3af; margin: 6px 8px 8px; }
.sidebar-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo { width: 120px; height: auto; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.content { flex: 1; padding: 24px; }
.auth { max-width: 360px; margin: 80px auto; }
.auth .error { color: #b91c1c; margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.card { 
  padding: 20px; 
  border: 1px solid #e5e7eb; 
  border-radius: 12px; 
  background: #ffffff; 
  display: block; 
  color: #111827; 
  text-decoration: none; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.04); 
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
}
.cards a.card:visited { color: #111827; }
.card:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 8px 16px rgba(0,0,0,0.08); 
  border-color: #c7d2fe; 
  background: linear-gradient(180deg, #ffffff, #fbfbff);
}
.card.admin { border-color: #7c3aed; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 10; height: 56px; display: flex; align-items: center; background: #111827; color: #fff; padding: 0 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-title { margin: 0 auto; font-weight: 600; letter-spacing: 0.3px; }

/* Buttons */
.btn { cursor: pointer; border: 1px solid transparent; border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.btn:hover { filter: brightness(0.98); }
.btn-primary { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.btn-outline { background: transparent; color: #e5e7eb; border-color: #374151; }
.btn-full { width: 100%; }

/* Auth page centered card */
body, html { height: 100%; }
.auth { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 0px); max-width: none; margin: 0; padding: 24px; background: linear-gradient(180deg, #f9fafb, #eef2ff); }
.auth-card { width: 100%; max-width: 420px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; box-shadow: 0 10px 20px rgba(0,0,0,0.06); }
.auth-brand { text-align: center; margin-bottom: 16px; }
.auth-logo { width: 140px; height: 140px; object-fit: contain; margin-bottom: 8px; }
.auth-title { margin: 0; font-size: 20px; font-weight: 700; color: #111827; }
.auth-form { margin-top: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group label { font-size: 13px; color: #374151; }
.form-group input { padding: 10px 12px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 14px; }
.form-group input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.form-group select, .form-group textarea { padding: 10px 12px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 14px; }
.form-group select:focus, .form-group textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.alert { padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; margin-bottom: 12px; }
.alert-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert.error { background: #fee2e2; color: #991b1b; padding: 8px 10px; border: 1px solid #fecaca; border-radius: 8px; margin-bottom: 12px; }

/* Layout spacing when topbar present */
.topbar + .app .content { padding-top: 12px; }

/* Password toggle styling */
.password-input { position: relative; }
.password-input input { width: 100%; padding-right: 44px; }
.password-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; padding: 4px; cursor: pointer; color: #6b7280; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.password-eye:hover { background: #f3f4f6; color: #374151; }
.password-eye:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

/* Admin page */
.admin h2 { margin-top: 0; margin-bottom: 12px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.tab { background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; border-bottom: none; padding: 8px 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; cursor: pointer; font-weight: 500; }
.tab.active { background: #ffffff; color: #111827; }
.tab:disabled { opacity: 0.6; cursor: not-allowed; }
.filters { display: flex; gap: 12px; align-items: flex-end; margin: 12px 0 16px; }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item select { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.chart-card { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.chart-card h3 { margin: 0 0 8px; font-size: 14px; color: #374151; font-weight: 600; }
