/* ═══════════════════════════════════════════════════════════════════════════
   GROUNDWORK DESIGN SYSTEM — GW-002 Token Foundation
   Executive Operations palette · Sprint 1 · 2026-06-27
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand primitives ── */
  --gw-pine:       #113931;   /* sidebar / primary brand surface          */
  --gw-pine-deep:  #0E372F;   /* sidebar hover / pressed                  */
  --gw-pine-light: #1A4740;   /* sidebar active bg tint                   */
  --gw-pine-muted: #2D7A55;   /* sidebar secondary text / dividers        */
  --gw-emerald:    #2D7A55;   /* positive trend / success accent          */
  --gw-emerald-dim:#113931;   /* emerald on dark bg                       */
  --gw-sky:        #4D8A86;   /* interactive blue / links / focus rings   */
  --gw-sky-2:      #4D8A86;   /* sky hover / gradient end                 */
  --gw-sky-soft:   #E5F0EF;   /* sky tint surface                         */
  --gw-amber:      #8B6914;   /* warning / caution accent                 */
  --gw-rose:       #8B3A2A;   /* danger / overdue                         */

  /* ── Neutral scale ── */
  --gw-ink:        #0F1C14;   /* primary text                             */
  --gw-ink-2:      #1E3326;   /* secondary text                           */
  --gw-muted:      #5A6B79;   /* tertiary / placeholder text              */
  --gw-subtle:     #6F7E6A;   /* disabled / hint text                     */
  --gw-line:       #E2EBE8;   /* border / divider                         */
  --gw-line-strong:#C8D8D3;   /* stronger divider                         */

  /* ── Surface scale ── */
  --gw-bg:         #F5F9F7;   /* page background — warm off-white green   */
  --gw-surface:    #FFFFFF;   /* card / panel surface                     */
  --gw-surface-2:  #FDFCF9;   /* secondary surface / alt row              */
  --gw-surface-3:  #EAF1EE;   /* tertiary / hover surface                 */

  /* ── Shadow scale ── */
  --gw-shadow-xs:  0 1px 3px rgba(15,28,20,.06);
  --gw-shadow-sm:  0 4px 12px rgba(15,28,20,.07);
  --gw-shadow-md:  0 8px 28px rgba(15,28,20,.09);
  --gw-shadow-lg:  0 20px 56px rgba(15,28,20,.12);

  /* ── Radius scale ── */
  --gw-r-xs:  6px;
  --gw-r-sm:  10px;
  --gw-r-md:  14px;
  --gw-r-lg:  18px;
  --gw-r-xl:  24px;

  /* ── Typography ── */
  --gw-font: 'Inter', system-ui, -apple-system, sans-serif;

  /* ── Legacy aliases (keep existing code working) ── */
  --blue:      var(--gw-sky);
  --blue-2:    var(--gw-sky-2);
  --blue-dark: #113931;
  --blue-deep: #0E372F;
  --blue-soft: var(--gw-sky-soft);
  --ink:       var(--gw-ink);
  --muted:     var(--gw-muted);
  --line:      var(--gw-line);
  --bg:        var(--gw-bg);
  --card:      var(--gw-surface);
  --green:     #2D7A55;
  --yellow:    #7A5C10;
  --red:       #8B3A2A;
  --shadow:    var(--gw-shadow-md);
}
/* ═══════════════════════════════════════════════════════════════════════════
   GW-005 · App Shell — Groundwork Executive theme
   ═══════════════════════════════════════════════════════════════════════════ */
*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--gw-font);
  color:var(--gw-ink);
  background:var(--gw-bg);
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}

/* ── App shell grid ── */
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:280px 1fr;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR — deep pine green Executive Ops style
   ════════════════════════════════════════════════════════ */
.sidebar{
  background:var(--gw-pine);
  border-right:none;
  padding:0;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
  overflow-x:hidden;
}

/* Subtle scrollbar on sidebar */
.sidebar::-webkit-scrollbar{width:4px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:var(--gw-pine-muted);border-radius:4px}

/* ── Brand block ── */
.brand{
  display:flex;
  gap:14px;
  align-items:center;
  padding:22px 18px 20px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:0;
  flex-shrink:0;
}
.brand-mark{
  width:42px;
  height:42px;
  border-radius:var(--gw-r-sm);
  background:transparent;
  border:none;
  overflow:hidden;
  display:grid;
  place-items:center;
  flex-shrink:0;
}
.brand-mark img{
  width:42px;
  height:42px;
  display:block;
  object-fit:cover;
  border-radius:9px;
}
.brand-name{
  font-size:17px;
  font-weight:900;
  letter-spacing:-.03em;
  color:#FFFFFF;
  line-height:1.1;
}
.brand-subtitle{
  color:rgba(255,255,255,.45);
  font-size:11px;
  font-weight:600;
  margin-top:1px;
}
.brand-kicker{
  margin-top:3px;
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--gw-emerald);
  min-height:12px;
}

/* ── Nav container ── */
.nav{
  display:flex;
  flex-direction:column;
  gap:0;
  padding:12px 10px;
  flex:1;
}
.nav-group{
  margin-bottom:2px;
}

/* ── Nav group summary (section headers) ── */
.nav-summary{
  list-style:none;
  display:flex;
  align-items:center;
  padding:7px 10px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(255,255,255,.38);
  cursor:pointer;
  user-select:none;
  border-radius:var(--gw-r-xs);
  transition:color .15s;
  gap:0;
}
.nav-summary::-webkit-details-marker{display:none}
.nav-summary:hover{color:rgba(255,255,255,.6)}
.nav-summary::after{
  content:'›';
  font-size:13px;
  font-weight:300;
  color:rgba(255,255,255,.25);
  transition:transform .18s ease;
  display:inline-block;
  transform:rotate(0deg);
  margin-left:auto;
  flex-shrink:0;
}
.nav-group[open]>.nav-summary::after{transform:rotate(90deg)}
.nav-group[open]>.nav-summary{color:rgba(255,255,255,.5)}

/* ── Nav items container ── */
.nav-items{
  display:flex;
  flex-direction:column;
  padding:0 0 6px 0;
}

/* ── Individual nav buttons ── */
.nav-item{
  border:0;
  background:transparent;
  text-align:left;
  padding:8px 12px 8px 14px;
  border-radius:var(--gw-r-xs);
  color:rgba(255,255,255,.62);
  font-weight:500;
  font-size:13px;
  width:100%;
  transition:color .12s, background .12s;
  position:relative;
}
.nav-item:hover{
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.9);
}
.nav-item.active{
  background:rgba(255,255,255,.13);
  color:#FFFFFF;
  font-weight:700;
}
/* Active indicator bar */
.nav-item.active::before{
  content:'';
  position:absolute;
  left:0;
  top:20%;
  bottom:20%;
  width:3px;
  background:var(--gw-emerald);
  border-radius:0 3px 3px 0;
}

/* ── Sidebar footer ── */
.sidebar-footer{
  margin-top:auto;
  color:rgba(255,255,255,.28);
  font-size:11px;
  border-top:1px solid rgba(255,255,255,.07);
  padding:16px 18px;
  line-height:1.55;
  flex-shrink:0;
}
.sidebar-footer strong{
  color:rgba(255,255,255,.45);
  font-weight:700;
}

/* ════════════════════════════════════════════════════════
   GW-005 · TOPBAR
   ════════════════════════════════════════════════════════ */
.topbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 24px;
  height:58px;
  background:var(--gw-surface);
  border-bottom:1px solid var(--gw-line);
  position:sticky;
  top:0;
  z-index:15;
  box-shadow:var(--gw-shadow-xs);
}
.topbar .menu-btn{
  display:none;
  background:none;
  border:none;
  color:var(--gw-muted);
  padding:6px;
  border-radius:var(--gw-r-xs);
  transition:background .12s, color .12s;
}
.topbar .menu-btn:hover{background:var(--gw-surface-2);color:var(--gw-ink)}

/* ── Search ── */
.search-wrap{
  flex:1;
  max-width:460px;
  position:relative;
}
.search-wrap input{
  width:100%;
  background:var(--gw-surface-2);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  padding:8px 14px 8px 36px;
  font-size:13px;
  color:var(--gw-ink);
  transition:border-color .15s, box-shadow .15s, background .15s;
  outline:none;
}
.search-wrap input:focus{
  border-color:var(--gw-pine);
  background:var(--gw-surface);
  box-shadow:0 0 0 3px rgba(30,70,56,.12);
}
.search-wrap::before{
  content:'';
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  width:14px;
  height:14px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%235A6B79' stroke-width='2' stroke-linecap='round' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4'/%3E%3Cline x1='10' y1='10' x2='14' y2='14'/%3E%3C/svg%3E");
  background-size:contain;
  background-repeat:no-repeat;
  pointer-events:none;
}

/* ── + New button ── */
.topbar-new-btn{
  background:var(--gw-pine);
  color:#fff;
  border:none;
  border-radius:var(--gw-r-sm);
  padding:8px 14px;
  font-size:13px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:6px;
  transition:background .14s, box-shadow .14s;
  box-shadow:0 2px 8px rgba(30,70,56,.25);
  white-space:nowrap;
}
.topbar-new-btn:hover{
  background:var(--gw-pine-light);
  box-shadow:0 4px 14px rgba(30,70,56,.35);
}

/* ── Dropdown ── */
.topbar-new-dropdown{
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-md);
}
.tnd-item:hover{
  background:var(--gw-surface-2);
  color:var(--gw-pine);
}

/* ── Settings button ── */
.topbar-settings{
  border:1px solid var(--gw-line);
  background:var(--gw-surface);
  border-radius:var(--gw-r-sm);
  padding:7px 12px;
  font-size:13px;
  font-weight:700;
  color:var(--gw-pine);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
  transition:background .12s, border-color .12s;
}
.topbar-settings:hover{
  background:var(--gw-surface-2);
  border-color:var(--gw-pine-muted);
}

/* ── Install button ── */
.install-btn{
  border:1px solid var(--gw-line);
  background:var(--gw-surface);
  border-radius:var(--gw-r-sm);
  padding:7px 12px;
  font-size:13px;
  font-weight:600;
  color:var(--gw-muted);
  white-space:nowrap;
  transition:all .12s;
}
.install-btn:hover{background:var(--gw-surface-2)}

/* ════════════════════════════════════════════════════════
   GW-005 · MAIN CONTENT AREA
   ════════════════════════════════════════════════════════ */
.main{
  background:var(--gw-bg);
  display:flex;
  flex-direction:column;
  min-height:100vh;
  min-width:0;
}
.view{
  padding:28px 32px;
  max-width:1320px;
  flex:1;
}

/* ── Page header pattern ── */
.pl-title{
  font-size:26px;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--gw-ink);
}
.pl-subtitle{
  font-size:13px;
  color:var(--gw-muted);
  font-weight:500;
  margin-top:2px;
}

/* ── Card baseline ── */
.card{
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
}
.app-card{
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
  overflow:hidden;
}
.app-card:before{
  content:'';
  display:block;
  height:3px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  opacity:.6;
}

