/* ============================================================
   CIV Agency — Admin Panel CSS
   Based on Fotosprint Design System + Lucide Icons
   ============================================================ */

/* --- Color Tokens --- */
:root {
  --bg:          #080c14;
  --surface:     #0d1520;
  --surface2:    #111e30;
  --teal:        #00c8d7;
  --teal-dark:   #0099cc;
  --teal-glow:   rgba(0, 200, 215, 0.22);
  --border:      rgba(0, 200, 215, 0.2);
  --text:        #dce8f0;
  --text-muted:  rgba(200, 220, 235, 0.5);
  --red:         #e94560;
  --green:       #34d399;
  --purple:      #a78bfa;
  --blue:        #60a5fa;
  --yellow:      #f39c12;
  --gold:        #e9b340;
  --sidebar-w:   250px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* --- Lucide Icons --- */
[data-lucide] { display: inline-block; vertical-align: middle; flex-shrink: 0; stroke-width: 1.75; }

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus-visible, a:focus-visible { outline-offset: 3px; }

/* --- Layout: Sidebar + Main --- */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 24px 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand h1 [data-lucide] { width: 22px; height: 22px; }
.sidebar-brand small {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}

.sidebar-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 18px 22px 8px;
  opacity: 0.7;
}

.sidebar-nav { list-style: none; flex: 1; padding: 8px 0; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  font-size: 0.84rem;
  color: var(--text-muted);
  transition: all 0.15s;
  border-left: 3px solid transparent;
  font-weight: 500;
}
.sidebar-nav a:hover {
  color: #fff;
  background: rgba(0,200,215,0.04);
}
.sidebar-nav a.active {
  color: #fff;
  background: rgba(0,200,215,0.08);
  border-left-color: var(--teal);
}
.sidebar-nav a [data-lucide] {
  width: 18px; height: 18px;
  opacity: 0.6;
}
.sidebar-nav a.active [data-lucide],
.sidebar-nav a:hover [data-lucide] {
  opacity: 1;
  color: var(--teal);
}

.sidebar-footer {
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,200,215,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.sidebar-footer .user-name { color: #fff; font-weight: 600; font-size: 0.82rem; }
.sidebar-footer .user-role { font-size: 0.7rem; color: var(--text-muted); }
.sidebar-footer .logout-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); font-size: 0.74rem;
  margin-top: 10px; cursor: pointer; transition: color 0.15s;
  background: none; border: none; font-family: inherit;
}
.sidebar-footer .logout-link:hover { color: var(--red); }

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 36px;
  min-height: 100vh;
  max-width: 1200px;
}

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

