:root{
  --forest:#173f31;
  --forest-2:#0e2f25;
  --green:#2f7f57;
  --green-soft:#e6f2eb;
  --mint:#dff0e6;
  --navy:#15263e;
  --navy-soft:#e7edf4;
  --gold:#d8b15a;
  --gold-soft:#f6eddb;
  --ink:#18232f;
  --muted:#667481;
  --line:#dfe7e2;
  --bg:#f4f7f5;
  --panel:#ffffff;
  --danger:#a83b3b;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:var(--bg);color:var(--ink);
}
a{color:inherit;text-decoration:none}
.staging{
  min-height:38px;background:#f2d995;color:#2b2a24;
  display:flex;align-items:center;justify-content:center;gap:10px;
  font-size:12px;letter-spacing:.01em;border-bottom:1px solid #dfc97d;
  position:sticky;top:0;z-index:50;padding:8px 18px
}
.staging-icon{font-size:15px}.staging-sep{height:16px;width:1px;background:rgba(0,0,0,.18)}
.app-shell{min-height:calc(100vh - 38px);display:flex}
.sidebar{
  width:246px;flex:0 0 246px;
  background:linear-gradient(180deg,#163f31 0%,#112f27 100%);
  color:#fff;position:relative;overflow:hidden;min-height:calc(100vh - 38px)
}
.sidebar-brand{display:flex;align-items:center;gap:11px;padding:24px 18px 18px;border-bottom:1px solid rgba(255,255,255,.08)}
.brand-logo{width:43px;height:50px;filter:drop-shadow(0 4px 12px rgba(0,0,0,.18))}
.brand-name{font-family: Georgia, "Times New Roman", serif;font-weight:700;font-size:20px;letter-spacing:.01em}
.brand-sub{font-size:8px;letter-spacing:.22em;color:#96c6aa;margin-top:2px}
.sidebar-nav{padding:13px 12px;display:grid;gap:4px;position:relative;z-index:2}
.nav-link{
  display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:8px;
  color:#d8e6df;font-size:13px;font-weight:600;transition:.15s ease
}
.nav-link:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-link.active{background:#245f47;color:#fff;box-shadow:inset 3px 0 0 var(--gold)}
.nav-icon{width:18px;text-align:center;color:#b9d6c6;font-size:16px}
.sidebar-art{position:absolute;left:-35px;bottom:-38px;width:250px;height:180px;opacity:.11;transform:rotate(-8deg)}
.sidebar-art span{position:absolute;width:100px;height:180px;border-radius:100% 0 100% 0;background:#97c7a7;transform-origin:bottom center}
.sidebar-art span:nth-child(1){left:35px;transform:rotate(-25deg)}
.sidebar-art span:nth-child(2){left:85px;transform:rotate(12deg)}
.sidebar-art span:nth-child(3){left:130px;transform:rotate(42deg)}
.main{flex:1;min-width:0}
.topbar{
  height:76px;background:#fff;border-bottom:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;padding:0 26px;
  position:sticky;top:38px;z-index:20
}
.topbar-kicker{font-size:8px;letter-spacing:.22em;color:var(--green);font-weight:800}
.topbar h1{font-family:Georgia,"Times New Roman",serif;margin:2px 0 0;font-size:27px;color:var(--navy)}
.account-chip{display:flex;align-items:center;gap:10px}
.avatar{
  width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
  background:var(--navy);color:#fff;font-weight:800;font-size:13px
}
.account-copy{display:flex;flex-direction:column;line-height:1.2}
.account-copy strong{font-size:12px}.account-copy span{font-size:10px;color:var(--muted);margin-top:2px}
.signout{font-size:11px;color:var(--green);font-weight:700;margin-left:8px}
.hero{
  min-height:240px;background:linear-gradient(90deg,#fff 0%,#fff 47%,#eef5f0 100%);
  display:grid;grid-template-columns:minmax(320px,1fr) minmax(420px,1.25fr);
  border-bottom:1px solid var(--line);position:relative;overflow:hidden
}
.hero-copy{padding:50px 42px;display:flex;flex-direction:column;justify-content:center}
.eyebrow{font-size:9px;letter-spacing:.24em;color:var(--green);font-weight:800;margin-bottom:8px}
.hero-copy h2{font-family:Georgia,"Times New Roman",serif;font-size:34px;line-height:1.08;margin:0;color:var(--navy)}
.hero-copy p{max-width:530px;color:var(--muted);font-size:14px;line-height:1.55;margin:13px 0 0}
.hero-visual{
  position:relative;min-height:240px;
  background:
    radial-gradient(circle at 70% 25%,rgba(255,255,255,.78),transparent 15%),
    linear-gradient(115deg,rgba(255,255,255,.95) 0%,rgba(255,255,255,.18) 30%,rgba(11,61,41,.12) 100%),
    linear-gradient(180deg,#bcd8c4 0%,#79a985 44%,#4e7a58 58%,#6f9e67 60%,#3f6a45 100%);
}
.hero-visual:before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(ellipse at 78% 70%,rgba(36,93,61,.42) 0 8%,transparent 9%),
    radial-gradient(ellipse at 63% 66%,rgba(40,102,68,.36) 0 10%,transparent 11%),
    radial-gradient(ellipse at 52% 66%,rgba(37,94,61,.28) 0 7%,transparent 8%);
  filter:blur(2px)
}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.12) 35%,rgba(12,48,35,.16) 100%)}
.hero-message{
  position:absolute;right:8%;top:38%;z-index:2;text-align:left;color:#fff;
  font-family:Georgia,"Times New Roman",serif;font-size:19px;line-height:1.45;letter-spacing:.08em;text-shadow:0 2px 8px rgba(0,0,0,.28)
}
.hero-message span{font-size:17px}
.hero-message:after{content:"";display:block;width:52px;height:2px;background:var(--gold);margin-top:12px}
.hero-route{position:absolute;right:20%;bottom:23px;width:160px;height:42px;border-bottom:2px dashed rgba(255,255,255,.38);border-radius:50%}
.content{padding:28px}
.dashboard-content{background:linear-gradient(180deg,#f6f8f6 0%,#fff 100%);min-height:420px;position:relative}
.dashboard-content:after{
  content:"";position:absolute;right:1%;bottom:-80px;width:320px;height:320px;
  border-radius:70% 0 70% 0;background:#eef4ef;opacity:.7;transform:rotate(-24deg);z-index:0
}
.dashboard-grid{
  position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px
}
.dash-card{
  min-height:190px;background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:23px 20px 20px;display:grid;grid-template-columns:46px 1fr 28px;gap:13px;align-items:start;
  position:relative;overflow:hidden;box-shadow:0 7px 18px rgba(23,49,39,.055);
  transition:transform .15s ease,box-shadow .15s ease
}
.dash-card:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(23,49,39,.09)}
.dash-card:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:var(--green)}
.card-icon{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft);color:var(--green);font-size:19px;font-weight:800}
.card-body h3{font-family:Georgia,"Times New Roman",serif;margin:3px 0 10px;color:var(--navy);font-size:18px}
.card-body p{font-size:12px;line-height:1.45;color:var(--muted);margin:0;max-width:210px}
.card-heading-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.pill{font-size:8px;letter-spacing:.12em;background:#dff2e5;color:#257349;border-radius:999px;padding:4px 7px;font-weight:900}
.card-arrow{align-self:center;justify-self:end;width:26px;height:26px;border-radius:50%;background:#eef2ef;display:grid;place-items:center;color:#607067;font-size:20px}
.watermark{position:absolute;left:14px;bottom:4px;font-size:52px;color:#e9f0eb;opacity:.8;line-height:1}
.status-card:before,.scheduling-card:before{background:var(--green)}
.sales-card:before{background:var(--navy)}
.sales-card .card-icon{background:var(--navy-soft);color:var(--navy)}
.production-card:before{background:var(--gold)}
.production-card .card-icon{background:var(--gold-soft);color:#a17723}
.scheduling-card .card-icon{background:#e1f1e7;color:#2e7d55}
.coming-soon{position:relative;z-index:2;margin-top:22px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 20px;box-shadow:0 5px 15px rgba(23,49,39,.035)}
.coming-soon div{display:flex;gap:14px;align-items:center}.coming-soon strong{font-family:Georgia,"Times New Roman",serif;color:var(--navy)}.coming-soon span{color:var(--muted);font-size:12px}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:0 4px 14px rgba(23,49,39,.045)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.muted{color:var(--muted)}
label{display:block;font-size:12px;font-weight:800;margin:14px 0 6px}
input,select{width:100%;padding:11px 12px;border:1px solid #cbd7d0;border-radius:8px;background:#fff;color:var(--ink)}
button,.button{display:inline-block;background:var(--green);color:#fff;border:0;border-radius:8px;padding:10px 14px;font-weight:800;cursor:pointer}
.button.secondary,button.secondary{background:#667581}.button.danger,button.danger{background:var(--danger)}
.alert{padding:12px 14px;border-radius:8px;margin:14px 0}.alert.error{background:#fae7e7;color:#7b1d1d}.alert.ok{background:#e3f3e9;color:#185c3e}.alert.warning{background:#fff1c7;color:#705800}
table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line)}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);font-size:13px}th{background:#f8faf9;color:var(--navy)}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#e7eef2;font-size:11px}.badge.active{background:#dff3e8;color:#1e6647}.badge.invited{background:#fff1c7;color:#7a5d00}.badge.disabled{background:#f1dddd;color:#7a2c2c}
.actions{display:flex;gap:8px;flex-wrap:wrap}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#eff5f1,#e2ece5)}
.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:16px;padding:30px;box-shadow:0 20px 50px rgba(18,58,43,.12)}
.login-brand{text-align:center;margin-bottom:24px}.login-brand .brand-mark{display:none}
.login-brand h2{font-family:Georgia,"Times New Roman",serif;color:var(--navy);font-size:28px;margin-bottom:5px}
.small{font-size:12px}.narrow{max-width:960px}
.checkgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}.check{display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff;font-weight:500;margin:0}.check input{width:auto}
.table-wrap{overflow-x:auto}.two-col{display:grid;grid-template-columns:240px 1fr;gap:18px}
@media(max-width:1180px){.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{grid-template-columns:1fr 1fr}}
@media(max-width:850px){
  .sidebar{width:78px;flex-basis:78px}.brand-copy,.nav-link span:last-child{display:none}.sidebar-brand{justify-content:center;padding-left:8px;padding-right:8px}.brand-logo{width:42px}
  .nav-link{justify-content:center}.hero{grid-template-columns:1fr}.hero-visual{min-height:160px}.dashboard-grid{grid-template-columns:1fr}.account-copy{display:none}.topbar{padding:0 16px}.content{padding:18px}
}


/* Service Hub branding refresh */
.sidebar-brand{
  gap:10px;
}
.brand-logo{
  width:48px;
  height:48px;
  object-fit:contain;
  flex:0 0 48px;
}
.brand-name{
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  line-height:1.02;
  color:#fff;
}
.brand-copy{
  display:flex;
  align-items:center;
}
.service-hero{
  width:100%;
  background:#fff;
  border-bottom:1px solid var(--line);
  overflow:hidden;
}
.service-hero img{
  display:block;
  width:100%;
  height:auto;
  max-height:480px;
  object-fit:cover;
  object-position:center center;
}
.topbar-page h1{
  font-size:30px;
}
@media(max-width:850px){
  .service-hero img{
    min-height:210px;
    object-fit:cover;
    object-position:center center;
  }
  .topbar-page h1{
    font-size:23px;
  }
}


/* Compact global workspace header v2.2
   The active section is primarily identified by the highlighted left navigation. */
:root{
  --hub-staging-height:32px;
  --hub-topbar-height:44px;
}
.staging{
  min-height:var(--hub-staging-height);
  height:var(--hub-staging-height);
  padding:5px 14px;
  font-size:11px;
}
.app-shell{
  min-height:calc(100vh - var(--hub-staging-height));
}
.sidebar{
  min-height:calc(100vh - var(--hub-staging-height));
  height:calc(100vh - var(--hub-staging-height));
  position:sticky;
  top:var(--hub-staging-height);
}
.topbar.service-compact-topbar{
  height:var(--hub-topbar-height);
  min-height:var(--hub-topbar-height);
  padding:0 18px;
  top:var(--hub-staging-height);
}
.topbar.service-compact-topbar .topbar-page{
  min-width:0;
  width:100%;
}
.topbar.service-compact-topbar .topbar-page h1{
  margin:0;
  font-size:20px;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar.service-compact-topbar + *{
  scroll-margin-top:calc(var(--hub-staging-height) + var(--hub-topbar-height));
}
@media(max-width:850px){
  :root{
    --hub-staging-height:30px;
    --hub-topbar-height:40px;
  }
  .staging{
    padding:4px 8px;
    font-size:9px;
    gap:6px;
  }
  .staging span:last-child{
    display:none;
  }
  .topbar.service-compact-topbar{
    padding:0 12px;
  }
  .topbar.service-compact-topbar .topbar-page h1{
    font-size:17px;
  }
}


/* Phase 2 Rev 2: branch-aware + isolated routing */
.branch-picker-page{max-width:1050px}
.branch-picker-head{margin-bottom:22px}
.branch-picker-head h2,.branch-module-intro h2{
  margin:5px 0 7px;
  font-family:Georgia,"Times New Roman",serif;
  color:var(--navy);
  font-size:32px;
}
.branch-picker-head p,.branch-module-intro p{color:var(--muted);margin:0}
.branch-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.branch-card{
  min-height:170px;background:#fff;border:1px solid var(--line);border-radius:14px;
  box-shadow:0 8px 22px rgba(23,49,39,.06);padding:24px;
  display:grid;grid-template-columns:62px 1fr 32px;align-items:center;gap:16px;
  transition:.16s ease
}
.branch-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(23,49,39,.10);border-color:#bfd5c6}
.branch-card-badge{
  width:58px;height:58px;border-radius:50%;display:grid;place-items:center;
  background:var(--forest);color:#fff;font-family:Georgia,"Times New Roman",serif;
  font-size:20px;font-weight:700
}
.branch-card small{font-size:9px;letter-spacing:.18em;color:var(--green);font-weight:800}
.branch-card h3{font-family:Georgia,"Times New Roman",serif;font-size:24px;color:var(--navy);margin:3px 0}
.branch-card p{font-size:12px;color:var(--muted);margin:0}
.branch-card-arrow{font-size:32px;color:var(--green)}
.branch-context{
  display:flex;align-items:center;justify-content:space-between;gap:15px;
  border:1px solid var(--line);background:#fff;border-radius:12px;
  padding:11px 14px;margin-bottom:24px
}
.branch-current{display:flex;align-items:center;gap:10px}
.branch-current small{display:block;font-size:8px;letter-spacing:.14em;color:var(--muted);font-weight:800}
.branch-current strong{display:block;color:var(--navy);font-size:16px;margin-top:1px}
.branch-dot{width:10px;height:10px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px var(--green-soft)}
.branch-switch{display:flex;gap:5px;background:#f1f5f2;padding:4px;border-radius:9px}
.branch-switch a{padding:7px 10px;border-radius:7px;font-size:11px;font-weight:800;color:var(--muted)}
.branch-switch a.selected{background:var(--forest);color:#fff}
.branch-module-intro{margin-bottom:20px}
.tool-card-grid,.placeholder-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.tool-card{
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;min-height:145px;
  display:grid;grid-template-columns:42px 1fr 22px;gap:11px;align-items:start;
  box-shadow:0 5px 15px rgba(23,49,39,.04)
}
.tool-icon{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft);color:var(--green);font-weight:800}
.tool-card h3,.placeholder-card h3{font-family:Georgia,"Times New Roman",serif;color:var(--navy);margin:2px 0 7px}
.tool-card p,.placeholder-card p{font-size:12px;line-height:1.45;color:var(--muted);margin:0}
.tool-card b{font-size:24px;color:var(--green)}
.muted-tool{opacity:.72}
.placeholder-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px}
.placeholder-card small{font-size:8px;letter-spacing:.16em;color:var(--green);font-weight:900}
.mobile-ready-note,.desktop-required,.routing-isolation-banner{
  border:1px solid #cfe2d5;background:#edf7f1;border-radius:10px;padding:13px 15px;margin:0 0 18px;
  display:flex;gap:11px;align-items:center
}
.mobile-ready-note strong,.routing-isolation-banner strong{color:var(--green)}
.mobile-ready-note span,.routing-isolation-banner span{font-size:12px;color:var(--muted)}
.routing-isolation-banner{justify-content:space-between;border-color:#b8d7c3;background:#f1f8f4}
@media(max-width:850px){
  .branch-card-grid,.tool-card-grid,.placeholder-grid{grid-template-columns:1fr}
  .branch-card{min-height:130px;padding:18px;grid-template-columns:52px 1fr 24px}
  .branch-card-badge{width:48px;height:48px;font-size:17px}
  .branch-context,.routing-isolation-banner{align-items:flex-start;flex-direction:column}
  .branch-switch{width:100%}
  .branch-switch a{flex:1;text-align:center}
  .branch-picker-head h2,.branch-module-intro h2{font-size:26px}
}



/* Service Hub workspace v2.3 — no white page-title bar */
:root{
  --hub-staging-height:30px;
  --hub-topbar-height:0px;
}
.staging{
  min-height:var(--hub-staging-height);
  height:var(--hub-staging-height);
  padding:4px 12px;
  font-size:10px;
}
.app-shell{
  min-height:calc(100vh - var(--hub-staging-height));
}
.main.service-workspace-main{
  min-width:0;
  min-height:calc(100vh - var(--hub-staging-height));
  height:auto;
  overflow:visible;
}
.sidebar{
  min-height:calc(100vh - var(--hub-staging-height));
  height:calc(100vh - var(--hub-staging-height));
  position:sticky;
  top:var(--hub-staging-height);
}
.topbar,
.service-compact-topbar{
  display:none!important;
}
.content{
  padding-top:18px;
}

/* Branch picker and branch module screens should retain their visual cards. */
.branch-picker-page,
.branch-module-page{
  width:min(1180px,100%);
  box-sizing:border-box;
}
.branch-picker-page{
  padding-top:22px;
}
.branch-card{
  text-decoration:none;
  color:inherit;
}
.tool-card{
  text-decoration:none;
  color:inherit;
}

/* Keep the active working section obvious in the left nav. */
.service-nav-link.active,
.service-nav-group>summary.active{
  background:#286349!important;
  color:#fff!important;
  box-shadow:inset 3px 0 0 #d8b15a!important;
}

@media(max-width:850px){
  :root{--hub-staging-height:28px}
  .staging{font-size:9px;padding:3px 7px}
  .staging span:last-child{display:none}
  .content{padding-top:12px}
}
