/* ESS Admin Console landing dashboard (Owner-approved design, 2026-10-14). Proportions follow the approved 1536px
   reference: 208px sidebar, 135px hero, five 107px KPI cards, schedule : right column = 0.91 : 1, bottom row
   1.2 : 1 : 1.03. The hero photo slot is --db-hero-photo (none until the Owner supplies an image). */
.db {
  --db-ink: #14213d; --db-text: #1f2937; --db-muted: #667085; --db-line: #e4e8ef; --db-soft: #f1f4f8;
  --db-blue: #2f6fe0; --db-green: #1e9e5a; --db-amber: #d98a1c; --db-red: #d93a3a; --db-violet: #7c5cdb;
  --db-hero-photo: none;
  margin: -16px -20px -32px; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--db-text);
}
#message:empty { display: none; }
body.ess-shell { background: #eef1f6; }

/* ---------------------------------------------------------------- hero */
.db-hero {
  position: relative; height: 135px; display: flex; justify-content: space-between; align-items: center;
  padding: 0 32px; color: #fff; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9,20,42,.94) 0%, rgba(12,28,58,.80) 45%, rgba(12,28,58,.70) 70%, rgba(9,20,42,.90) 100%),
    var(--db-hero-photo) center / cover no-repeat,
    radial-gradient(ellipse 30% 70% at 62% 85%, rgba(232,183,104,.22), transparent 70%),
    radial-gradient(ellipse 22% 55% at 80% 75%, rgba(232,183,104,.16), transparent 70%),
    linear-gradient(180deg, #1a2f57 0%, #0d1d3c 100%);
}
.db-hero-art {
  position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255,255,255,.18) 46px 47px) 46% 100% / 30% 52% no-repeat,
    linear-gradient(180deg, transparent 0, transparent 40%, rgba(255,220,160,.35) 40% 100%) 46% 100% / 30% 52% no-repeat;
}
.db-greeting { position: relative; margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 46px; line-height: 1; letter-spacing: .2px; }
.db-hero-right { position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; padding-top: 18px; }
.db-hero-controls { display: flex; align-items: center; gap: 22px; }
.db-search { display: flex; align-items: center; gap: 10px; width: 292px; height: 39px; padding: 0 14px; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.db-search-ic { width: 18px; height: 18px; color: #475467; flex: 0 0 18px; }
.db-search input { border: 0; outline: 0; font: 12.5px Inter, system-ui, sans-serif; color: var(--db-text); width: 100%; background: transparent; }
.db-search input::placeholder { color: #667085; }
.db-bell { position: relative; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.db-bell .ess-ic { display: block; width: 28px; height: 28px; }
.db-bell-count { position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }
.db-user { display: flex; align-items: center; gap: 12px; }
.db-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e2c793, #9b7a43); color: #14213d; font-weight: 700; font-size: 14px; border: 2px solid rgba(255,255,255,.85); }
.db-user-text { display: flex; flex-direction: column; line-height: 1.25; }
.db-user-text b { font-size: 16px; font-weight: 600; }
.db-user-text small { font-size: 12px; color: #c9d1df; }
.db-caret { width: 18px; height: 18px; color: #fff; margin-left: 14px; }
.db-tagline { margin-top: 14px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 25px; font-weight: 500; color: #dcc08a; letter-spacing: .2px; }
.db-place { margin-top: 4px; display: flex; align-items: center; gap: 10px; font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; color: #fff; }
.db-place .db-sep { color: #c9a464; letter-spacing: 0; }
.db-rule { display: inline-block; width: 30px; height: 2px; background: #c9a464; margin-left: 4px; }

/* ---------------------------------------------------------------- body + cards */
.db-body { padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.db-card { background: #fff; border: 1px solid var(--db-line); border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); padding: 13px 16px; min-width: 0; }
.db-card h2 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--db-ink); display: flex; align-items: center; gap: 10px; }
.db-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.db-viewall { display: inline-flex; align-items: center; gap: 4px; color: var(--db-blue); font-size: 12.5px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.db-viewall .ess-ic { width: 15px; height: 15px; }
.db-count { display: inline-block; min-width: 26px; height: 18px; line-height: 18px; padding: 0 8px; border-radius: 9px; font-size: 11px; font-weight: 700; text-align: center; color: #fff; }
.db-count.red { background: #e5484d; } .db-count.blue { background: var(--db-blue); }
.db-sample { display: inline-block; font-size: 9.5px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: #8a6d3b; background: #fbf3e2; border: 1px solid #efdcb4; border-radius: 4px; padding: 0 5px; line-height: 15px; }
.db-empty { color: var(--db-muted); font-size: 13px; margin: 10px 0 0; }
.db-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: #98a2b3; }
.db-dot.t-green { background: #22a565; } .db-dot.t-blue { background: #2f6fe0; } .db-dot.t-amber { background: #f0a020; }
.db-dot.t-red { background: #e5484d; } .db-dot.t-violet { background: var(--db-violet); } .db-dot.t-navy { background: #3d4f7a; } .db-dot.t-grey { background: #b0b8c6; }

/* ---------------------------------------------------------------- KPI cards */
.db-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.db-kpi { position: relative; display: flex; gap: 15px; height: 107px; padding: 16px 8px 14px 16px; background: #fff; border: 1px solid var(--db-line); border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); text-decoration: none; color: inherit; }
.db-kpi:hover { border-color: #c8d3e6; }
.db-kpi-ic { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.db-kpi-ic .ess-ic { width: 28px; height: 28px; }
.t-blue.db-kpi-ic { background: #e7effd; color: var(--db-blue); } .t-green.db-kpi-ic { background: #e2f4ea; color: var(--db-green); }
.t-amber.db-kpi-ic { background: #fdf1dc; color: var(--db-amber); } .t-red.db-kpi-ic { background: #fde7e7; color: var(--db-red); }
.t-violet.db-kpi-ic { background: #efe9fc; color: var(--db-violet); }
.db-kpi-body { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.db-kpi-label { font-size: 14.5px; font-weight: 600; color: var(--db-ink); margin-top: 2px; }
.db-kpi-value { font-size: 26px; font-weight: 700; color: var(--db-ink); line-height: 1.25; margin-top: 2px; }
.db-kpi-value.hot { color: var(--db-red); }
.db-kpi-detail { margin-top: auto; font-size: 10px; letter-spacing: -.2px; color: #5d6678; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-kpi-chev { position: absolute; top: 22px; right: 12px; width: 18px; height: 18px; color: #6b7280; }
.db-kpi-dot { position: absolute; top: 12px; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: #d4a95a; }

/* ---------------------------------------------------------------- rows */
.db-row2 { display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1fr); gap: 12px; }
.db-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.db-col .db-team { flex: 1 1 auto; }
.db-row3 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.03fr); gap: 12px; }

/* ---------------------------------------------------------------- Today's Schedule */
.db-sched { display: flex; flex-direction: column; }
.db-date { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #475467; }
.db-iconbtn { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #344054; cursor: pointer; }
.db-iconbtn .ess-ic { display: block; width: 20px; height: 20px; }
.db-sched-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.db-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-right: auto; }
.db-tab { height: 30px; padding: 0 13px; border-radius: 15px; border: 1px solid var(--db-line); background: #fff; font: 500 12px Inter, system-ui, sans-serif; color: #344054; cursor: pointer; }
.db-tab.on { background: var(--db-blue); border-color: var(--db-blue); color: #fff; }
.db-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--db-line); border-radius: 6px; background: #fff; font: 500 11px Inter, system-ui, sans-serif; color: #344054; text-decoration: none; cursor: pointer; }
.db-btn .ess-ic { width: 15px; height: 15px; }
.db-srows { display: flex; flex-direction: column; }
.db-srow { display: grid; grid-template-columns: 62px 3px minmax(0, 1fr) auto 24px; align-items: center; column-gap: 16px; min-height: 56px; padding: 3px 0; border-bottom: 1px solid #eef0f4; }
.db-stime { font-size: 12.5px; color: #344054; }
.db-sbar { width: 3px; height: 42px; border-radius: 2px; }
.db-sbar.t-blue { background: var(--db-blue); } .db-sbar.t-gold { background: #e3b65f; }
.db-saddr { font-size: 13.5px; font-weight: 600; color: var(--db-ink); }
.db-smeta { display: flex; align-items: center; gap: 14px; margin-top: 5px; }
.db-pill { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 4px; }
.db-pill.p-blue { background: #e4ecfd; color: #2556c9; } .db-pill.p-amber { background: #fdefd3; color: #8f5f0e; }
.db-sperson { font-size: 12.5px; color: var(--db-muted); }
.db-status { font-size: 12.5px; color: #344054; white-space: nowrap; }
.db-kebab { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #475467; cursor: pointer; }
.db-kebab .ess-ic { display: block; width: 20px; height: 20px; }
.db-full { margin-top: auto; padding-top: 10px; font-size: 13px; }

/* ---------------------------------------------------------------- Task Pipeline */
.db-pipe { padding-bottom: 13px; }
.db-pipeline { display: flex; height: 98px; }
.db-stage {
  flex: 1 1 0; min-width: 0; margin-left: -9px; padding: 0 2px 0 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}
.db-stage.s1 { margin-left: 0; padding-left: 8px; border-radius: 6px 0 0 6px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.db-stage.s7 { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); border-radius: 0 6px 6px 0; }
.db-stage-label { font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--db-ink); }
.db-stage-value { font-size: 24px; font-weight: 700; color: var(--db-ink); line-height: 1.3; }
.db-stage-sub { font-size: 10px; color: #475467; white-space: nowrap; }
.s1 { background: #14306a; } .s1 span { color: #fff !important; }
.s2 { background: #dce7fb; } .s3 { background: #fbebc8; } .s4 { background: #fbdfd5; }
.s4 { flex-grow: 1.22; }
.s5 { background: #d3efe5; } .s6 { background: #e4dcf8; } .s7 { background: #e7ebf2; }

/* ---------------------------------------------------------------- tables (Live Team, Needs My Attention) */
.db-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.db-table th { text-align: left; font-size: 12px; font-weight: 500; color: #475467; padding: 0 8px 8px; border-bottom: 1px solid var(--db-line); }
.db-table td { font-size: 12.5px; color: var(--db-text); padding: 5px 8px; border: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-team .db-table td { padding: 4px 8px; }
.db-team .db-table th:nth-child(1) { width: 25%; } .db-team .db-table th:nth-child(2) { width: 17%; }
.db-team .db-table th:nth-child(3) { width: 19%; } .db-team .db-table th:nth-child(5) { width: 13%; }
.db-attn .db-table td { padding: 4px 8px; border-bottom: 1px solid #f0f2f6; }
.db-attn .db-table th:nth-child(1) { width: 22%; } .db-attn .db-table th:nth-child(3) { width: 26%; } .db-attn .db-table th:nth-child(4) { width: 12%; }
.db-type.tone-red { color: var(--db-red); } .db-type.tone-amber { color: var(--db-amber); } .db-type.tone-violet { color: var(--db-violet); } .db-type.tone-navy { color: #3d4f7a; }
.db-age { color: #475467; } .db-age.hot { color: var(--db-red); font-weight: 600; }

/* ---------------------------------------------------------------- Recent Communications */
.db-comms { display: flex; flex-direction: column; }
.db-crow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 14px; align-items: center; padding: 3px 0 4px; }
.db-cic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.db-cic .ess-ic { width: 20px; height: 20px; }
.db-cic.t-blue { background: #e6eefd; color: var(--db-blue); } .db-cic.t-sky { background: #e3efff; color: #3b82f6; }
.db-cic.t-red { background: #fde6e6; color: var(--db-red); } .db-cic.t-green { background: #e2f4ea; color: var(--db-green); } .db-cic.t-grey { background: var(--db-soft); color: #475467; }
.db-ctitle { font-size: 12.5px; font-weight: 600; color: var(--db-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-cprev { font-size: 12px; color: var(--db-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-cage { font-size: 11.5px; color: var(--db-muted); align-self: start; padding-top: 2px; white-space: nowrap; }

/* ---------------------------------------------------------------- Quick Actions + Shortcuts */
.db-quick h2 { margin-bottom: 10px; }
.db-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.db-action { height: 58px; border: 0; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: 500 11.5px Inter, system-ui, sans-serif; color: #1f2937; text-decoration: none; cursor: pointer; }
.db-action .ess-ic { width: 24px; height: 24px; }
.db-action.t-blue { background: #e8effd; } .db-action.t-blue .ess-ic { color: var(--db-blue); }
.db-action.t-green { background: #e3f3e8; } .db-action.t-green .ess-ic { color: var(--db-green); }
.db-action.t-violet { background: #ece6fb; } .db-action.t-violet .ess-ic { color: var(--db-violet); }
.db-action.t-amber { background: #fcefdc; } .db-action.t-amber .ess-ic { color: var(--db-amber); }
.db-action.t-slate { background: #e8edf3; } .db-action.t-slate .ess-ic { color: #2f4a73; }
.db-action.t-rose { background: #fbe5e5; } .db-action.t-rose .ess-ic { color: var(--db-red); }
.db-action:hover { filter: brightness(.97); }
.db-short-h { margin-top: 12px; }
.db-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.db-shortcut { height: 29px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--db-line); border-radius: 5px; background: #fff; font-size: 12px; color: #1f2937; text-decoration: none; }
.db-shortcut .ess-ic { width: 18px; height: 18px; color: var(--db-blue); }
.db-shortcut:hover { border-color: #c8d3e6; }

/* ---------------------------------------------------------------- other admin views inside the shell */
body.ess-shell .page { padding: 16px 20px 32px; }
.db-soon { max-width: 640px; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1350px) {
  .db-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .db-quick { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .db-row2 { grid-template-columns: minmax(0, 1fr); }
  .db-hero { height: auto; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 20px; }
  .db-hero-right { align-items: flex-start; padding-top: 0; }
  .db-pipeline { overflow-x: auto; }
  .db-stage { min-width: 96px; }
}
@media (max-width: 720px) {
  .db-kpis, .db-row3 { grid-template-columns: minmax(0, 1fr); }
  .db-hero-controls { flex-wrap: wrap; gap: 12px; }
  .db-search { width: 100%; }
  .db-greeting { font-size: 36px; }
  .db-srow { grid-template-columns: 56px 3px minmax(0, 1fr) 24px; }
  .db-srow .db-status { grid-column: 3; }
  .db-team, .db-attn { overflow-x: auto; }
  .db-table { min-width: 520px; }
}

/* ---------------------------------------------------------------- Systems (connection status) */
.db-systems-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.db-systems-card h2 { font-size: 13px; margin: 0; flex: 0 0 auto; }
.db-systems { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 11px; }
.db-sys { display: inline-flex; align-items: center; font-size: 11.5px; white-space: nowrap; cursor: default; }
.db-sys .db-dot { margin-right: 5px; }
.db-sys b { font-weight: 500; color: var(--db-ink); }
.db-sys.bad b { color: var(--db-red); }
.db-sys-st { margin-left: 5px; color: var(--db-red); font-size: 11.5px; }
.db-row3 > .db-col .db-attn { flex: 1 1 auto; }
.db-row3 > .db-col { gap: 8px; }

/* ---------------------------------------------------------------- ESS brand palette (Owner 2026-10-14: "my colors are
   black, gold, white, mainly"). Black and white carry the page, gold is the accent; red / amber / green stay only
   where they mean something (overdue, waiting, working / connected). */
.db {
  --db-ink: #111111; --db-text: #1a1a1a; --db-muted: #6b6b6b; --db-line: #e8e4da; --db-soft: #f6f3ec;
  --db-blue: #9c7a35;             /* the accent everywhere the design used blue: dark gold, readable on white */
  --db-gold: #c9a464; --db-gold-tint: #f7f0e1; --db-gold-line: #e9dcbf;
}
body.ess-shell { background: #f4f2ee; }
.db-hero {
  background:
    linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(10,10,10,.82) 45%, rgba(10,10,10,.72) 70%, rgba(0,0,0,.92) 100%),
    var(--db-hero-photo) center / cover no-repeat,
    radial-gradient(ellipse 30% 70% at 62% 85%, rgba(232,183,104,.22), transparent 70%),
    radial-gradient(ellipse 22% 55% at 80% 75%, rgba(232,183,104,.16), transparent 70%),
    linear-gradient(180deg, #1c1c1c 0%, #050505 100%);
}
.db-avatar { color: #111; }
.db-kpi:hover, .db-shortcut:hover { border-color: var(--db-gold-line); }
.t-blue.db-kpi-ic { background: var(--db-gold-tint); color: var(--db-blue); }
.t-violet.db-kpi-ic { background: #f0efec; color: #111; }
.db-tab.on { background: #111; border-color: #111; color: #fff; }
.db-count.blue { background: #111; }
.db-pill.p-blue { background: #f0efec; color: #2b2b2b; }
.db-pill.p-amber { background: var(--db-gold-tint); color: #7a5a1c; }
.db-sbar.t-blue { background: #111; } .db-sbar.t-gold { background: var(--db-gold); }
.s1 { background: #111; }
.s2 { background: #f7f0e1; } .s3 { background: #f1e5c8; } .s4 { background: #ead9b0; }
.s5 { background: #e2cd98; } .s6 { background: #d9c085; } .s7 { background: #ecebe7; }
.db-cic.t-blue, .db-cic.t-sky { background: var(--db-gold-tint); color: var(--db-blue); }
.db-action { border: 1px solid transparent; }
.db-action.t-blue, .db-action.t-violet, .db-action.t-amber { background: var(--db-gold-tint); border-color: var(--db-gold-line); }
.db-action.t-green, .db-action.t-slate, .db-action.t-rose { background: #f4f3f0; border-color: #e6e3dc; }
.db-action .ess-ic, .db-action.t-blue .ess-ic, .db-action.t-green .ess-ic, .db-action.t-violet .ess-ic,
.db-action.t-amber .ess-ic, .db-action.t-slate .ess-ic, .db-action.t-rose .ess-ic { color: var(--db-blue); }
.db-dot.t-blue { background: #111; } .db-dot.t-navy { background: #111; } .db-type.tone-navy { color: #111; }
.db-type.tone-violet { color: var(--db-blue); } .db-dot.t-violet { background: var(--db-gold); }
/* Live dashboard (2026-10-29): each pipeline stage opens its page. */
a.db-stage { text-decoration: none; color: inherit; }
a.db-stage:hover { filter: brightness(0.96); }
#db-team-note:empty { display: none; }

/* Unanswered Messages (ESS-OPS-SWEEP-001 item 2). */

.db-sweep-sub { margin: 0 0 8px; font-size: 12.5px; color: #475467; }
.db-sweep .db-table th small { display: block; font-weight: 400; color: #98a2b3; }
.db-sweep .db-table td { border-bottom: 1px solid #f0f2f6; }
.db-sweep .db-late { color: #d92d20; font-weight: 600; }
.db-sweep .db-ontime { color: #067647; font-weight: 600; }
.db-sweep .db-still { color: #b54708; }
.db-sweep .db-sweep-total { font-weight: 500; }
@media (max-width: 720px) { .db-sweep .db-table { table-layout: auto; } .db-sweep .db-table td { white-space: normal; } }