/* nav-items width fix carried from old monolithic line */
.nav-items{width:100%}
/* ── end of monolithic shell block replacement ──th:100%;margin-bottom:2px}.nav-item{border:none;background:transparent;text-align:left;padding:6px 10px 6px 24px;border-radius:5px;color:#6F7E6A;font-weight:400;font-size:13px;width:100%;display:block;transition:color .12s,background .12s}.nav-item:hover{background:rgba(0,167,225,.07);color:#113931}.nav-item.active{color:#1A4740;font-weight:600;background:transparent;box-shadow:none}.sidebar-footer{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;margin-top:auto;box-shadow:0 8px 20px rgba(31,42,43,.04);color:var(--muted);font-size:13px;line-height:1.45}.main{min-width:0}.topbar{position:sticky;top:0;z-index:10;background:rgba(244,250,253,.88);backdrop-filter:blur(16px);border-bottom:1px solid rgba(77,138,134,.13);padding:14px 22px;display:flex;align-items:center;gap:12px}.menu-btn{display:none;border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 12px}.search-wrap{position:relative;flex:1;max-width:850px}#searchInput{width:100%;border:1px solid var(--line);border-radius:999px;padding:12px 18px;background:#fff;outline:none;box-shadow:0 8px 20px rgba(31,42,43,.04)}#searchInput:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(77,138,134,.16)}.search-results{position:absolute;top:calc(100% + 8px);left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);max-height:420px;overflow:auto;padding:8px}.result{width:100%;text-align:left;border:0;background:#fff;border-radius:12px;padding:12px}.result:hover{background:var(--blue-soft)}.result-type{font-size:11px;color:var(--blue-dark);font-weight:900;text-transform:uppercase;letter-spacing:.06em}.result-title{font-weight:900;margin-top:3px}.result-text{color:var(--muted);font-size:13px;margin-top:3px}.install-btn,.primary-btn,.secondary-btn,.danger-btn{border:0;border-radius:999px;padding:11px 16px;font-weight:850}.install-btn,.primary-btn{background:linear-gradient(135deg,var(--blue),var(--blue-2));color:#fff;box-shadow:0 10px 22px rgba(77,138,134,.18)}.secondary-btn{background:#fff;color:var(--blue-dark);border:1px solid var(--line)}.danger-btn{background:#FDFCF9;color:var(--red);border:1px solid #F5D5C8}.small{padding:8px 12px;font-size:13px}.view{padding:26px;max-width:1340px;margin:0 auto}.hero{background:linear-gradient(135deg,#FFFFFF 0%,#FDFCF9 52%,#E5F0EF 100%);border:1px solid rgba(77,138,134,.16);border-radius:32px;padding:0;box-shadow:var(--shadow);position:relative;overflow:hidden}.hero:before{content:'';position:absolute;inset:auto -140px -180px auto;width:440px;height:440px;border-radius:50%;background:radial-gradient(circle,rgba(77,138,134,.20),transparent 62%)}.hero:after{content:'';position:absolute;right:-30px;bottom:-54px;width:260px;height:260px;background:url('/static/avalon-logo.png') no-repeat center/contain;opacity:.08;pointer-events:none}.pipeline-hero{padding:26px 30px}.hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.5fr) 360px;gap:24px;padding:34px}.hero-panel{background:#113931;color:#fff;border-radius:28px;padding:26px;display:grid;align-content:space-between;min-height:310px;box-shadow:0 24px 54px rgba(7,19,27,.18);position:relative;overflow:hidden}.hero-panel:after{content:'';position:absolute;right:-26px;bottom:-36px;width:220px;height:220px;background:url('/static/avalon-logo.png') no-repeat center/contain;opacity:.22;pointer-events:none}.hero-panel h3{color:#fff}.hero-panel .muted{color:#E8E4D9}.hero-logo{width:86px;height:86px;border-radius:26px;background:#113931;display:grid;place-items:center;border:1px solid rgba(0,167,225,.28)}.hero-logo img{width:64px}.hero-title-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.pill{display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(77,138,134,.2);background:#fff;border-radius:999px;padding:8px 12px;color:var(--blue-dark);font-size:12px;font-weight:950}.eyebrow{color:var(--blue-dark);text-transform:uppercase;letter-spacing:.12em;font-size:12px;font-weight:950}h1{font-size:clamp(34px,5vw,58px);line-height:.96;letter-spacing:-.06em;margin:12px 0}h2{font-size:28px;letter-spacing:-.04em;margin:0 0 14px}h3{font-size:20px;letter-spacing:-.03em;margin:0 0 10px}h4{margin:18px 0 6px}p{line-height:1.58}.lede{color:var(--muted);font-size:18px;max-width:860px}.muted{color:var(--muted)}.small-text{font-size:13px}.mt{margin-top:18px}.mt8{margin-top:8px}.grid{display:grid;gap:16px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--card);border:1px solid rgba(7,62,86,.12);border-radius:22px;padding:20px;box-shadow:0 10px 28px rgba(7,19,27,.045)}.card.clickable{cursor:pointer;transition:transform .15s,box-shadow .15s,border-color .15s}.card.clickable:hover{transform:translateY(-3px);box-shadow:0 20px 42px rgba(31,42,43,.09);border-color:rgba(0,167,225,.26)}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;background:var(--blue-soft);border:1px solid rgba(77,138,134,.16);color:var(--blue-dark);font-size:12px;font-weight:900}.warn-badge{background:#FAF6E8;color:var(--yellow)}.stage-number{width:34px;height:34px;border-radius:11px;display:inline-grid;place-items:center;background:linear-gradient(135deg,var(--blue),var(--blue-2));color:#fff;font-weight:950;margin-bottom:12px;box-shadow:0 8px 18px rgba(77,138,134,.18)}.meta{color:var(--muted);font-size:13px}.list{padding-left:20px;line-height:1.7}.script-box{background:#FDFCF9;border-left:5px solid var(--blue);border-radius:16px;padding:16px;font-size:15px;line-height:1.6;white-space:normal}.check-item{display:flex;gap:12px;align-items:flex-start;padding:11px 0;border-bottom:1px solid var(--line)}.check-item input{margin-top:3px;width:18px;height:18px;accent-color:var(--blue)}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.tab{border:1px solid var(--line);background:#fff;color:var(--muted);border-radius:999px;padding:10px 14px;font-weight:800}.tab.active{background:linear-gradient(135deg,var(--blue),var(--blue-2));color:#fff;border-color:var(--blue)}.danger{background:#FDFCF9;border-color:#F5D5C8}.warn{background:#FAF6E8;border-color:#F5E8C0}.footer-actions,.quick-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.stat-grid{margin-top:18px}.stat{background:linear-gradient(180deg,#fff,#FDFCF9);border:1px solid rgba(77,138,134,.13);border-radius:18px;padding:18px;position:relative;overflow:hidden}.stat:after{content:'';position:absolute;right:14px;top:14px;width:30px;height:30px;border-radius:999px;background:rgba(77,138,134,.10)}.stat span{display:block;color:var(--muted);font-weight:800}.stat strong{font-size:36px;letter-spacing:-.05em;color:var(--blue-dark)}.stat.bad{border-color:#F5D5C8;background:#FAE8E4}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-head h2{margin-bottom:0}.opp-card{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.opp-card h3{margin:0}.opp-card p{margin:3px 0 0;color:var(--muted);font-size:13px}.opp-meta{display:grid;gap:7px;justify-items:end;font-size:13px;color:var(--muted)}.mini-row{width:100%;display:grid;grid-template-columns:1fr auto;gap:3px;text-align:left;border:0;border-bottom:1px solid var(--line);background:#fff;padding:12px;border-radius:12px}.mini-row:hover{background:var(--blue-soft)}.mini-row em{grid-column:1/-1;color:var(--muted);font-style:normal;font-size:13px}.empty{background:#FDFCF9;border:1px dashed var(--line);border-radius:16px;padding:18px;color:var(--muted)}.kanban{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:16px;align-items:start}.kanban-col{background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px;box-shadow:0 10px 24px rgba(31,42,43,.04)}.kanban-col h3{display:flex;justify-content:space-between}.form label{display:grid;gap:7px;margin-bottom:14px}.form label span{font-weight:850;color:var(--blue-dark);font-size:13px}.form input,.form select,.form textarea,select,input,textarea{width:100%;border:1px solid var(--line);border-radius:14px;padding:11px 12px;background:#fff;outline:none}.form input:focus,.form select:focus,.form textarea:focus,input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(0,167,225,.14)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.full{grid-column:1/-1}.detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.detail-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.tool-list{display:grid;gap:10px}.tool-list button{border:1px solid var(--line);background:#fff;border-radius:14px;text-align:left;padding:13px;font-weight:850;color:var(--blue-dark)}.tool-list button:hover{background:var(--blue-soft)}.note{border-bottom:1px solid var(--line);padding:12px 0}.note time{font-size:12px;color:var(--muted);font-weight:800}.note p{margin:6px 0}.result-box{margin-top:14px;background:var(--blue-soft);border-radius:16px;padding:16px;line-height:1.7}.toast{position:fixed;right:22px;bottom:22px;background:var(--ink);color:#fff;border-radius:999px;padding:12px 18px;box-shadow:var(--shadow);z-index:50;font-weight:800}.app-card{position:relative;overflow:hidden}.app-card:before{content:'';position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,var(--blue),var(--blue-2))}.dashboard-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.dash-tile{background:rgba(255,255,255,.78);border:1px solid rgba(77,138,134,.16);border-radius:20px;padding:14px}.dash-tile strong{display:block;font-size:14px;color:var(--ink)}.dash-tile span{display:block;color:var(--muted);font-size:12px;margin-top:3px}@media(max-width:1100px){.kanban{grid-template-columns:1fr 1fr}.grid-4{grid-template-columns:repeat(2,1fr)}.hero-grid{grid-template-columns:1fr}.hero-panel{min-height:220px}.dashboard-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:920px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;transform:translateX(-100%);transition:transform .2s;z-index:20;width:292px;box-shadow:var(--shadow)}.sidebar.open{transform:translateX(0)}.menu-btn{display:inline-flex;align-items:center;justify-content:center;color:var(--ink)}.view{padding:16px}.grid-2,.grid-3,.grid-4,.kanban,.form-grid{grid-template-columns:1fr}.hero-grid{padding:22px}.hero-panel{display:none}.dashboard-strip{grid-template-columns:1fr}.opp-card{grid-template-columns:1fr}.opp-meta{justify-items:start}.detail-head{display:block}.detail-actions{justify-content:flex-start;margin-top:12px}h1{font-size:clamp(34px,12vw,48px)}}@media print{.sidebar,.topbar,.toast{display:none}.app-shell{display:block}.view{max-width:none;padding:0}.card{break-inside:avoid;box-shadow:none}.quick-actions,.footer-actions{display:none}}

/* ── Integrations / Spinner ──────────────────────────────────────────── */
.spinner-wrap{display:flex;justify-content:center;padding:24px}
/* ── Global readability upgrades ── */
.int-list-row{display:flex;justify-content:space-between;align-items:flex-start;padding:12px 14px;background:#113931;border-radius:10px;margin-bottom:8px;gap:14px;border:1px solid #0E372F;cursor:default;transition:background .12s}
.int-list-row:hover{background:#0E372F}
.int-list-row-title{font-weight:600;font-size:14px;color:#EDEAE0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.int-list-row-meta{font-size:12px;color:#6F7E6A;margin-top:3px}
.int-list-row-link{font-size:12px;color:#4D8A86;white-space:nowrap;text-decoration:none;flex-shrink:0;padding:4px 8px;border:1px solid #4A5947;border-radius:6px;transition:background .12s}
.int-list-row-link:hover{background:#0E372F}
/* Settings topbar button */
.topbar-settings{border:1px solid var(--line);background:#fff;border-radius:10px;padding:7px 12px;font-size:13px;font-weight:700;color:var(--blue-dark);cursor:pointer;display:flex;align-items:center;gap:6px;white-space:nowrap;transition:background .12s}
.topbar-settings:hover{background:var(--blue-soft)}

/* ── + New quick-create button & dropdown ── */
.topbar-new-wrap {
  position: relative;
  flex-shrink: 0;
}
.topbar-new-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: none;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, box-shadow .12s;
  box-shadow: 0 2px 8px rgba(77,138,134,.25);
}
.topbar-new-btn:hover { background: var(--blue-2); box-shadow: 0 4px 14px rgba(0,167,225,.35); }
.topbar-new-caret { transition: transform .15s; opacity: .8; }
.tnd-open .topbar-new-caret { transform: rotate(180deg); }
.topbar-new-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(7,19,27,.12);
  padding: 6px;
  z-index: 50;
  animation: tnd-in .12s ease;
}
@keyframes tnd-in {
  from { opacity:0; transform:translateY(-4px); }
  to   { opacity:1; transform:translateY(0); }
}
.tnd-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  padding: 4px 10px 6px;
}
.tnd-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border: none; background: transparent;
  border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left;
  transition: background .1s, color .1s;
}
.tnd-item:hover { background: var(--blue-soft); color: var(--blue-dark); }
.tnd-item svg { flex-shrink: 0; opacity: .7; }
/* Mark Sold modal */
.sold-modal-backdrop{position:fixed;inset:0;background:rgba(7,19,27,.7);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}
.sold-modal{background:#fff;border-radius:24px;padding:32px;width:100%;max-width:560px;box-shadow:0 30px 80px rgba(7,19,27,.25);position:relative;max-height:90vh;overflow-y:auto}
.sold-modal h2{margin:0 0 6px;font-size:22px;letter-spacing:-.03em}
.sold-modal-close{position:absolute;top:16px;right:16px;border:0;background:none;font-size:22px;cursor:pointer;color:var(--muted);line-height:1;padding:4px 8px}
.sold-modal-close:hover{color:var(--ink)}
.spinner{width:32px;height:32px;border:3px solid #4A5947;border-top-color:#4D8A86;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
code{background:#113931;color:#E8E4D9;padding:2px 6px;border-radius:4px;font-size:12px}

/* ── Dark card readability improvements ─────────────────────────────────── */
/* Primary text on all dark sections */
[style*="background:#113931"] { color: #EDEAE0; }
[style*="background:#113931"] { color: #EDEAE0; }
[style*="background:linear-gradient(135deg,#113931"] { color: #EDEAE0; }
[style*="background:linear-gradient(135deg,#113931"] { color: #EDEAE0; }
/* Stat/metric values on dark cards */
.dark-card-val { font-size: 1.7rem; font-weight: 800; color: #FDFCF9 !important; }
.dark-card-label { font-size: 10px; font-weight: 700; color: #6F7E6A !important; text-transform: uppercase; letter-spacing: .06em; }
.dark-card-green { color: #2D7A55 !important; }
.dark-card-red   { color: #C97B6A !important; }
.dark-card-yellow{ color: #8B6914 !important; }
.dark-card-cyan  { color: #4D8A86 !important; }
/* Month mini-card row on Owner Dashboard */
.month-mini-card { background:#113931; border:1px solid #0E372F; border-radius:10px; padding:10px 12px; min-width:80px; text-align:center; }
.month-mini-card .budget { font-size:11px; color:#6F7E6A; }
.month-mini-card .actual { font-size:14px; font-weight:700; color:#4D8A86; }
.month-mini-card .variance.pos { color:#2D7A55; }
.month-mini-card .variance.neg { color:#C97B6A; }
.month-mini-card .variance.none { color:#5C6B58; }
/* Quick Actions integration buttons */
.int-action-btn {
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 14px; border-radius:10px;
  border:2px solid var(--line); background:#fff;
  color:var(--blue-dark); font-size:13px; font-weight:700;
  cursor:pointer; text-decoration:none;
  transition:all .15s;
}
.int-action-btn:hover { background:var(--blue-soft); border-color:var(--blue); box-shadow:0 4px 12px rgba(77,138,134,.12); }
/* ── Calendar view toggle ──────────────────────────────────────────────── */
.cal-view-toggle { display:flex; gap:4px; background:#113931; border-radius:8px; padding:3px; }
.cal-view-btn { border:0; background:transparent; color:#8FB8B2; font-size:12px; font-weight:600; padding:5px 12px; border-radius:6px; cursor:pointer; transition:all .12s; }
.cal-view-btn.active { background:#1A4740; color:#EDEAE0; box-shadow:0 1px 4px rgba(0,0,0,.4); }
.cal-view-btn:hover:not(.active) { color:#D6D1C4; }
/* Month grid */
.cal-month-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:#0E372F; border-radius:8px; overflow:hidden; margin-top:8px; }
.cal-month-day-header { background:#113931; color:#8FB8B2; font-size:10px; font-weight:700; text-align:center; padding:6px 0; text-transform:uppercase; letter-spacing:.05em; }
.cal-month-cell { background:#113931; min-height:72px; padding:4px; position:relative; }
.cal-month-cell.today { background:#1A4740; }
.cal-month-cell.other-month { background:#113931; opacity:.55; }
.cal-month-cell-num { font-size:11px; font-weight:700; color:#8FB8B2; margin-bottom:2px; width:20px; height:20px; display:flex; align-items:center; justify-content:center; border-radius:50%; }
.cal-month-cell.today .cal-month-cell-num { background:#4D8A86; color:#fff; }
.cal-event-chip { font-size:10px; font-weight:600; color:#E8E4D9; background:#1A4740; border-radius:3px; padding:1px 5px; margin-bottom:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.cal-event-chip:hover { background:#245A52; }
/* Week columns */
.cal-week-grid { display:grid; grid-template-columns:48px repeat(7,1fr); gap:1px; background:#0E372F; border-radius:8px; overflow:hidden; margin-top:8px; }
.cal-week-header { background:#113931; padding:6px 4px; text-align:center; }
.cal-week-header .dow { font-size:10px; color:#8FB8B2; font-weight:700; text-transform:uppercase; }
.cal-week-header .dom { font-size:16px; font-weight:800; color:#E8E4D9; line-height:1.2; }
.cal-week-header .dom.today-num { background:#4D8A86; color:#fff; border-radius:50%; width:28px; height:28px; display:flex; align-items:center; justify-content:center; margin:0 auto; }
.cal-week-time-label { background:#113931; padding:4px 4px; text-align:right; font-size:10px; color:#8FB8B2; border-bottom:1px solid #0E372F; }
.cal-week-cell { background:#113931; border-bottom:1px solid #0E372F; position:relative; min-height:28px; }
.cal-week-event { position:absolute; left:2px; right:2px; background:#1A4740; border-left:2px solid #4D8A86; border-radius:3px; padding:1px 4px; font-size:10px; color:#B8DEC9; overflow:hidden; z-index:1; cursor:pointer; }
.cal-week-event:hover { background:#245A52; color:#fff; }
/* Revenue editor */
.rev-editor-table { width:100%; border-collapse:collapse; font-size:13px; }
.rev-editor-table thead tr { background:#113931; }
.rev-editor-table th { padding:10px 12px; text-align:left; color:#6F7E6A; font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; border-bottom:1px solid #113931; }
.rev-editor-table th.right { text-align:right; }
.rev-editor-table tbody tr { border-bottom:1px solid #113931; transition:background .1s; }
.rev-editor-table tbody tr:hover { background:#113931; }
.rev-editor-table td { padding:8px 12px; color:#E8E4D9; }
.rev-editor-table td.right { text-align:right; }
.rev-editor-input { width:100%; background:#113931; border:1px solid #113931; border-radius:6px; color:#EDEAE0; font-size:13px; font-weight:700; padding:6px 10px; text-align:right; box-sizing:border-box; }
.rev-editor-input:focus { border-color:#4D8A86; outline:none; }
.rev-editor-input.locked { opacity:.45; pointer-events:none; }
.rev-variance-pos { color:#2D7A55; font-weight:700; }
.rev-variance-neg { color:#C97B6A; font-weight:700; }
.rev-variance-none { color:#4A5947; }
.rev-month-tag { font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#6F7E6A; margin-right:6px; }
.rev-locked-badge { font-size:9px; background:#113931; color:#5C6B58; border-radius:4px; padding:1px 5px; margin-left:4px; vertical-align:middle; }

/* ── Financial Hub tab nav / division entry ───────────────────────────────── */
.fin-tab-btn { padding:8px 16px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; transition:all .12s; }
.fin-tab-btn.active { background:#113931; border:1px solid #4D8A86; color:#4D8A86; }
.fin-tab-btn:not(.active) { background:#113931; border:1px solid #113931; color:#6F7E6A; }
.fin-tab-btn:hover:not(.active) { border-color:#4A5947; color:#D6D1C4; }
.div-entry-table { width:100%; border-collapse:collapse; font-size:13px; }
.div-entry-table th { padding:9px 10px; text-align:left; color:#6F7E6A; font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; border-bottom:1px solid #113931; }
.div-entry-table th.right { text-align:right; }
.div-entry-table td { padding:6px 10px; color:#E8E4D9; border-bottom:1px solid #113931; }
.div-entry-table td.right { text-align:right; }
.div-entry-table tbody tr:hover { background:#113931; }
/* P&L upload drop zone */
.pnl-drop-zone { border:2px dashed #1A4740; border-radius:14px; padding:24px; text-align:center; background:#113931; transition:border-color .12s; }
.pnl-drop-zone:hover { border-color:#4D8A86; }
/* Dynamic tag */
.dynamic-tag { font-size:9px; font-weight:700; background:#113931; color:#4D8A86; border-radius:4px; padding:1px 5px; margin-left:4px; vertical-align:middle; letter-spacing:.04em; text-transform:uppercase; }

/* ════════════════════════════════════════════════════════════════════════════
   JIRA BATCH: T1/T2/T22/T24/T25 — Global UI readability, button hierarchy,
   permission matrix, mobile tap targets, dashboard card polish
   ════════════════════════════════════════════════════════════════════════════ */

/* ── T1: Button hierarchy — clear enabled / hover / focus / disabled states ── */
.primary-btn:hover   { filter:brightness(1.1); box-shadow:0 14px 28px rgba(0,167,225,.28); }
.primary-btn:active  { filter:brightness(.94); transform:translateY(1px); }
.primary-btn:focus-visible { outline:3px solid rgba(0,167,225,.55); outline-offset:3px; }
.primary-btn:disabled, .primary-btn[disabled] {
  opacity:.45; cursor:not-allowed; pointer-events:none;
}
.secondary-btn:hover { background:var(--blue-soft); border-color:rgba(0,167,225,.36); }
.secondary-btn:active { transform:translateY(1px); }
.secondary-btn:focus-visible { outline:3px solid rgba(0,167,225,.45); outline-offset:3px; }
.secondary-btn:disabled, .secondary-btn[disabled] {
  opacity:.42; cursor:not-allowed; pointer-events:none; color:var(--muted);
}
.danger-btn:hover { background:#FAE8E4; border-color:#C97B6A; }
.danger-btn:focus-visible { outline:3px solid rgba(248,113,113,.5); outline-offset:3px; }

/* ── T1: Loading state pill — show spinner inside any button ── */
.btn-loading { position:relative; pointer-events:none; }
.btn-loading::after {
  content:''; position:absolute; right:12px; top:50%; transform:translateY(-50%);
  width:14px; height:14px; border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite;
}

/* ── T1: Status chips — not color-only; add shape/icon context ── */
.status-chip {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700;
  border:1px solid transparent;
}
.status-chip.sold    { background:#EAF1EE; color:#1A4740; border-color:#B8DEC9; }
.status-chip.active  { background:#E5F0EF; color:#1A4740; border-color:#B8C8C7; }
.status-chip.overdue { background:#FAE8E4; color:#7A2E20; border-color:#F5D5C8; }
.status-chip.pending { background:#FAF6E8; color:#7A5C10; border-color:#F5E8C0; }
.status-chip.lost    { background:#EDEAE0; color:#2D3E3F; border-color:#D6D1C4; }

/* ── T1/T25: Dark card values — hierarchy and breathing room ── */
.kpi-card {
  background:linear-gradient(145deg,#113931,#113931);
  border:1px solid #113931; border-radius:16px; padding:18px 20px;
  transition:border-color .15s, box-shadow .15s;
}
.kpi-card:hover { border-color:#1A4740; box-shadow:0 8px 24px rgba(0,0,0,.25); }
.kpi-card .kpi-label {
  font-size:10px; font-weight:800; color:#6F7E6A;
  text-transform:uppercase; letter-spacing:.08em; margin-bottom:6px;
}
.kpi-card .kpi-value {
  font-size:1.9rem; font-weight:900; color:#FDFCF9;
  line-height:1; letter-spacing:-.03em;
}
.kpi-card .kpi-sub { font-size:11px; color:#5C6B58; margin-top:5px; }
.kpi-card .kpi-value.green  { color:#2D7A55; }
.kpi-card .kpi-value.red    { color:#C97B6A; }
.kpi-card .kpi-value.cyan   { color:#4D8A86; }
.kpi-card .kpi-value.amber  { color:#8B6914; }

/* ── T22: Permission matrix — zebra striping + hover guide ── */
.perm-table { width:100%; border-collapse:collapse; min-width:480px; }
.perm-table thead tr { border-bottom:2px solid #113931; }
.perm-table thead th {
  padding:11px 14px; font-size:12px; font-weight:700; text-align:left;
}
.perm-table thead th:not(:first-child) { text-align:center; }
.perm-table .perm-group-row td {
  padding:12px 14px 4px; font-size:10px; font-weight:900;
  letter-spacing:.1em; text-transform:uppercase; color:#5C6B58;
  border-bottom:1px solid #113931; background:#FDFCF9;
}
.perm-table tbody tr.perm-row { border-bottom:1px solid var(--line); }
.perm-table tbody tr.perm-row:nth-child(even) { background:#FDFCF9; }
.perm-table tbody tr.perm-row:hover { background:var(--blue-soft) !important; }
.perm-table td.perm-section { padding:10px 14px; font-size:13px; color:var(--ink); }
.perm-table td.perm-check   { text-align:center; padding:10px; }
.perm-check input[type=checkbox] { width:18px; height:18px; cursor:pointer; }

/* ── T23: Empty states — richer, more actionable ── */
.empty-state {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:32px 20px; text-align:center;
  background:linear-gradient(180deg,#FDFCF9,#FDFCF9);
  border:1.5px dashed rgba(77,138,134,.2); border-radius:18px;
}
.empty-state .empty-icon { font-size:36px; margin-bottom:10px; opacity:.7; }
.empty-state .empty-title { font-weight:800; color:var(--ink); font-size:15px; margin-bottom:4px; }
.empty-state .empty-body  { color:var(--muted); font-size:13px; max-width:280px; line-height:1.55; }
.empty-state .empty-cta   { margin-top:14px; }

/* ── T24: Mobile tap targets — minimum 44px touch target ── */
@media (max-width:920px) {
  .primary-btn, .secondary-btn, .danger-btn {
    min-height:44px; padding:12px 18px; font-size:15px;
  }
  .small.primary-btn, .small.secondary-btn { min-height:38px; padding:10px 14px; }
  .nav-item { min-height:40px; padding:10px 10px 10px 24px; font-size:13px; }
  .check-item input { width:22px; height:22px; }
  select, input[type=text], input[type=number], input[type=date],
  input[type=email], textarea {
    min-height:44px; font-size:16px !important; /* prevent iOS zoom */
  }
  /* Quick Actions integration buttons on mobile */
  .int-action-btn { padding:12px 16px; font-size:14px; }
  /* Today page stat cards — bigger hit zone */
  .stat { padding:20px; }
  /* dashboard-strip tiles on mobile */
  .dash-tile { padding:16px; }
  .dash-tile strong { font-size:15px; }
  .dash-tile span   { font-size:13px; }

  /* Pipeline toolbar wraps on mobile */
  .pl-toolbar { gap:2px; padding:6px 6px; }
  .pl-filter-group { padding:2px 4px; }
  .pl-filter-divider { display:none; }
  .pl-page-header { flex-direction:column; align-items:flex-start; gap:10px; }
  .pl-page-actions { width:100%; }
  .pl-page-actions .primary-btn,
  .pl-page-actions .secondary-btn { flex:1; text-align:center; }

  /* Sidebar scrim — dims content behind open mobile nav */
  .sidebar-scrim {
    display: none;
    position: fixed; inset: 0;
    background: rgba(7,19,27,.38);
    z-index: 19; /* just below sidebar z-index:20 */
    backdrop-filter: blur(1px);
  }
  .sidebar-scrim.visible { display: block; }
}

/* ── T25: Owner Dashboard — clickable stat cards ── */
.dash-card-clickable {
  cursor:pointer; transition:transform .15s, box-shadow .15s, border-color .15s;
  user-select:none;
}
.dash-card-clickable:hover {
  transform:translateY(-2px);
  box-shadow:0 12px 32px rgba(7,19,27,.12);
  border-color:rgba(77,138,134,.3) !important;
}
.dash-card-clickable:active { transform:translateY(0); }
.dash-card-clickable .card-drill-hint {
  font-size:10px; color:rgba(0,167,225,.6); margin-top:6px; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em;
  opacity:0; transition:opacity .15s;
}
.dash-card-clickable:hover .card-drill-hint { opacity:1; }

/* ── T6: Quick Actions integration buttons — prominent states ── */
.int-action-btn.active   { border-color:var(--blue); background:var(--blue-soft); }
.int-action-btn.success  { border-color:#2D7A55; background:#D4EDE1; color:#2D7A55; }
.int-action-btn.loading  { opacity:.7; pointer-events:none; }
.int-action-btn.loading::after {
  content:''; display:inline-block; width:12px; height:12px;
  border:2px solid rgba(7,62,86,.3); border-top-color:var(--blue-dark);
  border-radius:50%; animation:spin .7s linear infinite; margin-left:6px;
  vertical-align:middle;
}

/* ── T9: Activity timeline in lead detail ── */
.timeline { list-style:none; padding:0; margin:0; position:relative; }
.timeline::before {
  content:''; position:absolute; left:16px; top:0; bottom:0;
  width:2px; background:var(--line);
}
.timeline-item {
  display:flex; gap:14px; padding:10px 0; position:relative;
}
.timeline-dot {
  width:32px; height:32px; border-radius:50%;
  background:#fff; border:2px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size:14px; flex-shrink:0; z-index:1;
  box-shadow:0 2px 6px rgba(7,19,27,.07);
}
.timeline-dot.note    { border-color:var(--blue); background:var(--blue-soft); }
.timeline-dot.stage   { border-color:#B8744F; background:#FAF6E8; }
.timeline-dot.sold    { border-color:#2D7A55; background:#D4EDE1; }
.timeline-dot.created { border-color:#8B6914; background:#FAF6E8; }
.timeline-dot.admin   { border-color:#6F7E6A; background:#FDFCF9; }
.timeline-body { flex:1; min-width:0; padding-top:4px; }
.timeline-body time { font-size:11px; color:var(--muted); font-weight:700; }
.timeline-body .tl-title { font-weight:700; color:var(--ink); font-size:13px; margin-bottom:2px; }
.timeline-body .tl-detail { font-size:12px; color:var(--muted); line-height:1.5; }

/* ── General: Topbar quick-create pill ── */
.topbar-quick-add {
  background:linear-gradient(135deg,var(--blue),var(--blue-2));
  color:#fff; border:0; border-radius:999px;
  padding:8px 14px; font-size:13px; font-weight:800;
  cursor:pointer; white-space:nowrap;
  box-shadow:0 6px 16px rgba(0,167,225,.22);
  transition:filter .15s, box-shadow .15s;
}
.topbar-quick-add:hover { filter:brightness(1.08); box-shadow:0 10px 22px rgba(77,138,134,.3); }

/* ═══════════════════════════════════════════════════════════════════════════
   T26-T50 CSS additions — Jira Batch v2
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Lead Header Bar (T26) ── */
.lead-header-bar {
  display:flex; gap:0; border:1px solid #E8E4D9; border-radius:12px;
  overflow:hidden; margin-bottom:20px; background:#fff;
  box-shadow:0 2px 8px rgba(31,42,43,.06);
}
.lhb-cell {
  flex:1; padding:12px 14px; border-right:1px solid #E8E4D9;
  text-align:center; min-width:0;
}
.lhb-cell:last-child { border-right:none; }
.lhb-label {
  font-size:10px; font-weight:700; color:var(--muted);
  text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px;
}
.lhb-cell strong { font-size:13px; color:var(--ink); font-weight:700; }

/* ── Urgency Badges on Opp Cards (T27) ── */
.urgency-badge {
  display:inline-block; padding:2px 8px; border-radius:20px;
  font-size:10px; font-weight:800; letter-spacing:.04em; margin-bottom:4px;
}
.urgency-badge.overdue { background:#FAE8E4; color:#8B3A2A; border:1px solid #F5D5C8; }
.urgency-badge.stale   { background:#FAF6E8; color:#7A5C10; border:1px solid #F5E8C0; }
.opp-overdue { border-left:3px solid #8B3A2A !important; }
.opp-stale   { border-left:3px solid #8B6914 !important; }
.opp-card-top { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:4px; }
.opp-project  { font-size:12px; color:var(--muted); margin:2px 0 8px; line-height:1.4; }
.opp-meta     { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.opp-next     { font-size:11px; color:var(--muted); }
.opp-value    { font-size:12px; color:#2D7A55; font-weight:700; margin-left:auto; }
.opp-rep      { font-size:14px; }
.opp-card     { padding:14px; border-radius:14px; border:1px solid var(--line); background:#fff;
                margin-bottom:8px; transition:box-shadow .15s, border-color .15s; }
.opp-card:hover { box-shadow:0 4px 16px rgba(31,42,43,.09); border-color:rgba(77,138,134,.3); }
.opp-card h3  { font-size:14px; font-weight:700; margin:0; letter-spacing:-.01em; }

/* ── Pipeline page layout ── */
.pl-page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.pl-page-title { display:flex; align-items:baseline; gap:12px; }
.pl-title { font-size: 26px; font-weight: 800; letter-spacing:-.03em; margin:0; line-height:1; }
.pl-subtitle { font-size: 12px; color: var(--muted); font-weight: 500; text-transform:uppercase; letter-spacing:.06em; }
.pl-page-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* ── Pipeline filter toolbar ── */
.pl-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 6px 10px; margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(31,42,43,.05);
}
.pl-filter-group { display:flex; align-items:center; gap:4px; padding: 2px 6px; }
.pl-filter-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; margin-right: 2px; white-space:nowrap;
}
.pl-filter-btn {
  border: none; background: transparent; color: #4A5947;
  font-size: 12px; font-weight: 600; padding: 5px 10px;
  border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s;
  font-family: inherit;
}
.pl-filter-btn:hover { background: rgba(77,138,134,.08); color: var(--blue-dark); }
.pl-filter-btn.pl-active {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(77,138,134,.25);
}
.pl-filter-divider {
  width: 1px; height: 20px; background: var(--line);
  margin: 0 4px; flex-shrink: 0;
}

/* ── Active filter notice ── */
.pl-active-filter-bar {
  display:flex; align-items:center; gap:10px;
  padding:8px 14px; margin-bottom:12px;
  background:#FDFCF9; border:1px solid rgba(77,138,134,.2);
  border-radius:10px; font-size:13px; color:var(--muted);
}
.pl-active-filter-bar strong { color:var(--ink); }
.pl-clear-filter {
  margin-left:auto; border:none; background:transparent;
  color:var(--muted); font-size:12px; font-weight:700;
  cursor:pointer; padding:2px 6px; border-radius:6px;
}
.pl-clear-filter:hover { background:rgba(77,138,134,.1); color:var(--blue-dark); }

/* ── Stat cards — compact ── */
.stat-grid { margin-top:0; margin-bottom:14px; }
.stat { padding:14px 16px; }
.stat:after { display:none; } /* remove dot decoration */
.stat span { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.stat strong { font-size:28px; }

/* ── Kanban count badge ── */
.kanban-count {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:20px; height:20px; padding:0 5px;
  background:#EDEAE0; color:#6F7E6A;
  font-size:11px; font-weight:700; border-radius:999px;
}
.kanban-col h3 { font-size:13px; font-weight:700; letter-spacing:.01em;
  text-transform:uppercase; color:#2D3E3F; margin-bottom:10px; }

/* ── Copy Feedback (T30) ── */
.btn-copied {
  background:#2D7A55 !important; color:#fff !important;
  border-color:#2D7A55 !important;
  transition:background .15s, color .15s;
}

/* ── Suggested Actions (T29) ── */
.suggested-actions { margin-top:16px; }
.sa-header {
  font-size:11px; font-weight:800; color:var(--muted);
  text-transform:uppercase; letter-spacing:.07em; margin-bottom:10px;
}
.sa-row {
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 12px; background:#FDFCF9; border-radius:10px;
  margin-bottom:8px; cursor:pointer; transition:background .15s;
  border:1px solid #E8E4D9;
}
.sa-row:hover { background:#FDFCF9; border-color:var(--blue); }
.sa-icon { font-size:1.1rem; min-width:24px; margin-top:1px; }
.sa-text { font-size:13px; color:var(--ink); line-height:1.4; }

/* ── Due Now clear chip (T28) ── */
.due-now-clear {
  display:inline-flex; align-items:center; gap:6px;
  background:#FAE8E4; color:#8B3A2A; border:1px solid #F5D5C8;
  border-radius:999px; padding:4px 12px; font-size:12px; font-weight:700;
  cursor:pointer; margin-left:8px; vertical-align:middle;
}
.due-now-clear:hover { background:#FAE8E4; }

/* ── Status chips (T50) ── */
.status-chip {
  display:inline-block; padding:2px 8px; border-radius:20px;
  font-size:11px; font-weight:700; letter-spacing:.03em;
}
.status-chip.new-lead      { background:#FDFCF9; color:#1A4740; }
.status-chip.contacted     { background:#EAF1EE; color:#2D7A55; }
.status-chip.discovery     { background:#FAF6E8; color:#7A5C10; }
.status-chip.proposal      { background:#FAF6E8; color:#8B3A2A; }
.status-chip.follow-up     { background:#FAF6E8; color:#B8744F; }
.status-chip.negotiation   { background:#FAE8E4; color:#8B3A2A; }
.status-chip.verbal        { background:#EAF1EE; color:#2D7A55; }
.status-chip.sold          { background:#D4EDE1; color:#2D7A55; border:1px solid #B8DEC9; font-weight:800; }
.status-chip.lost          { background:#EDEAE0; color:#6F7E6A; }
.status-chip.pending       { background:#FDFCF9; color:#6F7E6A; }

/* mini-row overdue (T46) */
.mini-row-overdue { border-left:3px solid #8B3A2A !important; }

/* ── Duplicate warning card (T36) ── */
.dup-warn {
  background:#FAE8E4; border:1px solid #F5D5C8; border-radius:10px;
  padding:12px 14px; margin-bottom:16px; font-size:13px; color:#7A2E20;
  line-height:1.6;
}
.dup-warn strong { color:#5C2318; }

/* ── Link-style button ── */
.link-btn {
  background:none; border:none; color:var(--blue);
  font-size:inherit; cursor:pointer; padding:0;
  text-decoration:underline;
}
.link-btn:hover { color:var(--blue-2); }

/* ── Missing data badges (T41) ── */
.missing-data-badge {
  display:inline-block; background:#FAE8E4; color:#8B3A2A;
  border:1px solid #F5D5C8; border-radius:4px;
  font-size:10px; font-weight:700; padding:1px 6px; margin-left:6px;
  vertical-align:middle;
}
.missing-data-alert {
  background:#FAE8E4; border:1px solid #F5D5C8; border-radius:10px;
  padding:12px 16px; margin-bottom:16px; font-size:13px; color:#7A2E20;
  font-weight:500;
}
.missing-data-alert strong { color:#5C2318; }

/* ── Live count badge (T34) ── */
.live-count-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:22px; height:22px; border-radius:999px;
  background:linear-gradient(135deg,var(--blue),var(--blue-2));
  color:#fff; font-size:11px; font-weight:800; padding:0 6px;
}
.live-count-badge.empty {
  background:#EDEAE0; color:#6F7E6A;
}

/* ── Checklist progress bar (T37) ── */
.checklist-progress {
  height:6px; background:#E8E4D9; border-radius:4px;
  margin-bottom:4px; overflow:hidden;
}
.cp-bar {
  height:6px; border-radius:4px;
  transition:width .4s cubic-bezier(.4,0,.2,1);
}
.cp-label {
  font-size:11px; color:var(--muted); margin-bottom:8px;
  font-weight:600;
}

/* ── Google Integration: connected features (T44) ── */
.connected-features {
  background:#EAF1EE; border:1px solid #B8DEC9;
  border-radius:10px; padding:12px 14px;
}
.cf-row {
  display:flex; gap:10px; align-items:flex-start;
  margin-bottom:8px; font-size:13px; color:#2D7A55;
}
.cf-row:last-child { margin-bottom:0; }
.cf-icon { font-size:1.1rem; min-width:24px; margin-top:1px; }

/* ── Homeworks onboarding (T48) ── */
.int-onboarding-state {
  background:linear-gradient(135deg,#113931,#113931);
  border:1px solid rgba(139,105,20,.25); border-radius:12px;
  padding:16px; margin-bottom:16px;
}
.setup-steps { padding-left:4px; }
.step-num {
  display:flex; align-items:center; justify-content:center;
  min-width:28px; height:28px; border-radius:50%;
  background:linear-gradient(135deg,#8B6914,#7A5C10);
  color:#fff; font-size:13px; font-weight:800; flex-shrink:0;
}

/* ── Forms clickable cards (T49) ── */
.card.clickable {
  cursor:pointer;
  transition:box-shadow .15s, border-color .15s, transform .1s;
}
.card.clickable:hover {
  box-shadow:0 6px 20px rgba(77,138,134,.12);
  transform:translateY(-1px);
}

/* ══════════════════════════════════════════════
   Lead Intake Form Redesign
   ══════════════════════════════════════════════ */

/* Hero header */
.lf-hero {
  display:flex;
  align-items:baseline;
  gap:10px;
  max-width:680px;
  margin:0 auto 14px;
  padding:4px 0 0;
}
.lf-hero-eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#4D8A86;
}
.lf-hero-title {
  font-size:20px;
  font-weight:700;
  color:#113931;
  margin:0;
  line-height:1;
}
.lf-hero-sub {
  display:none;
}

/* Sections */
.lf-section {
  background:#fff;
  border:1px solid #E8E4D9;
  border-radius:14px;
  padding:18px 20px;
  margin:0 auto 10px;
  max-width:680px;
  box-shadow:0 1px 4px rgba(31,42,43,.05);
}
.lf-section-header {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid #EDEAE0;
}
.lf-section-num {
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  border-radius:6px;
  background:#4D8A86;
  color:#fff;
  font-size:11px;
  font-weight:800;
  flex-shrink:0;
}
.lf-section-title {
  font-size:14px;
  font-weight:700;
  color:#113931;
  line-height:1.2;
}
.lf-section-sub {
  font-size:11px;
  color:#6F7E6A;
  margin-top:1px;
}

/* Field grid */
.lf-fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 14px;
}
@media (max-width:600px) {
  .lf-fields { grid-template-columns:1fr; }
  .lf-section { padding:14px 14px; }
}
.lf-field {
  display:flex;
  flex-direction:column;
  gap:4px;
}
.lf-field--full {
  grid-column:1 / -1;
}
.lf-label {
  font-size:11px;
  font-weight:600;
  color:#6F7E6A;
  letter-spacing:.02em;
}
.lf-required { color:#8B3A2A; }
.lf-hint { color:#6F7E6A; font-weight:400; }

/* Inputs */
.lf-input, .lf-select, .lf-textarea {
  background:#FDFCF9;
  border:1px solid #E8E4D9;
  border-radius:8px;
  color:#113931;
  font-size:13px;
  padding:8px 10px;
  outline:none;
  transition:border-color .15s, box-shadow .15s;
  width:100%;
  box-sizing:border-box;
}
.lf-input:focus, .lf-select:focus, .lf-textarea:focus {
  border-color:#4D8A86;
  background:#fff;
  box-shadow:0 0 0 3px rgba(77,138,134,.1);
}
.lf-input::placeholder { color:#6F7E6A; }
.lf-input--lg { font-size:15px; padding:10px 12px; font-weight:600; }
.lf-input--value { font-size:16px; font-weight:700; color:#2D7A55; }
.lf-input--value::placeholder { color:#6F7E6A; font-weight:400; font-size:13px; }
.lf-textarea { resize:vertical; min-height:72px; font-family:inherit; line-height:1.5; }
.lf-select { cursor:pointer; }
.lf-select option { background:#fff; color:#113931; }

/* Client type toggle */
.lf-toggle-group {
  display:flex;
  gap:6px;
}
.lf-toggle-radio { display:none; }
.lf-toggle-btn {
  flex:1;
  text-align:center;
  padding:8px 8px;
  border:1px solid #E8E4D9;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  color:#6F7E6A;
  background:#FDFCF9;
  transition:all .15s;
  user-select:none;
}
.lf-toggle-radio:checked + .lf-toggle-btn {
  border-color:#4D8A86;
  background:rgba(77,138,134,.08);
  color:#1A4740;
  box-shadow:0 0 0 2px rgba(77,138,134,.12);
}
.lf-toggle-btn:hover { border-color:#4D8A86; color:#1A4740; }

/* Project category tiles */
.lf-cat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-tile {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #E8E4D9;
  border-radius: 999px;
  background: #FDFCF9;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
}
.cat-tile:hover {
  border-color: #4D8A86;
  background: rgba(77,138,134,.06);
}
.cat-tile--active {
  border-color: #4D8A86;
  background: rgba(77,138,134,.1);
  box-shadow: 0 0 0 2px rgba(77,138,134,.12);
}
.cat-tile-label { font-size: 12px; font-weight: 600; color: #5C6B58; letter-spacing: .01em; }
.cat-tile--active .cat-tile-label { color: #1A4740; font-weight: 700; }

/* Commission preview */
.lf-comm-preview {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  background:#EAF1EE;
  border:1px solid #B8DEC9;
  border-radius:8px;
  padding:9px 12px;
  font-size:13px;
  font-weight:700;
  color:#2D7A55;
  animation:lf-comm-pop .2s ease;
}
.lf-comm-icon { font-size:20px; }
@keyframes lf-comm-pop {
  from { transform:scale(.95); opacity:.6; }
  to   { transform:scale(1);   opacity:1; }
}

/* Detail toggle */
.lf-detail-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  max-width:680px;
  margin:0 auto 0;
  padding:10px 16px;
  cursor:pointer;
  color:#6F7E6A;
  font-size:12px;
  font-weight:600;
  letter-spacing:.02em;
  border:1px dashed #E8E4D9;
  border-radius:10px;
  transition:color .15s, border-color .15s;
  background:#FDFCF9;
  user-select:none;
}
.lf-detail-toggle:hover { color:#1A4740; border-color:#4D8A86; }
.lf-detail-chevron {
  font-size:16px;
  transition:transform .2s;
  color:#6F7E6A;
}

/* Detail panel */
.lf-detail-panel {
  max-width:680px;
  margin:0 auto;
  padding-top:12px;
}
.lf-detail-panel .lf-fields { grid-template-columns:1fr; }

/* Footer */
.lf-footer {
  display:flex;
  align-items:center;
  gap:10px;
  max-width:680px;
  margin:14px auto 32px;
  flex-wrap:wrap;
}
.lf-save-btn {
  font-size:14px;
  padding:10px 24px;
  font-weight:700;
  letter-spacing:.01em;
}

/* ── Avalon Internal Icon System ─────────────────────────────────────────── */
/* Timeline dot SVG icons — override the plain font-size approach */
.timeline-dot {
  /* Override: make the inner span render SVG correctly */
  overflow: visible;
}
.timeline-dot span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.timeline-dot.note    span { color: var(--blue); }
.timeline-dot.stage   span { color: #B8744F; }
.timeline-dot.sold    span { color: #2D7A55; }
.timeline-dot.created span { color: #8B6914; }
.timeline-dot.admin   span { color: #6F7E6A; }

/* Category tile icon container */
.cat-tile-icon { display: none; } /* icons removed from intake form — text-only pills */

/* Suggested action icon container */
.sa-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Exec takeaway icon badge */
.takeaway-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Division icon wrapper */
.div-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  flex-shrink: 0;
}

/* Commission preview icon */
.lf-comm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* General inline SVG helper */
.av-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}
/* ────────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════
   Today Page — Clean-up styles
   ══════════════════════════════════════════════ */

/* ── Stat cards — Today page refinements ── */
.stat-grid { gap:12px; }
.stat {
  border-radius:14px;
  background:#fff;
  border:1px solid #E5F0EF;
  box-shadow:0 2px 8px rgba(31,42,43,.04);
}
.stat span {
  color:#6F7E6A;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.stat strong {
  font-size:26px;
  font-weight:800;
  color:#113931;
  letter-spacing:-.04em;
  line-height:1.1;
}
.stat.bad strong { color:#8B3A2A; }

/* ── Today section card headings ── */
.today-card-title {
  font-size:15px;
  font-weight:750;
  color:#113931;
  letter-spacing:-.01em;
  margin:0;
}

/* Override the global h2 only inside today cards */
.app-card h2,
.card h2.today-h2 {
  font-size:16px;
  font-weight:750;
  letter-spacing:-.02em;
  color:#113931;
  margin:0 0 10px;
}

/* Section head — align badge right, tighter */
.section-head {
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px solid #EDEAE0;
}
.section-head h2 {
  font-size:15px;
  font-weight:750;
  color:#113931;
  letter-spacing:-.01em;
  margin:0;
}

/* ── 0 follow-ups pill badge ── */
.warn-badge {
  background:#FAF6E8;
  color:#7A5C10;
  border:1px solid #F5E8C0;
  font-size:11px;
  font-weight:700;
}
/* neutral / zero state badge */
.neutral-badge {
  background:#EDEAE0;
  color:#5C6B58;
  border:1px solid #E8E4D9;
  font-size:11px;
  font-weight:700;
}

/* ── app-card top accent bar — thinner, subtler ── */
.app-card:before {
  height:3px;
  background:linear-gradient(90deg,#4D8A86,#4D8A86);
  opacity:.7;
}

/* ── Mini-rows (Coming Up / Recently Updated) ── */
.mini-row {
  background:#FDFCF9;
  border:1px solid #EDEAE0;
  border-bottom:none;
  border-radius:0;
  padding:10px 12px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:2px 8px;
  align-items:center;
  transition:background .12s;
}
.mini-row:first-of-type { border-radius:10px 10px 0 0; border-top:1px solid #EDEAE0; }
.mini-row:last-of-type  { border-radius:0 0 10px 10px; border-bottom:1px solid #EDEAE0; }
.mini-row:only-of-type  { border-radius:10px; border:1px solid #EDEAE0; }
.mini-row:hover { background:#FDFCF9; border-color:#E5F0EF; }
.mini-row strong { font-size:13px; font-weight:650; color:#113931; }
.mini-row em     { font-size:12px; color:#6F7E6A; font-style:normal; grid-column:1; }
.mini-row .status-chip { align-self:start; margin-top:1px; }

/* ── Checklist items — tighter, lighter ── */
.check-item {
  padding:9px 0;
  gap:10px;
  border-bottom:1px solid #EDEAE0;
}
.check-item:last-child { border-bottom:none; }
.check-item input { width:16px; height:16px; }
.check-item label { font-size:13px; color:#113931; line-height:1.4; }

/* ── Due Now clear chip ── */
.due-now-clear {
  background:#EAF1EE;
  color:#2D7A55;
  border:1px solid #B8DEC9;
  border-radius:999px;
  padding:5px 12px;
  font-size:12px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin:8px 0;
  cursor:default;
}
.due-now-clear:hover { background:#D4EDE1; }

/* ── Quick-action buttons in today header ── */
.pl-page-actions .primary-btn.small,
.pl-page-actions .secondary-btn.small {
  font-size:12px;
  padding:7px 14px;
  font-weight:700;
  letter-spacing:.01em;
}

/* ── pl-title / pl-subtitle on Today ── */
.pl-title   { font-size:22px; font-weight:800; letter-spacing:-.03em; color:#113931; }
.pl-subtitle { font-size:13px; color:#6F7E6A; font-weight:500; margin-top:1px; }

/* ── KPI activity widget (Ryan only) — light card ── */
.card[style*="border-left"] h3 {
  font-size:15px;
  font-weight:700;
  color:#113931;
  margin-bottom:4px;
}
.card[style*="border-left"] .muted.small-text {
  font-size:12px;
  color:#6F7E6A;
  margin-bottom:0;
}

/* ── Mobile Today adjustments ── */
@media(max-width:920px){
  .pl-title   { font-size:18px; }
  .pl-subtitle { font-size:12px; }
  .stat strong { font-size:22px; }
  .mini-row   { padding:9px 10px; }
}

/* ══════════════════════════════════════════════
   Clients & Properties View
   ══════════════════════════════════════════════ */

/* ── Type badges ── */
.cl-badge {
  display:inline-flex; align-items:center;
  padding:3px 9px; border-radius:999px;
  font-size:11px; font-weight:700; letter-spacing:.02em;
  white-space:nowrap;
}
.cl-badge-residential { background:#FDFCF9; color:#1A4740; border:1px solid #D6D1C4; }
.cl-badge-commercial  { background:#EAF1EE; color:#2D7A55; border:1px solid #B8DEC9; }
.cl-badge-hoa         { background:#FAF6E8; color:#B8744F; border:1px solid #F5E8DF; }
.cl-badge-vendor      { background:#FAF6E8; color:#8B3A2A; border:1px solid #F5E8DF; }

/* ── Status dot ── */
.cl-status-dot {
  display:inline-block; width:7px; height:7px;
  border-radius:50%; vertical-align:middle; margin-right:3px;
}

/* ── Tags ── */
.cl-tag {
  display:inline-flex; padding:2px 8px; border-radius:999px;
  background:#EDEAE0; color:#5C6B58;
  font-size:10px; font-weight:600; white-space:nowrap;
}

/* ── Opp count bubble ── */
.cl-opp-count {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:22px; height:22px; border-radius:999px;
  background:linear-gradient(135deg,var(--blue),var(--blue-2));
  color:#fff; font-size:11px; font-weight:800;
}

/* ── Search bar ── */
.cl-search-wrap {
  position:relative; flex:1; max-width:320px; min-width:180px;
}
.cl-search-input {
  width:100%; border:1px solid #E8E4D9; border-radius:999px;
  padding:7px 12px 7px 30px; font-size:13px;
  background:#fff; outline:none; color:#113931;
  transition:border-color .15s, box-shadow .15s;
}
.cl-search-input:focus {
  border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(77,138,134,.12);
}

/* ── Table wrapper ── */
.cl-table-wrap { margin-top:10px; }
.cl-table {
  width:100%; border-collapse:collapse;
  font-size:13px;
}
.cl-table thead tr {
  background:#FDFCF9;
  border-bottom:1px solid #E8E4D9;
}
.cl-table th {
  padding:10px 14px;
  text-align:left;
  font-size:11px; font-weight:700;
  color:#6F7E6A; text-transform:uppercase; letter-spacing:.05em;
}
.cl-table tbody .cl-row {
  border-bottom:1px solid #EDEAE0;
  cursor:pointer;
  transition:background .1s;
}
.cl-table tbody .cl-row:last-child { border-bottom:none; }
.cl-table tbody .cl-row:hover { background:#FDFCF9; }
.cl-table td {
  padding:11px 14px;
  vertical-align:middle;
}

/* ── Name cell ── */
.cl-name-wrap { display:flex; align-items:center; gap:10px; }
.cl-avatar {
  width:32px; height:32px; border-radius:10px; flex-shrink:0;
  background:linear-gradient(135deg,#E5F0EF,#E5F0EF);
  color:#4D8A86; font-weight:800; font-size:13px;
  display:flex; align-items:center; justify-content:center;
}
.cl-name { font-weight:650; color:#113931; font-size:13px; }
.cl-sub  { font-size:11px; color:#6F7E6A; margin-top:1px; }
.cl-cell-addr, .cl-cell-contact { font-size:12px; color:#5C6B58; }
.cl-empty-cell { color:#D6D1C4; }
.cl-link { color:var(--blue-dark); text-decoration:none; font-size:12px; }
.cl-link:hover { text-decoration:underline; }

/* ── Back button ── */
.cl-back-btn {
  background:none; border:none; color:#6F7E6A; font-size:13px;
  font-weight:600; cursor:pointer; padding:0; display:block;
  margin-bottom:2px; transition:color .12s;
}
.cl-back-btn:hover { color:#113931; }

/* ── Detail DL ── */
.cl-dl { display:grid; grid-template-columns:100px 1fr; gap:6px 12px; font-size:13px; margin:0; }
.cl-dl dt { color:#6F7E6A; font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.05em; align-self:start; padding-top:1px; }
.cl-dl dd { margin:0; color:#113931; word-break:break-word; }
.cl-notes-block {
  margin-top:12px; padding:10px 14px;
  background:#FDFCF9; border-radius:10px; border:1px solid #EDEAE0;
  font-size:13px; color:#5C6B58; line-height:1.55; white-space:pre-wrap;
}

/* ── Properties grid ── */
.cl-properties-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:10px; margin-top:2px; }
.cl-property-card {
  background:#FDFCF9; border:1px solid #E8E4D9;
  border-radius:12px; padding:12px 14px; position:relative;
}
.cl-property-label { font-weight:700; color:#113931; font-size:13px; margin-bottom:3px; }
.cl-property-addr  { font-size:12px; color:#6F7E6A; line-height:1.4; }
.cl-property-notes { font-size:11px; color:#6F7E6A; margin-top:5px; font-style:italic; }
.cl-property-delete {
  position:absolute; top:8px; right:8px;
  background:none; border:1px solid #F5D5C8; border-radius:6px;
  color:#8B3A2A; font-size:10px; font-weight:700; padding:2px 7px;
  cursor:pointer; opacity:.7; transition:opacity .12s;
}
.cl-property-delete:hover { opacity:1; background:#FAE8E4; }

/* ── Modal ── */
.cl-modal-overlay {
  position:fixed; inset:0; z-index:200;
  background:rgba(7,19,27,.45); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.cl-modal {
  background:#fff; border-radius:20px; width:100%; max-width:580px;
  max-height:90vh; overflow:auto;
  box-shadow:0 32px 80px rgba(7,19,27,.22);
  animation:cl-modal-in .18s ease;
}
@keyframes cl-modal-in {
  from { transform:translateY(12px); opacity:.6; }
  to   { transform:translateY(0);    opacity:1; }
}
.cl-modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px 14px; border-bottom:1px solid #EDEAE0;
}
.cl-modal-header h3 { margin:0; font-size:16px; font-weight:750; color:#113931; }
.cl-modal-close {
  background:none; border:none; color:#6F7E6A; font-size:18px;
  cursor:pointer; padding:0 4px; line-height:1; transition:color .12s;
}
.cl-modal-close:hover { color:#113931; }
.cl-modal-body { padding:16px 20px; }
.cl-modal-footer {
  display:flex; gap:8px; justify-content:flex-end; align-items:center;
  padding:14px 20px 18px; border-top:1px solid #EDEAE0;
}
.cl-modal-footer .danger-btn { margin-right:auto; }

/* ── Form grid inside modal ── */
.cl-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.cl-form-label { display:grid; gap:5px; }
.cl-form-label span { font-size:11px; font-weight:700; color:#2D3E3F; letter-spacing:.02em; }
.cl-form-label.full { grid-column:1/-1; }
.cl-input {
  width:100%; border:1px solid #E8E4D9; border-radius:10px;
  padding:8px 11px; font-size:13px; color:#113931; background:#fff;
  outline:none; transition:border-color .15s, box-shadow .15s;
  font-family:inherit;
}
.cl-input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(77,138,134,.12); }
.cl-input textarea { resize:vertical; }

/* ── Mobile ── */
@media(max-width:920px){
  .cl-form-grid { grid-template-columns:1fr; }
  .cl-table { font-size:12px; }
  .cl-cell-addr, .cl-cell-contact { display:none; }
  .cl-table th:nth-child(4), .cl-table th:nth-child(5) { display:none; }
  .cl-properties-grid { grid-template-columns:1fr; }
  .cl-search-wrap { max-width:100%; }
}

/* ══════════════════════════════════════════════
   Lead Form — Client Autocomplete
   ══════════════════════════════════════════════ */

/* Wrapper so dropdown is positioned relative to input */
.lf-client-search-wrap {
  position: relative;
}

/* Dropdown container */
.lf-client-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #E8E4D9;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(7,19,27,.12);
  z-index: 120;
  overflow: hidden;
  animation: lf-cd-in .12s ease;
  max-height: 320px;
  overflow-y: auto;
}
@keyframes lf-cd-in {
  from { opacity:.5; transform:translateY(-4px); }
  to   { opacity:1;  transform:translateY(0); }
}

/* Existing client row */
.lf-cd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .1s;
}
.lf-cd-item:hover { background: #FDFCF9; }

.lf-cd-avatar {
  width: 30px; height: 30px;
  border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg,#E5F0EF,#E5F0EF);
  color: #4D8A86; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.lf-cd-info {
  display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0;
}
.lf-cd-name {
  font-size: 13px; font-weight: 650; color: #113931;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lf-cd-sub {
  font-size: 11px; color: #6F7E6A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lf-cd-badge { flex-shrink: 0; }

/* Divider between results and create-new */
.lf-cd-divider {
  height: 1px; background: #EDEAE0; margin: 2px 0;
}

/* "Create new client" row */
.lf-cd-new {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--blue-dark);
  transition: background .1s;
}
.lf-cd-new:hover { background: #FDFCF9; }
.lf-cd-new svg { flex-shrink: 0; opacity: .7; }

/* Client status chip (shown after selection) */
.lf-client-status { margin-top: 6px; min-height: 0; }

.lf-client-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FDFCF9;
  border: 1px solid #E5F0EF;
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  color: #4D8A86;
  line-height: 1.3;
}
.lf-client-chip--new {
  background: #EAF1EE;
  border-color: #B8DEC9;
  color: #2D7A55;
}
.lf-client-chip-clear {
  background: none; border: none;
  color: #6F7E6A; font-size: 13px;
  cursor: pointer; padding: 0 0 0 4px;
  line-height: 1; transition: color .12s;
}
.lf-client-chip-clear:hover { color: #8B3A2A; }

/* Read-only state when client is selected */
#lf-client-input[readonly] {
  background: #FDFCF9;
  color: #5C6B58;
  cursor: default;
  border-color: #E5F0EF;
}
/* ────────────────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   GROUNDWORK GLOBAL THEME — Sprint 1+2 component layer
   GW-006 · GW-007 · GW-008 · GW-009 · GW-011 · GW-012 · GW-013 · GW-014
   ═══════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════
   GW-006 · STATUS CHIPS — unified across all modules
   ════════════════════════════════════════════════════════ */
.status-chip {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 10px; border-radius:999px;
  font-size:11px; font-weight:700; letter-spacing:.02em;
  border:1px solid transparent; white-space:nowrap;
}
/* Pipeline stages */
.status-chip.new-lead    { background:#EAF1EE; color:#1A4740; border-color:#D4EDE1; }
.status-chip.contacted   { background:#FDFCF9; color:#1A4740; border-color:#D6D1C4; }
.status-chip.discovery   { background:#FAF6E8; color:#7A5C10; border-color:#F5E8C0; }
.status-chip.proposal    { background:#FAF6E8; color:#8B3A2A; border-color:#F5E8DF; }
.status-chip.follow-up   { background:#FAF6E8; color:#B8744F; border-color:#F5E8DF; }
.status-chip.negotiation { background:#FAE8E4; color:#8B3A2A; border-color:#F5D5C8; }
.status-chip.verbal      { background:#EAF1EE; color:#2D7A55; border-color:#B8DEC9; }
.status-chip.sold        { background:#D4EDE1; color:#2D7A55; border-color:#B8DEC9; font-weight:800; }
.status-chip.lost        { background:#EDEAE0; color:#6F7E6A; border-color:#D6D1C4; }
.status-chip.pending     { background:#FDFCF9; color:#6F7E6A; border-color:#E8E4D9; }
/* General semantic */
.status-chip.active  { background:#EAF1EE; color:#1A4740; border-color:#D4EDE1; }
.status-chip.overdue { background:#FAE8E4; color:#7A2E20; border-color:#F5D5C8; }
.status-chip.warn    { background:#FAF6E8; color:#7A5C10; border-color:#F5E8C0; }

/* ── GW-006 · KPI CARDS — light & dark variants ── */
/* Light KPI card (Executive Ops style) */
.gw-kpi-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  padding:20px 22px;
  box-shadow:var(--gw-shadow-xs);
  transition:border-color .15s, box-shadow .15s, transform .15s;
}
.gw-kpi-card:hover {
  border-color:var(--gw-pine-muted);
  box-shadow:var(--gw-shadow-sm);
  transform:translateY(-1px);
}
.gw-kpi-label {
  font-size:10px; font-weight:800; letter-spacing:.09em;
  text-transform:uppercase; color:var(--gw-muted); margin-bottom:8px;
}
.gw-kpi-value {
  font-size:2rem; font-weight:900; letter-spacing:-.04em;
  color:var(--gw-ink); line-height:1;
}
.gw-kpi-trend {
  display:inline-flex; align-items:center; gap:4px;
  margin-top:8px; font-size:12px; font-weight:700;
}
.gw-kpi-trend.up   { color:var(--gw-emerald); }
.gw-kpi-trend.down { color:var(--gw-rose); }
.gw-kpi-sub {
  font-size:11.5px; color:var(--gw-muted); margin-top:4px;
}

/* Dark KPI card (Manager Tools style) */
.gw-kpi-card-dark {
  background:linear-gradient(145deg,var(--gw-pine-deep),var(--gw-pine));
  border:1px solid rgba(255,255,255,.1);
  border-radius:var(--gw-r-md);
  padding:20px 22px;
  box-shadow:0 8px 28px rgba(0,0,0,.2);
  transition:border-color .15s, box-shadow .15s;
}
.gw-kpi-card-dark:hover {
  border-color:rgba(16,185,129,.3);
  box-shadow:0 12px 36px rgba(0,0,0,.28);
}
.gw-kpi-card-dark .gw-kpi-label { color:rgba(255,255,255,.45); }
.gw-kpi-card-dark .gw-kpi-value { color:#FFFFFF; }
.gw-kpi-card-dark .gw-kpi-sub   { color:rgba(255,255,255,.4); }

/* Existing .kpi-card — keep dark but match new radius/spacing */
.kpi-card {
  background:linear-gradient(145deg,var(--gw-pine-deep),#113931);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--gw-r-md);
  padding:20px 22px;
}
.kpi-card:hover { border-color:rgba(16,185,129,.25); box-shadow:0 8px 28px rgba(0,0,0,.2); }

/* ── GW-006 · PROGRESS BARS ── */
.gw-progress-track {
  height:7px; background:var(--gw-surface-3);
  border-radius:999px; overflow:hidden;
}
.gw-progress-fill {
  height:100%; border-radius:999px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  transition:width .4s cubic-bezier(.4,0,.2,1);
}
.gw-progress-fill.amber { background:linear-gradient(90deg,#7A5C10,#8B6914); }
.gw-progress-fill.rose  { background:linear-gradient(90deg,#8B3A2A,#8B3A2A); }

/* ════════════════════════════════════════════════════════
   GW-007 · SHARED STAT CARDS (Today / Dashboard)
   ════════════════════════════════════════════════════════ */
.stat {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  padding:18px 20px;
  box-shadow:var(--gw-shadow-xs);
  transition:box-shadow .15s, border-color .15s, transform .15s;
  position:relative;
  overflow:hidden;
}
.stat::after { display:none; }
.stat:hover {
  box-shadow:var(--gw-shadow-sm);
  border-color:var(--gw-pine-muted);
  transform:translateY(-1px);
}
.stat span {
  font-size:10px; font-weight:800; letter-spacing:.09em;
  text-transform:uppercase; color:var(--gw-muted); display:block;
  margin-bottom:8px;
}
.stat strong {
  font-size:28px; font-weight:900; letter-spacing:-.04em;
  color:var(--gw-ink); line-height:1; display:block;
}
.stat.bad strong { color:#8B3A2A; }
/* Accent bar bottom */
.stat::before {
  content:'';
  position:absolute;
  bottom:0; left:0; right:0;
  height:3px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  opacity:0;
  transition:opacity .15s;
}
.stat:hover::before { opacity:.6; }

/* ════════════════════════════════════════════════════════
   GW-008 · INTERACTION POLISH — buttons, inputs, focus
   ════════════════════════════════════════════════════════ */

/* ── Primary button ── */
.primary-btn {
  background:var(--gw-pine);
  color:#fff;
  border:none;
  border-radius:var(--gw-r-sm);
  padding:9px 18px;
  font-size:13px; font-weight:700;
  display:inline-flex; align-items:center; gap:7px;
  transition:background .14s, box-shadow .14s, transform .1s;
  box-shadow:0 2px 8px rgba(30,70,56,.22);
  cursor:pointer; white-space:nowrap;
}
.primary-btn:hover {
  background:var(--gw-pine-light);
  box-shadow:0 5px 16px rgba(30,70,56,.32);
  transform:translateY(-1px);
}
.primary-btn:active  { transform:translateY(0); box-shadow:none; }
.primary-btn:focus-visible { outline:3px solid rgba(30,70,56,.45); outline-offset:3px; }
.primary-btn:disabled { opacity:.42; cursor:not-allowed; pointer-events:none; }

/* ── Secondary button ── */
.secondary-btn {
  background:var(--gw-surface);
  color:var(--gw-ink);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  padding:9px 16px;
  font-size:13px; font-weight:600;
  display:inline-flex; align-items:center; gap:6px;
  transition:background .12s, border-color .12s, transform .1s;
  cursor:pointer; white-space:nowrap;
}
.secondary-btn:hover {
  background:var(--gw-surface-2);
  border-color:var(--gw-pine-muted);
  transform:translateY(-1px);
}
.secondary-btn:active  { transform:translateY(0); }
.secondary-btn:focus-visible { outline:3px solid rgba(30,70,56,.3); outline-offset:3px; }
.secondary-btn:disabled { opacity:.42; cursor:not-allowed; pointer-events:none; }

/* ── Danger button ── */
.danger-btn {
  background:var(--gw-surface);
  color:#8B3A2A;
  border:1px solid #F5D5C8;
  border-radius:var(--gw-r-sm);
  padding:9px 16px;
  font-size:13px; font-weight:600;
  display:inline-flex; align-items:center; gap:6px;
  transition:background .12s, border-color .12s;
  cursor:pointer;
}
.danger-btn:hover { background:#FAE8E4; border-color:#F5D5C8; }
.danger-btn:focus-visible { outline:3px solid rgba(220,38,38,.3); outline-offset:3px; }

/* ── Input / select / textarea ── */
input[type=text], input[type=email], input[type=number],
input[type=date], input[type=search], input[type=tel],
select, textarea {
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  background:var(--gw-surface);
  color:var(--gw-ink);
  font-size:13px;
  padding:9px 12px;
  outline:none;
  transition:border-color .15s, box-shadow .15s;
  width:100%;
  box-sizing:border-box;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--gw-pine);
  box-shadow:0 0 0 3px rgba(30,70,56,.12);
}
input::placeholder, textarea::placeholder { color:var(--gw-subtle); }

/* ── Focus ring for interactive elements ── */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline:3px solid rgba(30,70,56,.4);
  outline-offset:2px;
}

/* ── Loading state ── */
.btn-loading { position:relative; pointer-events:none; opacity:.8; }
.btn-loading::after {
  content:''; position:absolute; right:12px; top:50%; transform:translateY(-50%);
  width:13px; height:13px;
  border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;
  border-radius:50%; animation:gw-spin .7s linear infinite;
}
@keyframes gw-spin { to { transform:translateY(-50%) rotate(360deg); } }

/* ── Hover transitions on cards ── */
.dash-card-clickable {
  cursor:pointer;
  transition:transform .15s, box-shadow .15s, border-color .15s;
}
.dash-card-clickable:hover {
  transform:translateY(-2px);
  box-shadow:var(--gw-shadow-sm);
  border-color:var(--gw-pine-muted) !important;
}
.dash-card-clickable:active { transform:translateY(0); }

/* ── Toast / feedback ── */
.toast {
  border-radius:var(--gw-r-sm) !important;
  box-shadow:var(--gw-shadow-md) !important;
}

/* ════════════════════════════════════════════════════════
   GW-009 · TODAY / DASHBOARD VIEW
   ════════════════════════════════════════════════════════ */
.today-card-title {
  font-size:15px; font-weight:750; color:var(--gw-ink);
  letter-spacing:-.01em; margin:0;
}
.section-head {
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid var(--gw-line);
}
.section-head h2 {
  font-size:15px; font-weight:750; color:var(--gw-ink);
  letter-spacing:-.01em; margin:0;
}
.app-card h2, .card h2.today-h2 {
  font-size:15px; font-weight:750; letter-spacing:-.02em; color:var(--gw-ink); margin:0 0 12px;
}
/* Mini rows */
.mini-row {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-bottom:none; border-radius:0;
  padding:11px 14px;
  display:grid; grid-template-columns:1fr auto; gap:2px 8px; align-items:center;
  transition:background .12s, border-color .12s;
}
.mini-row:first-of-type { border-radius:var(--gw-r-sm) var(--gw-r-sm) 0 0; border-top:1px solid var(--gw-line); }
.mini-row:last-of-type  { border-radius:0 0 var(--gw-r-sm) var(--gw-r-sm); border-bottom:1px solid var(--gw-line); }
.mini-row:only-of-type  { border-radius:var(--gw-r-sm); border:1px solid var(--gw-line); }
.mini-row:hover { background:var(--gw-surface-2); border-color:var(--gw-pine-muted); }
.mini-row strong { font-size:13px; font-weight:650; color:var(--gw-ink); }
.mini-row em     { font-size:12px; color:var(--gw-muted); font-style:normal; grid-column:1; }

/* Check items */
.check-item {
  padding:10px 4px; gap:10px;
  border-bottom:1px solid var(--gw-line);
  transition:background .1s; border-radius:var(--gw-r-xs); cursor:pointer;
}
.check-item:last-child { border-bottom:none; }
.check-item:hover { background:var(--gw-surface-2); }
.check-item input { width:16px; height:16px; accent-color:var(--gw-pine); }
.check-item label { font-size:13px; color:var(--gw-ink); line-height:1.4; }

/* Stat grid */
.stat-grid { gap:14px; margin-bottom:16px; }

/* Empty states */
.empty-state {
  background:var(--gw-surface);
  border:1.5px dashed var(--gw-line-strong);
  border-radius:var(--gw-r-lg);
  padding:36px 24px; text-align:center;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.empty-state .empty-title { font-weight:800; color:var(--gw-ink); font-size:15px; margin-bottom:5px; }
.empty-state .empty-body  { color:var(--gw-muted); font-size:13px; max-width:280px; line-height:1.6; }

/* ════════════════════════════════════════════════════════
   GW-011 · LEAD DETAIL — Groundwork theme alignment
   ════════════════════════════════════════════════════════ */

/* Sticky header: warm surface, pine border accent */
.ld-sticky-header {
  background:rgba(245,249,247,.95);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--gw-line);
}
/* Hero avatar: pine gradient */
.ld-hero-avatar, .ld-sticky-avatar {
  background:linear-gradient(135deg, var(--gw-pine), var(--gw-pine-light));
  box-shadow:0 6px 18px rgba(30,70,56,.25);
}
/* Lead name */
.ld-name { color:var(--gw-ink); }
/* Tab bar */
.ld-tab-bar { border-bottom-color:var(--gw-line); }
.ld-tab { color:var(--gw-muted); }
.ld-tab:hover { color:var(--gw-ink); background:var(--gw-surface-2); }
.ld-tab-active {
  color:var(--gw-pine);
  border-bottom-color:var(--gw-pine);
  font-weight:700;
}
.ld-tab-active:hover { background:transparent; }
.ld-tab-count { background:#EAF1EE; color:var(--gw-pine); }
.ld-tab-active .ld-tab-count { background:var(--gw-pine); color:#fff; }
/* Lead cards */
.ld-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
}
/* Rail cards */
.ld-rail-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
}
/* Primary button in lead */
.ld-btn-primary {
  background:linear-gradient(135deg, var(--gw-pine), var(--gw-pine-light));
  box-shadow:0 4px 14px rgba(30,70,56,.28);
}
.ld-btn-primary:hover { box-shadow:0 6px 20px rgba(30,70,56,.38); }
/* Save action */
.ld-action-save {
  background:linear-gradient(135deg, var(--gw-pine), var(--gw-pine-light));
  box-shadow:0 2px 8px rgba(30,70,56,.22);
}
/* Quick action buttons */
.ld-qa-btn {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  transition:all .14s;
}
.ld-qa-btn:hover {
  border-color:rgba(30,70,56,.3);
  background:var(--gw-surface-2);
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(30,70,56,.1);
}
.ld-qa-btn svg { color:var(--gw-pine); }
/* Form inputs in lead */
.ld-form input:focus, .ld-form select:focus, .ld-form textarea:focus {
  border-color:var(--gw-pine);
  box-shadow:0 0 0 3px rgba(30,70,56,.12);
}
/* Qual section */
.ld-qual-save-btn {
  background:var(--gw-pine);
}
.ld-qual-save-btn:hover {
  background:var(--gw-pine-light);
  box-shadow:0 3px 10px rgba(30,70,56,.25);
}
.ld-qual-edit-btn:hover {
  border-color:rgba(30,70,56,.3);
  background:var(--gw-surface-2);
  color:var(--gw-pine);
}
.ld-qual-textarea:focus {
  border-color:var(--gw-pine) !important;
  box-shadow:0 0 0 3px rgba(30,70,56,.12) !important;
}
/* Timeline */
.timeline::before { background:var(--gw-line); }
.timeline-dot { background:var(--gw-surface); border-color:var(--gw-line); }
.timeline-dot.note    { border-color:var(--gw-pine); background:var(--gw-surface-2); }
.timeline-dot.sold    { border-color:var(--gw-emerald); background:#EAF1EE; }
.timeline-dot.created { border-color:var(--gw-amber); background:#FAF6E8; }
/* Back button */
.ld-back-btn { border-color:var(--gw-line); color:var(--gw-muted); }
.ld-back-btn:hover { background:var(--gw-surface-2); color:var(--gw-ink); }
/* Rail buttons */
.ld-rail-btn { background:var(--gw-surface-2); border-color:var(--gw-line); }
.ld-rail-btn:hover {
  background:var(--gw-surface-3);
  border-color:var(--gw-pine-muted);
  color:var(--gw-pine);
}

/* ════════════════════════════════════════════════════════
   GW-012 · MANAGER TOOLS — token alignment
   ════════════════════════════════════════════════════════ */
.pl-toolbar {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
}
.pl-filter-btn:hover { background:var(--gw-surface-2); color:var(--gw-pine); }
.pl-filter-btn.pl-active {
  background:var(--gw-pine);
  color:#fff;
  box-shadow:0 2px 8px rgba(30,70,56,.25);
}
.pl-active-filter-bar {
  background:var(--gw-surface-2);
  border:1px solid var(--gw-line-strong);
  border-radius:var(--gw-r-sm);
}

/* ── Opp cards in pipeline ── */
.opp-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
  padding:16px;
  margin-bottom:9px;
  transition:box-shadow .15s, border-color .15s, transform .12s;
}
.opp-card:hover {
  box-shadow:var(--gw-shadow-sm);
  border-color:var(--gw-pine-muted);
  transform:translateY(-1px);
}

/* ── Kanban columns ── */
.kanban-col h3 {
  font-size:11px; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--gw-muted); margin-bottom:12px;
}
.kanban-count {
  background:var(--gw-surface-3);
  color:var(--gw-muted);
  font-size:11px; font-weight:700; border-radius:999px;
}

/* ════════════════════════════════════════════════════════
   GW-013 · SALES ACADEMY — Groundwork theme
   ════════════════════════════════════════════════════════ */
/* Academy progress bar */
.checklist-progress { background:var(--gw-surface-3); }
.cp-bar { background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald)); }
.cp-label { color:var(--gw-muted); }

/* ════════════════════════════════════════════════════════
   GW-014 · SETTINGS / USER MANAGEMENT / INTEGRATIONS
   ════════════════════════════════════════════════════════ */
/* Client table */
.cl-table thead tr { background:var(--gw-surface-2); border-bottom:1px solid var(--gw-line); }
.cl-table th { color:var(--gw-muted); }
.cl-table tbody .cl-row:hover { background:var(--gw-surface-2); }
.cl-search-input:focus { border-color:var(--gw-pine); box-shadow:0 0 0 3px rgba(30,70,56,.1); }
.cl-modal-overlay { background:rgba(15,28,20,.45); }
.cl-modal { border-radius:var(--gw-r-xl); }
.cl-input:focus { border-color:var(--gw-pine); box-shadow:0 0 0 3px rgba(30,70,56,.1); }

/* Permission table */
.perm-table tbody tr.perm-row:hover { background:var(--gw-surface-2) !important; }

/* Lead form inputs */
.lf-input:focus, .lf-select:focus, .lf-textarea:focus {
  border-color:var(--gw-pine);
  box-shadow:0 0 0 3px rgba(30,70,56,.1);
}
.lf-toggle-radio:checked + .lf-toggle-btn {
  border-color:var(--gw-pine);
  background:rgba(30,70,56,.07);
  color:var(--gw-pine-deep);
}
.lf-toggle-btn:hover { border-color:var(--gw-pine); color:var(--gw-pine); }
.cat-tile:hover { border-color:var(--gw-pine); background:rgba(30,70,56,.05); }
.cat-tile--active {
  border-color:var(--gw-pine);
  background:rgba(30,70,56,.09);
  box-shadow:0 0 0 2px rgba(30,70,56,.12);
}
.cat-tile--active .cat-tile-label { color:var(--gw-pine); }
.lf-cd-item:hover { background:var(--gw-surface-2); }
.lf-cd-new:hover  { background:var(--gw-surface-2); }

/* ════════════════════════════════════════════════════════
   GW-018 · EMPTY / LOADING / SKELETON STATES
   ════════════════════════════════════════════════════════ */
.gw-skeleton {
  background:linear-gradient(90deg, var(--gw-surface-3) 25%, var(--gw-surface-2) 50%, var(--gw-surface-3) 75%);
  background-size:200% 100%;
  animation:gw-shimmer 1.4s infinite;
  border-radius:var(--gw-r-xs);
}
@keyframes gw-shimmer {
  0%   { background-position:200% 0; }
  100% { background-position:-200% 0; }
}

/* ════════════════════════════════════════════════════════
   GW-019 · ACCESSIBILITY — focus, contrast, tap targets
   ════════════════════════════════════════════════════════ */
@media (max-width:920px) {
  .primary-btn, .secondary-btn, .danger-btn { min-height:44px; padding:12px 20px; font-size:14px; }
  .nav-item { min-height:42px; padding:12px 14px 12px 18px; font-size:14px; }
  .app-shell { grid-template-columns:1fr; }
  .sidebar {
    position:fixed;
    transform:translateX(-100%);
    transition:transform .22s ease;
    z-index:20; width:280px;
    box-shadow:var(--gw-shadow-lg);
  }
  .sidebar.open { transform:translateX(0); }
  .topbar .menu-btn { display:flex; }
  .view { padding:18px 16px; }
}
@media print {
  .sidebar, .topbar, .toast { display:none; }
  .app-shell { display:block; }
  .view { max-width:none; padding:0; }
  .card, .gw-kpi-card { break-inside:avoid; box-shadow:none; }
}

/* ════════════════════════════════════════════════════════
   GW-020 · DESIGN GOVERNANCE — utility tokens
   ════════════════════════════════════════════════════════ */
/* Color utility aliases for inline use */
.text-pine    { color:var(--gw-pine) !important; }
.text-emerald { color:var(--gw-emerald) !important; }
.text-muted   { color:var(--gw-muted) !important; }
.text-ink     { color:var(--gw-ink) !important; }
.bg-pine      { background:var(--gw-pine) !important; }
.bg-surface   { background:var(--gw-surface) !important; }
.bg-surface-2 { background:var(--gw-surface-2) !important; }

/* Scrollbar — global subtle style */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--gw-line-strong); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:var(--gw-pine-muted); }

/* ────────────────────────────────────────────────────── */
/* END Groundwork Sprint 1+2 Theme                        */
/* ────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   GROUNDWORK SPRINT 3 — Core Product Structural Rebrand
   GW-010 · GW-011-deep · GW-012 · GW-013 · 2026-06-27
   ═══════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════
   GW-010 · PIPELINE — Deep structural alignment
   ════════════════════════════════════════════════════════ */

/* Kanban board baseline */
.kanban {
  display:grid;
  grid-template-columns:repeat(3, minmax(280px,1fr));
  gap:14px;
  align-items:start;
  margin-top:18px;
}
@media(max-width:1100px){ .kanban { grid-template-columns:1fr 1fr; } }
@media(max-width:700px)  { .kanban { grid-template-columns:1fr; } }

/* Kanban column card */
.kanban-col {
  background:var(--gw-surface-2);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-lg);
  padding:14px 12px;
  transition:box-shadow .15s;
}

/* Column header: stage label + count badge */
.kanban-col > h3 {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--gw-muted);
  margin:0 0 10px;
  padding:0 2px;
  gap:8px;
}
.kanban-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  background:var(--gw-surface-3);
  color:var(--gw-muted);
  font-size:11px;
  font-weight:700;
  border-radius:999px;
  border:1px solid var(--gw-line);
}

/* Opp card — full GW3 treatment */
.opp-card {
  display:block; /* override old grid layout */
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
  padding:14px 15px;
  margin-bottom:8px;
  cursor:pointer;
  text-align:left;
  width:100%;
  transition:box-shadow .14s, border-color .14s, transform .12s;
  position:relative;
  overflow:hidden;
}
.opp-card::before {
  content:'';
  position:absolute;
  left:0; top:0; bottom:0;
  width:3px;
  background:var(--gw-line);
  border-radius:3px 0 0 3px;
  transition:background .14s;
}
.opp-card:hover {
  box-shadow:var(--gw-shadow-sm);
  border-color:var(--gw-pine-muted);
  transform:translateY(-1px);
}
.opp-card:hover::before { background:var(--gw-emerald); }
.opp-card:last-child { margin-bottom:0; }

/* Urgency variants */
.opp-card.opp-overdue::before { background:#C97B6A; }
.opp-card.opp-stale::before   { background:var(--gw-amber); }

/* Card heading */
.opp-card h3 {
  font-size:13.5px;
  font-weight:700;
  color:var(--gw-ink);
  margin:0 0 3px;
  letter-spacing:-.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.opp-project {
  font-size:12px;
  color:var(--gw-muted);
  margin:0 0 9px;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.opp-meta {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  margin:0;
}
.opp-next  { font-size:11px; color:var(--gw-muted); }
.opp-value { font-size:12px; color:var(--gw-emerald); font-weight:700; margin-left:auto; }
.opp-card-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:3px;
}

/* Urgency badges */
.urgency-badge {
  display:inline-block;
  padding:2px 7px;
  border-radius:20px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  flex-shrink:0;
}
.urgency-badge.overdue { background:#FAE8E4; color:#8B3A2A; border:1px solid #F5D5C8; }
.urgency-badge.stale   { background:#FAF6E8; color:#7A5C10; border:1px solid #F5E8C0; }

/* Pipeline filter active button — more legible */
.pl-filter-btn {
  border:none;
  background:transparent;
  color:var(--gw-muted);
  font-size:12px;
  font-weight:600;
  padding:5px 10px;
  border-radius:var(--gw-r-xs);
  cursor:pointer;
  white-space:nowrap;
  transition:background .12s, color .12s;
  font-family:inherit;
}
.pl-filter-btn:hover  { background:var(--gw-surface-2); color:var(--gw-pine); }
.pl-filter-btn.pl-active {
  background:var(--gw-pine);
  color:#fff;
  box-shadow:0 2px 8px rgba(30,70,56,.25);
}

/* Active filter notice bar */
.pl-active-filter-bar {
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  margin-bottom:12px;
  background:rgba(30,70,56,.06);
  border:1px solid rgba(30,70,56,.15);
  border-radius:var(--gw-r-sm);
  font-size:13px;
  color:var(--gw-ink);
}
.pl-clear-filter {
  background:none;
  border:none;
  color:var(--gw-pine);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  padding:0;
  margin-left:auto;
  transition:color .12s;
}
.pl-clear-filter:hover { color:var(--gw-rose); }

/* Mini row — Today view follow-up lists */
.mini-row {
  display:grid;
  grid-template-columns:1fr auto;
  gap:3px 8px;
  align-items:center;
  width:100%;
  text-align:left;
  border:none;
  background:var(--gw-surface);
  border-bottom:1px solid var(--gw-line);
  padding:11px 14px;
  font-family:inherit;
  cursor:pointer;
  transition:background .1s, border-color .1s;
  border-radius:0;
}
.mini-row:first-of-type { border-radius:var(--gw-r-sm) var(--gw-r-sm) 0 0; }
.mini-row:last-of-type  { border-radius:0 0 var(--gw-r-sm) var(--gw-r-sm); border-bottom:none; }
.mini-row:only-of-type  { border-radius:var(--gw-r-sm); border-bottom:1px solid var(--gw-line); }
.mini-row:hover { background:var(--gw-surface-2); }
.mini-row.mini-row-overdue { border-left:3px solid #C97B6A; }
.mini-row strong { font-size:13px; font-weight:650; color:var(--gw-ink); display:flex; align-items:center; gap:5px; }
.mini-row em     { font-size:12px; color:var(--gw-muted); font-style:normal; grid-column:1; }

/* ════════════════════════════════════════════════════════
   GW-011-DEEP · LEAD DETAIL — Full structural rebuild
   ════════════════════════════════════════════════════════ */

/* ── Sticky back-nav header ── */
.ld-back-btn {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:none;
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  color:var(--gw-muted);
  font-size:12px;
  font-weight:600;
  padding:6px 12px;
  cursor:pointer;
  transition:background .12s, border-color .12s, color .12s;
}
.ld-back-btn:hover {
  background:var(--gw-surface-2);
  border-color:var(--gw-pine-muted);
  color:var(--gw-ink);
}

/* ── Hero block ── */
.ld-hero {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px 0 18px;
  border-bottom:1px solid var(--gw-line);
  margin-bottom:16px;
  flex-wrap:wrap;
}
.ld-hero-left { display:flex; align-items:flex-start; gap:16px; flex:1; min-width:0; }
.ld-hero-avatar {
  width:54px; height:54px;
  border-radius:var(--gw-r-md);
  background:linear-gradient(135deg, var(--gw-pine), var(--gw-pine-light));
  color:#fff;
  font-size:18px; font-weight:900;
  display:grid; place-items:center;
  flex-shrink:0;
  box-shadow:0 6px 18px rgba(30,70,56,.28);
  letter-spacing:-.02em;
}
.ld-hero-info { flex:1; min-width:0; }
.ld-eyebrow {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--gw-muted);
  margin-bottom:5px;
}
.ld-source-pill {
  background:rgba(30,70,56,.08);
  color:var(--gw-pine);
  border:1px solid rgba(30,70,56,.15);
  border-radius:999px;
  padding:1px 8px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.04em;
}
.ld-name {
  font-size:22px;
  font-weight:900;
  letter-spacing:-.04em;
  color:var(--gw-ink);
  margin:0 0 3px;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ld-subtitle {
  font-size:13px;
  color:var(--gw-muted);
  margin:0 0 10px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0;
}
.ld-subtitle-sep { margin:0 5px; color:var(--gw-line-strong); }

/* Hero stat chips row */
.ld-stat-chips {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:4px;
}
.ld-stat-chip {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--gw-surface-2);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  padding:4px 9px;
  transition:border-color .12s;
}
.ld-stat-chip:hover { border-color:var(--gw-pine-muted); }
.ld-stat-icon  { color:var(--gw-subtle); display:flex; align-items:center; flex-shrink:0; }
.ld-stat-body  { display:flex; flex-direction:column; gap:0; }
.ld-stat-label { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; color:var(--gw-subtle); }
.ld-stat-val   { font-size:12.5px; font-weight:700; color:var(--gw-ink); }
.ld-stat-chip--green .ld-stat-val { color:#2D7A55; }
.ld-stat-chip--green { border-color:#B8DEC9; }
.ld-stat-chip--blue  .ld-stat-val { color:var(--gw-sky); }
.ld-stat-chip--blue  { border-color:rgba(77,138,134,.25); }
.ld-stat-chip--red   .ld-stat-val { color:#8B3A2A; }
.ld-stat-chip--red   { border-color:#F5D5C8; background:#FAE8E4; }
.ld-stat-chip--amber .ld-stat-val { color:var(--gw-amber); }

/* ── Hero action buttons ── */
.ld-hero-actions {
  display:flex;
  align-items:flex-start;
  gap:8px;
  flex-shrink:0;
  flex-wrap:wrap;
}
.ld-btn-primary {
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:linear-gradient(135deg, var(--gw-pine), var(--gw-pine-light));
  color:#fff;
  border:none;
  border-radius:var(--gw-r-sm);
  padding:9px 16px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(30,70,56,.28);
  transition:box-shadow .14s, transform .1s;
  white-space:nowrap;
}
.ld-btn-primary:hover {
  transform:translateY(-1px);
  box-shadow:0 6px 20px rgba(30,70,56,.38);
}
.ld-btn-primary:active { transform:translateY(0); box-shadow:none; }

.ld-btn-sold {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:linear-gradient(135deg, #2D7A55, #2D7A55);
  color:#fff;
  border:none;
  border-radius:var(--gw-r-sm);
  padding:9px 16px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(22,163,74,.28);
  transition:box-shadow .14s, transform .1s;
  white-space:nowrap;
}
.ld-btn-sold:hover {
  transform:translateY(-1px);
  box-shadow:0 6px 20px rgba(22,163,74,.38);
}

.ld-btn-secondary {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:var(--gw-surface);
  color:var(--gw-ink);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  padding:8px 14px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:background .12s, border-color .12s;
  white-space:nowrap;
}
.ld-btn-secondary:hover {
  background:var(--gw-surface-2);
  border-color:var(--gw-pine-muted);
}

.ld-sold-badge-large {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:#D4EDE1;
  color:#2D7A55;
  border:1px solid #B8DEC9;
  border-radius:var(--gw-r-sm);
  padding:8px 14px;
  font-size:13px;
  font-weight:800;
}

/* Overflow menu */
.ld-overflow-wrap { position:relative; }
.ld-overflow-menu {
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  min-width:195px;
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-md);
  padding:6px;
  z-index:80;
  animation:gw-dropdown-in .12s ease;
}
@keyframes gw-dropdown-in {
  from { opacity:0; transform:translateY(-5px); }
  to   { opacity:1; transform:translateY(0); }
}
.ld-overflow-menu button {
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  background:none;
  border:none;
  border-radius:var(--gw-r-xs);
  padding:8px 10px;
  font-size:13px;
  font-weight:600;
  color:var(--gw-ink);
  cursor:pointer;
  text-align:left;
  transition:background .1s, color .1s;
  font-family:inherit;
}
.ld-overflow-menu button:hover { background:var(--gw-surface-2); color:var(--gw-pine); }
.ld-overflow-menu button.danger { color:#8B3A2A; }
.ld-overflow-menu button.danger:hover { background:#FAE8E4; color:#8B3A2A; }
.ld-overflow-hero .ld-overflow-menu { right:auto; left:0; }

/* ── Tab bar ── */
.ld-tab-bar {
  display:flex;
  gap:0;
  border-bottom:2px solid var(--gw-line);
  margin-bottom:20px;
  overflow-x:auto;
  scrollbar-width:none;
}
.ld-tab-bar::-webkit-scrollbar { height:0; }
.ld-tab {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:none;
  border:none;
  border-bottom:2px solid transparent;
  margin-bottom:-2px;
  padding:10px 14px;
  font-size:13px;
  font-weight:600;
  color:var(--gw-muted);
  cursor:pointer;
  white-space:nowrap;
  transition:color .12s, background .12s, border-color .12s;
  border-radius:var(--gw-r-xs) var(--gw-r-xs) 0 0;
  font-family:inherit;
}
.ld-tab:hover {
  color:var(--gw-ink);
  background:var(--gw-surface-2);
}
.ld-tab-active {
  color:var(--gw-pine);
  border-bottom-color:var(--gw-pine);
  font-weight:700;
}
.ld-tab-active:hover { background:transparent; }
.ld-tab-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  background:var(--gw-surface-3);
  color:var(--gw-muted);
  border-radius:999px;
  font-size:10px;
  font-weight:700;
}
.ld-tab-active .ld-tab-count {
  background:var(--gw-pine);
  color:#fff;
}

/* ── Two-column body ── */
.ld-body {
  display:grid;
  grid-template-columns:1fr 280px;
  gap:20px;
  align-items:start;
}
@media(max-width:1100px) { .ld-body { grid-template-columns:1fr 240px; } }
@media(max-width:900px)  { .ld-body { grid-template-columns:1fr; } }

/* ── Main working column ── */
.ld-main { min-width:0; display:flex; flex-direction:column; gap:16px; }

/* ── Section heading in lead detail ── */
.ld-section-head {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--gw-muted);
  padding-bottom:10px;
  border-bottom:1px solid var(--gw-line);
  margin-bottom:12px;
}
.ld-section-head svg { color:var(--gw-pine-muted); flex-shrink:0; }
.ld-section-sub {
  font-size:10px;
  font-weight:600;
  color:var(--gw-subtle);
  letter-spacing:.04em;
  margin-left:auto;
  text-transform:none;
}

/* ── Lead detail card ── */
.ld-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
  overflow:hidden;
}
.ld-card-label {
  font-size:10px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:var(--gw-muted);
  margin-bottom:8px;
}

/* ── Form inside lead card ── */
.ld-form { padding:18px 20px; }
.ld-form label { display:grid; gap:5px; margin-bottom:12px; }
.ld-form label:last-child { margin-bottom:0; }
.ld-form label span { font-size:11px; font-weight:700; color:var(--gw-muted); letter-spacing:.02em; }
.ld-form input, .ld-form select, .ld-form textarea {
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  background:var(--gw-surface);
  color:var(--gw-ink);
  font-size:13px;
  padding:8px 11px;
  outline:none;
  transition:border-color .15s, box-shadow .15s;
  width:100%;
}
.ld-form input:focus, .ld-form select:focus, .ld-form textarea:focus {
  border-color:var(--gw-pine);
  box-shadow:0 0 0 3px rgba(30,70,56,.12);
}
.ld-form-grid   { display:grid; grid-template-columns:repeat(2,1fr); gap:8px 14px; }
.ld-form-grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:8px 14px; }
@media(max-width:700px){ .ld-form-grid, .ld-form-grid-3 { grid-template-columns:1fr; } }
.ld-form .full { grid-column:1/-1; }

/* 3-up mini card row */
.ld-card-row { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:0; }
@media(max-width:900px) { .ld-card-row { grid-template-columns:1fr; } }
.ld-card-sm { min-height:0; padding:16px; }
.ld-card-sm select, .ld-card-sm input {
  margin-top:8px;
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  padding:7px 10px;
  font-size:13px;
  width:100%;
}

/* Inline action button inside card */
.ld-inline-btn {
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:10px;
  background:rgba(30,70,56,.07);
  border:1px solid rgba(30,70,56,.18);
  border-radius:var(--gw-r-xs);
  padding:6px 12px;
  font-size:12px;
  font-weight:700;
  color:var(--gw-pine);
  cursor:pointer;
  transition:background .12s, border-color .12s;
  font-family:inherit;
}
.ld-inline-btn:hover {
  background:rgba(30,70,56,.13);
  border-color:rgba(30,70,56,.28);
}

/* ── Qual notes card ── */
.ld-qual-notes-card { padding:0; overflow:hidden; }
.ld-qual-field      { padding:0; }
.ld-qual-divider    { height:1px; background:var(--gw-line); }
.ld-qual-view, .ld-qual-edit { padding:14px 18px; }
.ld-qual-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}
.ld-qual-label {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:700;
  color:var(--gw-ink);
  letter-spacing:.01em;
}
.ld-qual-label svg { color:var(--gw-pine-muted); flex-shrink:0; }
.ld-qual-edit-btn {
  display:inline-flex;
  align-items:center;
  gap:4px;
  background:none;
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  padding:4px 9px;
  font-size:11px;
  font-weight:600;
  color:var(--gw-muted);
  cursor:pointer;
  transition:all .12s;
  font-family:inherit;
}
.ld-qual-edit-btn:hover {
  border-color:rgba(30,70,56,.3);
  background:var(--gw-surface-2);
  color:var(--gw-pine);
  transform:translateY(-1px);
}
.ld-qual-edit-btn:active { transform:translateY(0); }
.ld-qual-content {
  font-size:13px;
  color:var(--gw-ink);
  line-height:1.6;
  white-space:pre-wrap;
  word-break:break-word;
}
.ld-qual-empty { color:var(--gw-subtle); font-style:italic; font-size:13px; }

.ld-qual-save-btn {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--gw-pine);
  color:#fff;
  border:none;
  border-radius:var(--gw-r-xs);
  padding:7px 14px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:background .12s, transform .1s, box-shadow .12s;
  font-family:inherit;
}
.ld-qual-save-btn:hover {
  background:var(--gw-pine-light);
  transform:translateY(-1px);
  box-shadow:0 3px 10px rgba(30,70,56,.25);
}
.ld-qual-save-btn:active { transform:translateY(0); }

.ld-qual-cancel-btn {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--gw-surface-2);
  color:var(--gw-muted);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  padding:6px 12px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:background .12s;
  font-family:inherit;
}
.ld-qual-cancel-btn:hover { background:var(--gw-surface-3); color:var(--gw-ink); }

.ld-qual-textarea {
  width:100%;
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  padding:10px 12px;
  font-size:13px;
  color:var(--gw-ink);
  background:var(--gw-surface);
  outline:none;
  resize:vertical;
  min-height:80px;
  line-height:1.55;
  transition:border-color .15s, box-shadow .15s;
  font-family:inherit;
}
.ld-qual-textarea:focus {
  border-color:var(--gw-pine) !important;
  box-shadow:0 0 0 3px rgba(30,70,56,.12) !important;
  background:var(--gw-surface);
}

/* ── Toggle row (checkboxes in detail) ── */
.ld-toggle-row {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color:var(--gw-ink);
  padding:10px 0;
  border-bottom:1px solid var(--gw-line);
}
.ld-toggle-row:last-child { border-bottom:none; }
.ld-toggle-row input[type=checkbox] {
  width:16px; height:16px;
  accent-color:var(--gw-pine);
  flex-shrink:0;
}
.ld-locked-field {
  font-size:12px;
  color:var(--gw-subtle);
  font-style:italic;
  padding:8px 0;
}

/* ── Quick Actions ── */
.ld-qa-grid {
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
  margin-bottom:0;
}
@media(max-width:700px) { .ld-qa-grid { grid-template-columns:1fr; } }
@media(min-width:1024px){ .ld-qa-grid { grid-template-columns:repeat(5, 1fr); } }

.ld-qa-btn {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  padding:14px 10px;
  cursor:pointer;
  transition:border-color .14s, background .14s, transform .1s, box-shadow .14s;
  font-family:inherit;
  text-align:center;
}
.ld-qa-btn:hover {
  border-color:rgba(30,70,56,.3);
  background:var(--gw-surface-2);
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(30,70,56,.1);
}
.ld-qa-btn:focus-visible { outline:3px solid rgba(30,70,56,.4); outline-offset:2px; }
.ld-qa-btn:active { transform:translateY(0) !important; box-shadow:none !important; }
.ld-qa-btn svg { color:var(--gw-pine); flex-shrink:0; }
.ld-qa-title { font-size:12.5px; font-weight:700; color:var(--gw-ink); }
.ld-qa-sub   { font-size:10.5px; color:var(--gw-muted); margin-top:1px; }
.ld-qa-btn.ld-qa-loading { pointer-events:none; opacity:.7; }
.ld-qa-btn.ld-qa-success svg { color:var(--gw-emerald); }
.ld-qa-btn.ld-qa-success { border-color:rgba(16,185,129,.3); background:#EAF1EE; }

/* ── Checklist progress in lead ── */
.ld-cl-progress {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 18px;
  background:var(--gw-surface-2);
  border-bottom:1px solid var(--gw-line);
}
.ld-cl-bar-wrap { display:flex; align-items:center; gap:8px; flex:1; min-width:0; }
.ld-cl-bar-track {
  flex:1;
  height:6px;
  background:var(--gw-line-strong);
  border-radius:4px;
  overflow:hidden;
}
.ld-cl-bar-fill {
  height:100%;
  border-radius:4px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  transition:width .35s ease;
}
.ld-cl-count { font-size:11px; font-weight:700; color:var(--gw-muted); white-space:nowrap; flex-shrink:0; }
.ld-cl-chip {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px;
  border-radius:999px;
  font-size:10.5px;
  font-weight:700;
  flex-shrink:0;
}

/* ── Rail (right sidebar in lead detail) ── */
.ld-rail { display:flex; flex-direction:column; gap:14px; min-width:0; }
@media(max-width:900px) { .ld-rail { order:2; } }

.ld-rail-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  box-shadow:var(--gw-shadow-xs);
  overflow:hidden;
}
.ld-rail-card--alert {
  border-color:#F5D5C8;
  background:#FAE8E4;
}
.ld-rail-card-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--gw-line);
  font-size:11px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:var(--gw-muted);
}
.ld-rail-card-body { padding:14px; }

.ld-rail-follow-date {
  font-size:18px;
  font-weight:900;
  color:var(--gw-ink);
  letter-spacing:-.03em;
  margin-bottom:8px;
  line-height:1.1;
}
.ld-rail-follow-date.overdue { color:#8B3A2A; }
.ld-rail-overdue-badge {
  display:inline-flex;
  align-items:center;
  gap:4px;
  background:#FAE8E4;
  color:#8B3A2A;
  border:1px solid #F5D5C8;
  border-radius:999px;
  padding:2px 8px;
  font-size:10px;
  font-weight:700;
  margin-bottom:10px;
}
.ld-rail-btn {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--gw-surface-2);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-xs);
  padding:6px 11px;
  font-size:12px;
  font-weight:600;
  color:var(--gw-ink);
  cursor:pointer;
  transition:background .12s, border-color .12s, color .12s;
  font-family:inherit;
  white-space:nowrap;
}
.ld-rail-btn:hover {
  background:var(--gw-surface-3);
  border-color:var(--gw-pine-muted);
  color:var(--gw-pine);
}
.ld-rail-empty { font-size:12.5px; color:var(--gw-subtle); font-style:italic; padding:4px 0 8px; }
.ld-rail-last-type    { font-size:12px; font-weight:700; color:var(--gw-ink); margin-bottom:3px; }
.ld-rail-last-time    { font-size:11.5px; color:var(--gw-muted); margin-bottom:6px; }
.ld-rail-last-preview { font-size:12px; color:var(--gw-muted); line-height:1.5; word-break:break-word; }
.ld-rail-stats {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:14px;
}
.ld-rail-stat {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.ld-rail-stat span  { display:block; font-size:20px; font-weight:800; color:var(--gw-ink); letter-spacing:-.03em; }
.ld-rail-stat label { display:block; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--gw-subtle); margin-top:2px; }

/* ── Activity / timeline ── */
.ld-activity-item {
  display:flex;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid var(--gw-line);
}
.ld-activity-item:last-child { border-bottom:none; }
.ld-act-dot {
  width:28px; height:28px;
  border-radius:50%;
  background:var(--gw-surface-2);
  border:1.5px solid var(--gw-line);
  display:grid; place-items:center;
  font-size:13px;
  flex-shrink:0;
}
.ld-act-content  { flex:1; min-width:0; }
.ld-act-header   { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:3px; }
.ld-act-type     { font-size:10.5px; font-weight:800; letter-spacing:.06em; }
.ld-act-dir      { font-size:11px; color:var(--gw-subtle); }
.ld-act-time     { font-size:11px; color:var(--gw-subtle); margin-left:auto; }
.ld-act-subject  { font-size:13px; font-weight:700; color:var(--gw-ink); margin-bottom:3px; }
.ld-act-body     { font-size:12.5px; color:var(--gw-muted); line-height:1.5; word-break:break-word; }
.ld-act-actor    { font-size:11px; color:var(--gw-subtle); margin-top:4px; }

/* ═══════════════════════════════════════════════════════════════════════════
   GW-012 · MANAGER TOOLS — Light-mode / Groundwork conversion
   Converts the dark (#113931) hardcoded manager view into GW token palette
   ═══════════════════════════════════════════════════════════════════════════ */

/* Annual KPI banner override — dark inline style can't be overridden by class;
   catch via descendant rules when we can. We add .gw-mgr-* classes below
   and the JS will need to adopt them — OR we piggyback the .card class. */

/* Page headings that use h1/h2 inside .view */
.view h1 { font-size:clamp(24px,3.5vw,38px); font-weight:900; letter-spacing:-.04em; color:var(--gw-ink); margin:0 0 6px; }
.view h2 { font-size:18px; font-weight:750; color:var(--gw-ink); letter-spacing:-.02em; margin:0 0 10px; }
.view p.lede { font-size:15px; color:var(--gw-muted); max-width:700px; margin:0 0 24px; }
.view .eyebrow {
  font-size:10px; font-weight:800; letter-spacing:.12em;
  text-transform:uppercase; color:var(--gw-emerald);
  margin-bottom:4px;
}

/* GW Manager KPI card — replace dark hardcoded tiles */
.gw-mgr-kpi-banner {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px,1fr));
  gap:12px;
  margin-bottom:28px;
}
.gw-mgr-kpi {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  padding:18px 16px;
  box-shadow:var(--gw-shadow-xs);
  display:flex;
  flex-direction:column;
  gap:4px;
  position:relative;
  overflow:hidden;
}
.gw-mgr-kpi::before {
  content:'';
  position:absolute;
  bottom:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  opacity:.5;
}
.gw-mgr-kpi-label {
  font-size:10px; font-weight:800; letter-spacing:.09em;
  text-transform:uppercase; color:var(--gw-muted);
}
.gw-mgr-kpi-value {
  font-size:26px; font-weight:900; letter-spacing:-.04em;
  color:var(--gw-ink); line-height:1.1;
}
.gw-mgr-kpi-value.kpi-positive { color:var(--gw-emerald); }
.gw-mgr-kpi-value.kpi-warn     { color:var(--gw-amber); }
.gw-mgr-kpi-value.kpi-danger   { color:#8B3A2A; }
.gw-mgr-kpi-value.kpi-blue     { color:var(--gw-sky); }
.gw-mgr-kpi-value.kpi-purple   { color:#B8744F; }
.gw-mgr-kpi-sub {
  font-size:10.5px; color:var(--gw-subtle);
  line-height:1.4; margin-top:2px;
}

/* Division P&L tiles */
.gw-div-tile {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-lg);
  padding:20px;
  box-shadow:var(--gw-shadow-xs);
  transition:box-shadow .14s, border-color .14s;
  position:relative;
  overflow:hidden;
}
.gw-div-tile:hover { box-shadow:var(--gw-shadow-sm); border-color:var(--gw-pine-muted); }
.gw-div-tile.above-plan { border-color:rgba(16,185,129,.3); }
.gw-div-tile::before {
  content:'';
  position:absolute;
  top:0; left:0; right:0; height:4px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  opacity:.5;
}
.gw-div-tile.above-plan::before { opacity:1; }
.gw-div-header {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}
.gw-div-name { font-weight:750; font-size:15px; color:var(--gw-ink); }
.gw-div-plan-badge {
  background:var(--gw-emerald);
  color:#fff;
  font-size:10px; font-weight:700;
  border-radius:999px;
  padding:2px 8px;
  margin-left:auto;
}
.gw-div-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.gw-div-metric-label {
  font-size:10px; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--gw-muted); margin-bottom:3px;
}
.gw-div-metric-val {
  font-size:20px; font-weight:800; letter-spacing:-.03em; color:var(--gw-ink);
}
.gw-div-metric-val.positive  { color:var(--gw-emerald); }
.gw-div-metric-val.sky       { color:var(--gw-sky); }
.gw-div-metric-val.warn      { color:var(--gw-amber); }
.gw-div-metric-val.danger    { color:#8B3A2A; }

/* Progress bar — manager tools */
.gw-pbar-wrap {
  margin-top:2px;
  height:7px;
  background:var(--gw-surface-3);
  border-radius:4px;
  overflow:hidden;
}
.gw-pbar-fill {
  height:100%;
  border-radius:4px;
  transition:width .5s ease;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
}
.gw-pbar-fill.pbar-warn   { background:var(--gw-amber); }
.gw-pbar-fill.pbar-danger { background:#C97B6A; }
.gw-pbar-pct {
  font-size:10px;
  color:var(--gw-muted);
  margin-top:4px;
  font-weight:600;
}

/* Manager table override (monthly actuals) */
.gw-mgr-table {
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.gw-mgr-table thead tr {
  background:var(--gw-surface-2);
}
.gw-mgr-table th {
  padding:9px 12px;
  text-align:left;
  font-size:10px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:var(--gw-muted);
  border-bottom:1px solid var(--gw-line);
}
.gw-mgr-table th:not(:first-child) { text-align:right; }
.gw-mgr-table td {
  padding:9px 12px;
  border-bottom:1px solid var(--gw-line);
  color:var(--gw-ink);
  font-weight:600;
}
.gw-mgr-table td:not(:first-child) { text-align:right; }
.gw-mgr-table td.actual   { color:var(--gw-sky); }
.gw-mgr-table td.positive { color:var(--gw-emerald); font-weight:700; }
.gw-mgr-table td.negative { color:#8B3A2A; font-weight:700; }
.gw-mgr-table td.missing  { color:var(--gw-subtle); }
.gw-mgr-table tfoot td    { font-weight:800; background:var(--gw-surface-2); }
.gw-mgr-table tbody tr:hover { background:var(--gw-surface-2); }

/* Missing data badges */
.missing-data-badge {
  display:inline-flex;
  align-items:center;
  gap:3px;
  background:#FDFCF9;
  color:#8B3A2A;
  border:1px solid #F5D5C8;
  border-radius:999px;
  padding:1px 6px;
  font-size:10px;
  font-weight:700;
  margin-left:6px;
}
.missing-data-alert {
  background:#FDFCF9;
  border:1px solid #F5D5C8;
  border-radius:var(--gw-r-sm);
  padding:12px 16px;
  font-size:13px;
  color:#7A2E20;
  margin:14px 0;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* ════════════════════════════════════════════════════════
   GW-013 · SALES ACADEMY — Structural deep alignment
   ════════════════════════════════════════════════════════ */

/* Academy hero */
.acad-hero {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:24px 28px;
  background:linear-gradient(135deg, var(--gw-pine) 0%, var(--gw-pine-light) 60%, var(--gw-emerald-dim) 100%);
  border-radius:var(--gw-r-xl);
  margin-bottom:20px;
  overflow:hidden;
  position:relative;
}
.acad-hero::after {
  content:'';
  position:absolute;
  right:-40px; top:-40px;
  width:180px; height:180px;
  background:rgba(255,255,255,.04);
  border-radius:50%;
  pointer-events:none;
}
.acad-hero-text h1 {
  font-size:22px; font-weight:900; letter-spacing:-.04em;
  color:#fff; margin:0 0 4px;
}
.acad-hero-text p { font-size:13px; color:rgba(255,255,255,.6); margin:0; }
.acad-hero-stat { display:flex; gap:20px; align-items:center; flex-shrink:0; }
.acad-hero-kpi {
  text-align:center;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.15);
  border-radius:var(--gw-r-md);
  padding:12px 18px;
}
.acad-hero-kpi-val { font-size:24px; font-weight:900; color:#fff; letter-spacing:-.04em; }
.acad-hero-kpi-label {
  font-size:10px; font-weight:700; letter-spacing:.07em;
  text-transform:uppercase; color:rgba(255,255,255,.5); margin-top:2px;
}

/* Phase card */
.acad-phase-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-lg);
  overflow:hidden;
  box-shadow:var(--gw-shadow-xs);
  transition:box-shadow .14s, border-color .14s;
  margin-bottom:12px;
}
.acad-phase-card:hover { box-shadow:var(--gw-shadow-sm); border-color:var(--gw-pine-muted); }
.acad-phase-header {
  display:flex;
  align-items:center;
  gap:14px;
  padding:16px 20px;
  border-bottom:1px solid var(--gw-line);
  background:var(--gw-surface-2);
  cursor:pointer;
}
.acad-phase-icon {
  width:38px; height:38px;
  border-radius:var(--gw-r-sm);
  background:var(--gw-pine);
  color:#fff;
  font-size:16px;
  display:grid;
  place-items:center;
  flex-shrink:0;
}
.acad-phase-title {
  font-size:15px;
  font-weight:750;
  color:var(--gw-ink);
  letter-spacing:-.01em;
  flex:1;
}
.acad-phase-meta {
  font-size:11px;
  color:var(--gw-muted);
  margin-top:2px;
}
.acad-phase-progress {
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.acad-phase-bar {
  width:90px;
  height:6px;
  background:var(--gw-surface-3);
  border-radius:4px;
  overflow:hidden;
}
.acad-phase-fill {
  height:100%;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  border-radius:4px;
  transition:width .4s ease;
}
.acad-phase-pct {
  font-size:11px;
  font-weight:800;
  color:var(--gw-pine);
  white-space:nowrap;
}
.acad-phase-badge-done {
  background:var(--gw-emerald);
  color:#fff;
  font-size:10px;
  font-weight:700;
  border-radius:999px;
  padding:2px 9px;
  flex-shrink:0;
}

/* Module rows inside a phase */
.acad-module-list { padding:0; }
.acad-module-row {
  display:flex;
  align-items:center;
  gap:14px;
  padding:13px 20px;
  border-bottom:1px solid var(--gw-line);
  cursor:pointer;
  transition:background .12s;
  width:100%;
  text-align:left;
  background:none;
  border-left:none;
  border-right:none;
  border-top:none;
  font-family:inherit;
}
.acad-module-row:last-child { border-bottom:none; }
.acad-module-row:hover { background:var(--gw-surface-2); }
.acad-module-status {
  width:22px; height:22px;
  border-radius:50%;
  border:2px solid var(--gw-line);
  display:grid;
  place-items:center;
  flex-shrink:0;
  font-size:12px;
  transition:border-color .12s, background .12s;
}
.acad-module-status.done {
  background:var(--gw-emerald);
  border-color:var(--gw-emerald);
  color:#fff;
}
.acad-module-status.in-progress {
  background:rgba(30,70,56,.08);
  border-color:var(--gw-pine);
}
.acad-module-info { flex:1; min-width:0; }
.acad-module-title {
  font-size:13.5px;
  font-weight:700;
  color:var(--gw-ink);
  letter-spacing:-.01em;
  margin-bottom:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.acad-module-meta { font-size:11.5px; color:var(--gw-muted); }
.acad-module-arrow { color:var(--gw-subtle); flex-shrink:0; }

/* Academy checklist progress (existing .checklist-progress override) */
.checklist-progress { background:var(--gw-surface-3); border-radius:var(--gw-r-xs); height:6px; }
.cp-bar { background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald)); border-radius:var(--gw-r-xs); }
.cp-label { color:var(--gw-muted); font-size:11px; font-weight:600; }

/* ════════════════════════════════════════════════════════
   GW-009-ENHANCED · TODAY VIEW — Activity widget + cards
   ════════════════════════════════════════════════════════ */

/* Activity targets card */
.gw-activity-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-lg);
  overflow:hidden;
  box-shadow:var(--gw-shadow-xs);
}
.gw-activity-card-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--gw-line);
  background:var(--gw-surface-2);
}
.gw-activity-card-header h3 {
  font-size:14px; font-weight:750;
  color:var(--gw-ink); margin:0;
  letter-spacing:-.01em;
}
.gw-activity-target-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(160px,1fr));
  gap:10px;
  padding:14px;
}
.gw-activity-target-tile {
  background:var(--gw-surface-2);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  padding:12px;
  transition:border-color .12s;
}
.gw-activity-target-tile:hover { border-color:var(--gw-pine-muted); }
.gw-activity-target-label {
  font-size:11px; color:var(--gw-muted); margin-bottom:5px; font-weight:500;
}
.gw-activity-target-val {
  font-size:18px; font-weight:800; letter-spacing:-.03em;
  color:var(--gw-pine); line-height:1;
}
.gw-activity-target-desc {
  font-size:10.5px; color:var(--gw-subtle); margin-top:4px; line-height:1.4;
}

/* Suggested actions block */
.gw-suggested-actions {
  background:var(--gw-surface-2);
  border:1.5px dashed var(--gw-line-strong);
  border-radius:var(--gw-r-md);
  padding:18px;
  margin-top:10px;
}
.gw-suggested-actions h4 {
  font-size:12px; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:var(--gw-muted);
  margin:0 0 12px;
}
.gw-suggested-action-btn {
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-sm);
  padding:11px 13px;
  font-size:13px;
  font-weight:600;
  color:var(--gw-ink);
  cursor:pointer;
  text-align:left;
  margin-bottom:7px;
  transition:background .12s, border-color .12s, transform .1s;
  font-family:inherit;
}
.gw-suggested-action-btn:last-child { margin-bottom:0; }
.gw-suggested-action-btn:hover {
  background:var(--gw-surface-2);
  border-color:var(--gw-pine-muted);
  transform:translateX(2px);
}
.gw-suggested-action-btn svg { color:var(--gw-pine); flex-shrink:0; opacity:.8; }

/* ── Due now card — clear-state block ── */
.due-now-clear {
  font-size:13px;
  color:var(--gw-muted);
  padding:10px 0 4px;
  font-weight:500;
}

/* Neutral badge in section-head */
.neutral-badge {
  background:var(--gw-surface-3);
  color:var(--gw-muted);
  border:1px solid var(--gw-line);
  border-radius:999px;
  padding:3px 10px;
  font-size:11px;
  font-weight:700;
}

/* ════════════════════════════════════════════════════════
   GW-SPRINT3 · GLOBAL POLISH
   ════════════════════════════════════════════════════════ */

/* Badge in section head */
.warn-badge {
  background:#FAF6E8;
  color:#7A5C10;
  border:1px solid #F5E8C0;
  border-radius:999px;
  padding:3px 10px;
  font-size:11px;
  font-weight:700;
}

/* General badge variant */
.badge {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 10px;
  background:var(--gw-surface-2);
  color:var(--gw-pine);
  font-size:11px;
  font-weight:700;
  border:1px solid var(--gw-line);
}

/* Stat grid fine-tuning */
.stat-grid {
  display:grid;
  gap:12px;
  margin-bottom:16px;
}
.stat-grid.grid-4 {
  grid-template-columns:repeat(4,minmax(0,1fr));
}
@media(max-width:900px){ .stat-grid.grid-4 { grid-template-columns:repeat(2,1fr); } }
@media(max-width:600px){ .stat-grid.grid-4 { grid-template-columns:1fr 1fr; } }

/* Section head — Today view cards */
.section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 20px;
  border-bottom:1px solid var(--gw-line);
}
.section-head h2 {
  font-size:14px; font-weight:750;
  color:var(--gw-ink); margin:0;
  letter-spacing:-.01em;
}

/* GW KPI cards (already in Sprint 1 but refine here) */
.gw-kpi-card {
  background:var(--gw-surface);
  border:1px solid var(--gw-line);
  border-radius:var(--gw-r-md);
  padding:18px 20px;
  box-shadow:var(--gw-shadow-xs);
  display:flex;
  flex-direction:column;
  gap:6px;
  position:relative;
  overflow:hidden;
  transition:box-shadow .14s, border-color .14s, transform .12s;
  cursor:pointer;
}
.gw-kpi-card:hover {
  box-shadow:var(--gw-shadow-sm);
  border-color:var(--gw-pine-muted);
  transform:translateY(-1px);
}
.gw-kpi-card::after {
  content:'';
  position:absolute;
  bottom:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
  opacity:0;
  transition:opacity .15s;
}
.gw-kpi-card:hover::after { opacity:.6; }
.gw-kpi-label { font-size:10px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color:var(--gw-muted); }
.gw-kpi-value { font-size:28px; font-weight:900; letter-spacing:-.05em; color:var(--gw-ink); line-height:1; }
.gw-kpi-sub   { font-size:11.5px; color:var(--gw-muted); }
.gw-kpi-delta { font-size:11px; font-weight:700; }
.gw-kpi-delta.positive { color:var(--gw-emerald); }
.gw-kpi-delta.negative { color:#8B3A2A; }
.gw-kpi-drill { font-size:10px; color:var(--gw-pine); font-weight:700; text-transform:uppercase; letter-spacing:.06em; opacity:0; transition:opacity .15s; }
.gw-kpi-card:hover .gw-kpi-drill { opacity:1; }

/* Print tweaks for Sprint 3 */
@media print {
  .ld-hero-actions, .ld-tab-bar, .ld-rail, .pl-toolbar { display:none; }
  .ld-body { grid-template-columns:1fr; }
}

/* ────────────────────────────────────────────────────── */
/* END Groundwork Sprint 3 Theme                          */
/* ────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════ */
/* Groundwork Sprint 5 — JS Token Adoption Classes        */
/* Replaces all hardcoded #113931 dark inline styles      */
/* ═══════════════════════════════════════════════════════ */

/* ── KPI Banner (manager() top strip) ─────────────────── */
.gw-kpi-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
  background: var(--gw-surface);   /* white card — clear contrast for all text */
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 20px;
  box-shadow: var(--gw-shadow-sm);
}
.gw-kpi-banner-cell { text-align: center; }
.gw-kpi-banner-label {
  font-size: 11px;        /* bumped from 10px — more legible */
  font-weight: 700;
  color: var(--gw-muted); /* now #4A5947 — sufficient contrast on white */
  text-transform: uppercase;
  letter-spacing: .07em;
}
.gw-kpi-banner-val {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--gw-ink);
  line-height: 1.1;
}
.gw-kpi-banner-sub { font-size: 11px; color: var(--gw-muted); margin-top: 2px; }

/* ── Division Tile (divTile helper) ────────────────────── */
.gw-div-tile {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.gw-div-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
}
.gw-div-tile.above-plan {
  border-color: var(--gw-emerald);
}
.gw-div-tile-meta {
  font-size: 10px;
  color: var(--gw-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.gw-div-tile-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gw-ink);
}
.gw-div-tile-remaining {
  font-size: 11px;
  color: var(--gw-muted);
  margin-top: 6px;
}
.gw-div-tile-over {
  font-size: 11px;
  color: var(--gw-emerald);
  margin-top: 6px;
  font-weight: 700;
}

/* ── Progress Bar (pbar helper) ────────────────────────── */
.gw-pbar-track {
  height: 6px;
  background: var(--gw-line);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.gw-pbar-fill {
  height: 6px;
  border-radius: 4px;
  transition: width .5s;
  background: linear-gradient(90deg, var(--gw-pine), var(--gw-emerald));
}
.gw-pbar-fill.warn  { background: #8B6914; }
.gw-pbar-fill.alert { background: #8B3A2A; }
.gw-pbar-pct {
  font-size: 10px;
  color: var(--gw-muted);
  margin-top: 3px;
}

/* ── Data Tables (all manager/revenue tables) ──────────── */
.gw-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gw-data-table thead tr {
  background: var(--gw-surface-2);
}
.gw-data-table th {
  padding: 8px 10px;
  color: var(--gw-muted);
  border-bottom: 1px solid var(--gw-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gw-data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--gw-surface-2);
  color: var(--gw-ink);
}
.gw-data-table tbody tr:hover {
  background: var(--gw-surface-2);
}
.gw-data-table tfoot tr {
  background: var(--gw-surface-2);
  font-weight: 700;
  border-top: 2px solid var(--gw-line);
}
.gw-data-table tfoot td { color: var(--gw-ink); }
.gw-data-table .right { text-align: right; }
.gw-data-table .center { text-align: center; }

/* ── Admin Panel Card (settings/comm panels) ───────────── */
.gw-admin-panel {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.gw-admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gw-line);
  background: var(--gw-surface-2);
}
.gw-admin-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gw-ink);
}
.gw-admin-panel-sub {
  font-size: 11px;
  color: var(--gw-muted);
  margin-top: 2px;
}
.gw-admin-panel-body { padding: 16px 18px; }

/* ── Select / Input (form controls in manager/comm) ─────── */
.gw-select {
  padding: 5px 10px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  color: var(--gw-ink);
  font-size: 11px;
  font-family: inherit;
}
.gw-select:focus {
  outline: none;
  border-color: var(--gw-pine);
  box-shadow: 0 0 0 3px rgba(30,70,56,.1);
}
.gw-input-sm {
  padding: 4px 6px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 6px;
  color: var(--gw-ink);
  font-size: 12px;
  text-align: center;
  font-family: inherit;
}
.gw-input-sm:focus {
  outline: none;
  border-color: var(--gw-pine);
}

/* ── Aging Bucket Tile ─────────────────────────────────── */
.gw-aging-bucket {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  padding: 14px;
  text-align: center;
}
.gw-aging-bucket-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gw-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}
.gw-aging-bucket-count {
  font-size: 22px;
  font-weight: 800;
}
.gw-aging-bucket-sub {
  font-size: 12px;
  color: var(--gw-muted);
  margin-top: 2px;
}

/* ── Revenue Admin Banner ──────────────────────────────── */
.gw-rev-banner {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 18px;
  margin-bottom: 20px;
}
.gw-rev-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.gw-rev-banner-cell { text-align: center; }

/* ── Tab Nav (revenueAdmin tab pills) ──────────────────── */
.gw-tab-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.gw-tab-pill {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gw-line);
  background: var(--gw-surface-2);
  color: var(--gw-muted);
  transition: all .15s;
}
.gw-tab-pill:hover {
  border-color: var(--gw-pine-muted);
  color: var(--gw-pine);
}
.gw-tab-pill.active {
  background: var(--gw-pine);
  border-color: var(--gw-pine);
  color: #fff;
}

/* ── Division Section Header (revenueAdmin div entry) ──── */
.gw-div-section {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.gw-div-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gw-line);
  background: var(--gw-surface-2);
}

/* ── Annual Field Card (annuals tab) ───────────────────── */
.gw-ann-field {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  padding: 12px;
}

/* ── P&L Upload Zone ───────────────────────────────────── */
.gw-upload-zone {
  background: var(--gw-surface);
  border: 2px dashed var(--gw-pine-muted);
  border-radius: var(--gw-r-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  transition: border-color .15s;
}
.gw-upload-zone:hover { border-color: var(--gw-pine); }
.gw-upload-choose {
  display: inline-block;
  padding: 10px 24px;
  background: var(--gw-pine);
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.gw-upload-choose:hover { background: var(--gw-pine-light); }

/* ── P&L File Row ──────────────────────────────────────── */
.gw-pnl-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  margin-bottom: 8px;
}

/* ── Commission Panel ──────────────────────────────────── */
.gw-comm-panel {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  overflow: hidden;
}
.gw-comm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--gw-surface-2);
  border-bottom: 1px solid var(--gw-line);
}
.gw-comm-tools {
  margin-top: 16px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 16px 18px;
}

/* ── Audit Trail ───────────────────────────────────────── */
.gw-audit-panel {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  overflow: hidden;
}
.gw-audit-entry {
  padding: 10px 0;
  border-bottom: 1px solid var(--gw-surface-2);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.gw-audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

/* ── Audit Diff Modal ──────────────────────────────────── */
.gw-diff-modal-box {
  background: var(--gw-surface);
  border-radius: var(--gw-r-xl);
  padding: 24px;
  width: min(700px, 95vw);
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--gw-line);
}
.gw-diff-pre {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  padding: 12px;
  font-size: 10px;
  color: var(--gw-muted);
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
}

/* ── Feature Flag Panel ────────────────────────────────── */
.gw-flag-panel {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  padding: 10px;
  margin-top: 4px;
}
.gw-flag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--gw-line);
}

/* ── Simulator Panel (Commission) ──────────────────────── */
.gw-sim-panel {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  overflow: hidden;
}
.gw-sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--gw-surface-2);
  border-bottom: 1px solid var(--gw-line);
}
.gw-sim-body {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.gw-sim-result {
  margin: 0 18px 16px;
  padding: 14px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  min-height: 60px;
  font-size: 13px;
  color: var(--gw-muted);
}

/* ── Confirm Modal (new-lead / delete modals) ──────────── */
.gw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-modal-card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-xl);
  padding: 28px;
  width: min(420px, 90vw);
  box-shadow: var(--gw-shadow-lg);
}

/* ── Code/PRE blocks ───────────────────────────────────── */
.gw-code-block {
  display: block;
  background: var(--gw-surface-2);
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--gw-pine);
  font-size: 11px;
  line-height: 1.6;
  font-family: 'Courier New', monospace;
}

/* ── Academy Practice Challenge (GW token override) ─────── */
.acad-practice-challenge {
  background: linear-gradient(135deg, var(--gw-pine-deep) 0%, var(--gw-pine) 100%);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(30,70,56,.18);
}

/* ── Acad Practice icon area ───────────────────────────── */
.acad-practice-icon {
  font-size: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}

/* ── Export format buttons (CSV / XLSX / PDF picker) ──── */
.gw-export-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  cursor: pointer;
  color: var(--gw-ink);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  width: 100%;
  transition: border-color .15s;
}
.gw-export-btn:hover { border-color: var(--gw-pine); }

/* ── Comm panel — layout helpers ──────────────────────── */
.gw-comm-panel {
  /* Override: use padding instead of overflow:hidden so inputs aren't clipped */
  padding: 20px;
}
.gw-comm-tools {
  /* flex layout for admin controls strip */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.gw-comm-tools-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gw-ink);
  margin-bottom: 12px;
}
.gw-admin-btn {
  background: var(--gw-surface-3);
  border: 1px solid var(--gw-line);
  color: var(--gw-ink);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.gw-admin-btn:hover { background: var(--gw-pine-light); color: #fff; border-color: var(--gw-pine-light); }
.gw-tool-result {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gw-muted);
}

/* ── Audit panel header ────────────────────────────────── */
.gw-audit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gw-line);
}

/* ── Ghost / outline buttons ───────────────────────────── */
.gw-ghost-btn {
  font-size: 10px;
  color: var(--gw-muted);
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: color .15s;
}
.gw-ghost-btn:hover { color: var(--gw-ink); }

/* ── Primary action button (GW pine) ──────────────────── */
.gw-btn-primary {
  background: var(--gw-pine);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.gw-btn-primary:hover { background: var(--gw-pine-light); }

/* ── Danger ghost button (destructive action outline) ──── */
.gw-btn-danger-ghost {
  background: transparent;
  border: 1px solid #C97B6A;
  color: #C97B6A;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.gw-btn-danger-ghost:hover { background: rgba(248,113,113,.08); }

/* ── Table row separator ───────────────────────────────── */
.gw-table-row {
  border-bottom: 1px solid var(--gw-line);
}

/* ── Form label (small, muted) ─────────────────────────── */
.gw-label {
  font-size: 11px;
  color: var(--gw-muted);
}

/* ── Section heading label ─────────────────────────────── */
.gw-section-label {
  color: var(--gw-ink);
}

/* ────────────────────────────────────────────────────── */
/* END Sprint 5 JS Token Adoption Classes                 */
/* ────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════ */
/* SPRINT 6 — reps.js / user_management.js / integrations.js */
/* ══════════════════════════════════════════════════════ */

/* ── Rep Dashboard Commission stat tiles ───────────────── */
/* Earned (green gradient) */
.gw-rep-tile-earned {
  background: linear-gradient(135deg, var(--gw-pine-deep), var(--gw-pine));
  border: 1px solid var(--gw-emerald);
  border-radius: var(--gw-r-lg);
  padding: 18px;
  text-align: center;
}
/* Pending (amber gradient) */
.gw-rep-tile-pending {
  background: linear-gradient(135deg, #113931, #113931);
  border: 1px solid #7A5C10;
  border-radius: var(--gw-r-lg);
  padding: 18px;
  text-align: center;
}
/* Neutral stat tile */
.gw-rep-tile {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 18px;
  text-align: center;
}
.gw-rep-tile-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gw-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.gw-rep-tile-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--gw-ink);
  margin-top: 8px;
}
.gw-rep-tile-sub {
  font-size: 11px;
  color: var(--gw-muted);
  margin-top: 4px;
}

/* ── Mini opp card (pipeline list items) ───────────────── */
.gw-opp-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--gw-surface-2);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid var(--gw-line);
  transition: background .12s, border-color .12s;
}
.gw-opp-mini:hover { background: var(--gw-surface-3); }
.gw-opp-mini.overdue { border-color: #5C2318; }

/* ── Payout card (commission breakdown list) ────────────── */
.gw-payout-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--gw-surface-2);
  border-radius: 8px;
  margin-bottom: 5px;
  cursor: pointer;
  border: 1px solid var(--gw-line);
  transition: border-color .12s;
}
.gw-payout-card:hover { border-color: var(--gw-pine); }
.gw-payout-card.gate-held { border-color: rgba(139,105,20,.19); }

/* ── Weekly scoreboard progress bar ────────────────────── */
.gw-score-track {
  height: 5px;
  background: var(--gw-line);
  border-radius: 3px;
}
.gw-score-fill {
  height: 5px;
  border-radius: 3px;
  transition: width .4s;
}

/* ── Quick-nav action card (today / manager today view) ── */
.gw-qnav-card {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.gw-qnav-card:hover { background: var(--gw-surface-3); border-color: var(--gw-pine); }
.gw-qnav-card.alert  { border-color: #5C2318; background: linear-gradient(135deg, rgba(42,10,10,.3), var(--gw-surface-2)); }
.gw-qnav-card.warn   { border-color: rgba(245,158,11,.38); }
.gw-qnav-card.active { background: linear-gradient(135deg, var(--gw-pine-deep), var(--gw-pine)); border-color: var(--gw-emerald); }

/* ── Manager Today micro-stat tile ─────────────────────── */
.gw-micro-tile {
  background: var(--gw-surface-2);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

/* ── Commission plan reference tables ──────────────────── */
/* Reuse .gw-data-table; only the inline thStyle/rowStyle vars need token values */
/* These are handled by overriding the string variables in the JS migration      */

/* ── Weekly activity tracker modal ─────────────────────── */
/* Uses .gw-modal-overlay + .gw-diff-modal-box already defined; no new class */

/* ── Commission payout section header ──────────────────── */
.gw-payout-header {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 12px 16px;
  border-bottom: 1px solid var(--gw-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Sky-accented info card (target pipeline, HubSpot sync) */
.gw-sky-card {
  background: linear-gradient(135deg, var(--gw-surface-2), var(--gw-surface));
  border: 1px solid var(--gw-sky);
  border-radius: var(--gw-r-lg);
  margin-bottom: 20px;
}
.gw-sky-card-header {
  padding: 12px 16px;
  background: rgba(77,138,134,.06);
  border-bottom: 1px solid var(--gw-sky);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Today view — overdue section divider ───────────────── */
.gw-section-divider {
  border-top: 1px solid var(--gw-line);
  padding-top: 12px;
}
.gw-section-divider-top {
  border-top: 1px solid var(--gw-line);
  padding-top: 14px;
  margin-top: 10px;
}

/* ── Note / info strip ──────────────────────────────────── */
.gw-info-strip {
  font-size: 11px;
  color: var(--gw-muted);
  margin: 0;
  padding: 10px;
  background: var(--gw-surface-2);
  border-radius: 8px;
  border: 1px solid var(--gw-line);
}

/* ────────────────────────────────────────────────────── */
/* User Management classes                                */
/* ────────────────────────────────────────────────────── */

/* Tab nav border */
.gw-um-tab-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gw-line);
  padding-bottom: 16px;
}
/* Search / filter panel */
.gw-um-search-panel {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  padding: 20px;
  margin-bottom: 24px;
}
/* Edit/add user form card */
.gw-um-form-card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 16px;
  padding: 28px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}
/* Role description hint box */
.gw-um-role-desc {
  font-size: 12px;
  color: var(--gw-muted);
  background: var(--gw-surface-2);
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}
/* Google workspace integration strip */
.gw-um-google-strip {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  overflow: hidden;
}
/* Roles grid card */
.gw-um-role-card {
  padding: 16px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
}
/* Permission table wrapper */
.gw-um-perm-table {
  overflow-x: auto;
  border: 1px solid var(--gw-line);
  border-radius: 12px;
}
/* Webhook / logs info strip */
.gw-um-info-strip {
  margin-top: 20px;
  padding: 16px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
}
/* User row in table */
.gw-um-user-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  margin-bottom: 8px;
}
/* Inline CSS in user_management.js (style tags) → tokenised */

/* ────────────────────────────────────────────────────── */
/* Integrations classes                                   */
/* ────────────────────────────────────────────────────── */

/* Generic integration panel card */
.gw-int-panel {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 16px;
  padding: 28px;
}
/* Status strip inside integration panel */
.gw-int-status-strip {
  margin-top: 20px;
  padding: 14px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
}
.gw-int-status-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gw-line);
}
/* Icon square */
.gw-int-icon-sq {
  width: 32px;
  height: 32px;
  background: var(--gw-surface-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
/* Tab nav (integrations sub-tabs) */
.gw-int-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gw-line);
  margin-bottom: 0;
}
/* Modal card reuse: .gw-modal-card already defined */
/* Gmail thread list item */
.gw-gmail-thread {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gw-line);
  cursor: pointer;
  transition: background .12s;
}
.gw-gmail-thread:hover { background: var(--gw-surface-2); }
/* Reply box */
.gw-gmail-reply-box {
  margin-top: 16px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  padding: 16px;
}
/* Email detail panel */
.gw-email-detail {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  overflow: hidden;
}
/* Avatar circle */
.gw-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gw-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
/* Calendar grid cells */
.gw-cal-header-row {
  background: var(--gw-surface-2);
  border-bottom: 1px solid var(--gw-line);
}
.gw-cal-day-header {
  padding: 8px 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gw-muted);
  border-bottom: 1px solid var(--gw-line);
  border-left: 1px solid var(--gw-line);
}
.gw-cal-cell {
  padding: 2px 6px;
  text-align: right;
  font-size: 10px;
  font-weight: 600;
  border-top: 1px solid var(--gw-line);
  border-left: 1px solid var(--gw-line);
  height: 40px;
  position: relative;
  background: var(--gw-surface);
}
.gw-cal-cell.other-month { background: var(--gw-surface-2); opacity: .6; }
.gw-cal-time-block {
  border-top: 1px solid var(--gw-line);
  border-left: 1px solid var(--gw-line);
  height: 40px;
  position: relative;
  background: var(--gw-surface);
}
.gw-cal-event {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-left-width: 4px;
  transition: background .15s;
}
.gw-cal-event:hover { background: var(--gw-surface-3); }
/* Calendar nav buttons */
.gw-cal-nav-btn {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  color: var(--gw-muted);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s;
}
.gw-cal-nav-btn:hover { background: var(--gw-surface-3); color: var(--gw-ink); }
/* Calendar today button */
.gw-cal-today-btn {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-sky);
  color: var(--gw-sky);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
/* Contact/person list rows */
.gw-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .12s;
}
.gw-contact-row:hover { background: var(--gw-surface-3); }
/* Event form inputs container */
.gw-event-form {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 16px;
  padding: 24px;
  width: min(480px, 100%);
  max-height: 85vh;
  overflow-y: auto;
}
/* Ghost back button */
.gw-back-btn {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  color: var(--gw-muted);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: color .12s;
}
.gw-back-btn:hover { color: var(--gw-ink); }

/* ────────────────────────────────────────────────────── */
/* END Sprint 6 Classes                                   */
/* ────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════════
   SPRINT 7 — GROUNDWORK BRAND REDESIGN
   Palette: Evergreen Slate #1A4740 · Light Surface #F6F4EE · Satoshi font
   Overrides all prior token values and structural styles.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Import Satoshi font ──────────────────────────────────────────────── */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@700,500,400,900&display=swap');

/* ── 2. Token override ───────────────────────────────────────────────────── */
:root {
  /* Brand */
  --gw-pine:         #113931;   /* Brand Primary — exact logo bg           */
  --gw-pine-deep:    #0E372F;   /* deeper for hover / pressed states       */
  --gw-pine-light:   #1A4740;   /* lighter tint for hover accents          */
  --gw-pine-muted:   #4D8A86;   /* muted pine for secondary elements       */
  --gw-accent:       #B8744F;   /* Accent terracotta                       */
  --gw-accent-soft:  #F5E8DF;   /* Accent tint                             */
  --gw-ui-accent:    #4D8A86;   /* UI Accent teal                          */
  --gw-emerald:      #2D7A55;   /* success green                           */
  --gw-sky:          #4D8A86;   /* UI Accent teal as interactive blue      */
  --gw-sky-soft:     #E5F0EF;   /* teal tint                               */

  /* Text */
  --gw-ink:          #113931;   /* Dark Text — primary                     */
  --gw-ink-2:        #2D3E3F;   /* secondary text                          */
  --gw-muted:        #4A5947;   /* Muted — boosted for legibility on cream */
  --gw-subtle:       #6F7E6A;   /* placeholder / truly disabled only       */

  /* Surfaces */
  --gw-bg:           #EDEAE0;   /* Warm cream — distinctly warm page bg    */
  --gw-surface:      #FDFCF9;   /* card / panel — off-white warm           */
  --gw-surface-2:    #F0EDE4;   /* secondary surface — lighter, less clash */
  --gw-surface-3:    #E4E0D6;   /* tertiary / hover                        */

  /* Borders */
  --gw-line:         #C8C3B6;   /* Stronger border — clearly visible       */
  --gw-line-strong:  #B4AFA3;   /* stronger divider                        */

  /* Shadows — richer, warmer depth */
  --gw-shadow-xs:  0 1px 3px rgba(31,42,43,.08), 0 1px 2px rgba(31,42,43,.05);
  --gw-shadow-sm:  0 2px 8px rgba(31,42,43,.10), 0 4px 16px rgba(31,42,43,.07);
  --gw-shadow-md:  0 4px 16px rgba(31,42,43,.12), 0 8px 32px rgba(31,42,43,.08);
  --gw-shadow-lg:  0 8px 32px rgba(31,42,43,.16), 0 20px 60px rgba(31,42,43,.12);

  /* Font */
  --gw-font: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;

  /* Legacy token aliases — keep existing code working */
  --blue:       var(--gw-sky);
  --blue-dark:  var(--gw-pine);
  --blue-soft:  var(--gw-sky-soft);
  --ink:        var(--gw-ink);
  --muted:      var(--gw-muted);
  --line:       var(--gw-line);
  --bg:         var(--gw-bg);
  --card:       var(--gw-surface);
  --green:      #2D7A55;
  --yellow:     #7A5C10;
  --red:        #8B3A2A;
  --shadow:     var(--gw-shadow-md);
}

/* ── 3. Base reset ───────────────────────────────────────────────────────── */
body {
  font-family: var(--gw-font);
  background: var(--gw-bg);
  color: var(--gw-ink);
  -webkit-font-smoothing: antialiased;
  font-weight: 450;
  font-size: 14px;
}

/* ── 4. App shell ────────────────────────────────────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px 1fr;
}

/* ════════════════════════════════════════════════════════════════════════════
   5. SIDEBAR — Evergreen Slate dark background
   ════════════════════════════════════════════════════════════════════════════ */
.sidebar {
  background: #113931;   /* deep Evergreen Slate — rich dark green  */
  border-right: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  box-shadow: 2px 0 12px rgba(0,0,0,.18);
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

/* Brand block */
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 0;
  flex-shrink: 0;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark img {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  border-radius: 9px;
}
/* SVG logo mark fallback (text-based) */
.brand-mark-svg {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.025em;
  color: #ffffff;
  line-height: 1.15;
}
.brand-subtitle {
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 500;
  margin-top: 1px;
}
.brand-kicker {
  display: none; /* hide old kicker */
}

/* Nav container */
.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 14px 10px;
  flex: 1;
}
.nav-group { margin-bottom: 4px; }

/* Section labels */
.nav-summary {
  list-style: none;
  display: flex;
  align-items: center;
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  cursor: default;
  user-select: none;
  border-radius: 0;
  gap: 0;
  transition: none;
}
.nav-summary::-webkit-details-marker { display: none; }
.nav-summary:hover { color: rgba(255,255,255,.5); }
.nav-summary::after { display: none; }

/* Nav items */
.nav-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0;
  width: 100%;
}

.nav-item {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.60);
  font-weight: 500;
  font-size: 13.5px;
  width: 100%;
  transition: color .12s, background .12s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.90);
}
.nav-item.active {
  background: rgba(255,255,255,.14);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
.nav-item.active::before { display: none; } /* remove old left bar */

/* Sidebar footer / user card */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 14px 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.80);
  font-size: 13px;
  background: rgba(0,0,0,.12);
}
.sidebar-footer strong {
  color: #ffffff;
  font-weight: 700;
  display: block;
  font-size: 13px;
}
.sidebar-footer span {
  color: rgba(255,255,255,.50);
  font-size: 11.5px;
}

/* ════════════════════════════════════════════════════════════════════════════
   6. TOPBAR
   ════════════════════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--gw-surface);
  border-bottom: 1px solid var(--gw-line);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 15;
  box-shadow: 0 1px 4px rgba(31,42,43,.07);
  backdrop-filter: none;
}

/* Search bar */
.search-wrap {
  flex: 1;
  max-width: 380px;
  position: relative;
}
.search-wrap input,
#searchInput {
  width: 100%;
  background: var(--gw-bg);
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  padding: 7px 14px 7px 36px;
  font-size: 13px;
  color: var(--gw-ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: none;
}
.search-wrap input:focus,
#searchInput:focus {
  border-color: var(--gw-pine);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32,74,67,.10);
}
.search-wrap::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236F7E6A' stroke-width='2' stroke-linecap='round' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4'/%3E%3Cline x1='10' y1='10' x2='14' y2='14'/%3E%3C/svg%3E");
}

/* Topbar action buttons */
.topbar-new-btn {
  background: var(--gw-pine);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .14s, box-shadow .14s;
  box-shadow: 0 2px 6px rgba(32,74,67,.25);
}
.topbar-new-btn:hover {
  background: var(--gw-pine-deep);
  box-shadow: 0 4px 10px rgba(32,74,67,.30);
}
.topbar-settings {
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gw-ink);
}
.topbar-settings:hover {
  background: var(--gw-surface-2);
  border-color: var(--gw-line-strong);
}
.topbar-new-dropdown {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  box-shadow: var(--gw-shadow-md);
}
.tnd-item:hover {
  background: var(--gw-surface-2);
  color: var(--gw-pine);
}

/* Notification / icon buttons in topbar */
.topbar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  display: grid;
  place-items: center;
  color: var(--gw-muted);
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.topbar-icon-btn:hover { background: var(--gw-surface-2); }

/* User avatar chip in topbar */
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gw-pine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.01em;
  flex-shrink: 0;
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════════════════════
   7. MAIN VIEW AREA
   ════════════════════════════════════════════════════════════════════════════ */
.main {
  background: var(--gw-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}
.view {
  padding: 24px 28px;
  max-width: 1400px;
  flex: 1;
}

/* ════════════════════════════════════════════════════════════════════════════
   8. CARDS & SURFACES
   ════════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  box-shadow: var(--gw-shadow-sm);
  padding: 20px;
}
.card.clickable {
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.card.clickable:hover {
  box-shadow: var(--gw-shadow-md);
  border-color: var(--gw-pine);
  transform: translateY(-1px);
}
.app-card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  box-shadow: var(--gw-shadow-sm);
  overflow: hidden;
}
.app-card:before { display: none; } /* remove old gradient top bar */

/* ── KPI metric strip ──────────────────────────────────────────────────── */
.metric-strip,
.dashboard-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.metric-card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--gw-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .15s, transform .15s;
}
.metric-card:hover { box-shadow: var(--gw-shadow-md); transform: translateY(-1px); }

.metric-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
/* Icon colour variants — match reference */
.metric-icon-wrap.revenue  { background: #EAF1EE; color: var(--gw-pine); }
.metric-icon-wrap.pipeline { background: #EAF1EE; color: var(--gw-ui-accent); }
.metric-icon-wrap.won      { background: #F5E8DF; color: var(--gw-accent); }
.metric-icon-wrap.deals    { background: #EDEAE0; color: var(--gw-muted); }
.metric-icon-wrap.rate     { background: #EAF1EE; color: var(--gw-pine); }

.metric-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gw-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.metric-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--gw-ink);
  letter-spacing: -.04em;
  line-height: 1;
}
.metric-delta {
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-delta.pos { color: #2D7A55; }
.metric-delta.neg { color: #8B3A2A; }
.metric-delta .delta-desc {
  color: var(--gw-muted);
  font-weight: 400;
}

/* ── Dash tile (legacy reuse) ──────────────────────────────────────────── */
.dash-tile {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--gw-shadow-xs);
}
.dash-tile strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gw-ink);
}
.dash-tile span {
  display: block;
  color: var(--gw-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* ════════════════════════════════════════════════════════════════════════════
   9. TYPOGRAPHY & HEADINGS
   ════════════════════════════════════════════════════════════════════════════ */
h1 { font-size: clamp(24px,3vw,36px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 4px; font-weight: 900; color: var(--gw-ink); }
h2 { font-size: 19px; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 800; color: var(--gw-ink); }
h3 { font-size: 15px; letter-spacing: -.015em; margin: 0 0 8px; font-weight: 700; color: var(--gw-ink); }

.pl-title  { font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--gw-ink); }
.pl-subtitle { font-size: 13px; color: var(--gw-muted); font-weight: 400; margin-top: 2px; }
.eyebrow { color: var(--gw-accent); text-transform: uppercase; letter-spacing: .10em; font-size: 10.5px; font-weight: 800; }
.lede { color: var(--gw-muted); font-size: 14px; max-width: 680px; line-height: 1.65; font-weight: 450; }

/* ════════════════════════════════════════════════════════════════════════════
   10. BUTTONS
   ════════════════════════════════════════════════════════════════════════════ */
.primary-btn {
  background: var(--gw-accent);   /* Terracotta — warm CTA colour */
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .14s, box-shadow .14s;
  box-shadow: 0 2px 8px rgba(184,116,79,.30);
}
.primary-btn:hover { background: #B8744F; box-shadow: 0 4px 12px rgba(184,116,79,.40); }

.secondary-btn {
  background: var(--gw-surface);
  color: var(--gw-ink);
  border: 1.5px solid var(--gw-line-strong);  /* stronger border — readable on cream bg */
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.secondary-btn:hover {
  background: var(--gw-surface-2);
  border-color: var(--gw-pine);
  box-shadow: 0 2px 8px rgba(32,74,67,.10);
}

.danger-btn {
  background: #FAE8E4;
  color: #8B3A2A;
  border: 1px solid #F5D5C8;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .12s;
}
.danger-btn:hover { background: #FAE8E4; }

.install-btn {
  background: var(--gw-surface);
  color: var(--gw-muted);
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s;
}
.install-btn:hover { background: var(--gw-surface-2); }

/* ════════════════════════════════════════════════════════════════════════════
   11. FORMS
   ════════════════════════════════════════════════════════════════════════════ */
.form input, .form select, .form textarea,
input[type="text"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="time"],
input[type="url"], input[type="password"], select, textarea {
  width: 100%;
  border: 1px solid var(--gw-line);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--gw-surface);
  outline: none;
  color: var(--gw-ink);
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus,
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--gw-pine);
  box-shadow: 0 0 0 3px rgba(32,74,67,.10);
}
.form label span { font-weight: 600; color: var(--gw-ink); font-size: 12px; }

/* ════════════════════════════════════════════════════════════════════════════
   12. DATA TABLE
   ════════════════════════════════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead tr {
  background: transparent;
  border-bottom: 1px solid var(--gw-line);
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--gw-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--gw-surface-2);
}
.data-table tbody tr {
  border-bottom: 1px solid var(--gw-line);
  transition: background .1s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gw-surface-2); }
.data-table td {
  padding: 12px 14px;
  color: var(--gw-ink);
  vertical-align: middle;
}

/* ── GW data table (used in integrations/reps) ─── */
.gw-data-table {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════════════════
   13. STAGE BADGES — match reference color palette
   ════════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* Stage-specific badge colours */
.badge-prospecting,  .badge[data-stage="Prospecting"]   { background: #E5F0EF; color: #1A4740; }
.badge-qualification,.badge[data-stage="Qualification"] { background: #E5F0EF; color: #1A4740; }
.badge-proposal,     .badge[data-stage="Proposal"]      { background: #E5F0EF; color: #4D8A86; }
.badge-negotiation,  .badge[data-stage="Negotiation"]   { background: #FAF6E8; color: #7A5C10; }
.badge-closed-won,   .badge[data-stage="Closed Won"]    { background: #D4EDE1; color: #2D7A55; }
.badge-closed-lost,  .badge[data-stage="Closed Lost"]   { background: #FAE8E4; color: #7A2E20; }
.badge-new-lead,     .badge[data-stage="New Lead"]      { background: #EAF1EE; color: #2D7A55; }
.badge-contacted,    .badge[data-stage="Contacted"]     { background: #FAF6E8; color: #8B3A2A; }

/* Generic tonal badges */
.badge-green  { background: #D4EDE1; color: #2D7A55; }
.badge-blue   { background: #E5F0EF; color: #1A4740; }
.badge-amber  { background: #FAF6E8; color: #7A5C10; }
.badge-red    { background: #FAE8E4; color: #7A2E20; }
.badge-teal   { background: #D4EDE1; color: #4D8A86; }
.badge-purple { background: #E8E4D9; color: #1A4740; }
.badge-gray   { background: var(--gw-surface-2); color: var(--gw-muted); }

/* warn-badge / blue badge rewrite — solid amber bg with white text for legibility */
.warn-badge { background: #8B6914; color: #FFFFFF; border: none; font-weight: 700; }

/* ── Legacy pill/badge used in various views ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  border-radius: 20px;
  padding: 5px 12px;
  color: var(--gw-ink);
  font-size: 12px;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════════
   14. KANBAN BOARD
   ════════════════════════════════════════════════════════════════════════════ */
.kanban { display: grid; grid-template-columns: repeat(3,minmax(260px,1fr)); gap: 14px; align-items: start; }
.kanban-col {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: none;
}
.kanban-col h3 { display: flex; justify-content: space-between; font-size: 13px; color: var(--gw-ink); }

/* ════════════════════════════════════════════════════════════════════════════
   15. OPPORTUNITY / MINI-ROW CARDS
   ════════════════════════════════════════════════════════════════════════════ */
.opp-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gw-line);
}
.opp-card h3 { margin: 0; font-size: 14px; }
.opp-card p  { margin: 3px 0 0; color: var(--gw-muted); font-size: 12px; }
.opp-meta    { display: grid; gap: 6px; justify-items: end; font-size: 12px; color: var(--gw-muted); }

.mini-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--gw-line);
  background: var(--gw-surface);
  padding: 12px;
  border-radius: 8px;
}
.mini-row:hover { background: var(--gw-surface-2); }
.mini-row em { grid-column: 1/-1; color: var(--gw-muted); font-style: normal; font-size: 12px; }

/* ════════════════════════════════════════════════════════════════════════════
   16. SECTION HEADERS
   ════════════════════════════════════════════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 { margin-bottom: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   17. TOASTS & MODALS
   ════════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--gw-ink);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: var(--gw-shadow-md);
  z-index: 50;
  font-size: 13px;
  font-weight: 600;
}

.sold-modal {
  background: var(--gw-surface);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--gw-shadow-lg);
}
.sold-modal h2 { margin: 0 0 4px; font-size: 20px; }
.sold-modal-backdrop { background: rgba(31,42,43,.55); }

/* GW modal card */
.gw-modal-card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  box-shadow: var(--gw-shadow-lg);
}

/* ════════════════════════════════════════════════════════════════════════════
   18. HERO / PIPELINE HERO
   ════════════════════════════════════════════════════════════════════════════ */
.hero {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 16px;
  padding: 0;
  box-shadow: var(--gw-shadow-xs);
  position: relative;
  overflow: hidden;
}
.hero:before, .hero:after { display: none; }

.hero-panel {
  background: var(--gw-pine);
  color: #fff;
  border-radius: 12px;
  padding: 24px;
}
.hero-panel h3 { color: #fff; }
.hero-panel .muted { color: rgba(255,255,255,.6); }

/* ════════════════════════════════════════════════════════════════════════════
   19. SEARCH RESULTS DROPDOWN
   ════════════════════════════════════════════════════════════════════════════ */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  box-shadow: var(--gw-shadow-md);
  max-height: 380px;
  overflow: auto;
  padding: 6px;
  z-index: 100;
}
.result {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background .1s;
}
.result:hover { background: var(--gw-surface-2); }
.result-type  { font-size: 10px; color: var(--gw-pine); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.result-title { font-weight: 700; margin-top: 2px; color: var(--gw-ink); font-size: 13px; }
.result-text  { color: var(--gw-muted); font-size: 12px; margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════════════════
   20. PAGINATION
   ════════════════════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.page-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  color: var(--gw-muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .1s;
}
.page-btn:hover { background: var(--gw-surface-2); color: var(--gw-ink); }
.page-btn.active { background: var(--gw-pine); color: #fff; border-color: var(--gw-pine); }

/* ════════════════════════════════════════════════════════════════════════════
   21. TABS — pill style
   ════════════════════════════════════════════════════════════════════════════ */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tab {
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  color: var(--gw-muted);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.tab.active {
  background: var(--gw-pine);
  color: #fff;
  border-color: var(--gw-pine);
}
.tab:hover:not(.active) { background: var(--gw-surface-2); color: var(--gw-ink); }

/* ════════════════════════════════════════════════════════════════════════════
   22. STAT / METRIC TILES (legacy)
   ════════════════════════════════════════════════════════════════════════════ */
.stat {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--gw-shadow-sm);
}
.stat:after { display: none; }
.stat span  { display: block; color: var(--gw-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat strong { font-size: 32px; letter-spacing: -.05em; color: var(--gw-ink); font-weight: 900; }
.stat.bad { border-color: #E8C4BA; background: #FAE8E4; }
.stat.bad span   { color: #8B3A2A; }   /* overdue label — readable on pink bg */
.stat.bad strong { color: #8B3A2A; }   /* overdue count — strong red */

/* ════════════════════════════════════════════════════════════════════════════
   23. ACTIVITY LOG ROWS
   ════════════════════════════════════════════════════════════════════════════ */
.note { border-bottom: 1px solid var(--gw-line); padding: 10px 0; }
.note time { font-size: 11.5px; color: var(--gw-muted); font-weight: 600; }
.note p { margin: 5px 0 0; font-size: 13px; color: var(--gw-ink); line-height: 1.5; }

/* Tool list buttons */
.tool-list button {
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  border-radius: 10px;
  text-align: left;
  padding: 12px;
  font-weight: 700;
  color: var(--gw-pine);
  font-size: 13px;
}
.tool-list button:hover { background: var(--gw-surface-2); }

/* ════════════════════════════════════════════════════════════════════════════
   24. SPINNER & LOADING
   ════════════════════════════════════════════════════════════════════════════ */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--gw-line);
  border-top-color: var(--gw-pine);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-wrap { display: flex; justify-content: center; padding: 24px; }

/* ════════════════════════════════════════════════════════════════════════════
   25. INTEGRATIONS — light theme adapters for dark-origin components
   ════════════════════════════════════════════════════════════════════════════ */
/* Override hard-coded dark panel colours in integrations panel */
.gw-int-panel {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
}
.gw-info-strip {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
}
.gw-gmail-thread {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
}
.gw-sky-card {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  box-shadow: var(--gw-shadow-xs);
}
.gw-sky-card-header {
  background: var(--gw-surface-2);
  border-bottom: 1px solid var(--gw-line);
  padding: 14px 18px;
}
.gw-back-btn {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  color: var(--gw-muted);
}
.gw-back-btn:hover { background: var(--gw-surface-2); color: var(--gw-ink); }

/* ── Cal/Gmail label pills ─────────────────────────────────────────────── */
.gw-cal-nav-btn {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  color: var(--gw-muted);
}
.gw-cal-nav-btn:hover { background: var(--gw-surface-2); }
.gw-cal-today-btn {
  background: var(--gw-surface);
  border: 1px solid var(--gw-pine);
  color: var(--gw-pine);
}

/* ── User management panels ────────────────────────────────────────────── */
.gw-um-form-card, .gw-um-role-card, .gw-um-perm-table, .gw-um-user-row {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
}
.gw-um-tab-nav {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  gap: 4px;
}
.gw-um-role-desc { color: var(--gw-muted); }

/* ════════════════════════════════════════════════════════════════════════════
   26. LEAD / PIPELINE TAB BAR
   ════════════════════════════════════════════════════════════════════════════ */
.lead-tab-bar {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}
.lead-tab {
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gw-muted);
  transition: all .12s;
  cursor: pointer;
}
.lead-tab.active {
  background: var(--gw-surface);
  color: var(--gw-pine);
  font-weight: 700;
  box-shadow: var(--gw-shadow-xs);
}

/* ════════════════════════════════════════════════════════════════════════════
   27. CODE / INLINE CODE
   ════════════════════════════════════════════════════════════════════════════ */
code {
  background: var(--gw-surface-2);
  color: var(--gw-pine);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

/* ════════════════════════════════════════════════════════════════════════════
   28. RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px 1fr; }
  .metric-strip, .dashboard-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .kanban { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform .2s;
    z-index: 20;
    width: 224px;
    box-shadow: 4px 0 20px rgba(0,0,0,.25);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .view { padding: 16px; }
  .metric-strip, .dashboard-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2, .grid-3, .grid-4, .kanban, .form-grid { grid-template-columns: 1fr; }
  .opp-card { grid-template-columns: 1fr; }
  .opp-meta { justify-items: start; }
  .detail-head { display: block; }
  .detail-actions { justify-content: flex-start; margin-top: 12px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   29. DARK READABILITY OVERRIDES — neutralise old dark inline styles
   ════════════════════════════════════════════════════════════════════════════ */
/* These attribute selectors match any leftover inline dark backgrounds
   in sections not yet migrated, giving them readable light treatment */
[style*="background:var(--gw-surface)"]  { color: var(--gw-ink); }
[style*="background:var(--gw-surface-2)"] { color: var(--gw-ink); }
[style*="background:var(--gw-surface-3)"] { color: var(--gw-ink); }

/* Int action buttons — brand colour */
.int-action-btn {
  border: 1px solid var(--gw-line);
  background: var(--gw-surface);
  color: var(--gw-pine);
}
.int-action-btn:hover {
  background: var(--gw-surface-2);
  border-color: var(--gw-pine);
  box-shadow: 0 2px 8px rgba(32,74,67,.10);
}

/* Revenue editor — light theme */
.rev-editor-table thead tr { background: var(--gw-surface-2); }
.rev-editor-table th { color: var(--gw-muted); border-bottom: 1px solid var(--gw-line); }
.rev-editor-table tbody tr { border-bottom: 1px solid var(--gw-line); }
.rev-editor-table tbody tr:hover { background: var(--gw-surface-2); }
.rev-editor-table td { color: var(--gw-ink); }
.rev-editor-input {
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  color: var(--gw-ink);
}
.rev-editor-input:focus { border-color: var(--gw-pine); outline: none; }
.rev-variance-pos { color: #2D7A55; }
.rev-variance-neg { color: #8B3A2A; }
.rev-variance-none { color: var(--gw-subtle); }

/* Financial tab buttons */
.fin-tab-btn.active { background: #EAF1EE; border: 1px solid var(--gw-pine); color: var(--gw-pine); }
.fin-tab-btn:not(.active) { background: var(--gw-surface); border: 1px solid var(--gw-line); color: var(--gw-muted); }
.fin-tab-btn:hover:not(.active) { background: var(--gw-surface-2); color: var(--gw-ink); }

/* Calendar view buttons — light */
.cal-view-toggle { background: var(--gw-surface-2); border-radius: 8px; padding: 3px; }
.cal-view-btn { color: var(--gw-muted); }
.cal-view-btn.active { background: var(--gw-surface); color: var(--gw-pine); box-shadow: var(--gw-shadow-xs); }
.cal-view-btn:hover:not(.active) { color: var(--gw-ink); }

/* Month/week grid — light */
.cal-month-grid { background: var(--gw-line); }
.cal-month-day-header { background: var(--gw-surface-2); color: var(--gw-muted); }
.cal-month-cell { background: var(--gw-surface); min-height: 72px; }
.cal-month-cell.today { background: #EAF1EE; }
.cal-month-cell.other-month { background: var(--gw-surface-2); opacity: .7; }
.cal-month-cell-num { color: var(--gw-muted); }
.cal-month-cell.today .cal-month-cell-num { background: var(--gw-pine); color: #fff; }
.cal-event-chip { background: #EAF1EE; color: var(--gw-pine); }
.cal-event-chip:hover { background: var(--gw-pine); color: #fff; }

.cal-week-grid { background: var(--gw-line); }
.cal-week-header { background: var(--gw-surface-2); }
.cal-week-header .dow { color: var(--gw-muted); }
.cal-week-header .dom { color: var(--gw-ink); }
.cal-week-header .dom.today-num { background: var(--gw-pine); color: #fff; }
.cal-week-time-label { background: var(--gw-surface-2); color: var(--gw-subtle); border-bottom: 1px solid var(--gw-line); }
.cal-week-cell { background: var(--gw-surface); border-bottom: 1px solid var(--gw-line); }
.cal-week-event { background: #EAF1EE; border-left-color: var(--gw-pine); color: var(--gw-pine); }
.cal-week-event:hover { background: var(--gw-pine); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════════
   30. OWNER / REP DASHBOARD — GW Sky/Surface card overrides
   ════════════════════════════════════════════════════════════════════════════ */
/* Month mini-card (light) */
.month-mini-card {
  background: var(--gw-surface-2);
  border: 1px solid var(--gw-line);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 80px;
  text-align: center;
}
.month-mini-card .budget { font-size: 11px; color: var(--gw-muted); }
.month-mini-card .actual { font-size: 14px; font-weight: 700; color: var(--gw-pine); }
.month-mini-card .variance.pos { color: #2D7A55; }
.month-mini-card .variance.neg { color: #8B3A2A; }
.month-mini-card .variance.none { color: var(--gw-subtle); }

/* Dark card labels rewritten for light theme */
.dark-card-val   { font-size: 1.6rem; font-weight: 800; color: var(--gw-ink) !important; }
.dark-card-label { font-size: 10px; font-weight: 700; color: var(--gw-muted) !important; text-transform: uppercase; letter-spacing: .06em; }
.dark-card-green { color: #2D7A55 !important; }
.dark-card-red   { color: #8B3A2A !important; }
.dark-card-yellow{ color: #7A5C10 !important; }
.dark-card-cyan  { color: var(--gw-pine) !important; }

/* ════════════════════════════════════════════════════════════════════════════
   31. GW INPUT SMALL (used in reps / integrations)
   ════════════════════════════════════════════════════════════════════════════ */
.gw-input-sm {
  padding: 6px 10px;
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-radius: 7px;
  color: var(--gw-ink);
  font-size: 12px;
}
.gw-input-sm:focus { border-color: var(--gw-pine); outline: none; }

/* ════════════════════════════════════════════════════════════════════════════
   32. CONTRAST FIX PASS — Warm Cream Theme Legibility
   All elements where text was blending into the cream/white surface.
   ════════════════════════════════════════════════════════════════════════════ */

/* Checklist progress bar track — was too faint on white card */
.ld-cl-bar-track { background: var(--gw-line-strong) !important; }
/* Checklist count text — always dark enough to read */
.ld-cl-count { color: var(--gw-ink) !important; }

/* Warn-badge text in section-heads needs to pop on cream bg */
.warn-badge { font-weight: 700 !important; }

/* Secondary buttons on cream page bg — stronger border treatment */
.pl-page-actions .secondary-btn,
.section-head .secondary-btn,
.detail-actions .secondary-btn {
  border-color: var(--gw-line-strong);
}

/* neutral-badge (All clear) */
.neutral-badge {
  background: var(--gw-surface-2);
  color: var(--gw-pine);
  border: 1px solid var(--gw-line-strong);
  font-weight: 700;
}

/* Table headers — clearer label text */
table th { color: var(--gw-muted); }

/* Topbar search input on warm bg */
#searchInput { color: var(--gw-ink); }
#searchInput::placeholder { color: var(--gw-subtle); }

/* Owner Dashboard: section headers on gw-sky-card (now white) */
.gw-sky-card .eyebrow { color: var(--gw-pine); }

/* Overdue badge on stat.bad — stronger red */
.stat.bad strong { color: #8B3A2A; }

/* KPI banner: ensure Needed/Month amber on white has enough contrast */
.gw-kpi-banner-val[style*="8B6914"] { color: #6B4D0A !important; }

/* Stat card label text inherits muted which is now #4A5947 — good */
/* But if any inline styles override, catch them */
.stat > span[style*="#6F7E6A"] { color: var(--gw-muted) !important; }

/* ── Section 33: app_premium.js dark-card text overrides ───────────────────
   These catch inline color:#E8E4D9 (cream) text that appears on light panels
   such as .gw-comm-panel (white surface) and .gw-flag-panel (surface-2).      */

/* Commission Rules Manager title — was cream on white panel */
.gw-comm-panel [style*="color:#E8E4D9"],
.gw-comm-panel [style*="color: #E8E4D9"] { color: var(--gw-ink) !important; }

/* Feature Flags panel title — was cream on surface-2 */
.gw-flag-panel [style*="color:#E8E4D9"],
.gw-flag-panel [style*="color: #E8E4D9"] { color: var(--gw-ink) !important; }

/* Review Cadence meeting titles — was cream on var(--bg2) row */
.card [style*="color:#E8E4D9"],
article [style*="color:#E8E4D9"] { color: var(--gw-ink) !important; }

/* Commission rate table header — was cream on white table */
.gw-data-table th[style*="color:#E8E4D9"] { color: var(--gw-muted) !important; }

/* Any remaining #6F7E6A inline style on light cards → boosted muted */
.gw-comm-panel [style*="color:#6F7E6A"],
.gw-flag-panel [style*="color:#6F7E6A"] { color: var(--gw-muted) !important; }

/* Access restricted modal — was cream text on light modal surface */
.modal-body [style*="color:#E8E4D9"] { color: var(--gw-ink) !important; }

/* ── END SPRINT 7 ─────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 34 — LAYOUT STANDARDIZATION + LOGO FIX
   - Logo: real colors, no filter invert
   - opp-card: no truncation, full text, consistent layout
   - mini-row: standardized 3-row grid, uniform spacing
   - Coming Up / Recently Updated: clean card padding
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Logo / Brand Mark ───────────────────────────────────────────────────── */
/* New logo is dark-green-background + white mark — show as-is, no invert    */
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: grid;
  place-items: center;
}
.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  filter: none !important;
  opacity: 1 !important;
}

/* Brand text — ensure Groundwork name is always visible */
.brand-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-subtitle {
  color: rgba(255,255,255,.52) !important;
  font-size: 10.5px;
  font-weight: 500;
  margin-top: 1px;
  white-space: nowrap;
}

/* ── opp-card (Due Now cards) — no truncation ────────────────────────────── */
/* Allow client name and project to wrap — never clip words */
.opp-card h3 {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gw-ink);
  margin: 0 0 3px;
  letter-spacing: -.01em;
  line-height: 1.3;
  word-break: break-word;
}
.opp-project {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  font-size: 12px;
  color: var(--gw-muted);
  margin: 0 0 8px;
  line-height: 1.45;
  word-break: break-word;
}
/* Ensure opp-card padding is generous enough */
.opp-card {
  padding: 14px 14px 13px 17px;
}

/* ── mini-row (Coming Up / Recently Updated rows) — standardized layout ─── */
/*
  HTML structure (per oppMini()):
    <button class="mini-row">
      <strong>   ← client name + urgency dot           — col 1, row 1
      <span.status-chip>  ← stage badge                — col 2, row 1
      <em>       ← project/service line                — col 1, row 2 (full width)
      <span>     ← rep pill + time                     — col 1-2, row 3
    </button>

  Grid: 3 rows, col 1 = flexible text, col 2 = badge (shrink-to-fit)
*/
.mini-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 0 8px;
  text-align: left;
  background: var(--gw-surface);
  border: 1px solid var(--gw-line);
  border-bottom: none;
  border-radius: 0;
  padding: 11px 13px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  align-items: start;
  /* Reset any button defaults */
  font: inherit;
  color: inherit;
  position: relative;
}
.mini-row:first-of-type {
  border-radius: var(--gw-r-sm) var(--gw-r-sm) 0 0;
  border-top: 1px solid var(--gw-line);
}
.mini-row:last-of-type {
  border-radius: 0 0 var(--gw-r-sm) var(--gw-r-sm);
  border-bottom: 1px solid var(--gw-line);
}
.mini-row:only-of-type {
  border-radius: var(--gw-r-sm);
  border: 1px solid var(--gw-line);
}
.mini-row:hover {
  background: var(--gw-surface-2);
  border-color: var(--gw-pine-muted);
  z-index: 1;
}
/* Row 1, Col 1 — client name */
.mini-row > strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
  font-weight: 650;
  color: var(--gw-ink);
  line-height: 1.3;
  /* Allow wrap — no clipping */
  white-space: normal;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 6px;
}
/* Row 1, Col 2 — status badge */
.mini-row > .status-chip {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 2px;
}
/* Row 2, Col 1 — project / service line (full width) */
.mini-row > em {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 12px;
  color: var(--gw-muted);
  font-style: normal;
  line-height: 1.4;
  margin-top: 3px;
  white-space: normal;
  word-break: break-word;
}
/* Row 3 — rep pill + time (full width, flex row, right-aligned) */
.mini-row > span:not(.status-chip):not(.opp-rep-pill) {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* Overdue left-border accent */
.mini-row.mini-row-overdue {
  border-left: 3px solid #C97B6A !important;
  padding-left: 10px;
}

/* ── Section card spacing — Coming Up / Recently Updated ─────────────────── */
/* Ensure the card containers have clean internal spacing */
.card > .section-head + .mini-row:first-of-type,
.card > .section-head ~ .mini-row:first-of-type {
  margin-top: 0;
}
/* Small gap between section-head and the mini-row list */
.card .section-head {
  margin-bottom: 10px;
}

/* ── opp-rep-pill — uniform pill style ───────────────────────────────────── */
.opp-rep-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  padding: 2px 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ── status-chip uniform sizing in mini-rows ─────────────────────────────── */
.mini-row .status-chip {
  font-size: 10px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

/* ── urgency-badge (OVERDUE / STALE) — no truncation in opp-card ─────────── */
.urgency-badge {
  white-space: nowrap;
  flex-shrink: 0;
}
.opp-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

/* ── mini-row-meta / mini-row-time ──────────────────────────────────────── */
.mini-row-meta {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.mini-row-time {
  font-size: 10px;
  color: var(--gw-subtle, #8B9E95);
  font-weight: 500;
  white-space: nowrap;
}

/* ── END SECTION 34 ──────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════════════
   SECTION 35 — Logo Visibility Fix + groundwork-crm.pages.dev → redirect notice
   ══════════════════════════════════════════════════════════════════════════════

   The logo PNG has a dark-green (#103830) background that matches the sidebar
   (#113931). Without visual separation it appears as an invisible dark square.
   Fix: add a subtle white ring (box-shadow) around the brand-mark so the logo
   has clear edges, and a slightly lighter background to create depth.
*/
.brand-mark {
  background: rgba(255,255,255,.08) !important;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.18), 0 2px 8px rgba(0,0,0,.28) !important;
  border-radius: 10px !important;
}
.brand-mark img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  display: block !important;
  filter: none !important;
  opacity: 1 !important;
}

/* ── END SECTION 35 ───────────────────────────────────────────────────────── */


/* ══════════════════════════════════════════════════════════════════════════════
   SECTION 36 — UI Polish Pass (Screenshot Fixes — June 2026)
   ══════════════════════════════════════════════════════════════════════════════

   Fixes applied:
   1. Search bar — icon no longer overlaps placeholder text (increase padding-left)
   2. Sidebar footer (Tyler card) — proper dark background, high-contrast text
   3. Super Admin nav button — flex layout, shield icon aligns with label
   4. Add Lead category tiles — richer contrast, bolder active state
   5. Kanban pipeline cards — min-width guard, proper overflow, no text squish
   6. Opp-card h3 — allow wrap in narrow columns instead of going invisible
*/

/* ── 1. Search bar — push placeholder right of the magnifying-glass icon ── */
.search-wrap input,
.search-wrap #searchInput,
#searchInput {
  padding-left: 40px !important; /* icon sits at left:12px + 14px icon + 4px gap */
}

/* Ensure ::before icon is perfectly centered regardless of input height */
.search-wrap::before {
  left: 13px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 15px !important;
  height: 15px !important;
  z-index: 2;
}

/* ── 2. Sidebar footer / Tyler user card — high contrast dark treatment ── */
.sidebar-footer {
  background: rgba(0, 0, 0, 0.28) !important;   /* deep dark, clearly separate from sidebar */
  border-top: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 10px !important;
  margin: 8px 12px 12px !important;
  padding: 12px 14px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.20) !important;
  color: rgba(255,255,255,.90) !important;
}
.sidebar-footer strong,
#sidebarUserName {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
}
.sidebar-footer span,
#sidebarUserRole {
  color: rgba(255,255,255,.62) !important;
  font-size: 11.5px !important;
}

/* Avatar initials circle inside footer */
#sidebarAvatarInitials {
  background: var(--gw-emerald, #2EAD6D) !important;
  color: #fff !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,.18) !important;
}

/* ── 3. Super Admin nav button — inline-flex so icon + text align ── */
#superAdminNavBtn {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: var(--gw-emerald, #2EAD6D) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 8px 10px 8px 20px !important;
  border-top: 1px solid rgba(255,255,255,.10) !important;
  margin-top: 6px !important;
  border-radius: 6px !important;
  transition: background .14s !important;
}
#superAdminNavBtn:hover {
  background: rgba(46,173,109,.12) !important;
}
#superAdminNavBtn svg {
  flex-shrink: 0;
  opacity: .85;
}

/* ── 4. Add Lead — Project Category tiles: richer contrast ── */
.cat-tile {
  border: 1.5px solid rgba(30,70,56,.22) !important;
  background: #fff !important;
  color: var(--gw-ink, #1E2C2B) !important;
  padding: 7px 16px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  transition: background .14s, border-color .14s, box-shadow .14s !important;
  box-shadow: 0 1px 3px rgba(30,70,56,.06) !important;
}
.cat-tile:hover {
  border-color: var(--gw-pine, #1E4638) !important;
  background: rgba(30,70,56,.06) !important;
  color: var(--gw-pine, #1E4638) !important;
  box-shadow: 0 2px 6px rgba(30,70,56,.12) !important;
}
.cat-tile--active {
  border-color: var(--gw-pine, #1E4638) !important;
  background: var(--gw-pine, #1E4638) !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(30,70,56,.30) !important;
}
.cat-tile-label {
  color: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
}
.cat-tile--active .cat-tile-label {
  color: #fff !important;
  font-weight: 700 !important;
}

/* ── 5. Kanban — prevent column/card text squish, proper overflow ── */
.kanban {
  overflow-x: auto !important;   /* scroll instead of squishing */
  min-width: 0;
}

/* Each column: enforce minimum width so cards never collapse to slivers */
.kanban-col {
  min-width: 260px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ── 6. Opp card heading — allow wrapping in narrow columns ── */
.opp-card h3 {
  white-space: normal !important;      /* allow wrap — no more vertical letter stacking */
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;    /* max 2 lines, then ellipsis */
  -webkit-box-orient: vertical !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: var(--gw-ink) !important;
}

/* Project subtitle: allow wrap for long "Maintenance – Recurring Contract" */
.opp-project {
  white-space: normal !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  word-break: break-word !important;
  font-size: 11.5px !important;
  line-height: 1.4 !important;
  color: var(--gw-muted) !important;
  margin-bottom: 8px !important;
}

/* Urgency badge: never shrink or wrap */
.urgency-badge {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  letter-spacing: .05em !important;
}

/* ── 7. Status badge in opp cards — make it crisp ── */
.status-chip {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* ── END SECTION 36 ───────────────────────────────────────────────────────── */

/* ── SECTION 36-B — Pipeline heading & primary heading color fix ── */
/* .pl-title uses var(--gw-ink) which = #113931 (forest green) — override to near-black */
.pl-title,
h1.pl-title,
.view h1,
.view .pl-title {
  color: #0F1C14 !important;
}

/* ── Sidebar override guard (styles.css loads after, so re-assert here isn't enough) ──
   The actual fix is in styles.css STYLES-OVERRIDE block above.
   This block just documents the intent. */
/* ── END SECTION 36-B ────────────────────────────────────────────── */


/* ══════════════════════════════════════════════════════════════════════════════
   SECTION 37 — Card Layout Redesign (June 2026)
   Fixes: Due Now oppCard blank space, kanban column width/overflow, overdue
   indicator clipping, column header wrapping.
══════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Kanban: definitive column sizing fix ── */
/* Override ALL prior grid declarations. Use a scrollable parent wrapper. */
.kanban {
  display: flex !important;           /* switch from grid to flex for clean column layout */
  flex-direction: row !important;
  gap: 14px !important;
  align-items: flex-start !important;
  overflow-x: auto !important;
  padding-bottom: 10px !important;
  /* Custom scrollbar — subtle */
  scrollbar-width: thin;
  scrollbar-color: var(--gw-line) transparent;
}
.kanban::-webkit-scrollbar { height: 5px; }
.kanban::-webkit-scrollbar-track { background: transparent; }
.kanban::-webkit-scrollbar-thumb { background: var(--gw-line); border-radius: 3px; }

/* Each column: fixed min-width so headers never wrap */
.kanban-col {
  flex: 0 0 300px !important;         /* fixed 300px — never shrinks, never bloats */
  width: 300px !important;
  max-width: 300px !important;
  min-width: 0 !important;            /* flex child min-width override */
  box-sizing: border-box !important;
  background: var(--gw-surface-2) !important;
  border: 1px solid var(--gw-line) !important;
  border-radius: 14px !important;
  padding: 14px 12px !important;
}

/* Column header: single line, compact */
.kanban-col > h3 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--gw-muted) !important;
  margin: 0 0 10px !important;
  gap: 6px !important;
  white-space: nowrap !important;     /* NEVER let stage name wrap to 2 lines */
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ── 2. Opp card: clean block layout, no ::before clip ── */
.opp-card {
  display: block !important;
  position: relative !important;
  background: var(--gw-surface) !important;
  border: 1px solid var(--gw-line) !important;
  border-radius: 10px !important;
  padding: 12px 13px !important;
  margin-bottom: 8px !important;
  cursor: pointer !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  transition: box-shadow .13s, border-color .13s, transform .1s !important;
  overflow: hidden !important;         /* needed for ::before accent bar */
}
.opp-card:last-child { margin-bottom: 0 !important; }
.opp-card:hover {
  box-shadow: var(--gw-shadow-sm) !important;
  border-color: var(--gw-pine-muted) !important;
  transform: translateY(-1px) !important;
}

/* Accent bar — via ::before stays INSIDE rounded corners */
.opp-card::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 3px !important;
  background: transparent !important;
  border-radius: 10px 0 0 10px !important;
  transition: background .13s !important;
}
.opp-card:hover::before            { background: var(--gw-emerald) !important; }
.opp-card.opp-overdue::before      { background: #C97B6A !important; }
.opp-card.opp-stale::before        { background: var(--gw-amber, #C4922A) !important; }

/* Remove old border-left overdue/stale — use ::before instead */
.opp-overdue,
.opp-stale {
  border-left-width: 1px !important;  /* reset to normal border, ::before handles accent */
}

/* Opp card internal layout */
.opp-card-top {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin-bottom: 3px !important;
  flex-wrap: nowrap !important;
}
.opp-card h3 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--gw-ink) !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  word-break: break-word !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.urgency-badge {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .05em !important;
  padding: 2px 6px !important;
  border-radius: 20px !important;
  margin-top: 1px !important;
}
.urgency-badge.overdue { background: #FAE8E4 !important; color: #8B3A2A !important; border: 1px solid #F5D5C8 !important; }
.urgency-badge.stale   { background: #FAF6E8 !important; color: #7A5C10 !important; border: 1px solid #F5E8C0 !important; }
.opp-project {
  font-size: 11.5px !important;
  color: var(--gw-muted) !important;
  margin: 0 0 8px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  word-break: break-word !important;
}
.opp-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
}
.opp-value {
  margin-left: auto !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--gw-emerald) !important;
}

/* ── 3. Due Now section: compact oppCard styling ── */
/* When oppCard appears inside the Today "Due Now" card, make it leaner */
.card .opp-card {
  border-radius: 10px !important;
  margin-bottom: 8px !important;
  padding: 12px 14px 12px 16px !important;
}
.card .opp-card:last-child { margin-bottom: 0 !important; }

/* ── 4. Fix mini-row blank space — tighten the grid ── */
/* The blank space comes from mini-row-meta being placed at grid-row:3
   while col 2 of row 2 is empty. Fix: use align-items:start not center. */
.mini-row {
  align-items: start !important;
  gap: 2px 10px !important;
  padding: 10px 14px !important;
}

/* meta row: no forced grid-row, just flow naturally */
.mini-row-meta {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;         /* remove forced row 3 — flow naturally */
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 4px !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
}

/* Strong (name) and status-chip on same row */
.mini-row strong {
  align-self: center !important;
}
.mini-row .status-chip {
  align-self: center !important;
  margin-top: 0 !important;
}

/* Overdue indicator: left accent bar instead of border-left (no corner clash) */
.mini-row.mini-row-overdue {
  border-left: none !important;      /* remove the misaligned 3px border */
  border: 1px solid rgba(201,123,106,.35) !important;
  background: rgba(201,123,106,.04) !important;
  position: relative !important;
}
.mini-row.mini-row-overdue::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 3px !important;
  background: #C97B6A !important;
  border-radius: 3px 0 0 3px !important;
}

/* ── END SECTION 37 ───────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════════
   38. ROUND-4 POLISH — User Management rows, OAuth input, Commission form inputs
   2026-06-28 gw6
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 1. User Management: compact user rows ─────────────────────────────── */
/* The .gw-um-user-row had an extra flex layout applied via inline style that
   doubled padding. Override here so the main row div uses the expected height. */
.gw-um-user-row {
  display: block !important;         /* override flex — let inner divs handle layout */
  padding: 0 !important;
  background: var(--gw-surface) !important;
  border: 1px solid var(--gw-line) !important;
  border-radius: 10px !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
}

/* Main row: name + badges + buttons — keeps its flex layout */
.gw-um-user-row > div:first-child {
  padding: 12px 16px !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

/* Google status strip: tighter padding */
.gw-um-user-row > div:last-child {
  padding: 6px 16px !important;
}

/* ── 2. "Google not connected" — better contrast ───────────────────────── */
/* color:#5C6B58 on cream is barely readable; lift to ink-muted */
.gw-um-user-row span[style*="color:#5C6B58"] {
  color: var(--gw-ink) !important;
  opacity: 0.65 !important;
}

/* ── 3. Google OAuth Client ID input — fix excessive width ─────────────── */
/* The input wrapper has flex:1;min-width:220px — cap the input max-width */
#um-ws-client-id {
  max-width: 480px !important;
  flex: 1 1 220px !important;
}

/* ── 4. gw-info-strip label contrast: emoji pencil label was faint ─────── */
.gw-info-strip [style*="color:#5C6B58"],
.gw-info-strip [style*="color: #5C6B58"] {
  color: var(--gw-ink) !important;
  opacity: 0.6 !important;
}

/* ── 5. Commission form: gw-input-sm sizing in commission panels ───────── */
/* Small % and $ inputs were cramped (width:48px clips numbers). Ensure
   adequate width and consistent padding, especially the Cap $ inputs. */
.gw-comm-panel .gw-input-sm,
.gw-sim-panel .gw-input-sm {
  padding: 5px 8px !important;
  min-width: 52px !important;
  box-sizing: border-box !important;
}

/* Tier table % inputs — 60px is fine, ensure it's honoured */
.gw-comm-panel table .gw-input-sm {
  width: 62px !important;
  min-width: 52px !important;
}

/* Recurring row cap/bonus inputs — these were clipping at right */
.gw-comm-panel .gw-label {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.gw-comm-panel .gw-label .gw-input-sm[id$="-cap"] {
  width: 68px !important;
  min-width: 60px !important;
}

.gw-comm-panel .gw-label .gw-input-sm[id$="-bonus"] {
  width: 62px !important;
  min-width: 54px !important;
}

/* Soft approval / hard cap inputs below tier table */
#cr-soft-cap, #cr-hard-cap {
  width: 88px !important;
  min-width: 72px !important;
}

/* ── 6. Commission headings on cream bg: ensure icon+text are aligned ──── */
/* The gwIcon SVG sits inline — align-items keeps the row tidy */
.gw-comm-panel > div > div > div[style*="font-size:14px"],
.gw-sim-header > div > div[style*="font-size:14px"] {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ── END SECTION 38 ───────────────────────────────────────────────────────── */
