/* ─── Dashboard overview (default landing tab) ──────────────────────────────── */

/* The overview reads best wide; widen the board only while it's showing. */
.board-wrap.is-wide { max-width: 1680px; }

/* Shared white "section card" wrapper. */
.dh-dnu, .dh-col {
  background: var(--bg, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.06));
  padding: 20px 22px;
}

/* ─── "DO NOT USE" — non-operational GSE assets ─────────────────────────────── */
.dh-dnu { margin-bottom: 22px; }
.dh-dnu-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px;
  margin-bottom: 14px;
}
.dh-dnu-flag {
  font-family: var(--font-display, Georgia, serif);
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #B42318;
}
.dh-dnu-flag-ok { color: #2f6b45; }
.dh-dnu-sub { font-size: 13px; font-weight: 500; color: var(--fg-muted, #575760); }

.dh-dnu-clear .dh-dnu-head { margin-bottom: 0; align-items: center; }

.dh-dnu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 12px;
}
.dh-dnu-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left;
  padding: 16px 18px;
  background: #fcf0ee;
  border: 1.5px solid #e9b9b2;
  border-left: 5px solid #B42318;
  border-radius: var(--radius-lg, 16px);
  cursor: pointer;
  font-family: var(--font-body, sans-serif);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.dh-dnu-card:hover {
  border-color: #B42318;
  box-shadow: 0 6px 22px rgba(180,35,24,0.18);
  transform: translateY(-1px);
}
.dh-dnu-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff; background: #B42318;
  padding: 3px 8px; border-radius: var(--radius-full, 9999px);
}
.dh-dnu-name { font-size: 16px; font-weight: 700; color: #1c1c1c; margin-top: 4px; }
.dh-dnu-status { font-size: 12.5px; font-weight: 600; color: #97271c; }
.dh-dnu-meta { font-size: 12px; color: #8a6a66; }

/* ─── Two-column body (To-Dos | Notes) ──────────────────────────────────────── */
.dh-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
}
@media (max-width: 900px) { .dh-columns { grid-template-columns: 1fr; } }

/* Left column stacks two boxes (To-Dos over Inventory). */
.dh-col-stack { display: flex; flex-direction: column; gap: 22px; }

.dh-col-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.dh-col-actions { display: inline-flex; align-items: center; gap: 8px; }
.dh-add-btn { padding: 8px 14px; font-size: 12px; white-space: nowrap; }
.dh-col-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 18px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--fg-strong, #0A0A0A);
  margin: 0;
}
.dh-col-link {
  background: transparent; border: none; cursor: pointer;
  font-family: var(--font-body, sans-serif);
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--gold-dark, #9A8145);
  padding: 4px 6px; border-radius: var(--radius-full, 9999px);
}
.dh-col-link:hover { background: var(--gold-subtle, rgba(183,155,88,0.12)); }

.dh-todos, .dh-notes, .dh-inv-list { display: flex; flex-direction: column; gap: 10px; }

/* ─── Notes date grouping (Pinned · Upcoming · Today · Earlier) ───────────────
   Mirrors the Notes tab's .notes-group, tuned for the compact overview column. */
.dh-notes-group { display: flex; flex-direction: column; gap: 10px; }
.dh-notes-group + .dh-notes-group { margin-top: 8px; }
.dh-notes-group-head { display: flex; align-items: center; gap: 9px; }
.dh-notes-group-head::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border, rgba(0,0,0,0.08));
}
.dh-notes-group-label {
  font-family: var(--font-display, Georgia, serif);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-muted, #667085);
}
.dh-notes-group-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  font-size: 10.5px; font-weight: 700;
  color: var(--fg-muted, #667085);
}
/* Today is the anchor — give it the gold treatment. */
.dh-notes-group-today .dh-notes-group-label { color: var(--gold-dark, #9A8145); }
.dh-notes-group-today .dh-notes-group-head::after { background: var(--gold, #B79B58); opacity: 0.4; }
.dh-notes-group-today .dh-notes-group-count {
  background: var(--gold-subtle, rgba(183,155,88,0.12));
  color: var(--gold-dark, #9A8145);
}
.dh-notes-group-pinned .dh-notes-group-label { color: var(--gold-dark, #9A8145); }
.dh-notes-group-earlier .dh-notes-group-label { opacity: 0.8; }

.dh-empty {
  text-align: center; padding: 36px 16px;
  color: var(--fg-faint, #888);
  font-size: 14px; font-weight: 500;
  background: var(--bg-soft, rgba(0,0,0,0.02));
  border: 1px dashed var(--border-strong, rgba(0,0,0,0.12));
  border-radius: var(--radius-lg, 16px);
}

/* ─── Compact to-do row ─────────────────────────────────────────────────────── */
.dh-todo {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-soft, #f7f6f3);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-left: 4px solid var(--gray, #888);
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.dh-todo:hover { background: var(--bg, #fff); box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.08)); transform: translateY(-1px); }
.dh-todo.urg-overdue {
  border-left-color: #D92D20;
  animation: dh-overdue-pulse 2s ease-in-out infinite;
}
@keyframes dh-overdue-pulse {
  0%, 100% { background: rgba(217,45,32,0.05); box-shadow: none; }
  50%      { background: rgba(217,45,32,0.16); box-shadow: 0 0 0 1px rgba(217,45,32,0.35), var(--shadow-card, 0 4px 24px rgba(0,0,0,0.08)); }
}
.dh-todo.urg-red     { border-left-color: #E0533D; }
.dh-todo.urg-yellow  { border-left-color: #E5A000; }
.dh-todo.urg-grey    { border-left-color: #b6b6b6; }

.dh-todo-check {
  flex-shrink: 0;
  width: 24px; height: 24px; margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--border-strong, rgba(0,0,0,0.22));
  background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  font-size: 13px; line-height: 1;
  transition: all 0.15s ease;
}
.dh-todo-check:hover { border-color: #2f6b45; color: #2f6b45; background: #eaf5ee; }

.dh-todo-main { flex: 1; min-width: 0; cursor: pointer; }
.dh-todo-task {
  margin: 0;
  font-size: 14.5px; line-height: 1.45; font-weight: 500;
  color: var(--fg, #1A1A1A); word-break: break-word;
}
.dh-todo-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
/* "Posted by" pill — who created the to-do. */
.dh-todo-poster {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--fg-muted, #575760);
  background: var(--bg-subtle, #F4F4F2);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius-full, 9999px);
}
.dh-todo-poster span { font-size: 11px; line-height: 1; opacity: 0.7; }
.dh-todo-poster .dh-todo-poster-time { font-weight: 500; opacity: 1; color: var(--fg-faint, #888); }

/* Attachments on dashboard cards — reuse the shared .att-* styles but scale
   them down to suit the compact overview cards. */
.dh-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.dh-attachments .att-img { width: 64px; height: 64px; }
.dh-attachments .att-file { max-width: 200px; padding: 7px 11px; }
.dh-attachments .att-file-name { font-size: 12px; }
.dh-todo-cl {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 11px;
  font-family: var(--font-body, sans-serif);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--gold-dark, #9A8145);
  background: var(--gold-subtle, rgba(183,155,88,0.12));
  border: none; border-radius: var(--radius-full, 9999px);
  cursor: pointer; transition: background 0.15s ease-out, color 0.15s ease-out;
}
.dh-todo-cl:hover { background: var(--gold, #B79B58); color: #fff; }
.dh-todo-countdown {
  flex-shrink: 0;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-muted, #575760);
  white-space: nowrap; padding-top: 2px;
}
.dh-todo.urg-overdue .dh-todo-countdown { color: #B42318; }
.dh-todo.urg-red .dh-todo-countdown     { color: #B42318; }
.dh-todo.urg-yellow .dh-todo-countdown  { color: #8a6300; }

/* ─── Compact inventory + PMCS row (shared) ─────────────────────────────────── */
.dh-inv {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-soft, #f7f6f3);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-left: 4px solid var(--gray, #888);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.dh-inv:hover { background: var(--bg, #fff); box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.08)); transform: translateY(-1px); }
.dh-inv.urg-overdue { border-left-color: #B42318; }
.dh-inv.urg-soon    { border-left-color: #E5A000; }

.dh-inv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dh-inv-name { font-size: 14.5px; font-weight: 600; color: var(--fg-strong, #0A0A0A); }
.dh-inv-sub { font-size: 12px; color: var(--fg-muted, #575760); }
.dh-inv-due {
  flex-shrink: 0;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--fg-muted, #575760); white-space: nowrap;
}
.dh-inv-due.urg-overdue { color: #B42318; }
.dh-inv-due.urg-soon    { color: #8a6300; }

/* ─── Compact note card ─────────────────────────────────────────────────────── */
.dh-note {
  background: var(--bg-soft, #f7f6f3);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-left: 4px solid var(--gold, #B79B58);
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.dh-note:hover { background: var(--bg, #fff); box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.08)); transform: translateY(-1px); }
.dh-note.is-pinned { background: var(--gold-subtle, rgba(183,155,88,0.08)); }

.dh-note.accent-priority { border-left-color: #D92D20; background: rgba(217,45,32,0.04); }
.dh-note.accent-gse      { border-left-color: #DC6803; }
.dh-note.accent-admin    { border-left-color: #98A2B3; }
.dh-note.accent-customer { border-left-color: #0BA5EC; }
.dh-note.accent-elliott  { border-left-color: #7A5AF8; }
.dh-note.accent-rental   { border-left-color: #EE46BC; }
.dh-note.accent-inflight { border-left-color: #875BF7; }
.dh-note.accent-school   { border-left-color: #12B76A; }
.dh-note.accent-fuel     { border-left-color: #4E5BA6; }
.dh-note.accent-qcc      { border-left-color: #B54708; }
.dh-note.accent-none     { border-left-color: var(--gold, #B79B58); }

.dh-note-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.dh-note-date {
  font-family: var(--font-display, Georgia, serif);
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fg-strong, #0A0A0A);
}
.dh-note-pin {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark, #9A8145);
}
.dh-note-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.dh-note-body {
  margin: 0 0 8px;
  font-size: 14.5px; line-height: 1.5;
  color: var(--fg, #1A1A1A); word-break: break-word;
}
.dh-note-from { font-size: 11.5px; font-weight: 500; color: var(--fg-muted, #575760); }

/* Flash a card when deep-linked from the overview. */
@keyframes note-flash {
  0%   { box-shadow: 0 0 0 3px rgba(183,155,88,0.55); }
  100% { box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.06)); }
}
.note-card.note-flash { animation: note-flash 2.2s ease-out; }

/* ─── Read-only comment previews on dashboard cards ─────────────────────────── */
/* Let the to-do row wrap so its comments sit full-width below the row. */
.dh-todo { flex-wrap: wrap; }
.dh-cmts {
  width: 100%;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong, rgba(0,0,0,0.14));
  display: flex; flex-direction: column; gap: 7px;
}
.dh-cmts-head {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-faint, #888);
}
.dh-cmt-more { font-size: 11px; font-style: italic; color: var(--fg-faint, #888); }
.dh-cmt { display: flex; flex-direction: column; gap: 1px; }
.dh-cmt-top { display: flex; align-items: baseline; gap: 7px; }
.dh-cmt-who { font-size: 11.5px; font-weight: 700; color: var(--fg-strong, #0A0A0A); }
.dh-cmt-time { font-size: 10px; color: var(--fg-faint, #888); }
.dh-cmt-body { font-size: 12.5px; line-height: 1.4; color: var(--fg, #1A1A1A); word-break: break-word; }
