@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  /* Brand */
  --brand:      #1D9E75;
  --brand-d:    #085041;
  --brand-l:    #e4f5ef;
  --brand-mid:  #9FE1CB;

  /* Neutrals */
  --bg:         #f6f7fb;
  --surface:    #ffffff;
  --surface2:   #f5f6f8;
  --border:     #e6e9ef;
  --border-d:   #c3c6d4;
  --text:       #323338;
  --text-2:     #676879;
  --subtle:     #adb0be;

  /* Priority — red / orange / blue */
  --pri-high-bg:   #e2445c;
  --pri-high-text: #ffffff;
  --pri-med-bg:    #fdab3d;
  --pri-med-text:  #ffffff;
  --pri-low-bg:    #378add;
  --pri-low-text:  #ffffff;

  /* Status */
  --status-green:  #00c875;
  --status-blue:   #579bfc;
  --status-orange: #fdab3d;
  --status-pink:   #e2445c;
  --status-purple: #784bd1;
  --status-gray:   #c4c4c4;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 6px;
  --shadow: 0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
}

/* ── DARK MODE ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:       #0f0f0f;
  --surface:  #1a1a1a;
  --surface2: #222222;
  --border:   #2e2e2e;
  --border-d: #3e3e3e;
  --text:     #e8e8e6;
  --text-2:   #888784;
  --subtle:   #555452;
  --shadow:   0 1px 4px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --brand-l:  #0e2e21;
  --brand-mid:#1a5e42;
}

[data-theme="dark"] tbody tr:hover  { background: #1a2e22; }
[data-theme="dark"] .row-add:hover td { background: #1a2e22; }
[data-theme="dark"] .phase.todo     { border-color: #3e3e3e; }
[data-theme="dark"] .kcard          { background: #222; }
[data-theme="dark"] .auth-wrap      { border-color: #2e2e2e; }
[data-theme="dark"] .dod-item:hover { background: #1a2e22; }
[data-theme="dark"] .dod-item.checked { background: #1a2e22; }

/* ── FORM HIGHLIGHT ────────────────────────────────────── */
@keyframes highlight-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(29,158,117,.5); }
  50%  { box-shadow: 0 0 0 6px rgba(29,158,117,.2); }
  100% { box-shadow: 0 0 0 0   rgba(29,158,117,.0); }
}
.form-highlight { animation: highlight-pulse 1.2s ease; border-color: var(--brand) !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ── NAV ───────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.nav-left  { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 14px; }

.nav-brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.4px;
}
.nav-brand span { color: var(--text); font-weight: 400; }

.nav-project {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  padding-left: 12px;
  border-left: 1px solid var(--border-d);
}
.nav-user { font-size: 13px; color: var(--text-2); font-weight: 500; }

/* ── TAB BAR ───────────────────────────────────────────── */
.tab-bar {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
  gap: 2px;
}
.tab {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ── LAYOUT ────────────────────────────────────────────── */
.main-content { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }

.page-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ── SECTION LABEL ─────────────────────────────────────── */
.sec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 8px;
}

/* ── BUTTONS ───────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 9px 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--brand-d); }

.btn-sm {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border-d);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sm:hover { background: var(--surface2); }

.btn-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-new:hover { background: var(--brand-d); }

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-add:hover { background: var(--brand-d); }

.btn-del {
  padding: 3px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-del:hover { border-color: #e2445c; color: #e2445c; }

.btn-move {
  padding: 3px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--brand);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-move:hover { border-color: var(--brand); background: var(--brand-l); }

.btn-back {
  padding: 3px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-back:hover { border-color: var(--text-2); color: var(--text); }

.btn-x {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--subtle);
  font-size: 16px;
  padding: 0 3px;
  border-radius: 3px;
  transition: color 0.15s;
}
.btn-x:hover { color: #e2445c; }

/* ── FORMS ─────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border-d);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29,158,117,.12);
}

/* Inline add-row form */
.add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.add-form input,
.add-form select {
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  transition: border-color 0.15s;
}
.add-form input:focus,
.add-form select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
}
.add-form input.grow { flex: 1; min-width: 180px; }
.add-form input.w-sm { width: 80px; }
.add-form input.w-md { width: 130px; }

