/* ═══════════════════════════════════════
   APP SHELL, HEADER & NAVIGATION
   ═══════════════════════════════════════ */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ─── Header ─── */
.header {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 52px;
  background: var(--navy);
  color: white;
  flex-shrink: 0;
  transition: background .2s;
}

.h-brand { display: flex; align-items: center }

.h-logo-img {
  height: 22px; width: auto;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.h-divider {
  width: 1px; height: 26px;
  background: rgba(255, 255, 255, .12);
  margin: 0 16px;
}

/* ─── Segmented Control Tabs ─── */
.h-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, .06);
  border-radius: 8px;
  padding: 3px;
}

.h-tab {
  padding: 5px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: rgba(255, 255, 255, .45);
  transition: all .2s cubic-bezier(.16,1,.3,1);
  white-space: nowrap;
  font-family: var(--fd);
}
.h-tab:hover { color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .05) }
.h-tab.active { color: white; background: rgba(255, 255, 255, .14); font-weight: 600 }

.h-right { margin-left: auto; display: flex; align-items: center; gap: 8px }

.h-month {
  font-size: 12px; font-weight: 600;
  color: rgba(255, 255, 255, .7);
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--rs);
  background: transparent;
  cursor: pointer;
}
.h-month option { background: var(--navy); color: white }

.h-btn {
  padding: 5px 10px; border-radius: var(--rs);
  font-size: 11px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 4px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: transparent;
  color: rgba(255, 255, 255, .65);
  transition: all .15s;
}
.h-btn:hover {
  border-color: rgba(255, 255, 255, .3);
  color: white;
  background: rgba(255, 255, 255, .06);
}

/* Search button */
.h-search-btn {
  padding: 5px 12px;
  font-size: 11px;
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--rs);
  cursor: pointer;
  transition: all .15s;
}
.h-search-btn:hover { color: rgba(255,255,255,.7); background: rgba(255,255,255,.08) }
.h-search-kbd {
  font-size: 9px;
  font-family: var(--fm);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.1);
}

