/* ============================================================
   MXD Process Commercial Leadership Team Project Tracker
   main.css — global styles, brand variables, layout primitives

   Brand reference: raw/MXDProcess-BrandGuidelines.pdf
   - Primary: #000000 / #FFCC05 (MXD Yellow) / #FFFFFF
   - Internal font: Grandview (M365 Office Font Library)
   - Layout: left-aligned, whitespace-heavy, dividing lines,
     asymmetric, generous breathing room
   - Tone in copy: confident, friendly, sentence case
   ============================================================ */

:root {
  /* Brand */
  --mxd-yellow:   #FFCC05;
  --mxd-black:    #000000;
  --mxd-white:    #FFFFFF;

  /* Derived neutrals — restrained, brand-respecting */
  --ink:          #111111;
  --ink-soft:     #444444;
  --ink-muted:    #6B6B6B;
  --ink-faint:    #9A9A9A;
  --line:         #E5E5E5;
  --line-soft:    #F0F0F0;
  --surface:      #FFFFFF;
  --surface-alt:  #FAFAFA;
  --surface-tint: #FFF9E0; /* very pale yellow for hover/highlight */

  /* Status */
  --status-blocked:  #C0392B;
  --status-progress: #2D7CC9;
  --status-complete: #1F8A3A;
  --status-pending:  #888888;

  /* Priority pills */
  --prio-A: #C0392B;
  --prio-B: #D9822B;
  --prio-C: #2D7CC9;
  --prio-D: #6B6B6B;

  /* Typography scale */
  --fs-display: 2.25rem;
  --fs-h1:      1.75rem;
  --fs-h2:      1.25rem;
  --fs-h3:      1rem;
  --fs-body:    0.95rem;
  --fs-small:   0.8rem;
  --fs-micro:   0.7rem;

  /* Layout */
  --gutter:     1.5rem;
  --max-width:  1280px;
  --radius:     2px; /* MXD layouts use sharp corners */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 14px rgba(0,0,0,0.06);

  --stripe-h:   6px;
  --nav-h:      64px;
}

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

html, body { height: 100%; }

body {
  font-family: "Grandview", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}
a:hover { border-bottom-color: var(--mxd-yellow); }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
}

/* ====================== Layout ====================== */

.stripe {
  height: var(--stripe-h);
  background: var(--mxd-yellow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: none;
}
.nav-logo:hover { border-bottom: none; }

.nav-logo img {
  height: 38px;
  width: auto;
}

.nav-title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-title-main {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.nav-title-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1rem;
  flex: 1;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav-link.is-active {
  color: var(--ink);
  border-bottom-color: var(--mxd-yellow);
  font-weight: 700;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  cursor: pointer;
}
.user-chip:hover { border-color: var(--mxd-yellow); }

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mxd-yellow);
  color: var(--mxd-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--gutter) 4rem;
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ====================== Typography ====================== */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); margin-bottom: 0.5rem; }
h2 { font-size: var(--fs-h2); margin-bottom: 0.5rem; }
h3 { font-size: var(--fs-h3); margin-bottom: 0.4rem; }

.display { font-size: var(--fs-display); font-weight: 700; line-height: 1.1; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.lead { font-size: 1.05rem; color: var(--ink-soft); }

.muted { color: var(--ink-muted); }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); }

