/* Makki Demolition — the top of the owner's dashboard (Note N1, 2026-09-20).
   ==========================================================================
   Only the three panels that now open the dashboard: Today's active projects,
   Nearing bid hours, Certificates expiring soon. Everything here reuses the
   app's own black-and-gold tokens from app.css (:root) — no new colour, no new
   font, no new radius. .panel, .panel-head, .ph-sub, .cpill, .viewall, .empty,
   .warnpanel and .muted all come from app.css and are not touched here.

   Separate file on purpose: app.css was being edited by another hand the same
   night, so none of this goes near it. Registered in index.html right after
   app.css and precached by sw.js. */

/* the three panels stack, top to bottom, in Fieldflo's order */
.dash-top{ display:flex; flex-direction:column; gap:20px; margin-bottom:22px }
.dash-top .panel{ margin-bottom:0 }

/* ---------------- 1. today's active projects ---------------- */
.tap-grid{ display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(258px,1fr)) }
.tap-card{
  background:var(--panel-hd); border:1px solid var(--line);
  border-radius:var(--r-sm); padding:14px 15px 12px;
  display:flex; flex-direction:column; gap:7px;
  transition:border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.tap-card:hover,.tap-card:focus-visible{
  border-color:rgba(243,164,0,.45); transform:translateY(-2px);
  box-shadow:0 14px 28px -20px rgba(0,0,0,.9); outline:none;
}
.tap-top{ display:flex; align-items:center; justify-content:space-between; gap:10px }
.tap-id{ display:inline-flex; align-items:center; gap:7px;
  font-family:var(--mono); font-size:11.5px; letter-spacing:.06em; color:var(--mut) }
.tap-dot{ width:8px; height:8px; border-radius:50% }
.tap-name{ font-size:15px; font-weight:800; line-height:1.28; letter-spacing:.01em }
.tap-sub{ font-size:12.5px; color:var(--mut) }
.tap-crewline{ font-size:12.5px; color:var(--ink-2); padding-top:3px; border-top:1px solid var(--line); margin-top:3px }
.tap-avs{ display:flex; flex-wrap:wrap; align-items:center; gap:5px; min-height:30px }
.tap-av{
  width:30px; height:30px; border-radius:9px; display:grid; place-items:center;
  font-size:11px; font-weight:800; color:#14140f; letter-spacing:.02em;
  border:1px solid rgba(0,0,0,.35);
}
.tap-av.more{ background:transparent; color:var(--mut); border:1px dashed var(--line-2) }
.tap-go{ font-size:12px; color:var(--mut); margin-top:2px }
.tap-go b{ color:var(--gold); font-weight:700; white-space:nowrap }

/* ---------------- 2. nearing bid hours ---------------- */
.bring-grid{ display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(262px,1fr)) }
.bring-card{
  display:flex; align-items:center; gap:13px;
  background:var(--panel-hd); border:1px solid var(--line);
  border-radius:var(--r-sm); padding:12px 14px; min-height:64px;
  transition:border-color .16s ease, transform .16s ease;
}
.bring-card:hover,.bring-card:focus-visible{
  border-color:rgba(243,164,0,.45); transform:translateY(-2px); outline:none;
}
.bring{ flex:0 0 auto }
.bring-t{ font-size:16px; font-weight:800; font-family:var(--head) }
.bring-main{ min-width:0 }
.bring-name{ font-size:13.5px; font-weight:750; line-height:1.3; overflow-wrap:anywhere }
.bring-sub{ font-size:11.5px; color:var(--mut); margin-top:3px; overflow-wrap:anywhere }

