/* ── SEO / AIO Calendar — Shared Stylesheet ───────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:       #f7f5f0;
  --surf:     #ffffff;
  --surf2:    #f0ede6;
  --surf3:    #e8e4db;
  --border:   rgba(0,0,0,.08);
  --border-s: rgba(0,0,0,.15);
  --text:     #1a1814;
  --muted:    #6b6760;
  --light:    #a09c96;
  --accent:   #1d4d6e;
  --accent-l: #e8f2f8;
  --green:    #1a5c36;
  --green-l:  #e6f4ec;
  --amber:    #854f0b;
  --amber-l:  #fef4e0;
  --red:      #8b1a1a;
  --red-l:    #fde8e8;
  --purple:   #4a1d6e;
  --purple-l: #f0e8f8;
  --r:        10px;
  --sh:       0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --sh-lg:    0 4px 24px rgba(0,0,0,.10);

  /* Status colours */
  --s-todo:       #6b6760;  --s-todo-bg:       #f0ede6;
  --s-progress:   #1d4d6e;  --s-progress-bg:   #e8f2f8;
  --s-done:       #1a5c36;  --s-done-bg:       #e6f4ec;
  --s-blocked:    #8b1a1a;  --s-blocked-bg:    #fde8e8;
  --s-reviewed:   #4a1d6e;  --s-reviewed-bg:   #f0e8f8;

  /* Priority colours */
  --p-low:      #1a5c36; --p-low-bg:      #e6f4ec;
  --p-medium:   #854f0b; --p-medium-bg:   #fef4e0;
  --p-high:     #8b1a1a; --p-high-bg:     #fde8e8;
  --p-critical: #5c0000; --p-critical-bg: #ffe0e0;
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────── */
.serif { font-family: 'DM Serif Display', Georgia, serif; }
h1 { font-family: 'DM Serif Display', serif; font-size: 26px; font-weight: 400; letter-spacing: -.4px; }
h2 { font-family: 'DM Serif Display', serif; font-size: 20px; font-weight: 400; }
h3 { font-size: 15px; font-weight: 600; }
p  { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.container { max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrap  { padding: 2rem 1.5rem; max-width: 1440px; margin: 0 auto; }

/* ── HEADER ─────────────────────────────────────────────────────── */
.site-header {
  background: var(--accent);
  color: #fff;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  gap: 1rem;
}
.hdr-logo {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 17px; color: #fff; flex-shrink: 0;
}
.hdr-title { font-family: 'DM Serif Display', serif; font-size: 18px; font-weight: 400; }
.hdr-sub   { font-size: 11px; opacity: .6; }
.hdr-spacer { flex: 1; }
.hdr-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border-s);
  background: var(--surf2); color: var(--text);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--surf3); }