/* ====================== Page header / dividers ====================== */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--mxd-black);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-meta {
  text-align: right;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.section {
  margin-bottom: 3rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.divider-y {
  width: 56px;
  height: 3px;
  background: var(--mxd-yellow);
  margin: 0.75rem 0 1.5rem;
}

/* ====================== Buttons ====================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--mxd-black);
  background: var(--mxd-black);
  color: var(--mxd-yellow);
  text-decoration: none;
  transition: all 150ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--mxd-yellow); color: var(--mxd-black); border-bottom: 1px solid var(--mxd-black); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--mxd-yellow); border-color: var(--mxd-black); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--mxd-yellow); background: var(--surface-tint); }

.btn-sm { padding: 0.3rem 0.65rem; font-size: var(--fs-small); }

.btn-file-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--mxd-yellow); color: var(--mxd-black);
  border: 2px solid var(--mxd-black); font-weight: 700;
  padding: 0.45rem 1rem; font-size: var(--fs-small);
  letter-spacing: 0.03em; text-decoration: none;
  margin-bottom: 1.25rem; transition: background 120ms, color 120ms;
}
.btn-file-link:hover { background: var(--mxd-black); color: var(--mxd-yellow); }

.btn-danger { background: var(--status-blocked); color: #fff; border-color: var(--status-blocked); }
.btn-danger:hover { background: #fff; color: var(--status-blocked); }

/* ====================== Cards & grids ====================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem;
  transition: border-color 150ms ease;
}
.card:hover { border-color: var(--ink-faint); }

.card-list { display: grid; gap: 1rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* ====================== Pills, tags, status ====================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  font-size: var(--fs-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--ink-soft);
}

.pill-prio { color: #fff; border-color: transparent; }
.pill-prio[data-prio="A"] { background: var(--prio-A); }
.pill-prio[data-prio="B"] { background: var(--prio-B); }
.pill-prio[data-prio="C"] { background: var(--prio-C); }
.pill-prio[data-prio="D"] { background: var(--prio-D); }

.pill-dept { background: var(--mxd-yellow); color: var(--mxd-black); border-color: var(--mxd-yellow); }

.pill-status[data-status="not_started"] { color: var(--status-pending); }
.pill-status[data-status="in_progress"] { color: var(--status-progress); border-color: var(--status-progress); }
.pill-status[data-status="blocked"]     { color: var(--status-blocked);  border-color: var(--status-blocked);  background: #FCEEEC; }
.pill-status[data-status="complete"]    { color: var(--status-complete); border-color: var(--status-complete); background: #E9F4EC; }
.pill-status[data-status="archived"]    { color: var(--ink-faint); }

/* ====================== Tables ====================== */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.table th, .table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}
.table th {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 700;
  background: var(--surface-alt);
}
.table tr:hover td { background: var(--surface-tint); }

/* ====================== Tabs ====================== */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--mxd-yellow); }

/* ====================== Forms ====================== */

.form-row { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.form-row label {
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.input, .select, .textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 120ms ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--mxd-yellow); }
.textarea { min-height: 100px; resize: vertical; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ====================== Modal ====================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  background: var(--surface);
  width: 100%;
  max-width: 460px;
  padding: 1.75rem;
  position: relative;
  border-top: 4px solid var(--mxd-yellow);
}

.modal-lg { max-width: 720px; }

.modal h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}
.modal .modal-sub {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink-faint);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); }

/* ====================== Toast ====================== */

.toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}
.toast {
  background: var(--mxd-black);
  color: var(--mxd-white);
  padding: 0.7rem 1rem;
  font-size: var(--fs-small);
  border-left: 4px solid var(--mxd-yellow);
  max-width: 360px;
  animation: toast-in 200ms ease;
}
.toast.is-error { border-left-color: var(--status-blocked); }
.toast.is-success { border-left-color: var(--status-complete); }
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ====================== Empty states ====================== */

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  background: var(--surface-alt);
}
.empty h3 { color: var(--ink); margin-bottom: 0.5rem; }

/* ====================== Utility ====================== */

.row { display: flex; align-items: center; gap: 0.6rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 0.4rem; }
.stack > * + * { margin-top: 1rem; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }

.kpi {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--surface-alt);
  border-left: 4px solid var(--mxd-yellow);
}
.kpi-val { font-size: 1.75rem; font-weight: 700; }
.kpi-lbl { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }

/* ====================== Project cards ====================== */

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.proj-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 150ms, box-shadow 150ms;
}
.proj-card:hover {
  border-color: var(--mxd-yellow);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--mxd-yellow);
}