/* ---------------- 3. certificates expiring soon ---------------- */
.cx-grid{ display:grid; gap:10px; grid-template-columns:repeat(auto-fill,minmax(282px,1fr)) }
.cx-row{
  display:flex; align-items:center; gap:11px;
  background:var(--panel-hd); border:1px solid var(--line);
  border-radius:var(--r-sm); padding:10px 13px; min-height:58px;
}
.cx-row.gone{ border-color:rgba(255,77,94,.38); background:rgba(255,77,94,.06) }
.cx-av{
  flex:0 0 auto; width:34px; height:34px; border-radius:10px; display:grid; place-items:center;
  font-size:11.5px; font-weight:800; color:#14140f; border:1px solid rgba(0,0,0,.35);
}
.cx-main{ min-width:0; flex:1 1 auto }
.cx-name{ font-size:13.5px; font-weight:750; line-height:1.3 }
.cx-sub{ font-size:11.5px; color:var(--ink-2); margin-top:2px; overflow-wrap:anywhere }
.cx-days{ flex:0 0 auto; text-align:right; line-height:1.15 }
.cx-days b{ display:block; font-size:17px; font-weight:800; font-family:var(--head) }
.cx-days span{ display:block; font-size:9.5px; letter-spacing:.12em; color:var(--mut); margin-top:1px }
.cx-days.soon b{ color:var(--warn) }
.cx-days.warn b{ color:#ffab54 }
.cx-days.bad b{ color:var(--bad); font-size:12.5px; letter-spacing:.06em; padding-top:3px }

/* ---------------- phone ----------------
   One card per row at 390px, and every tappable card clears the 44px thumb
   target the phone sweep (outbox/_publish/check_app_phone.cjs) asserts. */
@media(max-width:820px){
  .dash-top{ gap:16px; margin-bottom:18px }
  .tap-grid,.bring-grid,.cx-grid{ grid-template-columns:1fr; gap:12px }
  .tap-card{ padding:13px 14px 11px }
  .bring-card,.cx-row{ min-height:66px }
  .tap-name{ font-size:14.5px }
}

/* ======================================================================
   THE FOUR-TAB DASHBOARD (2026-10-04, dash-4tabs) — app-dash.js.
   Appended block: the strip, the three-column rows, the Safety tiles, the
   counters, the "See my …" button over the maps, the read-only threads.
   Same tokens as app.css (:root); .panel / .panel-head / .cpill / .viewall /
   .btn / .selwrap / .jb-f / .f2-grid come from there and are not touched.
   ====================================================================== */
.dash-tabs{ display:flex; gap:6px; margin:0 0 18px; padding:4px; background:var(--panel-2); border:1px solid var(--line); border-radius:14px }
.dash-tab{ flex:1 1 0; min-width:0; min-height:44px; appearance:none; border:1px solid transparent; border-radius:11px; background:transparent;
  color:var(--mut); font:inherit; font-size:13.5px; font-weight:800; letter-spacing:.02em; cursor:pointer; padding:0 6px; white-space:nowrap;
  display:inline-flex; align-items:center; justify-content:center; transition:background .16s ease, color .16s ease }
.dash-tab:hover{ color:var(--ink) }
.dash-tab.on{ background:linear-gradient(180deg,var(--gold-2),var(--gold)); color:#1a1206; border-color:transparent }
.dash-tab:focus-visible{ outline:2px solid var(--gold); outline-offset:2px }
.dash-pane{ min-width:0 }
.dash-g3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-bottom:20px; align-items:stretch }
.dash-g2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:20px; align-items:stretch }
.dash-g3>.panel,.dash-g2>.panel{ margin-bottom:0; min-width:0 }
.dash-links{ display:inline-flex; gap:8px; flex-wrap:wrap; justify-content:flex-end }
.dash-note{ font-size:12px; margin-top:12px }
.dash-see{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:7; box-shadow:0 10px 24px -10px rgba(0,0,0,.9); white-space:nowrap }
.dash-see-row{ margin-top:12px; text-align:center }
/* Safety tiles: five across, each with an icon, a label and the two window counts */
.dash-tiles{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; margin:0 0 20px }
.dash-tile{ background:linear-gradient(180deg,var(--panel),var(--panel-2)); border:1px solid var(--line); border-radius:14px; padding:16px 16px 14px; text-align:center; min-width:0 }
.dash-tile-ic svg{ width:34px; height:34px; color:var(--gold); opacity:.95 }
.dash-tile-l{ font-size:11.5px; letter-spacing:.08em; text-transform:uppercase; font-weight:800; color:var(--mut); margin:6px 0 8px }
.dash-tile-n{ display:flex; flex-direction:column; align-items:center; padding:5px 0; border-top:1px solid var(--line) }
.dash-tile-n b{ font-size:24px; font-weight:800; font-family:var(--head); line-height:1.05; color:var(--ink) }
.dash-tile-n span{ font-size:11.5px; color:var(--mut); margin-top:2px }
.dash-tile-note{ font-size:11px; margin-top:6px }
/* counters: the forms counts, the OHS figures, the CRM counts and money tiles */
.dash-counters{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:20px }
.dash-counter{ background:var(--panel-hd); border:1px solid var(--line); border-radius:12px; padding:14px 12px; text-align:center; min-width:0; display:flex; flex-direction:column; align-items:center; gap:3px }
.dash-counter.panel{ background:linear-gradient(180deg,var(--panel),var(--panel-2)); margin-bottom:0 }
.dash-counter b{ font-size:24px; font-weight:800; font-family:var(--head); line-height:1.05; color:var(--gold); overflow-wrap:anywhere }
.dash-counter span{ font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; font-weight:800; color:var(--mut) }
.dash-counter small{ font-size:11px }
.dash-counter.owner{ border-color:rgba(62,207,122,.3) }
.dash-crmtop{ grid-template-columns:2fr 1fr }
.dash-icons{ margin-bottom:0 }
.dash-iconcount{ text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px; min-height:190px; justify-content:center }
.dash-iconcount .dash-tile-ic svg{ width:52px; height:52px }
.dash-iconcount b{ font-size:34px; font-weight:800; font-family:var(--head); color:var(--gold); line-height:1 }
.dash-iconcount .muted{ font-size:12px }
.dash-bign{ display:flex; align-items:baseline; gap:12px; margin:0 0 14px }
.dash-bign b{ font-size:40px; font-weight:800; font-family:var(--head); color:var(--gold); line-height:1 }
.dash-bign span{ font-size:12.5px; color:var(--mut) }
.dash-late{ color:var(--bad) !important; font-weight:800 }
.dash-empsel{ margin:0; min-width:220px }
.dash-formsel,.dash-ohssel{ margin-bottom:14px }
/* the read-only threads */
.dash-threads{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px }
.dash-thread{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; appearance:none; background:var(--panel-hd); border:1px solid var(--line); border-radius:12px; padding:9px 12px; color:var(--ink); font:inherit; cursor:pointer; min-height:44px }
.dash-thread.on{ border-color:rgba(243,164,0,.5) }
.dash-thread-t{ flex:1 1 auto; min-width:0; font-size:13px }
.dash-thread-last{ font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.dash-msgbody{ display:flex; flex-direction:column; gap:8px; max-height:220px; overflow:auto; padding:4px 2px }
.dash-msg{ background:var(--panel-hd); border:1px solid var(--line); border-radius:10px; padding:8px 11px; font-size:13px }
/* ---- narrower screens: one column, five tiles become a wrap, the strip stays four equal taps ---- */
@media(max-width:1160px){
  .dash-g3,.dash-g2,.dash-crmtop{ grid-template-columns:1fr }
  .dash-tiles{ grid-template-columns:repeat(auto-fit,minmax(150px,1fr)) }
}
@media(max-width:820px){
  .dash-tabs{ gap:4px; padding:3px; margin-bottom:14px }
  .dash-tab{ font-size:12.5px; padding:0 2px; letter-spacing:0 }
  .dash-g3,.dash-g2{ gap:14px; margin-bottom:16px }
  .dash-tiles{ grid-template-columns:1fr 1fr; gap:10px }
  .dash-counters{ grid-template-columns:1fr 1fr; gap:10px }
  .dash-iconcount{ min-height:150px }
  .dash-empsel{ min-width:0; width:100% }
  .dash-links{ justify-content:flex-start }
}
