@font-face{font-family:"MunchWelt Fredoka";src:url("/assets/fonts/Fredoka-Variable.ttf") format("truetype");font-weight:300 700;font-style:normal;font-display:swap}
@font-face{font-family:"MunchWelt Wondercity";src:url("/assets/fonts/Wondercity.otf") format("opentype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"MunchWelt Alfa";src:url("/assets/fonts/AlfaSlabOne-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
:root{--display:"MunchWelt Alfa",Rockwell,serif;--body:"MunchWelt Fredoka","Trebuchet MS",sans-serif;--accent:"MunchWelt Wondercity","MunchWelt Fredoka",sans-serif}
img.logo-mark{display:block;object-fit:contain;background:transparent;padding:0;border-radius:0}
.brand strong{font-family:var(--accent);font-weight:400}
.hero:after{content:"";width:265px;height:265px;right:28px;top:28px;background:url("/assets/mampfi.svg") center/contain no-repeat;transform:rotate(3deg);filter:drop-shadow(7px 7px 0 #3f3f3f33)}
.auth-art:after{width:280px;height:280px;left:auto;right:5%;bottom:3%;border-radius:0;background:url("/assets/mampfi.svg") center/contain no-repeat;z-index:1;transform:rotate(-7deg)}
@media(max-width:1050px){.hero:after{width:205px;height:205px;right:12px;top:38px}}
@media(max-width:760px){.hero:after{width:155px;height:155px;right:-10px;top:28px}.hero h2{max-width:82%}}

/* Responsive safeguards for long German labels and financial values. */
html,body{max-width:100%;overflow-x:hidden}
.kpi strong{font-size:clamp(32px,3.2vw,46px);white-space:nowrap}
.visit-lead h2{overflow-wrap:anywhere;hyphens:auto}
@media(max-width:760px){
  .topbar>div{min-width:0}
  .topbar h1{max-width:calc(100vw - 74px);font-size:clamp(21px,7vw,27px);overflow-wrap:anywhere}
  .visit-lead h2{font-size:clamp(34px,11vw,46px);line-height:.92}
  .kpi strong{font-size:clamp(26px,9vw,34px)}
  .bottom-nav{max-width:100vw}
}

/* Product polish and accessibility layer. */
body{line-height:1.45;-webkit-font-smoothing:antialiased}
.sidebar nav a{color:#fffde9d9}
.sidebar nav a:hover,.sidebar nav a:focus-visible{background:#ffffff12;color:var(--white)}
.sidebar nav a.active:after{content:"\2192"}
.n8n-link:hover,.n8n-link:focus-visible{background:#ffffff12}
.kpis{grid-template-columns:repeat(4,minmax(180px,1fr))}
.kpi{min-width:0;overflow:hidden}
.kpi strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.kpi small{line-height:1.35;overflow-wrap:anywhere}
.list-row{min-height:64px}
.list-row h3{font-size:16px;line-height:1.25}
.list-row p{line-height:1.45}
.list-row:focus-within{background:var(--cream)}
.toolbar{gap:12px;padding:16px}
label{line-height:1.35}
input:hover,select:hover,textarea:hover{border-color:#171717}
input:focus,select:focus,textarea:focus{box-shadow:inset 0 -4px var(--yellow);outline:2px solid var(--charcoal);outline-offset:1px}
input::placeholder,textarea::placeholder{color:#3f3f3f99;opacity:1}
.button:focus-visible,.icon-button:focus-visible{outline:3px solid var(--peach);outline-offset:3px}
.button:active{transform:translate(0,0);box-shadow:none}
.visit-lead:after{content:"\2192"}
.visit-lead p{max-width:58ch;font-size:16px;line-height:1.55}
.visit-actions a,.visit-actions button{display:flex;align-items:center;justify-content:center;min-height:50px;line-height:1.25}
.strategy p{max-width:70ch}
dialog{overscroll-behavior:contain}
.dialog-head{position:sticky;top:0;z-index:2;gap:16px}
.dialog-head h2{line-height:1.1;overflow-wrap:anywhere}
#modal-body{padding:30px}
.form-grid{row-gap:20px;column-gap:18px}
.muted,.form-help{color:#66635c}
.pill{line-height:1.2}

@media(max-width:1200px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kpi strong{font-size:clamp(32px,5vw,44px)}
}

@media(max-width:760px){
  body{font-size:16px}
  .sidebar{overflow-y:auto;overscroll-behavior:contain}
  .sidebar nav a{min-height:48px;font-size:15px}
  .topbar h1{line-height:1.05}
  .hero{min-height:330px}
  .hero h2{font-size:clamp(37px,12vw,46px);line-height:.94;overflow-wrap:anywhere;hyphens:auto}
  .hero p:not(.eyebrow){font-size:16px;line-height:1.55}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kpi{min-height:108px;padding:14px}
  .kpi strong{font-size:clamp(24px,8.5vw,32px)}
  .kpi small{font-size:8px;letter-spacing:.08em}
  .section-title{align-items:flex-start;gap:12px}
  .section-title h2{font-size:clamp(21px,7vw,26px);line-height:1.05;overflow-wrap:anywhere}
  .list-row{padding:17px 10px}
  .list-row>*{margin-top:7px}
  .list-row h3{font-size:17px}
  .visit-lead{min-height:auto;padding:28px 20px 24px}
  .visit-lead:after{right:14px;font-size:94px}
  .visit-lead h2{margin-top:36px;max-width:95%}
  .visit-lead p{font-size:16px;line-height:1.6}
  .visit-actions{gap:10px}
  .strategy{padding:19px 17px}
  .strategy p{font-size:15px;line-height:1.6}
  .bottom-nav a{min-width:0;padding:7px 2px}
  .bottom-nav small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}
  dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);box-shadow:5px 5px 0 var(--charcoal)}
  .dialog-head{padding:16px}
  .dialog-head h2{font-size:23px}
  #modal-body{padding:20px 16px;max-height:calc(100dvh - 82px)}
  .form-grid{gap:18px}
}

@media(max-width:390px){
  .view{padding-left:10px;padding-right:10px}
  .kpi{padding:12px;min-height:104px}
  .kpi strong{font-size:clamp(22px,8vw,29px)}
  .hero{padding-left:18px;padding-right:18px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
  .button:hover,.lead-card:hover{transform:none}
}
/* UI/UX Pro Max accessibility and interaction baseline */
.skip-link{position:fixed;z-index:9999;top:8px;left:8px;padding:12px 16px;background:#3f3f3f;color:#fbf8d0;border:2px solid #efeb8b;transform:translateY(-160%);transition:transform 180ms ease}
.skip-link:focus{transform:translateY(0)}
button,.button,[role="button"],nav a{min-height:44px}
button:active,.button:active,[role="button"]:active{opacity:.78}
html{overscroll-behavior:contain}
@media (prefers-reduced-motion:reduce){.skip-link{transition:none}}

/* 2026 premium CRM system — Brandbook + UI Pro Max */
:root{
  --surface:#fffef6;
  --surface-strong:#ffffff;
  --ink:#30302f;
  --hairline:rgba(63,63,63,.18);
  --elevated:0 14px 40px rgba(63,63,63,.09),0 2px 8px rgba(63,63,63,.05);
  --elevated-hover:0 18px 48px rgba(63,63,63,.13),0 3px 10px rgba(63,63,63,.07);
  --radius-lg:18px;
  --radius-md:12px;
}
body{background:linear-gradient(135deg,#fffef7 0%,#fbf8d0 160%);color:var(--ink)}
.app{background:transparent}
.sidebar{padding:30px 18px 22px;border-right:0;box-shadow:8px 0 30px rgba(25,25,25,.12)}
.brand{margin:0 7px 28px;padding:8px;border-radius:12px}
.sidebar nav{gap:6px}
.sidebar nav a{min-height:48px;border:0;border-radius:11px;padding:11px 13px;color:rgba(255,254,235,.78)}
.sidebar nav a:hover,.sidebar nav a:focus-visible{padding-left:17px;background:rgba(255,255,255,.09)}
.sidebar nav a.active{padding-left:17px;background:var(--yellow);box-shadow:0 8px 22px rgba(0,0,0,.18)}
.sidebar nav a.active:after{right:15px}
.sidebar-foot{margin:18px 7px 0;padding-top:18px}
.n8n-link{border-radius:10px}
.topbar{min-height:96px;padding:16px clamp(24px,3.6vw,58px);background:rgba(255,254,246,.92);border-bottom:1px solid var(--hairline);backdrop-filter:blur(16px)}
.topbar h1{font-size:clamp(30px,3vw,43px);letter-spacing:-.025em}
.topbar #page-subtitle{font-size:13px;color:rgba(63,63,63,.66)}
.top-actions{gap:10px}
.health{border-color:var(--hairline);background:var(--surface-strong);border-radius:999px;box-shadow:0 4px 15px rgba(63,63,63,.05)}
.view{padding:clamp(28px,3.8vw,58px);max-width:1520px;min-height:calc(100vh - 96px)}
.hero{min-height:300px;padding:clamp(32px,5vw,64px);border:1px solid var(--hairline);border-radius:var(--radius-lg);box-shadow:var(--elevated);background:linear-gradient(118deg,var(--cream) 0%,#fffde9 58%,var(--yellow) 140%)}
.hero:before{border:0;opacity:.72;filter:blur(2px)}
.hero:after{right:38px;filter:drop-shadow(0 16px 20px rgba(63,63,63,.18))}
.hero h2{font-size:clamp(44px,5.4vw,76px);letter-spacing:-.035em}
.hero .eyebrow{border-radius:999px;padding:7px 12px;letter-spacing:.09em}
.hero-actions{gap:12px;margin-top:24px}
.button{min-height:46px;border-radius:10px;padding-inline:18px;transition:transform 180ms ease,box-shadow 180ms ease,background 180ms ease,opacity 180ms ease}
.button:hover{transform:translateY(-1px)}
.button.primary,.button.forest{box-shadow:0 7px 18px rgba(63,63,63,.16)}
.icon-button{border-radius:10px}
.kpis{gap:14px;margin:24px 0 36px}
.card{border:1px solid var(--hairline);border-radius:var(--radius-md);background:rgba(255,255,255,.78);box-shadow:0 7px 24px rgba(63,63,63,.055)}
.kpi{position:relative;min-height:126px;padding:21px;overflow:hidden;background:var(--surface-strong)!important}
.kpi:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:var(--yellow)}
.kpi:nth-child(2):before{background:var(--sage)}
.kpi:nth-child(3):before{background:var(--peach)}
.kpi:nth-child(4):before{background:var(--charcoal)}
.kpi small{font-size:10px;color:rgba(63,63,63,.62)}
.kpi strong{font-size:clamp(34px,3.3vw,48px);letter-spacing:-.03em;color:var(--ink)}
.section-title{margin:38px 0 16px;padding:0 2px 12px;border-color:var(--hairline)}
.section-title h2{font-size:clamp(24px,2.2vw,31px)}
.section-title a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px;text-underline-offset:4px}
.list{display:grid;gap:9px}
.list-row{min-height:74px;padding:16px 18px;border:1px solid var(--hairline);border-radius:var(--radius-md);background:rgba(255,255,255,.76);box-shadow:0 4px 16px rgba(63,63,63,.035);transition:background 180ms ease,border-color 180ms ease,box-shadow 180ms ease,transform 180ms ease}
.list-row:hover,.list-row:focus-visible{background:var(--surface-strong);border-color:rgba(63,63,63,.35);box-shadow:var(--elevated);transform:translateY(-1px)}
.list-row h3{font-size:17px}
.list-row p{font-size:13px;color:rgba(63,63,63,.62)}
.pill{border-radius:999px;padding:6px 10px;border-color:rgba(63,63,63,.35)}
.toolbar{gap:12px;margin-bottom:20px;padding:14px;border:1px solid var(--hairline);border-radius:var(--radius-md);background:rgba(255,255,255,.74);box-shadow:0 5px 22px rgba(63,63,63,.05)}
input,select,textarea{border-color:var(--hairline);border-radius:9px;background:#fff;min-height:46px}
textarea{min-height:120px}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px rgba(239,235,139,.65);outline:2px solid var(--charcoal);outline-offset:0}
.empty{min-height:190px;border:1px dashed rgba(63,63,63,.25);border-radius:var(--radius-md);background:rgba(255,255,255,.48);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}
.empty h3{font-family:var(--display);font-size:24px;text-transform:uppercase;margin:0 0 8px}
.detail-grid{gap:16px}
.detail-grid>.card{min-height:178px;padding:26px}
.timeline-item{border-color:var(--hairline)}
dialog{border:1px solid var(--hairline);border-radius:18px;box-shadow:0 30px 90px rgba(30,30,30,.28)}
.dialog-head{border-color:var(--hairline);background:linear-gradient(110deg,var(--cream),#fffef2)}
dialog::backdrop{background:rgba(34,34,32,.58);backdrop-filter:blur(8px)}
.toasts .toast,.toast{border-radius:12px;box-shadow:var(--elevated)}

@media(max-width:760px){
  .sidebar{box-shadow:14px 0 36px rgba(25,25,25,.25)}
  .topbar{min-height:76px;padding:10px 12px}
  .view{padding:18px 12px 94px}
  .hero{min-height:350px;padding:25px 20px;border-radius:15px;box-shadow:0 10px 30px rgba(63,63,63,.1)}
  .hero:after{right:-8px;top:23px;opacity:.82}
  .hero h2{margin-top:64px;font-size:clamp(38px,12vw,48px)}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .hero-actions>*{width:100%;padding-inline:10px}
  .kpis{gap:9px;margin:18px 0 28px}
  .kpi{min-height:112px;padding:15px 14px 14px 18px;border-radius:11px}
  .kpi:before{width:4px}
  .kpi strong{font-size:clamp(26px,8vw,34px)}
  .section-title{margin-top:30px}
  .list{gap:8px}
  .list-row{padding:16px;border-radius:11px}
  .toolbar{padding:12px;border-radius:11px}
  .bottom-nav{background:rgba(63,63,63,.96);backdrop-filter:blur(14px);border-top:1px solid rgba(255,255,255,.14)}
  .bottom-nav a{min-height:58px;border-radius:9px}
  .bottom-nav a:focus-visible{outline:2px solid var(--yellow);outline-offset:-3px}
  dialog{border-radius:15px}
}

/* Production usability correction: full logo and relaxed brand typography. */
.brand{display:block;padding:10px 12px;margin:0 0 24px;background:var(--cream);border:1px solid rgba(255,255,255,.22);border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.16)}
.brand img.logo-mark{width:178px;height:88px;max-width:100%;object-fit:contain;object-position:center}
.brand>span{display:none}
body{word-spacing:.035em}
.topbar h1,.hero h2,.section-title h2,.card>h3,.empty h3,.detail-head h2,.visit-lead h2,.dialog-head h2{
  letter-spacing:.012em!important;
  word-spacing:.16em;
  line-height:1.04;
}
.hero h2{letter-spacing:.006em!important;word-spacing:.12em}
.sidebar nav a,.button,.list-row h3{letter-spacing:.012em;word-spacing:.065em}

@media(max-width:760px){
  .brand img.logo-mark{width:170px;height:84px}
  .topbar h1,.section-title h2,.card>h3{word-spacing:.1em}
}

/* Login page: spacious brand composition with separated Mampfi and seal. */
.auth{
  min-height:100dvh;
  grid-template-columns:minmax(0,1.12fr) minmax(480px,.88fr);
  background:linear-gradient(135deg,var(--cream),#fffef4);
}
.auth-art{
  isolation:isolate;
  padding:clamp(64px,5.5vw,104px);
  justify-content:center;
}
.auth-art:before{
  width:clamp(340px,31vw,500px);
  height:clamp(340px,31vw,500px);
  right:-10%;
  top:-16%;
  opacity:.98;
}
.auth-kicker{
  left:clamp(64px,5.5vw,104px);
  top:clamp(40px,5.5vh,64px);
  font-size:12px;
  line-height:1.4;
  letter-spacing:.18em;
}
.auth-art>p{
  max-width:100%;
  font:400 clamp(52px,4.6vw,84px)/1.08 var(--display);
  letter-spacing:.008em;
  word-spacing:.14em;
  white-space:nowrap;
}
.auth-art:after{
  width:clamp(190px,15vw,270px);
  height:clamp(190px,15vw,270px);
  right:clamp(40px,5vw,86px);
  bottom:clamp(32px,5.5vh,62px);
  border:2px solid var(--cream);
  border-radius:50%;
  background:var(--cream) url("/assets/mampfi.svg") center/84% no-repeat;
  transform:rotate(-5deg);
  filter:drop-shadow(0 18px 24px rgba(0,0,0,.16));
}
.auth-stamp{
  left:clamp(64px,5.5vw,104px);
  right:auto;
  bottom:clamp(48px,7vh,78px);
  width:142px;
  height:142px;
  padding:20px;
  border:2px solid var(--cream);
  border-radius:50%;
  font:400 17px/1.18 var(--display);
  letter-spacing:.035em;
  word-spacing:.08em;
  transform:rotate(-6deg);
  box-shadow:0 16px 32px rgba(0,0,0,.2);
}
.auth-card{
  width:min(580px,calc(100% - 64px));
  padding:clamp(42px,4vw,64px);
  border:1px solid rgba(63,63,63,.72);
  border-radius:22px;
  background:#fffef7;
  box-shadow:10px 10px 0 var(--charcoal),0 24px 64px rgba(63,63,63,.12);
}
.auth-card>.logo-mark{
  width:104px;
  height:80px;
  margin-bottom:36px;
}
.auth-card>.eyebrow{
  margin:0 0 14px;
  font-size:12px;
  line-height:1.4;
  letter-spacing:.16em;
}
.auth-card h1{
  margin:0 0 22px;
  font:400 clamp(36px,2.6vw,46px)/1.14 var(--display);
  letter-spacing:.012em;
  word-spacing:.14em;
  white-space:nowrap;
}
.auth-card>.muted{
  max-width:38ch;
  margin:0;
  font-size:16px;
  line-height:1.6;
  word-spacing:.06em;
}
.auth-card .stack{
  gap:20px;
  margin-top:32px;
}
.auth-card label{
  display:grid;
  gap:9px;
  font-size:12px;
  line-height:1.4;
  letter-spacing:.08em;
}
.auth-card input{
  min-height:52px;
  padding:12px 16px;
  border-radius:12px;
  font-size:16px;
  line-height:1.4;
}
.auth-card .button{
  min-height:52px;
  margin-top:4px;
  padding-inline:18px;
  border-radius:12px;
}
.auth-card .form-help{
  min-height:22px;
  margin:18px 0 0;
  line-height:1.5;
}

@media(max-width:1180px){
  .auth{
    display:grid;
    grid-template-columns:1fr;
    place-items:center;
    padding:40px 24px;
    background:
      radial-gradient(circle at 12% 12%,var(--yellow) 0 150px,transparent 151px),
      var(--charcoal);
  }
  .auth-art{display:none}
  .auth-card{margin:0}
}

@media(max-width:760px){
  .auth{
    display:grid;
    padding:24px 16px;
    min-height:100dvh;
    background:
      radial-gradient(circle at 5% 4%,var(--yellow) 0 92px,transparent 93px),
      var(--charcoal);
  }
  .auth-card{
    width:min(100%,520px);
    margin:0;
    padding:34px 24px;
    border-radius:18px;
    box-shadow:6px 6px 0 var(--peach),0 18px 44px rgba(0,0,0,.18);
  }
  .auth-card>.logo-mark{width:92px;height:70px;margin-bottom:30px}
  .auth-card h1{font-size:clamp(30px,9vw,42px);line-height:1.12;word-spacing:.1em;white-space:normal}
  .auth-card>.muted{font-size:16px;line-height:1.6}
}

@media(max-width:390px){
  .auth{padding:16px 10px}
  .auth-card{padding:28px 19px}
  .auth-card h1{font-size:clamp(28px,9vw,35px)}
}

/* Stable full-height desktop shell. */
@media(min-width:761px){
  .app{display:block}
  .sidebar{position:fixed;inset:0 auto 0 0;width:264px;height:100dvh;overflow-y:auto}
  .app>main{margin-left:264px;min-width:0}
}

/* Pipeline: all stages at a glance, readable cards in the selected stage. */
.pipeline-board{display:grid;gap:22px;min-width:0}
.pipeline-summary{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:6px;padding:6px;border:1px solid var(--hairline);border-radius:var(--radius-md);background:rgba(255,255,255,.72);box-shadow:var(--elevated)}
.pipeline-stage{position:relative;display:grid;align-content:start;gap:4px;min-width:0;min-height:116px;padding:11px 9px 15px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ink);text-align:left;cursor:pointer;transition:background 180ms ease,border-color 180ms ease,box-shadow 180ms ease}
.pipeline-stage:after{content:"";position:absolute;left:9px;right:9px;bottom:7px;height:3px;border-radius:2px;background:var(--sage);opacity:.45}
.pipeline-stage:hover{background:var(--cream)}
.pipeline-stage.is-active{border-color:var(--charcoal);background:var(--yellow);box-shadow:0 5px 14px rgba(63,63,63,.1)}
.pipeline-stage.is-drop-target{border:2px dashed var(--charcoal);background:var(--peach)}
.pipeline-stage[data-tone="lost"]:after{background:var(--red);opacity:.8}
.pipeline-stage__step{font-size:9px;font-weight:750;opacity:.58;letter-spacing:.08em}
.pipeline-stage__name{min-height:2.7em;font-size:11px;font-weight:750;line-height:1.28;overflow-wrap:anywhere;hyphens:auto}
.pipeline-stage__count{font:400 clamp(23px,2.1vw,31px)/1 var(--display);font-variant-numeric:tabular-nums}
.pipeline-stage__potential{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#66635c}
.pipeline-focus-head{display:flex;align-items:end;justify-content:space-between;gap:16px;border-bottom:1px solid var(--hairline);padding-bottom:12px}
.pipeline-focus-head h2{margin:5px 0 0;font:400 clamp(27px,2.4vw,36px)/1.1 var(--display);text-transform:uppercase}
.pipeline-focus-total{font-size:13px;color:#66635c}
.pipeline-panel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0}
.pipeline-panel>.empty{grid-column:1/-1}
.pipeline-card{display:grid;gap:11px;min-width:0;padding:16px;border:1px solid var(--hairline);border-radius:var(--radius-md);background:var(--surface-strong);box-shadow:0 5px 18px rgba(63,63,63,.06)}
.pipeline-card__top{display:flex;align-items:start;justify-content:space-between;gap:8px}
.pipeline-card h3{margin:0;font-size:16px;line-height:1.3;overflow-wrap:anywhere}
.pipeline-card__meta{margin:0;color:#66635c;font-size:13px;line-height:1.45}
.pipeline-card__facts{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;font-weight:650}
.pipeline-card__actions{display:grid;grid-template-columns:44px 1fr 44px;gap:7px;margin-top:auto}
.pipeline-card__actions>*{display:grid;place-items:center;min-height:44px;border:1px solid var(--hairline);border-radius:9px;background:var(--cream);color:var(--charcoal);text-decoration:none;font-weight:750;cursor:pointer}
.pipeline-card__actions>*:hover,.pipeline-card__actions>*:focus-visible{border-color:var(--charcoal);background:var(--yellow)}
.pipeline-card__actions button:disabled{opacity:.38;cursor:not-allowed;background:#eee}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* KPI overview dashboard. */
.dashboard-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:20px}
.dashboard-head p:not(.eyebrow){margin:7px 0 0;color:#66635c;font-size:13px}
.period-switch{display:inline-flex;gap:5px;padding:5px;border:1px solid var(--hairline);border-radius:12px;background:rgba(255,255,255,.8)}
.period-button{min-height:42px;padding:8px 13px;border:0;border-radius:8px;background:transparent;color:var(--charcoal);font-size:12px;font-weight:750;cursor:pointer}
.period-button:hover,.period-button:focus-visible{background:var(--cream)}
.period-button.is-active{background:var(--charcoal);color:var(--cream)}
.dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}
.dashboard-kpi{display:grid;gap:8px;min-height:142px;padding:21px;border:1px solid var(--hairline);border-radius:var(--radius-md);background:var(--surface-strong);box-shadow:0 7px 24px rgba(63,63,63,.055)}
.dashboard-kpi:before{content:"";width:34px;height:5px;border-radius:99px;background:var(--yellow)}
.dashboard-kpi:nth-child(2):before{background:var(--sage)}
.dashboard-kpi:nth-child(3):before{background:var(--peach)}
.dashboard-kpi:nth-child(4):before{background:var(--charcoal)}
.dashboard-kpi small{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#66635c}
.dashboard-kpi strong{font:400 clamp(31px,3.1vw,46px)/1 var(--display);letter-spacing:.01em;word-spacing:.08em;overflow-wrap:anywhere}
.dashboard-kpi span{margin-top:auto;color:#66635c;font-size:12px}
.operations-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:16px}
.operations-strip article{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 12px;padding:14px 16px;border:1px solid var(--hairline);border-radius:10px;background:rgba(255,255,255,.62)}
.operations-strip small{font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.06em}
.operations-strip strong{grid-row:1/3;grid-column:2;font:400 27px/1 var(--display)}
.operations-strip span{font-size:11px;color:var(--red)}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin:16px 0}
.dashboard-grid-primary{grid-template-columns:minmax(0,1.65fr) minmax(310px,.85fr)}
.dashboard-card{min-width:0;padding:24px;border:1px solid var(--hairline);border-radius:var(--radius-lg);background:rgba(255,255,255,.82);box-shadow:var(--elevated)}
.dashboard-card>header{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:20px}
.dashboard-card h2{margin:6px 0 0;font:400 clamp(22px,2vw,29px)/1.12 var(--display);text-transform:uppercase;letter-spacing:.012em;word-spacing:.12em}
.dashboard-card>header>strong{font:400 clamp(23px,2.4vw,34px)/1 var(--display);white-space:nowrap}
.dashboard-card>header>strong small{font:600 10px/1.2 var(--body);color:#66635c}
.trend-chart{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;min-height:240px;align-items:end;padding-top:10px}
.trend-bar{display:grid;grid-template-rows:auto 155px auto;gap:8px;min-width:0;text-align:center}
.trend-bar>strong{font-size:10px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trend-bar>span{display:flex;align-items:end;height:155px;border-bottom:1px solid var(--hairline);background:linear-gradient(to top,rgba(143,167,159,.1),transparent)}
.trend-bar i{display:block;width:100%;min-height:3px;border-radius:7px 7px 2px 2px;background:var(--sage);border:1px solid rgba(63,63,63,.3)}
.trend-bar:nth-child(3n+2) i{background:var(--yellow)}
.trend-bar:nth-child(3n) i{background:var(--peach)}
.trend-bar small{font-size:10px;text-transform:uppercase;font-weight:750}
.dashboard-mini-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0 20px}
.dashboard-mini-kpis span{display:grid;gap:6px;padding:14px 10px;border-radius:10px;background:var(--cream);font-size:10px;line-height:1.3}
.dashboard-mini-kpis b{font:400 29px/1 var(--display)}
.text-link{display:inline-flex;min-height:44px;align-items:center;font-weight:750;text-underline-offset:5px}
.pipeline-health{display:grid;gap:11px}
.pipeline-health-row{display:grid;grid-template-columns:minmax(105px,1.1fr) minmax(80px,2fr) 34px minmax(78px,.9fr);align-items:center;gap:10px;font-size:11px}
.pipeline-health-row>span{font-weight:700;overflow-wrap:anywhere}
.pipeline-health-row>strong{text-align:right;font-size:14px}
.pipeline-health-row>small{text-align:right;color:#66635c}
.pipeline-health-track{height:10px;border-radius:99px;background:#3f3f3f12;overflow:hidden}
.pipeline-health-track i{display:block;height:100%;min-width:2px;border-radius:inherit;background:var(--sage)}
.next-actions{display:grid;gap:7px}
.next-action{display:grid;grid-template-columns:minmax(0,1fr) auto 36px;align-items:center;gap:10px;min-height:61px;padding:10px 12px;border:1px solid var(--hairline);border-radius:10px;background:var(--surface-strong);text-decoration:none;transition:background 180ms ease,border-color 180ms ease}
.next-action:hover,.next-action:focus-visible{background:var(--cream);border-color:var(--charcoal)}
.next-action div{min-width:0;display:grid;gap:3px}
.next-action strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.next-action small{color:#66635c}
.next-action>span{font-size:11px;color:#66635c}
.next-action>b{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--yellow);font-size:12px}
.activity-summary{margin-top:20px;padding-top:18px;border-top:1px solid var(--hairline)}
.activity-summary>.eyebrow{margin-bottom:10px}
.activity-chip{display:inline-flex;align-items:center;gap:8px;margin:0 6px 6px 0;padding:7px 9px;border-radius:999px;background:var(--cream);font-size:11px}
.activity-chip strong{font-size:13px}
.dashboard-industries{margin-top:16px}
.table-scroll{max-width:100%;overflow-x:auto}
.dashboard-industries table{width:100%;border-collapse:collapse;font-size:12px}
.dashboard-industries th,.dashboard-industries td{padding:13px 10px;border-bottom:1px solid var(--hairline);text-align:right;white-space:nowrap}
.dashboard-industries th:first-child,.dashboard-industries td:first-child{text-align:left}
.dashboard-industries thead th{font-size:9px;text-transform:uppercase;letter-spacing:.07em;color:#66635c}

@media(max-width:1320px){
  .pipeline-panel{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:1199px){
  .pipeline-summary{grid-template-columns:repeat(5,minmax(0,1fr))}
  .pipeline-stage{min-height:100px}
  .pipeline-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-grid,.dashboard-grid-primary{grid-template-columns:1fr}
  .operations-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
  .topbar h1{font-size:clamp(18px,5.7vw,23px);white-space:nowrap;overflow-wrap:normal;word-break:normal}
  .pipeline-board{gap:16px}
  .pipeline-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:5px}
  .pipeline-stage{min-height:86px;padding:8px 7px 12px}
  .pipeline-stage__name{min-height:auto;font-size:10px}
  .pipeline-stage__potential{display:none}
  .pipeline-stage__count{font-size:22px}
  .pipeline-focus-head{display:grid;align-items:start}
  .pipeline-panel{grid-template-columns:1fr}
  .dashboard-head{display:grid;align-items:start}
  .period-switch{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}
  .period-button{padding-inline:6px}
  .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .dashboard-kpi{min-height:126px;padding:15px}
  .dashboard-kpi strong{font-size:clamp(25px,8vw,34px)}
  .operations-strip{grid-template-columns:1fr 1fr}
  .operations-strip article{padding:12px}
  .dashboard-card{padding:18px 15px;border-radius:14px}
  .dashboard-card>header{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:10px}
  .dashboard-card>header>strong{justify-self:start;font-size:22px}
  .trend-chart{gap:5px;min-height:210px}
  .trend-bar{grid-template-rows:auto 130px auto;gap:6px}
  .trend-bar>span{height:130px}
  .trend-bar>strong{font-size:8px}
  .pipeline-health-row{grid-template-columns:minmax(88px,1fr) minmax(65px,1.4fr) 27px}
  .pipeline-health-row>small{grid-column:2/4;text-align:right;margin-top:-7px}
  .next-action{grid-template-columns:minmax(0,1fr) 34px}
  .next-action>span{display:none}
}

@media(max-width:390px){
  .dashboard-mini-kpis{grid-template-columns:1fr 1fr}
}

/* Lead Excel workflow */
.lead-toolbar{display:grid;grid-template-columns:minmax(250px,1.4fr) minmax(145px,.65fr) minmax(145px,.65fr) auto;align-items:center}
.lead-toolbar>input,.lead-toolbar>select{min-width:0}
.toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.excel-button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.excel-button>span{display:grid;place-items:center;width:22px;height:22px;border:1px solid currentColor;border-radius:6px;font-size:15px;line-height:1}
.import-loading{min-height:220px;display:grid;place-items:center;align-content:center;gap:16px;text-align:center}
.import-spinner{width:38px;height:38px;border:4px solid var(--hairline);border-top-color:var(--charcoal);border-radius:50%;animation:import-spin .8s linear infinite}
@keyframes import-spin{to{transform:rotate(360deg)}}
.import-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--hairline)}
.import-head p{margin:0;overflow-wrap:anywhere}
.import-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:18px}
.import-summary article{min-height:98px;padding:15px;border:1px solid var(--hairline);border-radius:12px;background:var(--surface-strong)}
.import-summary article:nth-child(1){border-left:5px solid var(--yellow)}
.import-summary article:nth-child(2){border-left:5px solid var(--sage)}
.import-summary article:nth-child(3){border-left:5px solid var(--peach)}
.import-summary article:nth-child(4){border-left:5px solid var(--charcoal)}
.import-summary article.has-errors{background:#fff1ec;border-left-color:var(--red)}
.import-summary small{display:block;margin-bottom:12px;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;color:#66635c}
.import-summary strong{font:400 32px/1 var(--display)}
.import-ready{padding:18px;border:1px solid var(--sage);border-radius:12px;background:#eef4ef}
.import-ready.has-errors{border-color:var(--red);background:#fff1ec}
.import-ready p{margin:8px 0 0;line-height:1.55}
.import-errors{max-height:280px;overflow:auto;border:1px solid var(--hairline);border-radius:12px}
.import-errors table{width:100%;border-collapse:collapse;font-size:12px}
.import-errors th,.import-errors td{padding:11px 12px;border-bottom:1px solid var(--hairline);text-align:left;vertical-align:top}
.import-errors th{position:sticky;top:0;background:var(--cream);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.import-errors td:first-child{width:64px;font-weight:800}
.import-actions{justify-content:flex-end;margin-top:20px}
.button:disabled{cursor:wait;opacity:.6;transform:none!important;box-shadow:none!important}

@media(max-width:1250px){
  .lead-toolbar{grid-template-columns:minmax(230px,1fr) minmax(140px,.6fr) minmax(140px,.6fr)}
  .toolbar-actions{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:760px){
  .lead-toolbar{grid-template-columns:1fr}
  .toolbar-actions{grid-column:auto;display:grid;grid-template-columns:minmax(0,1fr);width:100%;min-width:0}
  .toolbar-actions .button{width:100%;padding-inline:10px}
  .toolbar-actions .button.forest{grid-column:auto}
  .import-head{display:grid}
  .import-summary{grid-template-columns:1fr 1fr}
  .import-summary article{min-height:88px;padding:13px}
  .import-actions{display:grid;grid-template-columns:1fr 1fr}
}