.proj-card-top  { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.proj-card-pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.proj-card-title { font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.proj-card-meta  { font-size: var(--fs-micro); color: var(--ink-muted); display: flex; gap: 0.75rem; flex-wrap: wrap; }

.proj-card-progress { margin-top: 0.25rem; }
.progress-bar-wrap  { height: 3px; background: var(--line-soft); width: 100%; }
.progress-bar-fill  { height: 100%; background: var(--status-complete); transition: width 300ms; }
.progress-label     { font-size: var(--fs-micro); color: var(--ink-faint); margin-top: 0.2rem; }

/* ====================== Task list ====================== */

.task-list { list-style: none; }

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.task-item.is-subtask { padding-left: 2rem; }
.task-item:last-child { border-bottom: none; }

.task-check {
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  font-size: 10px; color: transparent;
}
.task-check:hover { border-color: var(--status-complete); color: var(--status-complete); }
.task-check.is-checked { background: var(--status-complete); border-color: var(--status-complete); color: #fff; }

.task-body  { flex: 1; min-width: 0; }
.task-title { font-size: var(--fs-small); font-weight: 500; line-height: 1.4; word-break: break-word; }
.task-item.is-complete .task-title { text-decoration: line-through; color: var(--ink-muted); }
.task-item-meta { font-size: var(--fs-micro); color: var(--ink-muted); display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.2rem; }
.task-item-meta .overdue { color: var(--status-blocked); }

.task-actions { display: flex; gap: 0.2rem; margin-top: 2px; opacity: 0; transition: opacity 100ms; }
.task-item:hover .task-actions { opacity: 1; }
.task-actions button {
  background: none; border: none; cursor: pointer;
  font-size: var(--fs-micro); color: var(--ink-faint); padding: 0.15rem 0.3rem;
}
.task-actions button:hover { color: var(--ink); }

.subtask-toggle {
  font-size: var(--fs-micro); color: var(--ink-muted);
  background: none; border: none; cursor: pointer; padding: 0;
  margin-top: 0.2rem;
}
.subtask-toggle:hover { color: var(--ink); }

.add-subtask-row { padding: 0.3rem 0 0.3rem 2rem; }
.add-subtask-link {
  font-size: var(--fs-micro); color: var(--ink-muted);
  background: none; border: none; cursor: pointer;
}
.add-subtask-link:hover { color: var(--ink); }

/* ====================== Comments ====================== */

.comment-thread { display: flex; flex-direction: column; gap: 1.25rem; }

.comment-item { display: flex; gap: 0.75rem; }
.comment-content { flex: 1; min-width: 0; }
.comment-header  { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.comment-author  { font-weight: 600; font-size: var(--fs-small); }
.comment-time    { font-size: var(--fs-micro); color: var(--ink-muted); }
.comment-body    { font-size: var(--fs-small); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.comment-footer  { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.comment-footer button {
  font-size: var(--fs-micro); color: var(--ink-faint);
  background: none; border: none; cursor: pointer; padding: 0;
}
.comment-footer button:hover { color: var(--ink); }

.comment-add { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }

/* ====================== Activity feed ====================== */

.activity-feed { display: flex; flex-direction: column; }

.activity-item {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); flex-shrink: 0; margin-top: 5px;
}

.activity-item .act-time { font-size: var(--fs-micro); color: var(--ink-faint); white-space: nowrap; }

/* ====================== Project detail ====================== */

.proj-header-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.proj-detail-meta  {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1.5rem;
  font-size: var(--fs-small);
}
.proj-detail-meta-item { display: flex; flex-direction: column; gap: 0.1rem; }
.proj-detail-meta-item .lbl {
  font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); font-weight: 600;
}
.proj-detail-meta-item .val { font-weight: 500; }

.blocked-banner {
  padding: 0.6rem 1rem;
  background: #FCEEEC;
  border-left: 3px solid var(--status-blocked);
  font-size: var(--fs-small);
  margin-bottom: 1rem;
}
.blocked-banner strong { color: var(--status-blocked); }

/* ====================== Section grouping ==================== */

.section-group { margin-bottom: 2rem; }

.section-group-head {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--mxd-black);
}

.section-group-name {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.section-group-count {
  font-size: var(--fs-micro);
  color: var(--ink-faint);
  font-weight: 500;
}

.section-group-unsectioned .section-group-head {
  border-bottom-color: var(--line);
}

.section-group-unsectioned .section-group-name {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ====================== Role pills ========================== */

.pill-role-admin    { background: var(--mxd-black); color: var(--mxd-white); }
.pill-role-director { background: #1a1a2e; color: var(--mxd-white); }
.pill-role-manager  { background: #2d2d2d; color: var(--mxd-white); }
.pill-role-member   { background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--line); }

/* ====================== Notifications ======================= */

.notif-bell {
  position: relative;
  background: none; border: none;
  color: var(--ink-soft); cursor: pointer;
  padding: 0.35rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: color 150ms;
}
.notif-bell:hover { color: var(--ink); }
.notif-badge {
  position: absolute; top: 1px; right: 1px;
  background: #C0392B; color: #fff;
  font-size: 0.58rem; font-weight: 700;
  min-width: 1rem; height: 1rem; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0.2rem; line-height: 1; pointer-events: none;
}

.notif-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  z-index: 900; opacity: 0; transition: opacity 200ms;
}
.notif-overlay.is-visible { opacity: 1; }

.notif-panel {
  position: fixed; top: 0; right: 0;
  width: 380px; max-width: 100vw; height: 100vh;
  background: var(--surface); z-index: 901;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 220ms ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.14);
}
.notif-panel.is-open { transform: translateX(0); }

.notif-header {
  background: #111; color: #fff; padding: 1rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.notif-title {
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: #FFCC05;
}
.notif-close {
  background: none; border: none; color: rgba(255,255,255,0.55);
  font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0 0.15rem;
  transition: color 120ms;
}
.notif-close:hover { color: #fff; }

.notif-tabs {
  display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.notif-tab {
  flex: 1; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 0.7rem 1rem; font-size: 0.82rem; font-weight: 500;
  color: var(--ink-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  transition: color 120ms, border-color 120ms; font-family: inherit;
}
.notif-tab.is-active { color: var(--ink); border-bottom-color: var(--mxd-black); }
.notif-tab-count {
  background: #C0392B; color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 1rem; height: 1rem; border-radius: 1rem;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 0.2rem;
}

.notif-actions {
  display: flex; gap: 0.75rem; padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--line-soft); flex-shrink: 0;
}
.notif-action-btn {
  background: none; border: none; font-size: 0.75rem; font-family: inherit;
  color: var(--ink-muted); cursor: pointer; padding: 0.2rem 0;
  transition: color 120ms;
}
.notif-action-btn:hover { color: var(--ink); }

.notif-list { flex: 1; overflow-y: auto; }
.notif-empty {
  padding: 3rem 1.5rem; text-align: center;
  color: var(--ink-faint); font-size: 0.85rem;
}

.notif-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background 120ms; position: relative;
}
.notif-item:hover { background: var(--surface-alt); }
.notif-item.is-unread { background: var(--surface-tint); border-left: 3px solid #FFCC05; padding-left: calc(1.25rem - 3px); }
.notif-item.is-unread:hover { background: #FFF3B0; }
.notif-item.is-blocker.is-unread { border-left-color: #C0392B; }
.notif-item.is-blocker.is-unread:hover { background: #FFF0EE; }

.notif-avatar {
  width: 2rem; height: 2rem;
  background: var(--mxd-black); color: var(--mxd-yellow);
  font-size: 0.65rem; font-weight: 700; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notif-avatar.is-blocker { background: #C0392B; color: #fff; font-size: 0.9rem; }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-line { font-size: 0.82rem; line-height: 1.45; color: var(--ink); }
.notif-item-line strong { color: var(--ink); }
.notif-item-line em { font-style: normal; color: var(--ink-soft); }
.notif-item-excerpt {
  font-size: 0.75rem; color: var(--ink-muted);
  margin-top: 0.2rem; line-height: 1.4; font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item-time { font-size: 0.68rem; color: var(--ink-faint); margin-top: 0.25rem; }

.notif-unread-dot {
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: #C0392B; flex-shrink: 0; margin-top: 0.4rem;
}

[data-theme="dark"] .notif-item.is-unread { background: #1C1900; }
[data-theme="dark"] .notif-item.is-unread:hover { background: #252000; }
[data-theme="dark"] .notif-item.is-blocker.is-unread { background: #1F0808; }
[data-theme="dark"] .notif-item.is-blocker.is-unread:hover { background: #2A0A0A; }
[data-theme="dark"] .notif-tab.is-active { border-bottom-color: var(--mxd-yellow); }

/* ====================== Dark mode =========================== */

[data-theme="dark"] {
  --ink:          #EEEEEE;
  --ink-soft:     #C4C4C4;
  --ink-muted:    #888888;
  --ink-faint:    #505050;
  --line:         #2A2A2A;
  --line-soft:    #222222;
  --surface:      #141414;
  --surface-alt:  #1E1E1E;
  --surface-tint: #1C1900;
  --border:       #2A2A2A;
}

/* Status pill backgrounds need explicit dark-mode overrides (hardcoded light colors) */
[data-theme="dark"] .pill-status[data-status="blocked"]  { background: #2D1010; }
[data-theme="dark"] .pill-status[data-status="complete"] { background: #0E2416; }
[data-theme="dark"] .blocked-banner                      { background: #2D1010; }

/* Cards & sections */
[data-theme="dark"] .proj-card      { background: var(--surface-alt); }
[data-theme="dark"] .proj-card:hover { background: #252525; border-color: #3A3A3A; }
[data-theme="dark"] .section-card   { background: var(--surface-alt); }

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-soft);
  padding: 0.3rem 0.55rem;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color 150ms ease, color 150ms ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--mxd-yellow); }
[data-theme="dark"] .theme-toggle { color: var(--mxd-yellow); }

/* Sync status dot */
.sync-dot {
  width: 0.45rem; height: 0.45rem; border-radius: 50%; flex-shrink: 0;
}
.sync-dot.is-syncing {
  background: var(--mxd-yellow);
  animation: syncPulse 900ms ease-in-out infinite;
}
.sync-dot.is-fallback { background: #C0392B; }
@keyframes syncPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.25; }
}