/* ── AUTH ──────────────────────────────────────────────── */
.auth-wrap {
  max-width: 380px;
  margin: 60px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-brand {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.auth-wrap h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-sub { font-size: 13px; color: var(--text-2); margin-bottom: 24px; }
.auth-error {
  font-size: 13px;
  color: #c8102e;
  background: #fce8eb;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border-left: 3px solid #e2445c;
}
.auth-toggle { font-size: 13px; color: var(--text-2); margin-top: 20px; text-align: center; }
.auth-toggle a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* ── PRIORITY PILLS ────────────────────────────────────── */
.pri {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.pri-high   { background: var(--pri-high-bg);  color: var(--pri-high-text); }
.pri-med    { background: var(--pri-med-bg);   color: var(--pri-med-text); }
.pri-low    { background: var(--pri-low-bg);   color: var(--pri-low-text); }

/* ── STATUS PILLS ──────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
}
.status-green  { background: var(--status-green); }
.status-blue   { background: var(--status-blue); }
.status-orange { background: var(--status-orange); }
.status-pink   { background: var(--status-pink); }
.status-purple { background: var(--status-purple); }
.status-gray   { background: var(--status-gray); color: var(--text); }

/* ── POINTS BADGE ──────────────────────────────────────── */
.pts-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: #eeedfe;
  color: #5559df;
}

/* ── GROUP TABLE ───────────────────────────────────────── */
.board-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.group-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  cursor: default;
  user-select: none;
}
.group-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.group-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
}

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-align: left;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.03em;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f0fbf6; }
td { padding: 10px 16px; font-size: 13px; color: var(--text); vertical-align: middle; }
.td-title { font-weight: 500; }