/* ─── Sync Indicator ─── */
.sync-ind { font-size: 10px; color: rgba(255, 255, 255, .5); display: flex; align-items: center; gap: 5px }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #059669 }
.sync-dot.syncing { background: #d97706; animation: pulseGlow .8s infinite }

/* ─── Traffic Light Pills ─── */
.tl-pills { display: flex; gap: 6px }
.tl-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
}
.tl-pill .dot { width: 8px; height: 8px; border-radius: 50% }
.tl-g { background: rgba(5, 150, 105, .15); color: #6ee7b7 }
.tl-g .dot { background: #059669 }
.tl-a { background: rgba(217, 119, 6, .15); color: #fcd34d }
.tl-a .dot { background: #d97706 }
.tl-r { background: rgba(225, 29, 72, .15); color: #fda4af }
.tl-r .dot { background: #e11d48 }

/* ─── Content Area ─── */
.content { flex: 1; overflow: hidden }

/* ─── Executive Dashboard — Single Stream ─── */
.exec {
  height: 100%;
  overflow: hidden;
}
.exec-stream {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 80px;
}

/* ─── Hero Cards ─── */
.hero-strip {
  display: flex;
  gap: 10px;
  padding: 20px 28px 0;
  max-width: 1340px;
  margin: 0 auto;
}
.hero-card {
  flex: 1;
  background: var(--card);
  border: 2px solid var(--bdr-lt);
  border-radius: var(--r);
  padding: 18px 20px 16px;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 0px;
  transition: height .2s ease;
}
.hero-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  transform: translateY(-1px);
}
.hero-card.active { transform: translateY(-1px); }
.hero-card.active::before { height: 3px; }

.hero-card.t-released  { background: rgba(5,150,105,.09); }
.hero-card.t-released.active  { border-color: var(--emerald-bdr); background: rgba(5,150,105,.15); }
.hero-card.t-released.active::before { background: var(--emerald); }
.hero-card.t-released .hero-num { color: var(--emerald); }
.hero-card.t-released .hero-bg-icon { color: var(--emerald); }

.hero-card.t-progress  { background: rgba(39,70,194,.09); }
.hero-card.t-progress.active  { border-color: var(--sapphire-bdr); background: rgba(39,70,194,.15); }
.hero-card.t-progress.active::before { background: var(--sapphire); }
.hero-card.t-progress .hero-num { color: var(--sapphire); }
.hero-card.t-progress .hero-bg-icon { color: var(--sapphire); }

.hero-card.t-planned  { background: rgba(217,119,6,.09); }
.hero-card.t-planned.active   { border-color: var(--amber-bdr); background: rgba(217,119,6,.15); }
.hero-card.t-planned.active::before { background: var(--amber); }
.hero-card.t-planned .hero-num { color: var(--amber); }
.hero-card.t-planned .hero-bg-icon { color: var(--amber); }

.hero-card.t-unplanned  { background: rgba(225,29,72,.08); }
.hero-card.t-unplanned.active { border-color: var(--ruby-bdr); background: rgba(225,29,72,.15); }
.hero-card.t-unplanned.active::before { background: var(--ruby); }
.hero-card.t-unplanned .hero-num { color: var(--ruby); }
.hero-card.t-unplanned .hero-bg-icon { color: var(--ruby); }

.hero-card.t-vision  { background: rgba(124,58,237,.08); }
.hero-card.t-vision.active    { border-color: var(--violet-bdr); background: rgba(124,58,237,.15); }
.hero-card.t-vision.active::before { background: var(--violet); }
.hero-card.t-vision .hero-num { color: var(--violet); }
.hero-card.t-vision .hero-bg-icon { color: var(--violet); }


.hero-label {
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--tx3); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.hero-dot { width: 7px; height: 7px; border-radius: 2px; }
.hero-dot.released  { background: var(--emerald); }
.hero-dot.progress  { background: var(--sapphire); }
.hero-dot.planned   { background: var(--amber); }
.hero-dot.unplanned { background: var(--ruby); }
.hero-dot.vision    { background: var(--violet); }
.hero-bg-icon {
  position: absolute; right: 12px; bottom: 10px;
  opacity: 0.07; pointer-events: none;
  line-height: 0;
}
.hero-num {
  font-family: var(--fd);
  font-size: 52px; font-weight: 700;
  line-height: 1; margin-bottom: 2px;
  letter-spacing: -0.03em;
  transition: color .2s;
}
.hero-sub { font-size: 11px; color: var(--tx3); }

@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.hero-card { animation: fadeIn .3s ease both; }
.hero-card:nth-child(1) { animation-delay:.02s; }
.hero-card:nth-child(2) { animation-delay:.06s; }
.hero-card:nth-child(3) { animation-delay:.10s; }
.hero-card:nth-child(4) { animation-delay:.14s; }
.hero-card:nth-child(5) { animation-delay:.18s; }

/* ─── Toolbar ─── */
/* ─── Filter Bar (above hero cards) ─── */
.exec-filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 28px 0;
  max-width: 1340px; margin: 0 auto;
}

.exec-toolbar {
  background: var(--base);
  border-bottom: 1px solid var(--bdr-lt);
  margin: 14px 28px 0;
  max-width: 1340px;
  margin-left: auto; margin-right: auto;
  padding: 10px 28px;
  display: flex; align-items: center; gap: 8px;
  position: sticky; top: 0; z-index: 90;
}
.tb-label {
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--tx3); margin-right: 2px;
}
.group-toggle {
  display: flex;
  gap: 4px;
}
.group-toggle button {
  font-size: 12px; font-weight: 500;
  color: var(--tx2); background: none;
  border: 1px solid var(--bdr-lt);
  border-radius: 20px;
  padding: 5px 14px; cursor: pointer;
  font-family: var(--f); transition: all .12s;
  white-space: nowrap;
}
.group-toggle button:hover { background: var(--base2); color: var(--tx); }
.group-toggle button.active { background: var(--navy); color: white; border-color: var(--navy); }

.filter-chip {
  font-size: 12px; font-weight: 500;
  color: var(--tx2); background: var(--base2);
  border: 1px solid var(--bdr-lt);
  padding: 5px 24px 5px 12px;
  border-radius: 20px; cursor: pointer;
  font-family: var(--f); transition: all .12s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 10px) center;
}
.filter-chip:hover { border-color: var(--bdr-dk); color: var(--tx); }

.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex; align-items: center; gap: 5px;
  border: 1px solid var(--bdr-lt); border-radius: 20px;
  padding: 5px 12px; background: var(--base2); width: 180px; transition: all .2s;
}
.search-box:focus-within { border-color: var(--sapphire); box-shadow: 0 0 0 3px var(--sapphire-bg); width: 240px; }
.search-box svg { flex-shrink: 0; }
.search-box input {
  border: none; background: none; font-family: var(--f); font-size: 12px;
  color: var(--tx); width: 100%; outline: none;
}
.search-box input::placeholder { color: var(--tx3); }
.tb-count {
  font-family: var(--fm); font-size: 11.5px; font-weight: 600;
  color: var(--tx3); white-space: nowrap;
  background: var(--base2); border-radius: 10px; padding: 2px 8px;
}

/* ─── Filter Tags ─── */
.filter-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 28px 0;
  max-width: 1340px; margin: 0 auto;
}
.filter-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--sapphire-bg); color: var(--sapphire);
  font-size: 11.5px; font-weight: 600;
  border-radius: 20px; padding: 4px 10px;
  font-family: var(--f);
}
.filter-tag .ft-x {
  cursor: pointer; font-size: 13px;
  opacity: 0.6; transition: opacity .15s;
  margin-left: 2px;
}
.filter-tag .ft-x:hover { opacity: 1; }