.btn:active { transform: scale(.98); }
.btn.pri  { background: var(--accent);  color: #fff; border-color: var(--accent); }
.btn.pri:hover { background: #163d57; }
.btn.grn  { background: var(--green);   color: #fff; border-color: var(--green); }
.btn.grn:hover { background: #134829; }
.btn.red  { background: var(--red-l);   color: var(--red); border-color: #fbb; }
.btn.red:hover { background: #fee2e2; }
.btn.sm   { font-size: 12px; padding: 5px 10px; border-radius: 6px; }
.btn.lg   { font-size: 14px; padding: 10px 20px; }
.btn.full { width: 100%; justify-content: center; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.15); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── FORM ELEMENTS ──────────────────────────────────────────────── */
.fi {
  width: 100%;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text);
  background: var(--surf2); border: 1px solid var(--border-s);
  border-radius: 8px; padding: 9px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.fi:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,77,110,.12); }
.fi.err   { border-color: var(--red); }
.fi[type=password] { letter-spacing: .1em; }
textarea.fi { resize: vertical; min-height: 80px; }
select.fi { cursor: pointer; }

.fg       { margin-bottom: 16px; }
.flbl     { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.fhint    { font-size: 11px; color: var(--light); margin-top: 4px; line-height: 1.4; }
.ferr     { font-size: 12px; color: var(--red); margin-top: 3px; }
.frow     { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--sh);
}
.card-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-body  { padding: 20px; }
.card-foot  { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── BADGES ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
/* Status */
.s-todo     { background: var(--s-todo-bg);     color: var(--s-todo); }
.s-progress { background: var(--s-progress-bg); color: var(--s-progress); }
.s-done     { background: var(--s-done-bg);     color: var(--s-done); }
.s-blocked  { background: var(--s-blocked-bg);  color: var(--s-blocked); }
.s-reviewed { background: var(--s-reviewed-bg); color: var(--s-reviewed); }
/* Priority */
.p-low      { background: var(--p-low-bg);      color: var(--p-low); }
.p-medium   { background: var(--p-medium-bg);   color: var(--p-medium); }
.p-high     { background: var(--p-high-bg);     color: var(--p-high); }
.p-critical { background: var(--p-critical-bg); color: var(--p-critical); }

/* ── TASK CHIPS (calendar grid) ─────────────────────────────────── */
.chip {
  font-size: 10px; font-weight: 500; border-radius: 4px;
  padding: 2px 5px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; cursor: pointer; transition: opacity .12s; line-height: 1.5;
}
.chip:hover { opacity: .78; }
/* Type colours — auto-assigned by JS */
.tc-0  { background: #dbeafe; color: #1e3a5f; }
.tc-1  { background: #d1fae5; color: #064e3b; }
.tc-2  { background: #fef3c7; color: #78350f; }
.tc-3  { background: #fce7f3; color: #831843; }
.tc-4  { background: #ede9fe; color: #4c1d95; }
.tc-5  { background: #f3f4f6; color: #374151; }
.tc-6  { background: #fee2e2; color: #991b1b; }
.tc-7  { background: #ecfdf5; color: #065f46; }
.tc-8  { background: #fff7ed; color: #9a3412; }
.tc-9  { background: #f0fdf4; color: #14532d; }
.tc-10 { background: #fdf4ff; color: #701a75; }
.tc-11 { background: #fff1f2; color: #881337; }

/* ── STAT CARDS ─────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 1.5rem; }
.sc { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: .9rem 1.1rem; }
.sc-num { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--accent); line-height: 1; }
.sc-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }
.sc-sub { font-size: 10px; color: var(--light); margin-top: 4px; }

/* ── MODAL ──────────────────────────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.28); z-index: 500;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-bg.on { display: flex; }
.modal {
  background: var(--surf); border-radius: 14px;
  box-shadow: var(--sh-lg); width: 520px;
  max-width: 96vw; max-height: 92vh; overflow-y: auto;
  animation: mFade .18s ease;
}
.modal.wide { width: 720px; }
.modal.narrow { width: 420px; }
@keyframes mFade { from { opacity:0; transform: translateY(10px); } }
.modal-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── SIDE PANEL ──────────────────────────────────────────────────── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.18); z-index: 300; backdrop-filter: blur(1px); }
.overlay.on { display: block; }
.side-panel {
  position: fixed; top: 0; right: -440px; width: 440px; height: 100%;
  background: var(--surf); box-shadow: -4px 0 24px rgba(0,0,0,.12);
  z-index: 400; transition: right .24s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.side-panel.on { right: 0; }
.panel-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; flex-shrink: 0; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.icon-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-s); background: var(--surf2); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: var(--muted); transition: all .15s; flex-shrink: 0; }
.icon-btn:hover { background: var(--surf3); }

/* ── TOOLBAR ─────────────────────────────────────────────────────── */
.toolbar { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 11px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 1.2rem; }
.tsep { width: 1px; height: 24px; background: var(--border-s); margin: 0 2px; }
.tlbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.vtog { display: flex; border: 1px solid var(--border-s); border-radius: 7px; overflow: hidden; }
.vbtn { padding: 6px 11px; font-size: 12px; font-weight: 500; background: var(--surf2); color: var(--muted); border: none; cursor: pointer; transition: all .15s; font-family: 'DM Sans', sans-serif; }
.vbtn.act { background: var(--accent); color: #fff; }
.fi-sm { font-size: 12px; padding: 6px 10px; border-radius: 6px; background: var(--surf2); border: 1px solid var(--border-s); color: var(--text); outline: none; font-family: 'DM Sans', sans-serif; }
.fi-sm:focus { border-color: var(--accent); }

/* ── CALENDAR GRID ───────────────────────────────────────────────── */
.cal-shell { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.mnav { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.mnav-title { font-family: 'DM Serif Display', serif; font-size: 20px; }
.mnav-btns { display: flex; gap: 6px; }
.nbtn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border-s); background: var(--surf2); color: var(--text); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all .14s; }
.nbtn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.nbtn.tday { font-size: 11px; font-weight: 600; width: auto; padding: 0 10px; }
.dow-row { display: grid; grid-template-columns: repeat(7,1fr); border-bottom: 1px solid var(--border); }
.dow-c { padding: 8px 0; text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.dow-c.sun { color: #e55; }
.mgrid { display: grid; grid-template-columns: repeat(7,1fr); }
.dc { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 100px; padding: 6px 5px 4px; cursor: pointer; transition: background .1s; }
.dc:nth-child(7n) { border-right: none; }
.dc:hover { background: var(--surf2); }
.dc.empty { background: var(--bg); cursor: default; }
.dc.empty:hover { background: var(--bg); }
.dc.today { background: var(--accent-l); }
.dc.today .dnum { background: var(--accent); color: #fff; }
.dc.sun-c .dnum { color: #e55; }
.dc.overdue-day { background: #fff8f8; }
.dnum { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.chip-more { font-size: 10px; color: var(--light); font-weight: 500; margin-top: 1px; }

/* ── WEEK VIEW ───────────────────────────────────────────────────── */
.wnav { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surf2); }
.wgrid { display: grid; grid-template-columns: repeat(7,1fr); border-top: 1px solid var(--border); }
.wday-h { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.wday-h.tc { background: var(--accent-l); }
.wday-name { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wday-num  { font-family: 'DM Serif Display', serif; font-size: 18px; }
.wcol { border-right: 1px solid var(--border); min-height: 200px; padding: 5px 4px; cursor: pointer; transition: background .1s; }
.wcol:hover { background: var(--surf2); }
.wcol:last-child { border-right: none; }

/* ── LIST VIEW ───────────────────────────────────────────────────── */
.lgroup { border-bottom: 1px solid var(--border); }
.lday-h { padding: 10px 16px; display: flex; align-items: center; gap: 10px; background: var(--surf2); cursor: pointer; }
.lday-h:hover { background: var(--surf3); }
.lday-date { font-family: 'DM Serif Display', serif; font-size: 15px; color: var(--accent); min-width: 110px; }
.lday-dow  { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.lday-cnt  { margin-left: auto; font-size: 11px; background: var(--border); padding: 2px 7px; border-radius: 20px; color: var(--muted); font-weight: 600; }
.ltasks    { display: none; }
.ltasks.open { display: block; }
.ltask { padding: 9px 16px 9px 28px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); cursor: pointer; transition: background .1s; flex-wrap: wrap; }
.ltask:hover { background: var(--surf2); }
.ltask-name { font-size: 13px; flex: 1; min-width: 160px; }

/* ── SCORECARD VIEW ──────────────────────────────────────────────── */
.sc-table-wrap { overflow-x: auto; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--border-s); cursor: pointer; white-space: nowrap; user-select: none; }
.sc-table th:hover { color: var(--accent); }
.sc-table th .sort-arr { font-size: 9px; margin-left: 3px; opacity: .5; }
.sc-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.sc-table tr:last-child td { border-bottom: none; }
.sc-table tr:hover td { background: var(--surf2); }
.sc-table tr.overdue td { background: #fff8f8; }
.prog-bar { height: 6px; background: var(--surf3); border-radius: 3px; overflow: hidden; min-width: 60px; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.prog-fill.behind { background: var(--red); }
.prog-fill.ahead  { background: var(--green); }
.score-cell { display: flex; align-items: center; gap: 8px; }
.score-num { font-family: 'DM Serif Display', serif; font-size: 15px; min-width: 26px; }
.score-target { font-size: 11px; color: var(--muted); }
.delta { font-size: 12px; font-weight: 600; }
.delta.pos { color: var(--green); }
.delta.neg { color: var(--red); }
.url-cell a { color: var(--accent); font-size: 11px; max-width: 140px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── INLINE STATUS SELECT ────────────────────────────────────────── */
select.status-select {
  font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 6px;
  border: 1px solid transparent; cursor: pointer; outline: none; font-family: 'DM Sans', sans-serif;
}

/* ── LEGEND ──────────────────────────────────────────────────────── */
.legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.leg-lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.leg { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; padding: 3px 8px; border-radius: 20px; transition: all .14s; user-select: none; }
.leg:hover { background: var(--surf); }
.leg.dim { opacity: .3; }
.ldot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }

/* ── BAR CHART ───────────────────────────────────────────────────── */
.chart-box { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.bw { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.bw:hover .b { opacity: .72; }
.b { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; transition: opacity .14s; min-height: 2px; }
.b.cur { background: var(--amber); }
.bm { font-size: 9px; color: var(--light); font-weight: 600; text-transform: uppercase; }
.bc { font-size: 9px; color: var(--muted); font-weight: 600; }

/* ── TOAST ───────────────────────────────────────────────────────── */
#toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.2); animation: tSlide .2s ease; max-width: 320px; pointer-events: all; }
.toast.ok  { background: #166534; }
.toast.err { background: var(--red); }
.toast.warn{ background: var(--amber); }
@keyframes tSlide { from { transform: translateY(12px); opacity: 0; } }

/* ── ALERT BOX ───────────────────────────────────────────────────── */
.alert { display: none; padding: 11px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert.on { display: block; }
.alert.err  { background: var(--red-l);   color: var(--red);   border: 1px solid #fbb; }
.alert.ok   { background: var(--green-l); color: var(--green); border: 1px solid #9dc; }
.alert.warn { background: var(--amber-l); color: var(--amber); border: 1px solid #f6cc7e; }

/* ── BREADCRUMB ──────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 1.4rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); }
.breadcrumb .sep { color: var(--light); }

/* ── TASK PANEL CARD ─────────────────────────────────────────────── */
.ptask { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 13px; margin-bottom: 9px; cursor: pointer; transition: box-shadow .14s; }
.ptask:hover { box-shadow: var(--sh); }
.ptask-name { font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.ptask-meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prog-inline { height: 4px; background: var(--surf3); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.prog-inline-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.padd-btn { width: 100%; margin-top: 4px; text-align: center; font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 9px; border: 1px dashed var(--border-s); border-radius: var(--r); background: none; color: var(--muted); cursor: pointer; transition: all .14s; }
.padd-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── IMPORT WIZARD ───────────────────────────────────────────────── */
.wizard-step { display: none; }
.wizard-step.on { display: block; }
.step-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.step-tab { padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.step-tab.act { color: var(--accent); border-bottom-color: var(--accent); }
.col-map-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.col-map-label { color: var(--muted); min-width: 160px; font-family: monospace; font-size: 12px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
.preview-table th { background: var(--surf2); padding: 6px 10px; text-align: left; font-size: 11px; border-bottom: 1px solid var(--border-s); }
.preview-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.preview-table tr:hover td { background: var(--surf2); }

/* ── PROJECT CARDS (admin dashboard) ────────────────────────────── */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.proj-card { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; cursor: pointer; transition: box-shadow .14s, transform .14s; }
.proj-card:hover { box-shadow: var(--sh-lg); transform: translateY(-1px); }
.proj-bar { height: 4px; }
.proj-body { padding: 14px 16px; }
.proj-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.proj-client { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.proj-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.proj-meta strong { color: var(--text); }
.cal-list { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.cal-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--surf2); border-radius: 7px; cursor: pointer; font-size: 13px; transition: background .12s; }
.cal-item:hover { background: var(--surf3); }
.cal-item-name { flex: 1; font-weight: 500; }
.cal-item-counts { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── EMPTY STATES ────────────────────────────────────────────────── */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .4; }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 13px; }

/* ── SECTION DIVIDER ─────────────────────────────────────────────── */
.sec-div { margin: 20px 0 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.sec-div-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 12px; }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hdr-sub { display: none; }
  .page-wrap { padding: 1rem; }
  .frow { grid-template-columns: 1fr; }
  .side-panel { width: 100%; right: -100%; }
  .dc { min-height: 70px; }
  .sc-table { min-width: 700px; }
  .modal { width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; position: fixed; bottom: 0; top: auto; }
  .proj-grid { grid-template-columns: 1fr; }
}

/* ── PRINT ───────────────────────────────────────────────────────── */
@media print {
  .site-header, .toolbar, .stats-row, .chart-box, .legend, .overlay, .side-panel, #toast-stack, .btn, .mnav-btns { display: none !important; }
  .cal-shell { box-shadow: none; border: 1px solid #ccc; }
  .dc { min-height: 80px; }
}