.row-add td {
  padding: 8px 16px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.row-add:hover td { color: var(--brand); background: var(--brand-l); }

.empty-row td { padding: 20px 16px; font-size: 13px; color: var(--subtle); text-align: center; }

/* ── DRAG HANDLE ───────────────────────────────────────── */
.drag-handle {
  color: var(--subtle);
  font-size: 15px;
  cursor: grab;
  user-select: none;
  display: inline-block;
  line-height: 1;
}

/* ── OVERVIEW ──────────────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.mlabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); margin-bottom: 6px; }
.mval   { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -1px; }

.charter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.info-card {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.info-card label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.info-card input,
.info-card select,
.info-card textarea {
  width: 100%;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  outline: none;
}

/* ── PROGRESS BAR ──────────────────────────────────────── */
.progress-section { margin-bottom: 6px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.progress-meta .pct { color: var(--brand-d); font-weight: 700; }
.progress-bar-wrap { background: var(--border); border-radius: 4px; height: 6px; }
.progress-bar { height: 6px; border-radius: 4px; background: var(--brand); transition: width 0.4s ease; }

/* ── PHASES ────────────────────────────────────────────── */
.phase-row { display: flex; gap: 8px; flex-wrap: wrap; overflow-x: auto; padding-bottom: 4px; }
.phase {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  background: none;
  font-family: var(--font);
  transition: all 0.15s;
}
.phase.todo   { border-color: var(--border-d); color: var(--text-2); }
.phase.active { background: #fff7e6; border-color: var(--status-orange); color: #b86e00; }
.phase.done   { background: #e8faf2; border-color: var(--status-green); color: #047a45; }

/* ── SPRINT PROGRESS ───────────────────────────────────── */
.sprint-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* ── KANBAN ────────────────────────────────────────────── */
.sprint-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.sprint-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.sprint-stat { font-size: 13px; color: var(--text-2); font-weight: 500; }
.sprint-stat strong { color: var(--text); }

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kcol {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  min-height: 240px;
  box-shadow: var(--shadow);
}
.kcol-hd {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kcol-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.kcount {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.kcard {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.kcard:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: var(--brand-mid); }
.kcard-title { font-weight: 600; margin-bottom: 8px; color: var(--text); font-size: 13px; }
.kcard-meta  { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.assignee-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--brand-l);
  color: var(--brand-d);
  font-size: 11px;
  font-weight: 600;
}
.empty-col { font-size: 12px; color: var(--subtle); padding: 12px 0; text-align: center; }

/* ── RISK CARDS ────────────────────────────────────────── */
.risk-grid { display: flex; flex-direction: column; gap: 8px; }
.risk-card {
  display: flex;
  align-items: flex-start;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.risk-stripe { width: 5px; flex-shrink: 0; }
.risk-stripe.high   { background: #e2445c; }
.risk-stripe.med    { background: var(--status-orange); }
.risk-stripe.low    { background: var(--status-blue); }
.risk-body { flex: 1; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.risk-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); min-width: 120px; }
.risk-mit { font-size: 12px; color: var(--text-2); flex: 1; min-width: 120px; }

/* ── TEAM ──────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.mcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.mcard:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; margin-bottom: 12px;
}
.mname { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.mrole { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.capacity-section { margin-top: 8px; }
.capacity-label { font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.capacity-bar-wrap { background: var(--border); border-radius: 3px; height: 4px; }
.capacity-bar { height: 4px; border-radius: 3px; background: var(--brand); }

.add-member-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.add-member-form input,
.add-member-form select {
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}
.add-member-form input:focus,
.add-member-form select:focus { outline: none; border-color: var(--brand); }

/* ── DOD ───────────────────────────────────────────────── */
.dod-list { display: flex; flex-direction: column; gap: 6px; }
.dod-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dod-item:hover { background: var(--brand-l); border-color: var(--brand); }
.dod-item input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; flex-shrink: 0; }
.dod-item.checked { background: #f0fbf6; }
.dod-item.checked span { text-decoration: line-through; color: var(--text-2); }

/* ── RETRO ─────────────────────────────────────────────── */
.retro-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.retro-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.retro-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.retro-col.went-well { border-top: 3px solid var(--status-green); }
.retro-col.went-well h4 { color: #047a45; }
.retro-col.improve { border-top: 3px solid var(--status-orange); }
.retro-col.improve h4 { color: #b86e00; }
.retro-col.action { border-top: 3px solid var(--status-blue); }
.retro-col.action h4 { color: #1a5ba8; }
.retro-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 13px;
}
.retro-form { display: flex; gap: 6px; margin-top: 10px; }
.retro-form input {
  flex: 1;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}
.retro-form input:focus { outline: none; border-color: var(--brand); background: var(--surface); }

/* ── TOOLBAR ───────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.toolbar-btn:hover { background: var(--surface2); color: var(--text); }

/* ── MISC ──────────────────────────────────────────────── */
.empty-state { font-size: 13px; color: var(--subtle); padding: 20px 0; text-align: center; font-weight: 500; }

/* ── PROJECTS PAGE ─────────────────────────────────────── */
.projects-page {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.projects-header {
  text-align: center;
  margin-bottom: 28px;
}
.projects-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
}

/* Create form card */
.create-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.create-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* List header */
.projects-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* Project list */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.project-card:hover           { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: var(--border-d); }
.project-card.active-project  { border-color: var(--brand); }

.project-stripe               { align-self: stretch; background: var(--border); }
.project-stripe.stripe-active { background: var(--brand); }

.project-card-body {
  padding: 16px 18px;
  min-width: 0;
}
.project-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.meta-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}
.project-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  flex-shrink: 0;
}

.proj-badge-active {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-d);
  background: var(--brand-l);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.btn-switch {
  padding: 6px 14px;
  background: var(--surface2);
  border: 1px solid var(--border-d);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-switch:hover { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); }

/* Empty state */
.projects-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-d);
  border-radius: 8px;
  text-align: center;
}
.projects-empty-icon { font-size: 40px; margin-bottom: 12px; }
.projects-empty-text { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.projects-empty-sub  { font-size: 13px; color: var(--text-2); }

/* Navbar elements */
.active-project-badge {
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-l);
  color: var(--brand-d);
  padding: 3px 10px;
  border-radius: 20px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-switch {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border-d);
  border-radius: var(--radius);
  padding: 5px 10px;
  transition: background 0.15s, color 0.15s;
}
.nav-switch:hover { background: var(--surface2); color: var(--text); }

/* Dark mode */
[data-theme="dark"] .active-project-badge { background: #1a2e22; color: var(--brand-mid); }
[data-theme="dark"] .proj-badge-active    { background: #1a2e22; color: var(--brand-mid); }
[data-theme="dark"] .btn-switch:hover     { background: #1a2e22; }
[data-theme="dark"] .projects-empty      { border-color: #3e3e3e; }

/* Responsive */
@media (max-width: 600px) {
  .create-form { flex-direction: column; }
  .project-card-actions { padding: 12px 14px 14px; flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--border); }
  .project-card { grid-template-columns: 4px 1fr; grid-template-rows: auto auto; }
  .project-card-actions { grid-column: 1 / -1; }
}
