/* ==========================================================
   ExecPlanner — Single stylesheet
   All colours via CSS custom properties. Brand-faithful.
   ========================================================== */

/* ===== DARK THEME (default) ===== */
:root {
  --bg-base:        #0A1628;
  --bg-section:     #0F2035;
  --bg-card:        #111F38;
  --bg-card-hover:  #162845;
  --bg-input:       #162845;
  --border:         rgba(255,255,255,0.08);

  --text-heading:   #FFFFFF;
  --text-body:      #C8D8EE;
  --text-muted:     #7A9BBF;
  --text-on-accent: #0A1628;

  --accent-teal:    #2DD4C8;
  --accent-yellow:  #F7C52A;
  --accent-blue:    #1863DC;
  --accent-blue-lt: #6BA4F5;
  --accent-error:   #E05C5C;
  --accent-pink:    #EC4899;
  --accent-violet:  #A78BFA;

  --teal-tint:      rgba(45,212,200,0.10);
  --yellow-tint:    rgba(247,197,42,0.10);
  --error-tint:     rgba(224,92,92,0.10);
  --blue-tint:      rgba(24,99,220,0.10);

  --sidebar-bg:           #0F2035;
  --sidebar-active:       rgba(45,212,200,0.15);
  --sidebar-text:         #7A9BBF;
  --sidebar-text-active:  #2DD4C8;

  --shadow:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.5);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg-base:        #F5F7FA;
  --bg-section:     #FFFFFF;
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #F0F4F8;
  --bg-input:       #FFFFFF;
  --border:         #E2E8F0;

  --text-heading:   #0A1628;
  --text-body:      #334155;
  --text-muted:     #64748B;
  --text-on-accent: #FFFFFF;

  --teal-tint:      rgba(45,212,200,0.12);
  --yellow-tint:    rgba(247,197,42,0.12);
  --error-tint:     rgba(224,92,92,0.10);
  --blue-tint:      rgba(24,99,220,0.10);

  --shadow:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.10);
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-base); }
body {
  font-family: 'Poppins';
  background: var(--bg-base);
  color: var(--text-body);
  line-height: 1.5;
  font-size: 14px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
}
/* Lock the typeface and disable italics across all elements (including form controls,
   which by default fall back to the platform UI font in many browsers). */
input, select, textarea, button, optgroup {
  font-family: 'Poppins';
  font-style: normal;
}
i, em, address, cite, dfn, var {
  font-style: normal;
}
h1,h2,h3,h4,h5,h6 { color: var(--text-heading); margin: 0 0 .5em; line-height: 1.25; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
a { color: var(--accent-teal); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.right { text-align: right; }

/* ===== Layout shell ===== */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
  color: #FFF;
  font-weight: 700;
  font-size: 16px;
}
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-teal);
  color: var(--text-on-accent);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 13px;
}
.brand-mark {
  display: block;
  border-radius: 50%;
}
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 500;
  text-decoration: none;
  font-size: 13.5px;
}
.nav a:hover { background: rgba(255,255,255,0.04); color: #FFF; text-decoration: none; }
.nav a.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}
.nav .nav-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: currentColor;
}
.nav .nav-icon svg { width: 18px; height: 18px; display: block; }
.theme-toggle svg { width: 14px; height: 14px; display: block; color: currentColor; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 8px;
}
.user-chip {
  display: flex; gap: 10px; align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: #FFF;
}
.user-chip img {
  width: 30px; height: 30px; border-radius: 50%;
}
.user-chip .meta { line-height: 1.2; min-width: 0; }
.user-chip .meta .name { font-size: 13px; font-weight: 600; color: #FFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.user-chip .meta .email { font-size: 11px; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.theme-toggle {
  background: transparent;
  color: var(--sidebar-text);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  display: flex; gap: 8px; align-items: center; justify-content: center;
}
.theme-toggle:hover { color: #FFF; border-color: rgba(255,255,255,0.18); }
.logout-link {
  display: block; text-align: center;
  font-size: 12px;
  color: var(--sidebar-text);
  padding: 6px;
}
.logout-link:hover { color: var(--accent-error); text-decoration: none; }

.main {
  padding: 22px 28px 60px;
  max-width: 100%;
  min-width: 0;
}
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.page-head .title h1 { margin: 0; }
.page-head .crumb { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-body);
  font: inherit;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: var(--bg-card-hover); text-decoration: none; }