/* ─── Data Grid ─── */
.grid-wrap {
  max-width: 1340px;
  margin: 8px auto 0;
  padding: 0 28px;
}
.data-grid {
  background: var(--card);
  border: 1px solid var(--bdr-lt);
  border-radius: var(--r);
  overflow: hidden;
}
.grid-head {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 110px 120px 110px 70px 90px 80px;
  padding: 0 20px; height: 34px; align-items: center;
  background: var(--navy); border-radius: var(--rs) var(--rs) 0 0;
}
.grid-head span {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: #fff; font-family: var(--fd);
}
.grid-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 110px 120px 110px 70px 90px 80px;
  padding: 0 20px; min-height: 54px; align-items: center;
  border-bottom: 1px solid var(--bdr-lt);
  transition: background .08s; cursor: pointer;
  background: var(--card);
}
.grid-row:last-child { border-bottom: none; }
.grid-row:hover { background: var(--card-hover); }
.grid-row > div, .grid-row > span { min-width: 0; overflow: hidden; }

.cell-story { display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden; padding: 8px 0; }
.story-title-row { display: flex; align-items: center; gap: 6px; overflow: hidden; }
.story-title {
  font-size: 13px; font-weight: 500; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.story-meta-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--tx3); overflow: hidden;
}
.story-meta-row .meta-id {
  font-family: var(--fm); font-size: 10.5px;
  color: var(--tx3); flex-shrink: 0;
}
.story-meta-row .meta-sep { color: var(--bdr-lt); }
.story-meta-row .meta-epic {
  font-size: 11px; color: var(--tx3); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.story-meta-row .epic-icon {
  font-size: 10px; color: var(--violet); flex-shrink: 0; opacity: .7;
}

.cell-customer { display: flex; align-items: center; gap: 5px; }
.cdot { width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; }
.cname { font-size: 12px; color: var(--tx2); font-weight: 500; }

.cell-project { font-size: 11.5px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-sprint { font-family: var(--fm); font-size: 11px; color: var(--tx3); white-space: nowrap; }

.cell-progress { display: flex; align-items: center; gap: 5px; }
.pbar { width: 36px; height: 4px; background: var(--bdr-lt); border-radius: 2px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 2px; }
.pbar-fill.emerald { background: var(--emerald); }
.pbar-fill.amber { background: var(--amber); }
.pbar-fill.ruby { background: var(--ruby); }
.pbar-fill.sapphire { background: var(--sapphire); }
.ppct { font-family: var(--fm); font-size: 10.5px; color: var(--tx3); }

/* ─── Group Headers ─── */
.group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--bdr-lt);
  border-left: 3px solid var(--sapphire);
  cursor: pointer;
  transition: background .1s;
}
.group-header:hover { background: var(--card-hover); }
.group-header .gh-chevron {
  color: var(--tx3);
  transition: transform .2s;
  width: 14px; text-align: center;
  display: flex; align-items: center;
}
.group-header .gh-chevron.open { transform: rotate(90deg); }
.group-header.collapsed .gh-chevron.open { transform: rotate(0deg); }
.group-header .gh-label {
  font-size: 13px; font-weight: 700; color: var(--tx);
}
.group-header .gh-count {
  font-family: var(--fm); font-size: 11px; font-weight: 600;
  color: var(--sapphire); background: var(--sapphire-bg);
  padding: 2px 8px; border-radius: 10px;
}
/* Group color variants */
.group-header.gh-ruby    { border-left-color: var(--ruby); }
.group-header.gh-ruby .gh-count { color: var(--ruby); background: var(--ruby-bg); }
.group-header.gh-amber   { border-left-color: var(--amber); }
.group-header.gh-amber .gh-count { color: var(--amber); background: var(--amber-bg); }
.group-header.gh-emerald { border-left-color: var(--emerald); }
.group-header.gh-emerald .gh-count { color: var(--emerald); background: var(--emerald-bg); }
.group-header.gh-slate   { border-left-color: var(--tx3); }
.group-header.gh-slate .gh-count { color: var(--tx3); background: var(--base2); }
.group-header.gh-sapphire { border-left-color: var(--sapphire); }
.group-header.gh-sapphire .gh-count { color: var(--sapphire); background: var(--sapphire-bg); }

/* ─── Empty State ─── */
.exec-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 48px; color: var(--tx4); font-size: 13px;
  background: var(--card);
}