/* --- Back link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--teal); }
.back-link [data-lucide] { width: 15px; height: 15px; }

/* --- Card --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.card-p { padding: 22px 24px; }

/* --- Section title --- */
.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title [data-lucide] { width: 18px; height: 18px; color: var(--teal); }

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,200,215,0.4);
  box-shadow: 0 6px 22px rgba(0,200,215,0.08);
}
.stat-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon-wrap [data-lucide] { width: 22px; height: 22px; }
.stat-icon-wrap { background: rgba(0,200,215,0.1); color: var(--teal); }
.stat-icon-wrap.teal   { background: rgba(0,200,215,0.1);   color: var(--teal); }
.stat-icon-wrap.green  { background: rgba(52,211,153,0.1);  color: var(--green); }
.stat-icon-wrap.purple { background: rgba(167,139,250,0.1); color: var(--purple); }
.stat-icon-wrap.red    { background: rgba(233,69,96,0.1);   color: var(--red); }
.stat-icon-wrap.blue   { background: rgba(96,165,250,0.1);  color: var(--blue); }
.stat-icon-wrap.yellow { background: rgba(243,156,18,0.1);  color: var(--yellow); }
.stat-info { flex: 1; }
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* --- Two-col layout --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  letter-spacing: 0.3px;
  font-family: inherit;
  white-space: nowrap;
}
.btn [data-lucide] { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  box-shadow: 0 3px 14px var(--teal-glow);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-danger {
  background: rgba(233,69,96,.12);
  border: 1px solid rgba(233,69,96,.3);
  color: var(--red);
}
.btn-danger:hover { background: rgba(233,69,96,.22); }
.btn-sm { padding: 6px 14px; font-size: 0.76rem; }

/* --- Table --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
thead tr { border-bottom: 1px solid rgba(0,200,215,0.12); }
thead th {
  color: var(--text-muted);
  font-weight: 500;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(0,200,215,0.04); }
tbody td { padding: 13px 16px; vertical-align: middle; }

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-teal   { background: rgba(0,200,215,0.12); color: var(--teal); border: 1px solid rgba(0,200,215,0.22); }
.badge-green  { background: rgba(52,211,153,0.1); color: var(--green); border: 1px solid rgba(52,211,153,0.2); }
.badge-red    { background: rgba(233,69,96,0.1); color: var(--red); border: 1px solid rgba(233,69,96,0.2); }
.badge-purple { background: rgba(167,139,250,0.1); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); }
.badge-yellow { background: rgba(243,156,18,0.1); color: var(--yellow); border: 1px solid rgba(243,156,18,0.2); }
.badge-blue   { background: rgba(96,165,250,0.1); color: var(--blue); border: 1px solid rgba(96,165,250,0.2); }
.badge-gray   { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* --- Form Fields --- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 6px;
  font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,200,215,0.18);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.86rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal);
  background: rgba(0,200,215,0.04);
}
.field input[readonly] { opacity: 0.55; cursor: not-allowed; }
.field select option { background: var(--surface); color: var(--text); }
select { color-scheme: dark; background: rgba(255,255,255,0.04); color: var(--text); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-header h3 {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 600;
}
.modal-close {
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--red); background: rgba(233,69,96,0.1); }
.modal-body { padding: 22px 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; }
.toast-success { background: rgba(52,211,153,0.15); color: var(--green); border: 1px solid rgba(52,211,153,0.3); }
.toast-error { background: rgba(233,69,96,0.15); color: var(--red); border: 1px solid rgba(233,69,96,0.3); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- Action Links --- */
.actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.action-link {
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 5px 9px;
  transition: all .15s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.action-link [data-lucide] { width: 13px; height: 13px; }
.action-link:hover { color: var(--teal); background: rgba(0,200,215,0.06); }
.action-link.danger { color: var(--red); }
.action-link.danger:hover { color: #ff6b81; background: rgba(233,69,96,0.08); }
.action-sep { color: rgba(255,255,255,0.08); margin: 0 1px; user-select: none; }

/* --- Calendar --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar-grid .day-header {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 6px 0;
  font-weight: 600;
}
.calendar-grid .day {
  text-align: center;
  padding: 7px 4px;
  font-size: 0.76rem;
  border-radius: 8px;
  transition: background 0.1s;
}
.calendar-grid .day.empty { opacity: 0; }
.calendar-grid .day.today {
  background: rgba(0,200,215,0.15);
  color: var(--teal);
  font-weight: 700;
}
.calendar-grid .day.has-round {
  background: rgba(233,69,96,0.15);
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
}

/* --- Checkbox list --- */
.chk-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}
.chk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #fff;
  background: rgba(0,200,215,0.03);
  border: 1px solid rgba(0,200,215,0.08);
  transition: all 0.15s;
}
.chk-item:hover { background: rgba(0,200,215,0.06); border-color: rgba(0,200,215,0.15); }
.chk-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--teal);
  flex-shrink: 0;
}

/* --- Round item in prossimi round --- */
.next-round-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 14px;
}
.next-round-item:last-child { border-bottom: none; }
.next-round-date {
  background: rgba(0,200,215,0.08);
  border: 1px solid rgba(0,200,215,0.15);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  min-width: 56px;
  flex-shrink: 0;
}
.next-round-date .day { font-size: 1.2rem; font-weight: 700; color: #fff; line-height: 1; }
.next-round-date .month { font-size: 0.65rem; color: var(--teal); text-transform: uppercase; font-weight: 600; }
.next-round-name { font-weight: 600; color: #fff; font-size: 0.88rem; }
.next-round-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state [data-lucide] { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 0.84rem; }

/* --- Info box --- */
.info-box {
  background: rgba(0,200,215,0.04);
  border: 1px solid rgba(0,200,215,0.12);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.info-box [data-lucide] { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; margin-top: 1px; }

/* --- Pilota list in round-detail --- */
.pilota-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pilota-row:last-child { border-bottom: none; }
.pilota-number {
  background: rgba(0,200,215,0.08);
  border: 1px solid rgba(0,200,215,0.15);
  border-radius: 8px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--teal); font-size: 0.88rem;
  flex-shrink: 0;
}
.pilota-name { font-weight: 600; color: #fff; font-size: 0.86rem; }
.pilota-meta { font-size: 0.76rem; color: var(--text-muted); }

/* --- Operator chips --- */
.operator-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.operator-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  font-size: 0.8rem;
  color: #fff;
}
.operator-chip [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); }

/* --- Pilot operative card --- */
.pilot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.pilot-card:hover { border-color: rgba(0,200,215,0.35); }
.pilot-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}
.pilot-card-info { flex: 1; min-width: 0; }
.pilot-card-name { font-weight: 700; color: #fff; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pilot-card-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 1px; }
.pilot-card-progress { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; }
.pilot-card-progress strong { color: var(--teal); }
.pilot-card-body { padding: 0 18px 14px; }

/* --- Note type pills --- */
.note-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; }
.note-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.note-pill.foto   { background: rgba(0,200,215,0.08); color: var(--teal); border-color: rgba(0,200,215,0.2); }
.note-pill.video  { background: rgba(167,139,250,0.08); color: var(--purple); border-color: rgba(167,139,250,0.2); }
.note-pill.social { background: rgba(243,156,18,0.08); color: var(--yellow); border-color: rgba(243,156,18,0.2); }
.note-pill.active.foto   { background: rgba(0,200,215,0.18); border-color: var(--teal); }
.note-pill.active.video  { background: rgba(167,139,250,0.18); border-color: var(--purple); }
.note-pill.active.social { background: rgba(243,156,18,0.18); border-color: var(--yellow); }
.note-pill .pill-count { opacity: 0.75; font-weight: 400; font-size: 0.72rem; }
.note-pill [data-lucide] { width: 13px; height: 13px; }
.note-pill-add {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: 0.78rem;
  color: var(--text-muted); border: 1px dashed rgba(255,255,255,0.15);
  cursor: pointer; transition: all 0.15s;
}
.note-pill-add:hover { color: var(--teal); border-color: rgba(0,200,215,0.4); }
.note-pill-add [data-lucide] { width: 13px; height: 13px; }