.btn-primary {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: var(--text-on-accent);
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.05); background: var(--accent-teal); }
.btn-secondary {
  background: transparent;
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}
.btn-secondary:hover { background: var(--teal-tint); }
.btn-danger {
  background: transparent;
  border-color: var(--accent-error);
  color: var(--accent-error);
}
.btn-danger:hover { background: var(--error-tint); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-card-hover); }
.btn-icon { padding: 6px 8px; line-height: 0; }
.btn-icon.btn-sm { padding: 6px 8px; }
.btn-icon svg { display: block; width: 16px; height: 16px; }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.input, .select, .textarea {
  background: var(--bg-input);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
.textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; margin-bottom: 0; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 6px; }
.checkbox-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}
.checkbox-chip input { accent-color: var(--accent-teal); }
.checkbox-chip.is-on { background: var(--teal-tint); border-color: var(--accent-teal); color: var(--text-heading); }

/* ===== Cards / sections ===== */
.section {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: background .12s ease;
}
.card:hover { background: var(--bg-card-hover); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* ===== Metric tiles ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.tile .label {
  font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 6px;
}
.tile .value { font-size: 24px; font-weight: 700; color: var(--text-heading); }
.tile .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.tile .accent { color: var(--accent-teal); }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-teal   { background: var(--teal-tint);   color: var(--accent-teal);   border-color: transparent; }
.badge-yellow { background: var(--yellow-tint); color: var(--accent-yellow); border-color: transparent; }
.badge-error  { background: var(--error-tint);  color: var(--accent-error);  border-color: transparent; }
.badge-blue   { background: var(--blue-tint);   color: var(--accent-blue-lt);border-color: transparent; }
.badge-muted  { color: var(--text-muted); }

/* Status helpers — assigned by JS via class names */
.status-on_track,    .status-completed, .status-done,    .status-achieved { background: var(--teal-tint); color: var(--accent-teal); border-color: transparent; }
.status-in_progress, .status-at_risk                                       { background: var(--yellow-tint); color: var(--accent-yellow); border-color: transparent; }
.status-behind,      .status-open,      .status-missed                     { background: var(--error-tint); color: var(--accent-error); border-color: transparent; }
.status-not_started, .status-scheduled                                     { color: var(--text-muted); }
.status-cancelled,   .status-deferred,  .status-archived                   { color: var(--text-muted); text-decoration: line-through; }

/* Type / category chips */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.type-issue { background: var(--error-tint); color: var(--accent-error); }
.type-idea  { background: var(--blue-tint); color: var(--accent-blue-lt); }
.cat-dev     { background: rgba(107,164,245,0.15); color: #6BA4F5; }
.cat-ops     { background: rgba(24,99,220,0.18);   color: #6BA4F5; }
.cat-hr      { background: rgba(236,72,153,0.15);  color: #EC4899; }
.cat-mkting  { background: rgba(247,197,42,0.18);  color: #F7C52A; }
.cat-sales   { background: rgba(45,212,200,0.15);  color: #2DD4C8; }
.cat-support { background: rgba(167,139,250,0.18); color: #A78BFA; }
.cat-team    { background: rgba(122,155,191,0.15); color: #7A9BBF; }
.priority-low    { color: var(--text-muted); }
.priority-medium { color: var(--accent-blue-lt); }
.priority-high   { color: var(--accent-yellow); }
.priority-urgent { color: var(--accent-error); font-weight: 700; }

/* ===== Progress bar ===== */
.progress {
  height: 8px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress > .bar {
  height: 100%;
  background: var(--accent-teal);
  transition: width .25s ease;
}
.progress.warn > .bar  { background: var(--accent-yellow); }
.progress.error > .bar { background: var(--accent-error); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-size: 12px; color: var(--text-muted); min-width: 32px; text-align: right; }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tabs .tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}
.tabs .tab:hover { color: var(--text-body); }
.tabs .tab.active {
  color: var(--accent-teal);
  border-bottom-color: var(--accent-teal);
  font-weight: 600;
}

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed; /* respects <colgroup> widths so columns align across groups */
}
.table th, .table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table th { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.table tbody tr:hover { background: var(--bg-card-hover); }
.table .actions-cell {
  text-align: right;
  white-space: nowrap;
}
.table .owner-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category band row inside a grouped table */
.table-group-row td {
  background: var(--bg-card-hover);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.table-group-row:hover td { background: var(--bg-card-hover); }
.table-group-row:first-child td { border-top: 0; }

/* Goals table — column widths via colgroup so values align across categories */
.table-goals .col-title   { width: auto; }
.table-goals .col-num     { width: 110px; }
.table-goals .col-status  { width: 100px; }
.table-goals .col-owner   { width: 120px; }
.table-goals .col-actions { width: 76px; }
.table-goals td { word-break: break-word; }

/* ===== Topic / action item cards ===== */
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.topic-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.topic-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.topic-title {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 14px;
  margin: 4px 0 2px;
  cursor: pointer;
}
.topic-desc { color: var(--text-body); font-size: 13px; margin: 4px 0 8px; white-space: pre-wrap; }
.topic-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.action-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.action-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-section);
  border: 1px solid var(--border);
}
.action-item .checkbox {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.action-item .checkbox.done {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: var(--text-on-accent);
}
.action-item .grow { flex: 1; min-width: 0; }
.action-item .grow .ttl { color: var(--text-heading); font-size: 13px; font-weight: 500; }
.action-item .grow .meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.assignees { display: inline-flex; align-items: center; }
.assignees img {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--bg-section);
  margin-left: -6px;
}
.assignees img:first-child { margin-left: 0; }

.topic-updates {
  margin-top: 10px;
  background: var(--bg-section);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.topic-updates .upd { padding: 4px 0; border-bottom: 1px solid var(--border); }
.topic-updates .upd:last-child { border-bottom: 0; }
.topic-updates .upd .when { color: var(--text-muted); font-size: 11px; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px;
  z-index: 100;
}
[data-theme="light"] .modal-backdrop { background: rgba(15, 32, 53, 0.45); }
.modal {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal h2 { margin-top: 0; }
.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ===== Toast ===== */
#toast-host {
  position: fixed; bottom: 18px; right: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-teal);
  color: var(--text-body);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  max-width: 320px;
}
.toast.error  { border-left-color: var(--accent-error); }
.toast.warn   { border-left-color: var(--accent-yellow); }

/* ===== Login page ===== */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  /* Brand navy: layered radial highlight over base for depth */
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(45,212,200,0.10), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(24,99,220,0.18), transparent 60%),
    #0A1628;
  padding: 24px;
  color: #FFFFFF;
}
.login-card {
  background: rgba(15, 32, 53, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 44px 36px 32px;
  width: 100%; max-width: 400px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;
  backdrop-filter: blur(8px);
}
.login-logo {
  display: flex; justify-content: center;
  margin-bottom: 18px;
}
.login-logo img {
  display: block;
  filter: drop-shadow(0 8px 24px rgba(45,212,200,0.20));
}
.login-wordmark {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.login-sub {
  color: #7A9BBF;
  font-size: 13px;
  margin: 0 0 28px;
}
.btn-google {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0A1628;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 10px;
  gap: 10px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-google:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  text-decoration: none;
}
.btn-google svg path { fill: #4285F4; }
.login-fineprint {
  font-size: 12px;
  color: #7A9BBF;
  margin: 22px 0 0;
}
.login-fineprint strong { color: #C8D8EE; }
.login-error {
  background: var(--error-tint);
  color: #FFFFFF;
  border: 1px solid rgba(224, 92, 92, 0.45);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
  text-align: left;
}

/* ===== Two-column dashboard ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

/* ===== Empty state ===== */
.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 12px;
  font-size: 13px;
}
.empty-strong { color: var(--text-body); margin-bottom: 6px; font-size: 14px; font-weight: 600; }

/* ===== Weekly view layout ===== */
.weekly-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}
@media (max-width: 1000px) { .weekly-grid { grid-template-columns: 1fr; } }
.meeting-list {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  position: sticky; top: 16px;
}
.meeting-list .item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.meeting-list .item:hover { background: var(--bg-card-hover); }
.meeting-list .item.active { background: var(--teal-tint); border-color: var(--accent-teal); color: var(--text-heading); }
.meeting-list .item .date { font-weight: 600; color: var(--text-heading); }
.meeting-list .item .sub { font-size: 11px; color: var(--text-muted); }

/* ===== Goal table ===== */
.goal-group { margin-bottom: 18px; }
.goal-group h3 { color: var(--text-heading); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }

/* ===== Helpers ===== */
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--accent-teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive sidebar ===== */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    align-items: center;
    padding: 8px 12px;
  }
  .sidebar .brand { padding: 0 8px 0 0; }
  .nav { flex-direction: row; gap: 4px; margin-top: 0; }
  .nav a { padding: 6px 10px; font-size: 12px; }
  .sidebar-foot { display: none; }
  .main { padding: 14px; }
}