/* --- Nota section (expanded) --- */
.nota-section {
  margin: 0 18px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.nota-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 10px;
  flex-wrap: wrap;
}
.nota-section-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.76rem; color: var(--text-muted); }
.nota-section-meta [data-lucide] { width: 13px; height: 13px; }
.nota-approved-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; cursor: pointer; padding: 3px 10px;
  border-radius: 20px; border: none; font-family: inherit; font-weight: 600;
  transition: all 0.15s;
}
.nota-approved-toggle.yes { background: rgba(52,211,153,0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.25); }
.nota-approved-toggle.no  { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }
.nota-approved-toggle:hover.no { color: var(--green); border-color: var(--green); }

/* --- Checklist interattiva --- */
.checklist-list { list-style: none; padding: 4px 0; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 0;
}
.check-row:hover { background: rgba(255,255,255,0.03); }
.check-box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.check-row.done .check-box { background: var(--teal); border-color: var(--teal); }
.check-row.done .check-box [data-lucide] { display: block; }
.check-box [data-lucide] { width: 11px; height: 11px; color: #fff; display: none; }
.check-text { font-size: 0.82rem; color: #fff; flex: 1; line-height: 1.4; }
.check-row.done .check-text { text-decoration: line-through; color: var(--text-muted); }
.check-by { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.checklist-empty { padding: 12px 14px; font-size: 0.8rem; color: var(--text-muted); }

/* --- Progress bar --- */
.progress-bar { height: 4px; background: rgba(255,255,255,0.07); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 2px; transition: width 0.4s ease; }
.progress-fill.done { background: var(--green); }

/* --- Round selector card --- */
.round-selector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.round-selector-card label { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.round-selector-card select {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,200,215,0.18);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.86rem;
  padding: 10px 14px;
  outline: none;
  font-family: inherit;
  color-scheme: dark;
}
.round-selector-card .round-info { font-size: 0.78rem; color: var(--text-muted); }
.round-selector-card .round-info strong { color: #fff; }

/* --- Financial summary (collapsible) --- */
.financial-summary { margin-top: 28px; }
.financial-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-muted); cursor: pointer;
  padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.06);
  user-select: none; transition: color 0.15s;
}
.financial-toggle:hover { color: #fff; }
.financial-toggle [data-lucide] { width: 15px; height: 15px; transition: transform 0.2s; }
.financial-toggle.open [data-lucide] { transform: rotate(90deg); }
.financial-body { padding: 16px 0 0; }

/* --- Scrollbar --- */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(0,200,215,0.22); border-radius: 3px; }

/* --- Hidden --- */
.hidden { display: none !important; }

/* --- Login Page --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-card .login-icon {
  width: 48px; height: 48px;
  background: rgba(0,200,215,0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.login-card .login-icon [data-lucide] { width: 24px; height: 24px; color: var(--teal); }
.login-card h1 {
  font-size: 1.3rem;
  color: #fff;
  font-weight: 700;
}
.login-card .subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 28px;
  margin-top: 4px;
}
.login-card .alert-error {
  background: rgba(220,50,50,0.1);
  border: 1px solid rgba(220,50,50,0.35);
  border-radius: 10px;
  color: #ff8080;
  font-size: 0.82rem;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-card .alert-error [data-lucide] { width: 16px; height: 16px; flex-shrink: 0; }

/* --- Mobile sidebar toggle --- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 150;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--teal);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}
.sidebar-backdrop.active { display: block; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; padding: 64px 16px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .page-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 64px 12px 12px; }
  .card-p { padding: 16px 18px; }
}
