.portal-shell { min-height:100vh; overflow-x:hidden; background:#fff; }
.portal-header { display:flex; align-items:center; gap:22px; width:min(calc(100% - 80px),var(--max)); min-width:0; min-height:94px; margin:0 auto; border-bottom:1px solid #e7e9eb; }
.portal-brand { display:block; width:220px; }
.portal-brand img { display:block; width:100%; }
.portal-header-copy { display:grid; min-width:0; gap:3px; border-left:1px solid #dfe3e6; padding-left:22px; color:#69727c; font-size:11px; letter-spacing:.09em; text-transform:uppercase; }
.portal-header-copy strong { color:var(--ink); font-size:13px; letter-spacing:0; text-transform:none; }
.portal-header .portal-muted-link { flex:none; margin-top:0; margin-left:auto; white-space:nowrap; }
.portal-home-link { display:inline-flex; flex:none; align-items:center; gap:8px; margin-left:auto; border:1px solid rgba(48,54,61,.2); border-radius:999px; padding:9px 12px 9px 14px; background:rgba(255,255,255,.8); color:#30363d; font-size:11px; font-weight:750; line-height:1.2; white-space:nowrap; transition:border-color .2s ease,color .2s ease,background .2s ease,transform .2s ease; }
.portal-home-link span { color:var(--orange); font-size:17px; font-weight:500; line-height:1; }
.portal-home-link:hover,.portal-home-link:focus-visible { border-color:var(--orange); background:#fff; color:var(--orange-dark); transform:translateY(-1px); }
.portal-header .text-button { margin-left:14px; border:0; background:none; color:var(--orange-dark); cursor:pointer; font-size:13px; font-weight:750; }
.portal-main { width:min(calc(100% - 116px),var(--max)); margin:0 auto; padding:48px 0 64px; }
.portal-login { width:min(100%,540px); margin:0 auto; padding:28px 32px; border:1px solid #e5e8ea; border-radius:18px; background:#fff; box-shadow:0 8px 22px rgba(31,38,45,.055); }
.portal-login h1,.portal-heading h1 { margin-bottom:14px; font-size:clamp(31px,3.5vw,42px); line-height:1.06; letter-spacing:-.055em; }
.portal-login > p:not(.benefit-kicker) { margin-bottom:24px; color:#66707a; font-size:14px; line-height:1.5; }
.portal-auth-screen { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,1040px); margin:0 auto; overflow:hidden; border:1px solid #e3e7e9; border-radius:18px; background:#fff; box-shadow:0 8px 22px rgba(31,38,45,.055); }
.portal-auth-visual { position:relative; height:100%; min-height:0; isolation:isolate; overflow:hidden; background:#2e2a28; }
.portal-auth-visual::before { position:absolute; z-index:0; content:""; inset:-24px; background:url("/partner-onboarding.png") center/cover no-repeat; filter:blur(18px); opacity:.62; transform:scale(1.06); }
.portal-auth-visual::after { display:none; }
.portal-auth-visual img { position:relative; z-index:1; display:block; width:100%; height:100%; object-fit:contain; object-position:center top; opacity:1; }
.portal-auth-visual-copy { position:absolute; z-index:3; right:42px; bottom:30px; left:42px; display:grid; gap:7px; color:#fff; }
.portal-auth-visual-copy .benefit-kicker { margin-bottom:3px; color:#ffb08c; }
.portal-auth-visual-copy strong { max-width:360px; font-size:clamp(24px,2.5vw,34px); line-height:1; letter-spacing:-.05em; }
.portal-auth-visual-copy > span { max-width:310px; color:rgba(255,255,255,.78); font-size:12px; line-height:1.45; }
.portal-auth-panel { display:flex; min-width:0; flex-direction:column; justify-content:center; padding:28px 34px; }
.portal-auth-panel h1 { max-width:390px; margin-bottom:9px; font-size:clamp(30px,3.2vw,40px); }
.portal-auth-intro { max-width:330px; margin-bottom:16px; color:#66707a; font-size:14px; line-height:1.45; }
.portal-auth-panel .portal-form,.portal-auth-options { width:100%; max-width:420px; }
.portal-auth-panel .portal-form { grid-template-columns:1fr; gap:11px; }
.portal-auth-panel .portal-form label { gap:7px; font-size:11px; }
.portal-forgot-link { justify-self:end; margin-top:-2px; color:#68717a; font-size:11px; line-height:1.25; border-bottom:1px solid transparent; transition:color .2s ease,border-color .2s ease; }
.portal-forgot-link:hover,.portal-forgot-link:focus-visible { color:var(--orange-dark); border-color:rgba(241,90,36,.45); }
.portal-form .detail-cta { display:inline-flex; align-items:center; justify-content:space-between; min-height:46px; margin-top:0; border:0; border-radius:9px; padding:10px 13px 10px 17px; background:var(--orange); color:#fff; cursor:pointer; font:inherit; font-size:14px; font-weight:750; line-height:1.25; box-shadow:0 8px 18px rgba(241,90,36,.16); transition:transform .25s ease,background .25s ease,box-shadow .25s ease; }
.portal-form .detail-cta .detail-cta-icon { display:grid; place-items:center; width:25px; height:25px; border-radius:50%; background:rgba(255,255,255,.2); color:#fff; font-size:16px; font-weight:500; line-height:1; }
.portal-form .detail-cta:hover { background:var(--orange-dark); box-shadow:0 12px 24px rgba(241,90,36,.2); transform:translateY(-2px); }
.portal-form .detail-cta:focus-visible { outline:3px solid rgba(241,90,36,.25); outline-offset:3px; }
.portal-form .detail-cta:disabled { cursor:wait; opacity:.7; transform:none; }
.portal-auth-options { display:grid; margin-top:16px; padding-top:5px; border-top:1px solid #e5e8ea; }
.portal-auth-options a { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:42px; border-bottom:1px solid #edf0f1; color:#69727c; font-size:11px; }
.portal-auth-options a:last-child { border-bottom:0; }
.portal-auth-options a strong { color:#30363d; font-size:13px; transition:color .2s ease; }
.portal-auth-options a b { color:var(--orange); font-size:17px; font-weight:500; }
.portal-auth-options a:hover strong { color:var(--orange-dark); }
.benefit-kicker { margin:0 0 8px; color:var(--orange-dark); font-size:10px; font-weight:700; letter-spacing:.15em; line-height:1.2; text-transform:uppercase; }
.portal-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.portal-login .portal-form { grid-template-columns:1fr; }
.partner-apply-panel .portal-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.portal-form label { display:grid; gap:7px; color:#30363d; font-size:11px; font-weight:750; }
.portal-form input,.portal-form textarea,.portal-form select { width:100%; border:1px solid #dfe3e6; border-radius:9px; outline:0; padding:12px 13px; background:#fff; color:var(--ink); font:inherit; font-size:14px; }
.portal-form input,.portal-form select { height:46px; padding-top:0; padding-bottom:0; }
.portal-form textarea { min-height:138px; resize:vertical; line-height:1.45; }
.portal-form input:focus,.portal-form textarea:focus,.portal-form select:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(241,90,36,.1); }
.portal-status { min-height:0; margin:0; color:#a73528; font-size:12px; line-height:1.4; }
.portal-status.is-success { color:#1b7652; }
.portal-muted-link { display:inline-flex; align-items:center; gap:6px; margin-top:22px; color:#68717a; font-size:13px; border-bottom:1px solid #cfd5d8; padding-bottom:4px; }
.portal-muted-link span { color:var(--orange); font-size:15px; line-height:1; }
.honeypot { position:absolute!important; width:1px!important; height:1px!important; margin:-1px!important; padding:0!important; overflow:hidden!important; clip:rect(0 0 0 0)!important; clip-path:inset(50%)!important; white-space:nowrap!important; border:0!important; opacity:0!important; pointer-events:none!important; }
.portal-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:34px; }
.portal-heading h1 { margin-bottom:10px; }
.portal-heading p:last-child { margin:0; color:#69727c; font-size:14px; }
.portal-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; border-top:1px solid #e1e5e7; border-bottom:1px solid #e1e5e7; margin-bottom:52px; background:#e1e5e7; }
.portal-stats div { display:grid; gap:10px; padding:22px 24px; background:#fff; }
.portal-stats span { color:#707982; font-size:10px; font-weight:750; letter-spacing:.12em; text-transform:uppercase; }
.portal-stats strong { color:var(--ink); font-size:38px; letter-spacing:-.05em; }
.portal-section { border-top:1px solid #e1e5e7; padding:42px 0 50px; }
.portal-section-heading { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:26px; }
.portal-section-heading h2 { margin-bottom:10px; font-size:clamp(30px,3.2vw,46px); line-height:1; letter-spacing:-.05em; }
.portal-section-heading p:last-child { max-width:520px; margin:0; color:#68717a; font-size:14px; line-height:1.5; }
.portal-section-heading select { min-width:260px; }
.portal-benefit-form { max-width:760px; }
.portal-closing-form { max-width:900px; }
.portal-closing-form input[type="file"] { height:auto; min-height:46px; padding:12px 13px; }
.portal-empty-note { margin:0; color:#68717a; font-size:13px; line-height:1.5; }
.portal-document-list { display:grid; gap:8px; max-width:760px; margin-top:18px; }
.portal-document-link { justify-self:start; border-bottom:1px solid rgba(241,90,36,.45); padding-bottom:4px; color:var(--orange-dark); cursor:pointer; font-size:12px; font-weight:750; }
.portal-wide { grid-column:1/-1; }
.portal-form-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; grid-column:1/-1; }
.portal-form-secondary-link { color:#68717a; font-size:12px; line-height:1.3; border-bottom:1px solid transparent; transition:color .2s ease,border-color .2s ease; }
.portal-form-secondary-link:hover,.portal-form-secondary-link:focus-visible { color:var(--orange-dark); border-color:rgba(241,90,36,.45); }
.portal-form-status { grid-column:1/-1; }
.portal-lead-table { min-width:760px; }
.portal-lead-table select { min-width:126px; height:34px; padding:0 8px; font-size:12px; }
.portal-lead-table td strong { display:block; margin-bottom:3px; color:var(--ink); font-size:13px; }
.portal-lead-table td span { color:#727c84; }
@media (max-width:900px) { .portal-auth-screen { grid-template-columns:1fr; } .portal-auth-visual { height:330px; min-height:330px; } .portal-auth-panel { padding:36px 32px 40px; } }
@media (max-width:700px) { .portal-header,.portal-main { width:calc(100% - 40px); } .portal-header { gap:13px; } .portal-brand { width:min(180px,62vw); } .portal-header-copy { padding-left:13px; font-size:9px; } .portal-header-copy strong { font-size:11px; } .portal-home-link { padding:8px 10px 8px 12px; font-size:10px; } .portal-main { padding:42px 0 70px; } .portal-login { padding:30px 24px; } .portal-auth-screen { border-radius:18px; } .portal-auth-visual { height:280px; min-height:280px; } .portal-auth-visual-copy { right:24px; bottom:24px; left:24px; } .portal-auth-visual-copy strong { font-size:34px; } .portal-auth-panel { padding:30px 24px 34px; } .portal-heading,.portal-section-heading { align-items:flex-start; flex-direction:column; } .portal-stats { grid-template-columns:1fr; } .portal-form,.partner-apply-panel .portal-form { grid-template-columns:1fr; } .portal-wide { grid-column:auto; } .portal-form-actions { align-items:flex-start; flex-direction:column; } .portal-section-heading select { width:100%; min-width:0; } .portal-auth-options a { align-items:flex-start; flex-direction:column; gap:4px; } }

/* Public Partner application ------------------------------------------- */
.partner-application-page { background: var(--paper); }
.partner-application-main { padding-top: 42px; }
.partner-application-hero { display: grid; gap: 34px; }
.partner-application-banner { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.partner-application-banner img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; object-position: center; }
.partner-application-intro { max-width: 920px; }
.partner-application-intro h1 { max-width: 800px; margin: 0 0 16px; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -.055em; }
.partner-application-lead { max-width: 680px; margin: 0; color: var(--muted); font-size: clamp(16px, 1.45vw, 19px); line-height: 1.5; }
.partner-application-lead strong { color: var(--orange-dark); font-weight: 700; }
.partner-application-guidance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; padding: 28px 0 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.partner-application-guidance h2,.partner-application-section-heading h2 { margin: 0 0 8px; color: var(--ink); font-size: 18px; line-height: 1.15; letter-spacing: -.025em; }
.partner-application-guidance p,.partner-application-section-heading > p:last-child { max-width: 570px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.partner-application-form-section { padding: 64px 0 24px; }
.partner-application-section-heading { margin-bottom: 34px; }
.partner-application-section-heading h2 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -.045em; }
.partner-application-form { display: grid; grid-template-columns: 1fr; gap: 0; max-width: 1000px; }
.partner-form-group { min-width: 0; margin: 0; padding: 30px 0 34px; border: 0; border-top: 1px solid var(--line); }
.partner-form-group legend { margin: 0 0 22px; padding: 0; color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.partner-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.partner-form-grid label,.partner-form-group > label { display: grid; gap: 8px; color: var(--muted-strong); font-size: 13px; font-weight: 650; line-height: 1.25; }
.partner-form-grid label > span,.partner-form-group > label > span { display: block; }
.partner-form-grid b { color: var(--orange-dark); font-weight: 700; }
.partner-form-grid input,.partner-form-grid select,.partner-form-grid textarea,.partner-form-group > label input,.partner-form-group > label textarea { border-color: var(--line-strong); border-radius: 10px; background: #fff; font-size: 15px; }
.partner-form-grid input,.partner-form-grid select { height: 52px; }
.partner-form-grid textarea,.partner-form-group > label textarea { min-height: 122px; }
.partner-form-field--wide { grid-column: 1 / -1; }
.partner-consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 28px; color: var(--muted-strong); font-size: 13px; line-height: 1.5; }
.partner-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); }
.partner-legal { max-width: 820px; margin: 14px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.partner-form-actions { display: flex; align-items: center; gap: 20px; padding-top: 8px; }
.partner-form-actions .detail-cta { min-width: 220px; }
.partner-form-actions .portal-status { flex: 1; }
.partner-application-success { max-width: 720px; margin-top: 20px; padding: 34px 0 8px; border-top: 1px solid var(--line); }
.partner-application-success h2 { margin: 0 0 10px; color: var(--ink); font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: -.055em; }
.partner-application-success p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.partner-application-form[hidden] { display: none; }
.partner-application-form .portal-status.is-error { color: #ad3b2c; }
.partner-application-form .portal-status.is-loading { color: var(--muted); }
.partner-application-form .detail-cta.is-loading { cursor: wait; opacity: .78; }
@media (max-width: 700px) {
  .partner-application-main { padding-top: 24px; }
  .partner-application-page .portal-header { grid-template-columns: minmax(0, 1fr) auto; }
  .partner-application-page .portal-brand { width: min(140px, 48vw); }
  .partner-application-banner { border-radius: 12px; }
  .partner-application-intro h1 { font-size: clamp(32px, 10vw, 44px); }
  .partner-application-lead { font-size: 16px; }
  .partner-application-guidance,.partner-form-grid { grid-template-columns: 1fr; gap: 24px; }
  .partner-application-form-section { padding-top: 52px; }
  .partner-form-group { padding: 26px 0 30px; }
  .partner-form-field--wide { grid-column: auto; }
  .partner-form-actions { align-items: stretch; flex-direction: column; }
  .partner-form-actions .detail-cta { width: 100%; }
}

/* Internal surfaces ------------------------------------------------------ */
.portal-shell {
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: min(calc(100% - 64px), var(--max));
  min-height: 78px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(203, 212, 215, .9);
  background: #fff;
  backdrop-filter: blur(18px);
}

.portal-brand { width: 178px; }
.portal-header-copy { gap: 2px; padding-left: 20px; border-color: var(--line); color: var(--muted); font-size: 10px; letter-spacing: .14em; }
.portal-header-copy strong { color: var(--ink); font-size: 13px; }
.portal-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.portal-header .portal-muted-link { margin: 0; }
.portal-home-link { margin: 0; border-color: var(--line-strong); background: rgba(255,255,255,.7); }
.portal-header .text-button { margin: 0; padding: 9px 2px; }
#portal-view-nav[hidden] { display:none!important; }
#portal-view-nav:not([hidden]) { position:relative; display:flex; align-self:stretch; align-items:stretch; justify-content:flex-end; gap:5px; margin:0; border:0; }
#portal-view-nav button { position:relative; z-index:1; align-self:stretch; min-height:78px; border-top:0; border-radius:0; padding:0 16px; font-size:12px; transition:background-color .2s ease,color .2s ease; }
#portal-view-nav button::after { display:none; }
#portal-view-nav button:hover,#portal-view-nav button:focus-visible { background:rgba(241,90,36,.08); color:var(--orange-dark); outline:0; }
#portal-view-nav button.is-active { background:transparent; color:#fff; }
#portal-view-nav button.is-active span { background:rgba(255,255,255,.2); color:#fff; }
#portal-nav-indicator { position:absolute; z-index:0; right:auto; bottom:0; left:0; width:0; height:100%; border-radius:0; background:var(--orange); box-shadow:0 8px 18px rgba(241,90,36,.14); pointer-events:none; transition:width .24s ease,transform .24s ease; }
#portal-view-nav button span { min-width:20px; height:20px; margin-left:4px; font-size:10px; }

.portal-main {
  width: min(calc(100% - 64px), var(--max));
  padding: 58px 0 88px;
}

.portal-auth-screen {
  width: min(100%, 1080px);
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.portal-auth-visual { min-height: 540px; background: #1c2021; }
.portal-auth-visual::before { opacity: .34; filter: blur(22px); }
.portal-auth-visual img { object-fit: contain; object-position: center; }
.portal-auth-panel { padding: clamp(38px, 4vw, 52px); }
.portal-auth-panel h1 { max-width: 440px; margin-bottom: 10px; font-size: clamp(34px, 3.4vw, 48px); line-height: .98; }
.portal-auth-intro { margin-bottom: 22px; color: var(--muted); }
.portal-auth-panel .portal-form { max-width: 440px; gap: 13px; }
.portal-auth-panel .portal-form label { gap: 8px; color: var(--muted-strong); font-size: 12px; }
.portal-forgot-link { margin-top: -5px; font-size: 12px; }
.portal-auth-options { max-width: 440px; margin-top: 24px; padding-top: 12px; }
.portal-auth-options a { min-height: 48px; font-size: 12px; }

.portal-login {
  width: min(100%, 660px);
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.portal-login h1, .portal-heading h1 { font-size: clamp(36px, 5vw, 62px); line-height: .94; }
.portal-login > p:not(.benefit-kicker) { max-width: 520px; color: var(--muted); }

.portal-form { gap: 18px; }
.portal-form label { gap: 8px; color: var(--muted-strong); font-size: 12px; }
.portal-form input, .portal-form textarea, .portal-form select {
  min-height: 50px;
  border-color: var(--line-strong);
  border-radius: 11px;
  padding: 0 15px;
  background: #fbfcfc;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.portal-form textarea { min-height: 148px; padding-top: 13px; padding-bottom: 13px; }
.portal-form input:hover, .portal-form textarea:hover, .portal-form select:hover { border-color: #aebbc0; background: #fff; }
.portal-form input:focus, .portal-form textarea:focus, .portal-form select:focus { border-color: var(--orange); background: #fff; }
.portal-form .detail-cta { min-height: 50px; border-radius: 11px; padding: 11px 14px 11px 18px; }
.portal-form .detail-cta:disabled { cursor: wait; }
.portal-shell .detail-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; border: 0; border-radius: 11px; padding: 11px 14px 11px 18px; background: var(--orange); color: #fff; cursor: pointer; font: inherit; font-size: 14px; font-weight: 750; box-shadow: 0 10px 22px rgba(241,90,36,.18); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.portal-shell .detail-cta .detail-cta-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 17px; font-weight: 500; }
.portal-shell .detail-cta:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(241,90,36,.22); }
.portal-shell .detail-cta:disabled { cursor: wait; opacity: .72; transform: none; }
.portal-shell .outline-button { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 15px; background: #fff; color: var(--muted-strong); cursor: pointer; font: inherit; font-size: 13px; font-weight: 750; transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease; }
.portal-shell .outline-button:hover { border-color: var(--orange); background: #fff8f4; color: var(--orange-dark); transform: translateY(-1px); }
.portal-shell .outline-button:disabled { cursor: wait; opacity: .68; transform: none; }
.portal-form button.is-loading, .admin-login-form button.is-loading { position: relative; color: transparent; }
.portal-form button.is-loading::after, .admin-login-form button.is-loading::after { position: absolute; content: ""; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; color: #fff; animation: button-spin .7s linear infinite; }
.portal-form button.outline-button.is-loading::after { border-color: var(--orange); border-right-color: transparent; color: var(--orange); }
.portal-status { min-height: 20px; font-size: 13px; }

.portal-heading { align-items: end; margin-bottom: 30px; }
.portal-heading h1 { margin-bottom: 12px; }
.portal-heading p:last-child { color: var(--muted); }
.portal-stats {
  gap: 1px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-sm);
}
.portal-stats div { min-height: 104px; padding: 20px 26px; background: var(--surface); }
.portal-stats span { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.portal-stats strong { font-size: 46px; line-height: .95; }

.portal-section { padding: 38px 0 46px; border-color: var(--line); }
.portal-section-heading { margin-bottom: 24px; }
.portal-section-heading h2 { font-size: clamp(32px, 4vw, 50px); line-height: .95; }
.portal-section-heading p:last-child { color: var(--muted); }
.portal-section-heading select { min-width: 290px; }
.portal-form-actions { margin-top: 2px; }
.lead-table-wrap { border-color: var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.lead-table th { padding: 14px 16px; background: #f7f9f9; color: var(--muted); }
.lead-table td { padding: 17px 16px; }
.lead-table tbody tr:hover { background: #fffaf7; }
.portal-lead-table select { border-color: var(--line-strong); border-radius: 8px; background: #fff; }
.portal-document-list { gap: 10px; }
.portal-document-link { border-radius: 8px; padding: 8px 10px; background: #fff7f2; }

@media (max-width: 900px) {
  .portal-auth-screen { min-height: 0; }
  .portal-auth-visual { min-height: 420px; height: 420px; }
}

@media (max-width: 700px) {
  .portal-header { grid-template-columns: auto minmax(0, 1fr); width: calc(100% - 40px); min-height: 72px; gap: 13px; }
  .portal-header-copy { display: none; }
  .portal-header-actions { grid-column: 1 / -1; justify-content: space-between; padding: 0 0 12px; }
  .portal-header:has(.portal-header-actions) { padding-top: 12px; }
  .portal-home-link { margin-left: auto; }
  .portal-main { width: calc(100% - 40px); padding: 38px 0 70px; }
  .portal-auth-screen { border-radius: 20px; }
  .portal-auth-visual { min-height: 300px; height: 300px; }
  .portal-auth-panel { padding: 34px 24px 38px; }
  .portal-auth-panel h1 { font-size: 40px; }
  .portal-login { padding: 32px 24px; }
  .portal-stats { grid-template-columns: repeat(3, 1fr); }
  .portal-stats div { min-height: 104px; padding: 18px 14px; }
  .portal-stats strong { font-size: 34px; }
  .portal-stats span { font-size: 9px; letter-spacing: .1em; }
}

@media (max-width: 480px) {
  .portal-stats { grid-template-columns: 1fr; }
  .portal-stats div { min-height: auto; }
}

@keyframes button-spin { to { transform: rotate(360deg); } }

/* Partner workspace ----------------------------------------------------- */
#partner-dashboard { min-width: 0; }
.portal-workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.portal-workspace-heading h1 { margin: 0 0 8px; font-size: clamp(38px, 4.2vw, 54px); line-height: .92; letter-spacing: -.065em; }
.partner-heading-name { white-space: nowrap; }
.portal-workspace-heading p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.portal-heading-actions { display: flex; align-items: center; gap: 16px; }
.portal-last-sync { color: var(--muted); font-size: 11px; white-space: nowrap; }
.portal-view-nav { display: flex; gap: 22px; align-items: center; border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.portal-view-nav button { position: relative; min-height: 48px; border: 0; padding: 0 2px; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 14px; font-weight: 750; }
.portal-view-nav button::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: transparent; }
.portal-view-nav button.is-active { color: var(--ink); }
.portal-view-nav button.is-active::after { background: var(--orange); }
.portal-view-nav button span { display: inline-grid; place-items: center; min-width: 23px; height: 23px; margin-left: 5px; border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.portal-view-nav button.is-active span { background: #fff0e9; color: var(--orange-dark); }
.portal-view-panel[hidden] { display: none !important; }
.portal-view-panel:not([hidden]) { animation: portal-view-in .28s ease both; }
.portal-section-heading-inline { align-items: end; margin-bottom: 22px; }
.portal-section-heading-inline h2 { margin-bottom: 9px; }
.portal-section-heading-inline p:last-child { max-width: 560px; }
.portal-view-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.portal-lead-table .portal-row-action { display: inline-flex; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid rgba(241,90,36,.5); padding: 0 0 5px; background: none; color: var(--orange-dark); cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; white-space: nowrap; }
.portal-row-action span { font-size: 16px; font-weight: 500; transition: transform .2s ease; }
.portal-row-action:hover span { transform: translate(2px, -2px); }
.portal-lead-table .lead-status-badge { white-space: nowrap; }
.portal-lead-table td:last-child { text-align: right; }

.portal-select-label { display: grid; gap: 7px; min-width: 260px; color: var(--muted); font-size: 11px; font-weight: 750; }
.portal-select-label select { min-height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; background: #fff; color: var(--ink); font: inherit; }
.benefit-editor-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 42px; align-items: start; }
.portal-benefit-form { max-width: none; }
.portal-form-section-label { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.benefit-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.benefit-preview-toolbar { display:grid; gap:12px; border-bottom:1px solid var(--line); padding:15px 16px; background:#fbfcfc; }
.benefit-preview-toolbar > div:first-child { display:grid; gap:3px; }
.benefit-preview-toolbar strong { color:var(--ink); font-size:12px; font-weight:700; }
.benefit-preview-toolbar small { color:var(--muted); font-size:9px; font-weight:400; line-height:1.4; }
.benefit-preview-modes { display:grid; grid-template-columns:1fr 1fr; gap:3px; border:1px solid var(--line); border-radius:9px; padding:3px; background:#fff; }
.benefit-preview-modes button { min-height:31px; border:0; border-radius:6px; padding:6px 8px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:9px; font-weight:650; }
.benefit-preview-modes button:hover,.benefit-preview-modes button:focus-visible { color:var(--ink); outline:0; }
.benefit-preview-modes button.is-active { background:var(--ink); color:#fff; }
.benefit-preview-pane[hidden] { display:none!important; }
.benefit-preview-media { aspect-ratio: 1.65 / 1; overflow: hidden; background: var(--surface-soft); }
.benefit-preview-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.benefit-preview-copy { padding: 20px 20px 22px; }
.benefit-preview-copy .benefit-kicker { margin-bottom: 9px; }
.benefit-preview-copy h3 { margin: 0 0 9px; font-size: 24px; line-height: 1.02; letter-spacing: -.045em; }
.benefit-preview-copy p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.benefit-page-preview { background:#fff; }
.benefit-page-preview-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:10px 16px; color:var(--muted); font-size:8px; font-weight:650; letter-spacing:.08em; text-transform:uppercase; }
.benefit-page-preview-topbar span:first-child { color:var(--ink); }
.benefit-page-preview-hero { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(150px,.95fr); align-items:center; gap:18px; padding:24px 16px; }
.benefit-page-preview-heading { min-width:0; }
.benefit-page-preview-heading h3 { margin:0 0 9px; color:var(--ink); font-size:22px; font-weight:720; letter-spacing:-.045em; line-height:1.04; text-wrap:balance; }
.benefit-page-preview-offer { display:inline-flex; width:fit-content; margin:0 0 9px; border-radius:6px; padding:5px 7px; background:var(--ink); color:#fff; font-size:8px; font-weight:700; line-height:1.2; }
.benefit-page-preview-offer[hidden] { display:none; }
.benefit-page-preview-hero img { display:block; width:100%; height:auto; aspect-ratio:auto; border:1px solid var(--line); border-radius:10px; object-fit:contain; }
.benefit-page-preview-content { border-top:1px solid var(--line); padding:22px 16px; }
.benefit-page-preview-content > h4 { margin:0 0 14px; color:var(--ink); font-size:17px; font-weight:720; letter-spacing:-.035em; }
#benefit-page-preview-description { color:var(--muted-strong); font-size:10px; line-height:1.6; }
#benefit-page-preview-description p,#benefit-page-preview-description div { margin:0 0 10px; }
#benefit-page-preview-description p:last-child,#benefit-page-preview-description div:last-child { margin-bottom:0; }
#benefit-page-preview-description h2 { margin:20px 0 8px; color:var(--ink); font-size:17px; font-weight:720; letter-spacing:-.025em; line-height:1.18; text-wrap:balance; }
#benefit-page-preview-description h3 { margin:15px 0 6px; color:var(--ink); font-size:13px; font-weight:650; line-height:1.25; text-wrap:balance; }
#benefit-page-preview-description h2:first-child,#benefit-page-preview-description h3:first-child { margin-top:0; }
#benefit-page-preview-description ul,#benefit-page-preview-description ol { margin:0 0 10px; padding-left:18px; }
.benefit-page-preview-link { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--line); padding:13px 16px; color:var(--orange-dark); font-size:10px; font-weight:700; }
.benefit-page-preview-link span { font-size:14px; }

.portal-dialog { width: min(calc(100% - 32px), 620px); border: 1px solid var(--line); border-radius: 22px; padding: 30px; background: var(--surface); box-shadow: 0 30px 100px rgba(20,25,30,.24); color: var(--ink); }
.portal-dialog::backdrop { background: rgba(18,24,28,.38); backdrop-filter: blur(5px); }
.portal-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.portal-dialog-header h2 { margin: 0 0 7px; font-size: clamp(30px, 4vw, 44px); line-height: .95; letter-spacing: -.055em; }
.portal-dialog-subtitle { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.portal-dialog .dialog-close { position: static; flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; padding: 0; background: var(--surface-soft); color: var(--muted); cursor: pointer; font-size: 24px; line-height: 1; }
.portal-dialog .dialog-close:hover { background: #fff0e9; color: var(--orange-dark); }
.portal-lead-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 24px; padding: 24px 0; }
.portal-lead-details > div { min-width: 0; }
.portal-lead-details dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.portal-lead-details dd { margin: 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.lead-dialog-status-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; padding: 18px 0 22px; border-top: 1px solid var(--line); }
.lead-dialog-status-form label { display: grid; gap: 7px; color: var(--muted-strong); font-size: 11px; font-weight: 750; }
.lead-dialog-status-form select { min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; background: #fbfcfc; color: var(--ink); font: inherit; }
.lead-dialog-status-form .detail-cta { min-height: 48px; }
.lead-dialog-closing { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 22px 0 0; border-top: 1px solid var(--line); }
.lead-dialog-closing h3 { margin: 0 0 7px; font-size: 19px; letter-spacing: -.03em; }
.lead-dialog-closing p:last-child { max-width: 370px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.portal-document-list { margin-top: 14px; }
.closing-dialog { width: min(calc(100% - 32px), 520px); }
.closing-dialog .portal-form { grid-template-columns: 1fr 1fr; margin-top: 24px; }
.closing-dialog .portal-form > label:nth-of-type(3), .closing-dialog .portal-form-hint, .closing-dialog .portal-form-actions { grid-column: 1 / -1; }
.portal-form-hint { margin: -5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.closing-dialog input[type="file"] { min-height: 50px; padding: 7px 9px; }
.closing-dialog input[type="file"]::file-selector-button { margin-right: 10px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 8px 10px; background: var(--surface-soft); color: var(--muted-strong); cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; }
.closing-dialog input[type="file"]::file-selector-button:hover { border-color: var(--orange); background: #fff0e9; color: var(--orange-dark); }
.closing-dialog .portal-form-actions { align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.closing-dialog .portal-form-actions .portal-status { flex: 1 1 100%; order: 3; }
@keyframes portal-view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
  .portal-workspace-heading { align-items: start; flex-direction: column; gap: 18px; }
  .portal-heading-actions { width: 100%; justify-content: space-between; }
  .portal-view-nav { gap: 18px; overflow-x: auto; }
  .portal-section-heading-inline { align-items: start; flex-direction: column; gap: 14px; }
  .portal-view-summary { align-self: flex-start; }
  .benefit-editor-layout { grid-template-columns: 1fr; gap: 30px; }
  .portal-select-label { width: 100%; min-width: 0; }
  .portal-lead-table { min-width: 0; width: 100%; table-layout: fixed; }
  .portal-lead-table th:nth-child(2),
  .portal-lead-table td:nth-child(2),
  .portal-lead-table th:nth-child(3),
  .portal-lead-table td:nth-child(3),
  .portal-lead-table th:nth-child(4),
  .portal-lead-table td:nth-child(4) { display: none; }
  .portal-lead-table th:first-child,
  .portal-lead-table td:first-child { width: 54%; }
  .portal-lead-table th:nth-child(5),
  .portal-lead-table td:nth-child(5) { width: 22%; }
  .portal-lead-table th:last-child,
  .portal-lead-table td:last-child { width: 24%; padding-right: 0; white-space: nowrap; }
  .portal-dialog { padding: 24px; }
}

@media (max-width: 520px) {
  .portal-workspace-heading h1 { font-size: 43px; }
  .portal-last-sync { font-size: 10px; }
  .portal-lead-details { grid-template-columns: 1fr; gap: 13px; }
  .lead-dialog-status-form { grid-template-columns: 1fr; }
  .lead-dialog-status-form .detail-cta { width: 100%; }
  .lead-dialog-closing { align-items: start; flex-direction: column; }
  .lead-dialog-closing .outline-button { width: 100%; }
  .closing-dialog .portal-form { grid-template-columns: 1fr; }
  .closing-dialog .portal-form > label:nth-of-type(3), .closing-dialog .portal-form-hint, .closing-dialog .portal-form-actions { grid-column: auto; }
  .closing-dialog .portal-form-actions { align-items: stretch; flex-direction: column; }
  .closing-dialog .portal-form-actions button { width: 100%; }
}

/* Keep the square source artwork intact: the panel follows its natural frame. */
.portal-auth-screen { min-height: 0; }
.portal-auth-visual { min-height: 0; background: #1c2021; }
.portal-auth-visual::before { display: none; }
.portal-auth-visual img { object-fit: contain; object-position: center top; }
.portal-auth-panel { padding: 24px 34px; }
.portal-auth-panel h1 { max-width: 390px; margin-bottom: 9px; font-size: clamp(30px, 3.2vw, 40px); line-height: .98; }
.portal-auth-intro { margin-bottom: 16px; }
.portal-auth-panel .portal-form { max-width: 420px; gap: 11px; }
.portal-auth-options { max-width: 420px; margin-top: 16px; padding-top: 5px; }

.password-input-wrap { position: relative; display: block; }
.password-input-wrap input { padding-right: 48px !important; }
.password-input-wrap:focus-within .password-toggle { border-color: var(--orange); color: var(--orange-dark); }
.password-toggle { position: absolute; top: 50%; right: 8px; display: inline-grid; width: 34px; height: 34px; place-items: center; transform: translateY(-50%); border: 1px solid transparent; border-radius: 8px; background: transparent; color: #68717a; cursor: pointer; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.password-toggle:hover { background: #fff4ee; color: var(--orange-dark); }
.password-toggle:focus-visible { outline: 3px solid rgba(241,90,36,.18); outline-offset: 2px; }
.password-toggle-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-toggle-icon--open { display: none; }
.password-toggle.is-visible .password-toggle-icon--closed { display: none; }
.password-toggle.is-visible .password-toggle-icon--open { display: block; }

@media (max-width: 700px) {
  .portal-auth-visual { min-height: 0; height: auto; aspect-ratio: 1 / 1; }
  .portal-auth-panel { padding: 34px 24px 38px; }
  .portal-auth-panel h1 { max-width: 440px; font-size: 40px; }
}

/* Form hierarchy: values stay readable; emphasis belongs to labels and actions. */
.portal-form label,
.portal-select-label,
.lead-dialog-status-form label { font-weight: 600; }
.portal-form input,
.portal-form select,
.portal-form textarea,
.closing-dialog input,
.closing-dialog select,
.closing-dialog textarea { font-weight: 400; }

/* Partner workspace ----------------------------------------------------- */
.partner-workspace { min-width: 0; color: var(--ink); }
.workspace-heading { display:flex; align-items:end; justify-content:space-between; gap:28px; margin-bottom:28px; }
.workspace-heading h1 { max-width:820px; margin:0 0 7px; font-size:clamp(32px,3.8vw,48px); line-height:.98; letter-spacing:-.06em; }
.workspace-heading h1 .partner-name-brand { display:inline; color:var(--orange); white-space:normal; }
.workspace-heading #partner-summary { display:none; }
.workspace-heading p:last-child { margin:0; color:var(--muted); font-size:13px; }
.workspace-eyebrow { margin:0 0 8px; color:var(--orange-dark); font-size:10px; font-weight:750; letter-spacing:.16em; line-height:1.2; text-transform:uppercase; }
.workspace-heading-actions { display:flex; align-items:center; gap:14px; }
.workspace-quiet-button,.workspace-inline-link { border:0; background:transparent; color:var(--muted-strong); cursor:pointer; font:inherit; font-size:12px; font-weight:650; }
.workspace-quiet-button { border:1px solid var(--line-strong); border-radius:9px; padding:9px 12px; background:var(--surface); }
.workspace-quiet-button:hover,.workspace-inline-link:hover { color:var(--orange-dark); }
.workspace-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin-bottom:28px; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--line); box-shadow:var(--shadow-sm); }
.workspace-kpis article { min-width:0; min-height:122px; padding:18px 20px; background:var(--surface); }
.workspace-kpis span,.workspace-kpis small { display:block; color:var(--muted); font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.workspace-kpis strong { display:block; margin:12px 0 7px; color:var(--ink); font-size:27px; font-weight:650; letter-spacing:-.04em; line-height:1; white-space:nowrap; }
.workspace-kpis small { color:var(--muted); font-size:11px; letter-spacing:0; text-transform:none; }
.workspace-nav { display:flex; align-items:center; gap:24px; margin-bottom:24px; border-bottom:1px solid var(--line); }
.workspace-nav button { position:relative; min-height:42px; border:0; padding:0 1px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:13px; font-weight:600; }
.workspace-nav button::after { position:absolute; right:0; bottom:-1px; left:0; height:2px; content:""; background:transparent; }
.workspace-nav button.is-active { color:var(--ink); }
.workspace-nav button.is-active::after { background:var(--orange); }
.workspace-nav button span { display:inline-grid; place-items:center; min-width:20px; height:20px; margin-left:4px; border-radius:50%; background:var(--surface-soft); color:var(--muted); font-size:10px; }
.workspace-nav button span:not([hidden]) { background:#d34a3d; color:#fff; font-weight:750; }
.workspace-nav button:hover span:not([hidden]),.workspace-nav button:focus-visible span:not([hidden]),.workspace-nav button.is-active span:not([hidden]) { background:#b33e34; color:#fff; }
#portal-view-nav button span:not([hidden]),#portal-view-nav button.is-active span:not([hidden]) { background:#d34a3d; color:#fff; font-weight:750; }
#portal-view-nav button:hover span:not([hidden]),#portal-view-nav button:focus-visible span:not([hidden]) { background:#b33e34; color:#fff; }
.workspace-view[hidden] { display:none!important; }
.workspace-columns { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(280px,.85fr); gap:18px; }
.workspace-panel { min-width:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:var(--shadow-sm); }
.workspace-pipeline,.workspace-financial { padding:22px; }
.workspace-panel-heading,.workspace-section-heading { display:flex; align-items:start; justify-content:space-between; gap:18px; }
.workspace-panel-heading { margin-bottom:20px; }
.workspace-panel-heading h2,.workspace-section-heading h2 { margin:0 0 6px; font-size:22px; font-weight:650; letter-spacing:-.045em; }
.workspace-panel-heading h3 { margin:0 0 5px; font-size:18px; font-weight:650; letter-spacing:-.03em; }
.workspace-panel-heading p:not(.workspace-eyebrow),.workspace-section-heading p:not(.workspace-eyebrow) { max-width:560px; margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.pipeline-summary { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin:0 0 18px; border:1px solid var(--line); background:var(--line); }
.pipeline-summary div { display:grid; gap:4px; padding:12px 14px; background:var(--surface-soft); }
.pipeline-summary strong { font-size:26px; font-weight:650; line-height:1; }
.pipeline-summary span { color:var(--muted); font-size:11px; }
.pipeline-chart { display:flex; align-items:end; justify-content:center; gap:44px; height:142px; margin:4px 0 20px; padding:0 18px 14px; border-bottom:1px solid var(--line); }
.pipeline-bar { display:grid; justify-items:center; align-content:end; gap:5px; width:60px; height:100%; }
.pipeline-bar-track { display:flex; align-items:end; width:28px; height:100px; border-radius:6px 6px 3px 3px; background:var(--surface-soft); overflow:hidden; }
.pipeline-bar-fill { display:block; width:100%; min-height:8px; border-radius:6px 6px 2px 2px; }
.pipeline-bar-fill.is-pending { background:#d34a3d; }
.pipeline-bar-fill.is-contracted { background:#20865a; }
.pipeline-bar strong { font-size:15px; font-weight:650; }
.pipeline-bar small { color:var(--muted); font-size:10px; }
.workspace-mini-list { display:grid; gap:1px; }
.workspace-mini-row { display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:0; border:0; border-bottom:1px solid var(--line); padding:10px 0; background:transparent; color:inherit; cursor:pointer; text-align:left; }
.workspace-mini-row:last-child { border-bottom:0; }
.workspace-mini-row:hover strong { color:var(--orange-dark); }
.workspace-mini-row > span:first-child { display:grid; min-width:0; gap:3px; }
.workspace-mini-row strong { overflow:hidden; color:var(--ink); font-size:12px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.workspace-mini-row small { overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.workspace-status-badge { display:inline-flex; align-items:center; justify-content:center; border-radius:999px; padding:5px 8px; font-size:10px; font-weight:650; white-space:nowrap; }
.workspace-status-badge.is-pendente { background:#fdecea; color:#b33e34; }
.workspace-status-badge.is-contratado { background:#e8f6ee; color:#19734c; }
.workspace-financial { background:#20282c; color:#fff; }
.workspace-financial .workspace-eyebrow { color:#ff9b70; }
.workspace-financial h2 { color:#fff; }
.financial-list { display:grid; gap:0; margin:0; }
.financial-list div { display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:13px 0; border-bottom:1px solid rgba(255,255,255,.13); }
.financial-list dt { color:rgba(255,255,255,.66); font-size:11px; }
.financial-list dd { margin:0; color:#fff; font-size:15px; font-weight:650; white-space:nowrap; }
.financial-note { display:flex; gap:10px; margin-top:24px; }
.financial-note-mark { display:grid; flex:0 0 25px; place-items:center; width:25px; height:25px; border-radius:50%; background:rgba(241,90,36,.25); color:#ff9b70; }
.financial-note p { margin:0; color:rgba(255,255,255,.66); font-size:11px; line-height:1.45; }
.workspace-financial .workspace-panel-heading { align-items:center; margin-bottom:18px; }
.workspace-financial .workspace-panel-heading h2 { margin-bottom:0; }
.financial-open-link { display:inline-flex; align-items:center; gap:6px; color:#ff9b70; white-space:nowrap; }
.financial-open-link span { font-size:16px; font-weight:400; line-height:1; }
.financial-overdue-alert { display:flex; align-items:center; gap:10px; margin-top:18px; border:1px solid rgba(140,221,180,.25); border-radius:10px; padding:10px 11px; background:rgba(140,221,180,.08); }
.financial-overdue-alert.is-alert { border-color:rgba(255,173,141,.32); background:rgba(241,90,36,.13); }
.financial-overdue-mark { display:grid; flex:0 0 24px; place-items:center; width:24px; height:24px; border-radius:50%; background:rgba(140,221,180,.2); color:#8cddb4; font-size:13px; font-weight:750; }
.financial-overdue-alert.is-alert .financial-overdue-mark { background:rgba(255,173,141,.22); color:#ffad8d; }
.financial-overdue-alert div { min-width:0; }
.financial-overdue-alert strong { display:block; margin-bottom:2px; color:#fff; font-size:11px; font-weight:650; }
.financial-overdue-alert p { margin:0; color:rgba(255,255,255,.62); font-size:10px; line-height:1.35; }
.financial-trend { margin-top:20px; border-top:1px solid rgba(255,255,255,.13); padding-top:17px; }
.financial-trend-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:9px; }
.financial-trend-heading h3 { margin:0 0 3px; color:#fff; font-size:13px; font-weight:650; letter-spacing:-.02em; }
.financial-trend-heading span { color:rgba(255,255,255,.52); font-size:10px; }
.financial-trend-heading > strong { color:#fff; font-size:14px; font-weight:650; white-space:nowrap; }
.financial-trend-chart { height:94px; }
.financial-trend-chart svg { display:block; width:100%; height:100%; overflow:visible; }
.financial-trend-grid line { stroke:rgba(255,255,255,.11); stroke-width:1; stroke-dasharray:3 4; }
.financial-trend-area { fill:rgba(140,221,180,.13); }
.financial-trend-line { fill:none; stroke:#8cddb4; stroke-linecap:round; stroke-linejoin:round; stroke-width:2.5; }
.financial-trend-dots circle { fill:#20282c; stroke:#8cddb4; stroke-width:2; }
.financial-trend-labels { display:grid; grid-template-columns:repeat(6,1fr); gap:4px; margin-top:3px; color:rgba(255,255,255,.48); font-size:9px; text-align:center; text-transform:capitalize; }
.workspace-section-heading { align-items:end; margin-bottom:20px; }
.workspace-filter label,.workspace-select-label { display:grid; gap:6px; color:var(--muted); font-size:10px; font-weight:600; }
.workspace-filter select,.workspace-select-label select { min-width:150px; min-height:38px; border:1px solid var(--line-strong); border-radius:8px; padding:0 10px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; font-weight:400; }
.workspace-table-wrap { overflow:auto; border:1px solid var(--line); border-radius:13px; background:var(--surface); box-shadow:var(--shadow-sm); }
.workspace-table { width:100%; min-width:820px; border-collapse:collapse; }
.workspace-table th { padding:11px 14px; background:var(--surface-soft); color:var(--muted); font-size:10px; font-weight:650; letter-spacing:.08em; text-align:left; text-transform:uppercase; }
.workspace-table td { padding:13px 14px; border-top:1px solid var(--line); color:var(--ink); font-size:12px; vertical-align:middle; }
.workspace-table td strong,.workspace-table td span { display:block; }
.workspace-table td strong { margin-bottom:3px; font-size:12px; font-weight:600; }
.workspace-table td span:not(.workspace-status-badge) { color:var(--muted); font-size:11px; }
.workspace-table td.workspace-status-cell,.workspace-table td.workspace-action-cell { text-align:right; }
.workspace-table td.workspace-lead-age { color:var(--muted); white-space:nowrap; }
.workspace-table td span.workspace-status-badge { display:inline-flex; width:116px; min-width:116px; box-sizing:border-box; align-items:center; gap:5px; padding:4px 8px; }
.workspace-table td .workspace-status-badge > span:not(.workspace-status-icon) { display:inline; color:inherit; font-size:inherit; }
.workspace-table td .workspace-status-badge .workspace-status-icon { display:grid; flex:0 0 15px; place-items:center; width:15px; height:15px; margin:0; border-radius:50%; font-size:9px; font-weight:800; line-height:1; }
.workspace-table td .workspace-status-badge.is-contratado .workspace-status-icon { background:rgba(25,115,76,.16); color:#19734c; }
.workspace-table td .workspace-status-badge.is-pendente .workspace-status-icon { background:rgba(179,62,52,.14); color:#b33e34; }
.workspace-table tr:hover td { background:#fffaf7; }
.lead-sort-toggle { display:inline-grid; place-items:center; width:19px; height:19px; margin-left:4px; border:1px solid var(--line-strong); border-radius:50%; padding:0; background:var(--surface); color:var(--muted-strong); cursor:pointer; font:inherit; font-size:13px; font-weight:700; line-height:1; vertical-align:middle; transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease; }
.lead-sort-toggle:hover,.lead-sort-toggle:focus-visible { border-color:var(--orange); background:#fffaf7; color:var(--orange-dark); outline:0; transform:translateY(-1px); }
.lead-sort-toggle:focus-visible { box-shadow:0 0 0 3px rgba(241,90,36,.12); }
.workspace-row-action { display:inline-flex; align-items:center; gap:6px; min-height:30px; border:1px solid transparent; border-radius:7px; padding:5px 7px 5px 8px; background:transparent; color:var(--orange-dark); cursor:pointer; font:inherit; font-size:11px; font-weight:650; white-space:nowrap; transition:border-color .2s ease,background .2s ease,color .2s ease,transform .2s ease; }
.workspace-table td .workspace-row-action span { display:grid!important; place-items:center; width:18px; height:18px; margin:0; border-radius:50%; background:#fff0e9; color:var(--orange-dark); font-size:13px; font-weight:500; line-height:1; }
.workspace-row-action:hover,.workspace-row-action:focus-visible { border-color:rgba(241,90,36,.35); background:#fffaf7; color:var(--orange-dark); outline:0; transform:translateY(-1px); }
.workspace-row-action:focus-visible { box-shadow:0 0 0 3px rgba(241,90,36,.12); }
.table-help { display:inline-grid!important; place-items:center; width:14px; height:14px; margin-left:3px; border:1px solid currentColor; border-radius:50%; color:var(--muted); font-size:9px!important; font-weight:750; line-height:1; text-align:center; text-transform:none; vertical-align:middle; cursor:help; }
.workspace-empty { margin:0; padding:24px; color:var(--muted); font-size:12px; text-align:center; }
.form-builder-layout,.content-editor-layout { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); gap:18px; align-items:start; }
.form-builder,.form-builder-preview,.workspace-form,.benefit-preview { padding:22px; }
.form-fields-list { display:grid; gap:1px; margin-bottom:18px; border-top:1px solid var(--line); }
.form-field-row { display:grid; grid-template-columns:20px minmax(0,1fr) auto auto auto; align-items:center; gap:12px; min-height:64px; border-bottom:1px solid var(--line); }
.form-field-row.is-disabled { opacity:.58; }
.form-field-grip { color:var(--muted); font-size:16px; letter-spacing:-5px; }
.form-field-main { display:grid; min-width:0; gap:4px; }
.form-field-main strong { overflow:hidden; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.form-field-main small { color:var(--muted); font-size:10px; }
.form-field-toggle { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:10px; white-space:nowrap; }
.form-field-actions { display:flex; align-items:center; gap:10px; }
.form-field-edit { border:0; padding:0; background:transparent; color:var(--orange-dark); cursor:pointer; font:inherit; font-size:10px; font-weight:650; }
.form-field-delete { border:0; background:transparent; color:#b33e34; cursor:pointer; font:inherit; font-size:10px; }
.form-field-editor { grid-column:2 / -1; border-top:1px solid var(--line); padding:14px 0 16px; }
.form-field-editor-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.form-field-editor-form label { display:grid; gap:5px; color:var(--muted-strong); font-size:10px; font-weight:650; }
.form-field-editor-form input,.form-field-editor-form select,.form-field-editor-form textarea { width:100%; min-height:40px; border:1px solid var(--line-strong); border-radius:8px; padding:9px 10px; background:var(--surface); color:var(--ink); font:inherit; font-size:11px; font-weight:400; }
.form-field-editor-form textarea { min-height:98px; resize:vertical; line-height:1.45; }
.form-field-editor-form input:focus,.form-field-editor-form select:focus,.form-field-editor-form textarea:focus { border-color:var(--orange); outline:0; box-shadow:0 0 0 3px rgba(241,90,36,.1); }
.form-field-editor-form small { display:block; margin-top:5px; color:var(--muted); font-size:9px; font-weight:400; }
.form-field-editor-actions { display:flex; align-items:center; gap:8px; grid-column:1 / -1; }
.form-field-options-control { grid-column:1 / -1; }
.form-field-editor-actions .workspace-primary-button,.form-field-editor-actions .workspace-secondary-button { min-height:34px; padding:7px 10px; font-size:11px; }
.form-field-add { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr); gap:16px; margin-top:24px; border-top:1px solid var(--line); padding-top:24px; }
.form-field-add-heading,.form-field-add-placeholder,.form-field-add-options,.form-field-add-actions { grid-column:1 / -1; }
.form-field-add-heading { display:grid; gap:5px; margin-bottom:2px; }
.form-field-add-heading h4 { margin:0; color:var(--ink); font-size:18px; letter-spacing:-.025em; }
.form-field-add-heading > p:last-child { max-width:650px; margin:0; color:var(--muted); font-size:11px; line-height:1.5; }
.form-field-add > label { display:grid; align-content:start; gap:7px; color:var(--muted-strong); font-size:11px; font-weight:650; }
.form-field-add > label small { color:var(--muted); font-size:10px; font-weight:400; line-height:1.45; }
.form-field-add-options textarea { min-height:108px; resize:vertical; line-height:1.5; }
.form-field-add-actions { display:flex; align-items:center; padding-top:2px; }
.form-field-add input,.form-field-add select,.workspace-form input,.workspace-form select,.workspace-form textarea { width:100%; min-height:42px; border:1px solid var(--line-strong); border-radius:8px; padding:9px 11px; background:#fbfcfc; color:var(--ink); font:inherit; font-size:12px; font-weight:400; }
.workspace-form label small { color:var(--muted); font-size:10px; font-weight:400; line-height:1.4; }
.workspace-form label small strong { color:var(--orange-dark); font-weight:700; }
.workspace-form > label.workspace-wide { grid-column:1 / -1; }
.workspace-form textarea { min-height:130px; resize:vertical; line-height:1.45; }
.workspace-form label { display:grid; gap:6px; color:var(--muted-strong); font-size:11px; font-weight:600; }
.workspace-rich-text-field { display:grid; gap:6px; color:var(--muted-strong); font-size:11px; font-weight:600; }
.workspace-field-label { display:block; }
.rich-text-editor { overflow:hidden; border:1px solid var(--line-strong); border-radius:8px; background:#fbfcfc; transition:border-color .2s ease,box-shadow .2s ease,background .2s ease; }
.rich-text-editor:focus-within { border-color:var(--orange); background:#fff; box-shadow:0 0 0 3px rgba(241,90,36,.1); }
.rich-text-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-height:47px; border-bottom:1px solid var(--line); padding:7px 8px; background:var(--surface-soft); }
.rich-text-block-styles { display:flex; align-items:center; gap:2px; border:1px solid var(--line); border-radius:8px; padding:2px; background:#fff; }
.rich-text-toolbar-divider { width:1px; height:20px; margin:0 3px; background:var(--line-strong); }
.rich-text-toolbar button { display:inline-flex; min-height:29px; align-items:center; justify-content:center; gap:5px; border:1px solid transparent; border-radius:6px; padding:4px 9px; background:transparent; color:var(--muted-strong); cursor:pointer; font:inherit; font-size:10px; font-weight:600; line-height:1.15; }
.rich-text-toolbar button:hover,.rich-text-toolbar button:focus-visible { border-color:rgba(241,90,36,.35); background:#fff; color:var(--orange-dark); outline:0; }
.rich-text-block-styles button[data-rich-block="p"] { font-weight:500; }
.rich-text-block-styles button[data-rich-block="h2"] { font-size:11px; font-weight:750; }
.rich-text-block-styles button[data-rich-block="h3"] { font-weight:650; }
.rich-text-block-styles button.is-active { border-color:var(--ink); background:var(--ink); color:#fff; }
.rich-text-block-styles button.is-active:hover,.rich-text-block-styles button.is-active:focus-visible { border-color:var(--ink); background:var(--ink); color:#fff; }
.rich-text-surface { height:auto; min-height:196px; max-height:none; overflow:visible; overflow-wrap:anywhere; padding:15px 16px; color:var(--ink); font-size:13px; font-weight:400; line-height:1.65; outline:0; }
.rich-text-surface:empty::before { content:attr(data-placeholder); color:var(--muted); pointer-events:none; }
.rich-text-surface p,.rich-text-surface div { margin:0 0 11px; }
.rich-text-surface p:last-child,.rich-text-surface div:last-child { margin-bottom:0; }
.rich-text-surface h2 { margin:24px 0 9px; color:var(--ink); font-size:21px; font-weight:720; letter-spacing:-.035em; line-height:1.16; text-wrap:balance; }
.rich-text-surface h3 { margin:18px 0 7px; color:var(--ink); font-size:16px; font-weight:650; letter-spacing:-.015em; line-height:1.28; text-wrap:balance; }
.rich-text-surface h2:first-child,.rich-text-surface h3:first-child { margin-top:0; }
.rich-text-surface ul,.rich-text-surface ol { margin:0 0 11px; padding-left:22px; }
.benefit-preview-description { margin:0; color:var(--muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; text-wrap:pretty; white-space:pre-line; }
.workspace-form small { color:var(--muted); font-size:10px; font-weight:400; line-height:1.4; }
.workspace-form { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.benefit-edit-form { grid-template-columns:minmax(0,1.75fr) minmax(210px,.65fr); align-items:start; }
.benefit-edit-form > .benefit-title-field,.benefit-edit-form > .benefit-category-field { align-self:start; align-content:start; }
.benefit-edit-form > .benefit-title-field input,.benefit-edit-form > .benefit-category-field select { min-height:42px; height:42px; }
.benefit-offer-editor { min-width:0; margin:4px 0 2px; border:1px solid #f0c7b5; border-radius:12px; padding:18px; background:#fffaf7; }
.benefit-offer-editor legend { margin:0; padding:0 7px; color:var(--muted-strong); font-size:11px; font-weight:600; letter-spacing:0; line-height:1.2; }
.benefit-offer-editor > p { margin:0 0 14px; color:var(--muted); font-size:11px; font-weight:400; line-height:1.45; }
.benefit-offer-editor > small { display:block; margin-top:8px; color:var(--muted); font-size:10px; font-weight:400; line-height:1.4; }
.benefit-offer-toggle { display:flex!important; align-items:center; gap:8px; margin:0 0 14px; color:var(--muted-strong)!important; font-size:11px!important; font-weight:600!important; }
.benefit-offer-toggle input { flex:none; width:16px!important; min-height:16px!important; height:16px; margin:0; accent-color:var(--orange); }
.benefit-offer-editor.is-disabled .benefit-offer-fields { opacity:.52; }
.benefit-offer-editor.is-disabled .benefit-offer-help { color:var(--muted-strong); }
.benefit-offer-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.benefit-offer-fields label { align-content:start; }
.benefit-offer-value-control { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; min-height:42px; overflow:hidden; border:1px solid var(--line-strong); border-radius:8px; background:#fbfcfc; }
.benefit-offer-value-control:focus-within { border-color:var(--orange); box-shadow:0 0 0 3px var(--focus-ring); }
.benefit-offer-value-control > span { padding:0 11px; color:var(--muted-strong); font-size:12px; font-weight:650; }
.benefit-offer-value-control input { width:100%; min-height:40px!important; height:40px; border:0!important; border-radius:0!important; padding-right:2px!important; padding-left:2px!important; background:transparent!important; box-shadow:none!important; }
.workspace-wide { grid-column:1 / -1; }
.workspace-form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; grid-column:1 / -1; }
.workspace-primary-button,.workspace-secondary-button { min-height:40px; border-radius:8px; padding:9px 13px; cursor:pointer; font:inherit; font-size:12px; font-weight:650; }
.workspace-primary-button { border:1px solid var(--orange); background:var(--orange); color:#fff; box-shadow:0 6px 14px rgba(241,90,36,.14); }
.workspace-primary-button:hover { background:var(--orange-dark); }
.workspace-secondary-button { border:1px solid var(--line-strong); background:var(--surface); color:var(--muted-strong); }
.workspace-secondary-button:hover { border-color:var(--orange); color:var(--orange-dark); }
.form-builder-preview { position:sticky; top:104px; }
.form-preview-fields { display:grid; gap:16px; }
.form-preview-fields label { display:grid; gap:7px; color:var(--muted-strong); font-size:11px; font-weight:650; line-height:1.3; }
.form-preview-fields input,.form-preview-fields select,.form-preview-fields textarea { width:100%; min-height:44px; border:1px solid var(--line-strong); border-radius:9px; padding:0 12px; background:#f8faf9; color:var(--muted-strong); font:inherit; font-size:12px; font-weight:400; opacity:1; -webkit-text-fill-color:var(--muted-strong); }
.form-preview-fields select { padding-right:36px; color-scheme:light; }
.form-preview-fields textarea { min-height:92px; padding-top:11px; padding-bottom:11px; resize:none; line-height:1.45; }
.form-preview-fields input::placeholder,.form-preview-fields textarea::placeholder { color:#8d989f; opacity:1; -webkit-text-fill-color:#8d989f; }
.form-preview-consent { display:grid!important; grid-template-columns:18px minmax(0,1fr); align-items:start; gap:10px!important; margin-top:2px; border-top:1px solid var(--line); padding-top:16px; color:var(--muted)!important; font-size:10px!important; font-weight:400!important; line-height:1.5; }
.form-preview-consent input { appearance:none; width:18px; min-height:18px; height:18px; margin:0; border:1px solid var(--line-strong); border-radius:5px; padding:0; background:#fff; opacity:1; }
.benefit-preview { overflow:hidden; padding:0; }
.benefit-preview-media { aspect-ratio:1.55 / 1; overflow:hidden; background:var(--surface-soft); }
.benefit-preview-media img { display:block; width:100%; height:100%; object-fit:cover; }
.benefit-preview-copy { padding:18px; }
.benefit-preview-copy h3 { margin:0 0 7px; font-size:20px; font-weight:650; letter-spacing:-.04em; }
.benefit-preview-copy p:last-child { margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.workspace-dialog { width:min(calc(100% - 32px),620px); border:1px solid var(--line); border-radius:16px; padding:24px; background:var(--surface); color:var(--ink); box-shadow:0 24px 70px rgba(20,25,30,.22); }
.workspace-dialog::backdrop { background:rgba(18,24,28,.4); backdrop-filter:blur(4px); }
.workspace-dialog-heading { display:flex; align-items:start; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.workspace-dialog-heading h2 { margin:0 0 6px; font-size:30px; font-weight:650; letter-spacing:-.055em; line-height:.98; }
.workspace-dialog-subtitle { margin:0; color:var(--muted); font-size:12px; }
.workspace-dialog .dialog-close { width:32px; height:32px; border:1px solid var(--line); border-radius:50%; background:var(--surface-soft); color:var(--muted); cursor:pointer; font-size:21px; line-height:1; }
.workspace-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 24px; padding:20px 0; }
.workspace-detail-grid dt { margin-bottom:4px; color:var(--muted); font-size:9px; font-weight:650; letter-spacing:.12em; text-transform:uppercase; }
.workspace-detail-grid dd { margin:0; color:var(--ink); font-size:13px; overflow-wrap:anywhere; }
.lead-contact-grid { gap:10px; padding:18px 0 20px; }
.lead-contact-item { min-width:0; border:1px solid var(--line); border-radius:11px; padding:13px 14px; background:#fbfcfc; }
.lead-contact-item.is-primary { border-color:#dce5e6; background:#f8fbfb; }
.lead-contact-item dt { margin-bottom:7px; }
.lead-contact-item dd { font-size:14px; font-weight:550; line-height:1.3; }
.lead-contact-item dd a { color:inherit; text-decoration:none; text-decoration-color:rgba(241,90,36,.45); text-underline-offset:3px; }
.lead-contact-item dd a:hover,.lead-contact-item dd a:focus-visible { color:var(--orange-dark); text-decoration:underline; }
.workspace-status-form { display:grid; grid-template-columns:1fr auto; align-items:end; gap:12px; padding:17px 0; border-top:1px solid var(--line); }
.workspace-status-form label { display:grid; gap:6px; color:var(--muted-strong); font-size:11px; font-weight:600; }
.workspace-status-form select { min-height:40px; border:1px solid var(--line-strong); border-radius:8px; padding:0 10px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; font-weight:400; }
.workspace-result-section { display:flex; align-items:end; justify-content:space-between; gap:18px; padding-top:18px; border-top:1px solid var(--line); }
.workspace-result-section h3 { margin:0 0 5px; font-size:17px; font-weight:650; letter-spacing:-.035em; }
.workspace-result-section p:last-child { max-width:340px; margin:0; color:var(--muted); font-size:11px; line-height:1.4; }
.workspace-document-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; border-top:1px solid var(--line); padding-top:14px; color:var(--muted); font-size:11px; }
.workspace-document-row button { border:0; background:transparent; color:var(--orange-dark); cursor:pointer; font:inherit; font-size:11px; font-weight:650; }
.closing-dialog .workspace-form { margin-top:20px; }
@media (max-width:900px) { .workspace-kpis { grid-template-columns:repeat(2,1fr); } .workspace-columns,.form-builder-layout,.content-editor-layout { grid-template-columns:1fr; } .form-builder-preview { position:static; } }
@media (max-width:620px) { .workspace-heading,.workspace-section-heading { align-items:start; flex-direction:column; } .workspace-heading-actions { width:100%; justify-content:space-between; } .workspace-nav { gap:17px; overflow-x:auto; } .workspace-kpis { grid-template-columns:1fr 1fr; } .workspace-kpis article { min-height:112px; padding:14px; } .workspace-kpis strong { font-size:22px; } .form-field-row { grid-template-columns:18px minmax(0,1fr) auto; gap:8px; padding:9px 0; } .form-field-toggle { font-size:0; } .form-field-toggle input { width:16px; height:16px; } .form-field-delete { grid-column:auto; justify-self:start; } .form-field-actions { grid-column:2 / -1; justify-self:start; } .form-field-editor { grid-column:2 / -1; } .form-field-editor-form { grid-template-columns:1fr; } .form-field-editor-actions { grid-column:auto; flex-wrap:wrap; } .form-field-add,.workspace-form,.benefit-edit-form { grid-template-columns:1fr; } .workspace-wide,.workspace-form-actions { grid-column:auto; } .workspace-detail-grid { grid-template-columns:1fr; gap:12px; } .workspace-status-form { grid-template-columns:1fr; } .workspace-status-form button { width:100%; } .workspace-result-section { align-items:start; flex-direction:column; } .workspace-result-section button { width:100%; } }
@media (max-width:620px) { .benefit-offer-fields { grid-template-columns:1fr; } .benefit-offer-editor { padding:15px; } }

/* Pipeline: uma única leitura visual, sem cartões duplicados nem colunas vazias. */
.pipeline-summary { display:none; }
.pipeline-chart { display:block; height:auto; margin:0 0 18px; padding:0 0 18px; border-bottom:1px solid var(--line); }
.pipeline-distribution-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.pipeline-distribution-head div { display:flex; align-items:baseline; gap:8px; }
.pipeline-distribution-head strong { color:var(--ink); font-size:30px; font-weight:650; letter-spacing:-.05em; line-height:1; }
.pipeline-distribution-head span { color:var(--muted); font-size:11px; }
.pipeline-distribution-context { letter-spacing:.08em; text-transform:uppercase; }
.pipeline-distribution-track { display:flex; width:100%; height:10px; overflow:hidden; border-radius:999px; background:#eef1f1; }
.pipeline-distribution-track.is-empty { background:#eef1f1; }
.pipeline-distribution-track span { display:block; min-width:0; height:100%; transition:width .25s ease; }
.pipeline-distribution-track .is-pending { background:#d34a3d; }
.pipeline-distribution-track .is-contracted { background:#20865a; }
.pipeline-distribution-legend { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.pipeline-distribution-legend span { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:7px; min-width:0; color:var(--muted); font-size:11px; }
.pipeline-distribution-legend i { width:8px; height:8px; border-radius:50%; }
.pipeline-distribution-legend i.is-pending { background:#d34a3d; }
.pipeline-distribution-legend i.is-contracted { background:#20865a; }
.pipeline-distribution-legend strong { color:var(--muted-strong); font-weight:600; }
.pipeline-distribution-legend b { color:var(--ink); font-weight:650; }
@media (max-width:620px) { .pipeline-distribution-head strong { font-size:26px; } .pipeline-distribution-context { font-size:9px!important; } }

/* Leads: filtros compactos, combináveis e fáceis de escanear. */
.leads-summary-kpis { margin:0 0 24px; }
.leads-summary-kpis article { min-height:96px; padding:16px 18px; }
.leads-summary-kpis strong { margin:10px 0 5px; font-size:24px; }
.leads-summary-kpis small { font-size:10px; }
.lead-pagination { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:12px 2px 0; color:var(--muted); font-size:10px; }
.lead-pagination-controls { display:flex; gap:6px; }
.lead-pagination-controls button { min-height:30px; border:1px solid var(--line); border-radius:999px; padding:5px 11px; background:var(--surface); color:var(--muted-strong); cursor:pointer; font:inherit; font-size:10px; font-weight:650; }
.lead-pagination-controls button:hover:not(:disabled) { border-color:var(--orange); color:var(--orange-dark); }
.lead-pagination-controls button:disabled { cursor:not-allowed; opacity:.45; }
.lead-filter-stack { display:grid; justify-items:stretch; gap:12px; width:min(100%,660px); margin-left:auto; }
.lead-filter-search { display:grid; gap:5px; width:100%; color:var(--muted); font-size:10px; font-weight:650; }
.lead-search-control { position:relative; display:block; }
.lead-search-control input { width:100%; height:32px; min-height:32px; border:1px solid var(--line-strong); border-radius:8px; padding:0 34px 0 11px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; font-weight:400; outline:none; }
.lead-search-control input::placeholder { color:var(--muted); }
.lead-search-control input:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(241,90,36,.12); }
.lead-search-control button { position:absolute; top:50%; right:8px; display:grid; place-items:center; width:22px; height:22px; transform:translateY(-50%); border:0; border-radius:50%; background:var(--surface-soft); color:var(--muted-strong); cursor:pointer; font-size:17px; line-height:1; }
.lead-filter-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.lead-filter-row { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.lead-filter-label { color:var(--muted); font-size:10px; font-weight:650; }
.lead-filter-buttons { display:inline-flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
.lead-filter-button { min-height:30px; border:1px solid var(--line); border-radius:999px; padding:5px 10px; background:transparent; color:var(--muted-strong); cursor:pointer; font:inherit; font-size:10px; font-weight:600; transition:background .18s ease,border-color .18s ease,color .18s ease; }
.lead-filter-button:hover { border-color:var(--orange); color:var(--orange-dark); }
.lead-filter-button.is-active { border-color:var(--ink); background:var(--ink); color:#fff; }
.lead-filter-custom { display:flex; align-items:end; justify-content:flex-end; gap:7px; width:100%; }
.lead-filter-custom label { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:650; }
.lead-filter-custom input { min-height:30px; border:1px solid var(--line-strong); border-radius:7px; padding:0 8px; background:var(--surface); color:var(--ink); font:inherit; font-size:11px; font-weight:400; }
.lead-filter-custom input:focus { border-color:var(--orange); outline:0; box-shadow:0 0 0 3px rgba(241,90,36,.12); }
.lead-filter-custom > span { padding-bottom:8px; color:var(--muted); font-size:10px; }
.lead-filter-clear { min-height:30px; border:0; padding:5px 0; background:transparent; color:var(--orange-dark); cursor:pointer; font:inherit; font-size:10px; font-weight:650; }
.lead-filter-result { margin:0; color:var(--muted); font-size:10px; }

/* Pipeline: duas leituras operacionais separadas dentro do mesmo contexto. */
#overview-leads.pipeline-recent-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.pipeline-recent-card { min-width:0; border:1px solid var(--line); border-radius:11px; padding:14px; background:#fbfcfc; }
.pipeline-recent-card-heading { display:flex; align-items:start; justify-content:space-between; gap:12px; margin-bottom:7px; }
.pipeline-recent-card-heading .workspace-eyebrow { margin-bottom:5px; font-size:9px; }
.pipeline-recent-card-heading h3 { margin:0 0 3px; color:var(--ink); font-size:15px; font-weight:650; letter-spacing:-.035em; }
.pipeline-recent-card-heading span { color:var(--muted); font-size:10px; }
.pipeline-recent-card-heading > strong { display:grid; place-items:center; min-width:23px; height:23px; border-radius:50%; background:var(--surface); color:var(--muted-strong); font-size:10px; font-weight:650; }
.pipeline-recent-card .workspace-mini-row { padding:9px 0; }
.pipeline-recent-empty { margin:0; padding:14px 0 4px; color:var(--muted); font-size:10px; }
@media (max-width:900px) { .lead-filter-stack { justify-items:start; width:100%; margin-left:0; } .lead-filter-search { width:100%; } .lead-filter-row { justify-content:flex-start; } .lead-filter-buttons { justify-content:flex-start; } }
@media (max-width:620px) { #overview-leads.pipeline-recent-grid { grid-template-columns:1fr; } .lead-filter-custom { align-items:stretch; flex-wrap:wrap; justify-content:flex-start; } .lead-filter-custom > span { display:none; } .lead-filter-custom label { flex:1 1 130px; } .lead-filter-clear { flex:0 0 auto; } .lead-pagination { align-items:flex-start; flex-direction:column; } }

/* Visão geral: o período é parte do contexto dos números, não um detalhe escondido. */
.workspace-pipeline > .workspace-panel-heading .workspace-eyebrow { display:none; }
.workspace-section-heading .workspace-eyebrow { display:none; }
.overview-period-filter { margin:0 0 26px; border-bottom:1px solid var(--line); padding:0 0 17px; }
.overview-period-filter .overview-period-row { margin:0; }
.overview-period-copy { display:grid!important; gap:4px!important; }
.overview-period-copy small { color:var(--muted); font-size:10px; }
.overview-period-row { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.overview-period-row > div:first-child { display:grid; gap:4px; }
.overview-period-label { color:var(--muted); font-size:10px; font-weight:650; letter-spacing:.08em; text-transform:uppercase; }
.overview-period-row strong { color:var(--ink); font-size:13px; font-weight:650; }
.overview-period-buttons { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
.overview-period-button { min-height:28px; border:1px solid var(--line); border-radius:999px; padding:5px 9px; background:transparent; color:var(--muted-strong); cursor:pointer; font:inherit; font-size:10px; font-weight:600; }
.overview-period-button:hover { border-color:var(--orange); color:var(--orange-dark); }
.overview-period-button.is-active { border-color:var(--ink); background:var(--ink); color:#fff; }
.overview-period-custom { display:flex; align-items:end; justify-content:flex-end; gap:7px; margin:14px 0 0; }
.overview-period-custom label { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:650; }
.overview-period-custom input { min-height:29px; border:1px solid var(--line-strong); border-radius:7px; padding:0 8px; background:var(--surface); color:var(--ink); font:inherit; font-size:11px; font-weight:400; }
.overview-period-custom input:focus { border-color:var(--orange); outline:0; box-shadow:0 0 0 3px rgba(241,90,36,.12); }
.overview-period-custom > span { padding-bottom:7px; color:var(--muted); font-size:10px; }
.overview-period-custom button { min-height:29px; border:0; padding:5px 0; background:transparent; color:var(--orange-dark); cursor:pointer; font:inherit; font-size:10px; font-weight:650; }
.overview-period-custom .overview-period-apply { border:1px solid var(--orange); border-radius:7px; padding:5px 9px; background:var(--orange); color:#fff; }
@media (max-width:900px) { .overview-period-row { align-items:start; flex-direction:column; } .overview-period-buttons { justify-content:flex-start; } }
@media (max-width:620px) { .overview-period-custom { align-items:stretch; flex-wrap:wrap; justify-content:flex-start; } .overview-period-custom > span { display:none; } .overview-period-custom label { flex:1 1 130px; } }

/* Benefícios: primeiro o catálogo, depois a edição contextual do benefício selecionado. */
.benefit-picker-view .workspace-section-heading { margin-bottom:20px; }
.partner-benefit-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.partner-benefit-card { display:flex; min-width:0; flex-direction:column; overflow:hidden; border:1px solid #e6e7e8; border-radius:16px; background:var(--surface); box-shadow:0 8px 22px rgba(31,38,45,.055); color:var(--ink); cursor:pointer; padding:0; text-align:left; transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease; }
.partner-benefit-card:hover,.partner-benefit-card:focus-visible { border-color:#efb99f; box-shadow:0 16px 30px rgba(31,38,45,.1); outline:0; transform:translateY(-3px); }
.partner-benefit-card-media { display:block; aspect-ratio:1.77/1; overflow:hidden; background:linear-gradient(120deg,#eef1f2,#e7dfdd); }
.partner-benefit-card-media img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.partner-benefit-card:hover .partner-benefit-card-media img,.partner-benefit-card:focus-visible .partner-benefit-card-media img { transform:scale(1.03); }
.partner-benefit-card-body { display:grid; gap:8px; padding:17px 16px 18px; }
.partner-benefit-card-kicker { color:var(--orange-dark); font-size:9px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.partner-benefit-card-body strong { min-height:38px; color:var(--ink); font-size:17px; font-weight:650; letter-spacing:-.04em; line-height:1.12; }
.partner-benefit-card-description { display:-webkit-box; min-height:43px; overflow:hidden; color:var(--muted); font-size:11px; line-height:1.45; white-space:pre-line; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.partner-benefit-card-action { display:inline-flex; align-items:center; justify-self:start; gap:8px; margin-top:4px; border-radius:8px; padding:8px 10px; background:#fff3ed; color:var(--orange-dark); font-size:11px; font-weight:700; line-height:1.2; transition:background .2s ease,color .2s ease,transform .2s ease; }
.partner-benefit-card-action svg { width:15px; height:15px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.partner-benefit-card:hover .partner-benefit-card-action,.partner-benefit-card:focus-visible .partner-benefit-card-action { background:var(--orange); color:#fff; transform:translateY(-1px); }
.is-benefits-view .workspace-heading { margin-bottom:22px; border-bottom:1px solid var(--line); padding-bottom:22px; }
.benefit-editor-heading { display:grid; gap:14px; margin:0 0 18px; border-bottom:1px solid var(--line); padding:20px 0 22px; }
.benefit-editor-heading > .workspace-inline-link { justify-self:start; }
.benefit-editor-context { display:grid; gap:5px; }
.benefit-editor-heading .workspace-eyebrow { margin:0; }
.benefit-editor-heading h2 { margin:0; font-size:clamp(26px,3vw,38px); line-height:1; }
.workspace-subnav { display:flex; gap:22px; margin:0 0 22px; border-bottom:1px solid var(--line); }
.workspace-subnav button { position:relative; min-height:38px; border:0; border-bottom:2px solid transparent; padding:0 0 10px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:12px; font-weight:600; }
.workspace-subnav button:hover { color:var(--ink); }
.workspace-subnav button.is-active { border-bottom-color:var(--orange); color:var(--ink); }
.benefit-editor-view[hidden],.benefit-editor-panel[hidden] { display:none!important; }
@media (max-width:900px) { .partner-benefit-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .partner-benefit-cards { grid-template-columns:1fr; } .workspace-subnav { gap:18px; overflow-x:auto; } .workspace-subnav button { flex:0 0 auto; } }

/* Cabeçalho de Leads: título e filtros compartilham o mesmo eixo superior. */
.workspace-section-heading { align-items:flex-start; }
.workspace-section-heading .workspace-eyebrow { display:none!important; }
.workspace-section-heading .workspace-filter { flex:0 1 660px; min-width:0; }
.workspace-section-heading .lead-filter-stack { width:min(100%,660px); min-width:0; }

/* Imagem do benefício: a própria prévia é o ponto de edição. */
.benefit-preview-media { position:relative; display:block; width:100%; border:0; padding:0; color:inherit; cursor:pointer; font:inherit; text-align:left; }
.benefit-preview-media:focus-visible { outline:3px solid rgba(241,90,36,.42); outline-offset:-3px; }
.benefit-preview-offer { position:absolute; z-index:4; top:18px; left:18px; display:grid; gap:2px; border-radius:10px; padding:9px 12px; background:#171a1d; color:#fff; box-shadow:0 8px 20px rgba(16,20,24,.25); pointer-events:none; }
.benefit-preview-offer[hidden] { display:none; }
.benefit-preview-offer small { color:#fff; font-size:8px; font-weight:700; letter-spacing:.12em; line-height:1; text-transform:uppercase; }
.benefit-preview-offer strong { color:#fff; font-size:15px; font-weight:750; line-height:1.08; }
.benefit-image-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:4px; background:rgba(25,31,35,.56); color:#fff; opacity:0; transition:opacity .2s ease; }
.benefit-preview-media:hover .benefit-image-overlay,.benefit-preview-media:focus-visible .benefit-image-overlay { opacity:1; }
.benefit-image-overlay span { font-size:13px; font-weight:700; }
.benefit-image-overlay small { color:rgba(255,255,255,.82); font-size:10px; font-weight:400; }
.benefit-image-dialog { width:min(calc(100% - 32px),640px); }
.benefit-image-dialog .workspace-dialog-heading { border-bottom:1px solid var(--line); padding-bottom:20px; }
.benefit-image-dialog .workspace-dialog-heading h2 { max-width:480px; font-size:clamp(24px,4vw,34px); line-height:1.02; }
.benefit-image-guidelines { display:grid; gap:12px; padding:18px 0 4px; }
.benefit-image-guidelines section { display:grid; gap:7px; border:1px solid var(--line); border-radius:11px; padding:14px 15px; background:var(--surface-soft); }
.benefit-image-guidelines h3 { margin:0; color:var(--ink); font-size:11px; font-weight:750; letter-spacing:.1em; text-transform:uppercase; }
.benefit-image-guidelines p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.benefit-image-guidelines strong { color:var(--ink); font-weight:650; }
.benefit-image-guidelines ul { display:grid; gap:7px; margin:0; padding-left:18px; color:var(--muted); font-size:12px; line-height:1.45; }
.benefit-image-dialog .workspace-form-actions { justify-content:flex-end; margin-top:12px; border-top:1px solid var(--line); padding-top:16px; }
.benefit-image-status { min-height:18px; margin:0; color:#b33e34!important; font-size:11px!important; }
.benefit-image-status:empty { display:none; }

/* Fluxo de fechamento: o status nasce do comprovante registrado, nunca de uma edição manual. */
.workspace-closing-section { margin-top:2px; border-top:1px solid var(--line); padding-top:20px; }
.workspace-closing-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.workspace-closing-heading h3 { margin:0 0 5px; color:var(--ink); font-size:20px; font-weight:650; letter-spacing:-.04em; }
.workspace-closing-heading p:last-child { max-width:470px; margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.lead-age-badge { display:inline-flex; flex:0 0 auto; align-items:center; border-radius:999px; padding:7px 10px; font-size:10px; font-weight:700; white-space:nowrap; }
.lead-age-badge.is-fresh { background:#eef5f5; color:#536770; }
.lead-age-badge.is-aging { background:#fff3e9; color:#b85b23; }
.lead-age-badge.is-overdue { background:#fdecea; color:#b33e34; }
.workspace-closing-action { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:18px; border:1px solid #f2d6c9; border-radius:11px; padding:14px 15px; background:#fffaf7; }
.workspace-closing-action strong { display:block; margin-bottom:4px; color:var(--ink); font-size:12px; font-weight:650; }
.workspace-closing-action p { max-width:440px; margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.workspace-closing-action .workspace-primary-button { display:inline-flex; flex:0 0 auto; align-items:center; gap:9px; min-height:42px; }
.workspace-closing-action .workspace-primary-button span { font-size:16px; font-weight:400; line-height:1; }
.lead-dialog { width:min(calc(100% - 32px),700px); }
.lead-dialog-heading { align-items:flex-start; }
.lead-dialog-title-row { display:flex; align-items:center; min-width:0; }
.lead-dialog-title-row h2 { min-width:0; }
.lead-dialog-heading-actions { display:flex; align-items:flex-start; flex:0 0 auto; }
.lead-dialog-company { color:var(--orange)!important; }
.lead-dialog-subtitle-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.lead-dialog-subtitle-row .workspace-dialog-subtitle { margin:0; }
.lead-next-step { margin-top:0; border-top:0; padding-top:18px; }
.lead-next-step h3 { max-width:560px; }
.lead-closing-urgency { margin:9px 0 0!important; max-width:560px!important; color:var(--muted-strong)!important; font-size:12px!important; font-weight:550; }
.lead-dialog .lead-contact-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; max-height:min(34vh,280px); overflow:auto; border:1px solid #dfe9e9; border-radius:12px; padding:4px 14px; background:#f4f8f8; }
.lead-dialog .lead-contact-item { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:10px 0; background:transparent; }
.lead-dialog .lead-contact-item:nth-last-child(-n+2) { border-bottom:0; }
.lead-dialog .lead-contact-item dt { margin-bottom:4px; font-size:8px; }
.lead-dialog .lead-contact-item dd { font-size:12px; font-weight:550; line-height:1.25; }
.lead-dialog .workspace-closing-action { margin-top:16px; border-color:#cce8d7; background:#f1faf4; }
.lead-dialog .workspace-primary-button.is-success { border-color:#20865a; background:#20865a; box-shadow:0 7px 15px rgba(32,134,90,.16); }
.lead-dialog .workspace-primary-button.is-success:hover { background:#176f49; }
.lead-dialog.is-contracted .workspace-primary-button.is-success { background:#20865a; }
.lead-dialog .workspace-closing-action.is-pending { border-color:#efb3af; background:#fff3f2; }
.lead-dialog .workspace-primary-button.is-pending { border-color:#d63b35; background:#d63b35; box-shadow:none; }
.lead-dialog .workspace-primary-button.is-pending:hover,
.lead-dialog .workspace-primary-button.is-pending:focus-visible { border-color:#b92f2a; background:#b92f2a; box-shadow:none; }
.lead-dialog.is-contracted .lead-next-step { padding-bottom:10px; }
.lead-dialog.is-contracted .lead-next-step h3 { margin-bottom:2px; }
.lead-dialog.is-contracted .lead-closing-urgency { display:none; }
.lead-dialog .lead-age-badge.is-fresh { border:1px solid #f1d27a; background:#fff5c9; color:#896a0b; }
.lead-dialog .lead-age-badge.is-aging { background:#eef5f5; color:#536770; }
.lead-dialog .lead-age-badge.is-overdue { background:#fdecea; color:#b33e34; }
@media (max-width:620px) {
  .lead-dialog-heading-actions { align-items:flex-start; }
  .lead-dialog .lead-contact-grid { grid-template-columns:1fr; max-height:34vh; }
  .lead-dialog .lead-contact-item:nth-last-child(-n+2) { border-bottom:1px solid var(--line); }
  .lead-dialog .lead-contact-item:last-child { border-bottom:0; }
  .workspace-closing-heading,
  .workspace-closing-action { align-items:stretch; flex-direction:column; }
  .workspace-closing-action .workspace-primary-button { width:100%; justify-content:center; }
}

/* Financeiro: extrato operacional com leitura de saldo, situação e vencimento. */
.finance-heading { align-items:end; margin-bottom:22px; }
.finance-heading-meta { display:flex; align-items:center; gap:14px; color:var(--muted); font-size:10px; white-space:nowrap; }
.finance-summary { display:grid; gap:12px; overflow:hidden; margin-bottom:18px; border:1px solid var(--line); border-radius:16px; padding:12px; background:#f8fafa; box-shadow:var(--shadow-sm); }
.finance-summary-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; padding:22px 24px 18px; border-bottom:1px solid var(--line); }
.finance-summary-heading p { margin:0 0 4px; color:var(--ink); font-size:16px; font-weight:650; letter-spacing:-.035em; }
.finance-summary-heading span { color:var(--muted); font-size:11px; line-height:1.4; }
.finance-summary-heading > small { color:var(--muted); font-size:10px; white-space:nowrap; }
.finance-primary-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.finance-primary-kpis { gap:12px; }
.finance-primary-kpis article { display:grid; align-content:start; gap:8px; min-width:0; min-height:142px; border:1px solid var(--line); border-radius:13px; padding:23px 24px 25px; background:var(--surface); box-shadow:var(--shadow-sm); }
.finance-primary-kpis article:last-child { border-right:1px solid var(--line); }
.finance-primary-kpis span,.finance-pending-metrics span { overflow:hidden; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.1em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.finance-primary-kpis strong { color:var(--ink); font-size:30px; font-weight:650; letter-spacing:-.055em; line-height:1; }
.finance-primary-kpis article:nth-child(2) strong { color:var(--orange-dark); }
.finance-primary-kpis small,.finance-pending-metrics small { color:var(--muted); font-size:10px; line-height:1.35; }
.finance-summary-primary { display:grid; min-width:0; min-height:142px; align-content:start; border-color:#20282c!important; background:#20282c!important; color:#fff; box-shadow:0 10px 24px rgba(32,40,44,.14)!important; }
.finance-summary-primary-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.finance-summary-primary-head span { color:rgba(255,255,255,.72); font-size:10px; font-weight:650; letter-spacing:.08em; text-transform:uppercase; }
.finance-summary-primary-head small { color:rgba(255,255,255,.52); font-size:10px; white-space:nowrap; }
.finance-summary-primary > strong { margin-top:18px; color:#fff; font-size:32px; font-weight:650; letter-spacing:-.055em; line-height:1; }
.finance-summary-primary > p { max-width:320px; margin:8px 0 0; color:rgba(255,255,255,.68); font-size:11px; line-height:1.45; }
.finance-secondary-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.finance-secondary-kpis article { display:grid; align-content:start; gap:6px; min-width:0; min-height:92px; border:1px solid var(--line); border-radius:11px; padding:16px 18px 17px; background:var(--surface); }
.finance-secondary-kpis span { overflow:hidden; color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.1em; text-overflow:ellipsis; text-transform:uppercase; white-space:nowrap; }
.finance-secondary-kpis strong { color:var(--ink); font-size:21px; font-weight:650; letter-spacing:-.04em; line-height:1; }
.finance-secondary-kpis strong.is-attention { color:#b33e34; }
.finance-pending-card { margin:0 18px 18px; border:1px solid var(--line); border-radius:12px; background:#f7f9f9; }
.finance-pending-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 17px 12px; border-bottom:1px solid var(--line); }
.finance-pending-heading div { display:grid; gap:3px; min-width:0; }
.finance-pending-heading strong { color:var(--muted-strong); font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.finance-pending-heading span { color:var(--muted); font-size:10px; line-height:1.35; }
.finance-pending-heading > small { color:var(--muted); font-size:10px; white-space:nowrap; }
.finance-pending-metrics { display:grid; grid-template-columns:1fr 1fr; }
.finance-pending-metrics article { display:grid; align-content:start; gap:6px; min-width:0; padding:14px 17px 16px; }
.finance-pending-metrics article + article { border-left:1px solid var(--line); }
.finance-pending-metrics strong { color:var(--ink); font-size:20px; font-weight:650; letter-spacing:-.04em; line-height:1; }
.finance-pending-metrics strong.is-attention { color:#b33e34; }
.finance-rate-note { color:var(--muted); font-size:10px; }
.finance-attention { display:flex; align-items:center; gap:12px; margin-bottom:28px; border:1px solid #f0d9cd; border-radius:11px; padding:13px 15px; background:#fffaf7; }
.finance-attention-icon { display:grid; flex:0 0 25px; place-items:center; width:25px; height:25px; border-radius:50%; background:#f9d7c6; color:#b34d27; font-size:13px; font-weight:750; }
.finance-attention div { min-width:0; }
.finance-attention strong { display:block; margin-bottom:3px; color:var(--ink); font-size:12px; font-weight:650; }
.finance-attention p { margin:0; color:var(--muted); font-size:11px; line-height:1.4; }
.finance-attention-amount { margin-left:auto; color:#b33e34; font-size:15px; font-weight:700; white-space:nowrap; }
.finance-extract-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:13px; }
.finance-extract-heading h3 { margin:0 0 4px; color:var(--ink); font-size:19px; font-weight:650; letter-spacing:-.04em; }
.finance-extract-heading p { margin:0; color:var(--muted); font-size:11px; }
.finance-filters { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.finance-filter-button { min-height:30px; border:1px solid var(--line); border-radius:999px; padding:5px 10px; background:transparent; color:var(--muted-strong); cursor:pointer; font:inherit; font-size:10px; font-weight:600; }
.finance-filter-button:hover { border-color:var(--orange); color:var(--orange-dark); }
.finance-filter-button.is-active { border-color:var(--ink); background:var(--ink); color:#fff; }
.finance-table-wrap { box-shadow:var(--shadow-sm); }
.finance-table { min-width:980px; }
.finance-table th,.finance-table td { padding-left:15px; padding-right:15px; }
.finance-table td strong { font-size:12px; }
.finance-table td span:not(.finance-status-badge):not(.finance-payment-note) { line-height:1.35; }
.finance-status-badge { display:inline-flex; width:116px; min-width:116px; box-sizing:border-box; align-items:center; justify-content:flex-start; border-radius:999px; padding:4px 8px; font-size:10px; font-weight:700; white-space:nowrap; }
.finance-status-badge.is-paid { background:#e8f6ee; color:#19734c; }
.finance-status-badge.is-open { background:#e8f1fb; color:#2f67a0; }
.finance-status-badge.is-overdue { background:#fdecea; color:#b33e34; }
.finance-payment-note { display:block; color:var(--muted); font-size:10px; line-height:1.35; white-space:nowrap; }
.finance-action-cell { text-align:right; }
.finance-row-action { margin-left:auto; }
.finance-charge-dialog { width:min(calc(100% - 32px),700px); }
.finance-charge-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; margin:20px 0; border:1px solid var(--line); border-radius:11px; overflow:hidden; background:var(--line); }
.finance-charge-summary div { display:grid; gap:6px; padding:13px 14px; background:var(--surface); }
.finance-charge-summary dt { color:var(--muted); font-size:10px; font-weight:650; letter-spacing:.08em; text-transform:uppercase; }
.finance-charge-summary dd { margin:0; color:var(--ink); font-size:16px; font-weight:650; }
.finance-charge-items-section { border-top:1px solid var(--line); padding-top:18px; }
.finance-charge-items-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }
.finance-charge-items-heading h3 { margin:0; color:var(--ink); font-size:16px; font-weight:650; letter-spacing:-.03em; }
.finance-charge-items-heading span { color:var(--muted); font-size:11px; }
.finance-charge-items { display:grid; gap:0; border:1px solid var(--line); border-radius:11px; overflow:hidden; }
.finance-charge-item { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:13px 14px; background:var(--surface); }
.finance-charge-item + .finance-charge-item { border-top:1px solid var(--line); }
.finance-charge-item div { display:grid; gap:3px; min-width:0; }
.finance-charge-item strong { color:var(--ink); font-size:12px; font-weight:650; }
.finance-charge-item span,.finance-charge-item small { overflow:hidden; color:var(--muted); font-size:10px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.finance-charge-item b { color:var(--ink); font-size:12px; font-weight:700; white-space:nowrap; }
.finance-charge-dialog .workspace-form-actions { justify-content:flex-end; margin-top:18px; }
.finance-pagination { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:12px 2px 0; color:var(--muted); font-size:10px; }
.finance-pagination-controls { display:flex; gap:6px; }
.finance-pagination-controls button { min-height:30px; border:1px solid var(--line); border-radius:999px; padding:5px 11px; background:var(--surface); color:var(--muted-strong); cursor:pointer; font:inherit; font-size:10px; font-weight:650; }
.finance-pagination-controls button:hover:not(:disabled) { border-color:var(--orange); color:var(--orange-dark); }
.finance-pagination-controls button:disabled { cursor:not-allowed; opacity:.45; }
@media (max-width:900px) {
  .finance-charge-summary { grid-template-columns:1fr; }
  .finance-extract-heading { align-items:start; flex-direction:column; }
  .finance-filters { justify-content:flex-start; }
}
@media (max-width:620px) {
  .finance-heading { align-items:start; }
  .finance-heading-meta { width:100%; justify-content:space-between; }
  .finance-summary { padding:10px; }
  .finance-primary-kpis { grid-template-columns:1fr; }
  .finance-primary-kpis article { min-height:0; padding:16px; border-right:0; border-bottom:1px solid var(--line); }
  .finance-primary-kpis article:last-child { border-bottom:0; }
  .finance-primary-kpis strong { font-size:26px; }
  .finance-secondary-kpis { grid-template-columns:1fr; }
  .finance-secondary-kpis article { min-height:0; padding:13px 14px; }
  .finance-attention { align-items:start; flex-wrap:wrap; }
  .finance-pagination { align-items:flex-start; flex-direction:column; }
  .finance-attention-amount { width:100%; margin-left:37px; }
  .workspace-financial .workspace-panel-heading { align-items:flex-start; flex-direction:column; gap:8px; }
}

/* Cabeçalho e período pertencem ao workspace; os KPIs vivem apenas na visão geral. */
#overview-period-filter { margin-bottom:22px; }

/* Login: ocupa o viewport sem flutuar e mantém o rodapé no limite inferior. */
.portal-shell { display:flex; min-height:100vh; flex-direction:column; }
.portal-header { flex:0 0 auto; }
.portal-main { display:flex; min-height:0; flex:1 0 auto; flex-direction:column; }
.portal-main:has(> #partner-login:not([hidden])) { justify-content:center; }
.portal-main > #partner-login { flex:0 0 auto; }
.portal-main > #partner-dashboard { flex:0 0 auto; width:100%; }
.portal-shell > .site-footer { flex:0 0 auto; width:min(calc(100% - 64px),var(--max)); margin:0 auto; }
@media (max-width:700px) {
  .portal-shell > .site-footer { width:calc(100% - 40px); }
  .portal-main:has(> #partner-login:not([hidden])) { justify-content:flex-start; }
}

@media (max-width:900px) {
  .portal-header { grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:"brand copy actions" "nav nav nav"; row-gap:0; }
  .portal-header .portal-brand { grid-area:brand; }
  .portal-header .portal-header-copy { grid-area:copy; }
  .portal-header .portal-header-actions { grid-area:actions; }
  #portal-view-nav:not([hidden]) { grid-area:nav; justify-content:flex-start; overflow-x:auto; min-width:0; border-top:1px solid var(--line); }
  #portal-view-nav button { min-height:46px; }
}

/* Leads: título primeiro; busca e filtros compartilham a linha de operação abaixo. */
#partner-leads-view > .leads-section-heading { display:block; margin-bottom:15px; }
#partner-leads-view > .leads-controls { margin-bottom:20px; }
#partner-leads-view .workspace-filter { width:100%; min-width:0; }
#partner-leads-view .lead-filter-layout { display:grid; grid-template-columns:minmax(320px,1fr) minmax(620px,auto); align-items:start; gap:26px; }
#partner-leads-view .lead-filter-search { width:min(100%,520px); }
#partner-leads-view .lead-filter-groups { display:grid; grid-template-columns:auto auto; align-items:start; align-content:start; gap:14px 24px; }
#partner-leads-view .lead-filter-row { display:grid; align-items:start; justify-content:stretch; gap:7px; }
#partner-leads-view .lead-filter-label { display:flex; align-items:baseline; gap:6px; }
#partner-leads-view .lead-filter-label small { color:var(--muted); font-size:9px; font-weight:400; letter-spacing:0; white-space:nowrap; }
#partner-leads-view .lead-filter-buttons { justify-content:flex-start; flex-wrap:nowrap; gap:5px; }
#partner-leads-view .lead-filter-button { min-height:32px; padding:6px 11px; white-space:nowrap; }
#partner-leads-view .lead-filter-custom { grid-column:2; display:flex; align-items:end; justify-content:flex-start; gap:8px; border-top:1px solid var(--line); padding-top:10px; }
#partner-leads-view .lead-filter-custom-label { align-self:center; margin-right:2px; color:var(--muted); font-size:10px; font-weight:650; }
@media (max-width:1120px) {
  #partner-leads-view > .leads-controls { margin-bottom:16px; }
  #partner-leads-view .lead-filter-layout { grid-template-columns:minmax(280px,1fr) minmax(560px,auto); gap:20px; }
  #partner-leads-view .lead-filter-search { width:100%; max-width:520px; }
}
@media (max-width:760px) {
  #partner-leads-view > .leads-controls { margin-bottom:14px; }
  #partner-leads-view .lead-filter-layout { grid-template-columns:1fr; gap:14px; }
  #partner-leads-view .lead-filter-groups { grid-template-columns:1fr; gap:12px; }
  #partner-leads-view .lead-filter-buttons { flex-wrap:wrap; }
  #partner-leads-view .lead-filter-custom { grid-column:1; align-items:stretch; flex-wrap:wrap; }
  #partner-leads-view .lead-filter-custom-label { width:100%; }
}

/* Login: comunica o acesso dentro do CTA, sem alterar a geometria validada. */
#partner-login-form .detail-cta { text-align:left; }
#partner-login-form .detail-cta-label { display:block; flex:1 1 auto; min-width:0; text-align:left; white-space:nowrap; }
#partner-login-form .detail-cta.is-loading { color:#fff; }
#partner-login-form .detail-cta.is-loading::after { display:none; }
#partner-login-form .detail-cta.is-loading .detail-cta-label { font-size:0; }
#partner-login-form .detail-cta.is-loading .detail-cta-label::after { content:"Acessando seu ambiente Partner…"; display:block; font-size:13px; font-weight:750; text-align:left; white-space:nowrap; }
#partner-login-form .detail-cta.is-loading .detail-cta-icon { width:18px; height:18px; border:2px solid rgba(255,255,255,.86); border-right-color:transparent; background:transparent; font-size:0; animation:button-spin .7s linear infinite; }

/* Lead details: separate the action guidance from the submitted contact data. */
.lead-dialog .lead-next-step + .lead-contact-grid {
  margin-top:22px;
  padding-top:12px;
  padding-bottom:14px;
}
@media (max-width:620px) {
  .lead-dialog .lead-next-step + .lead-contact-grid {
    margin-top:18px;
    padding-top:10px;
    padding-bottom:12px;
  }
}

/* Cadastro de Partner: uma única grade controla texto, divisórias e campos. */
.partner-application-main {
  width: min(calc(100% - 64px), var(--max));
}
.partner-application-intro,
.partner-application-form-section,
.partner-application-form {
  width: 100%;
  max-width: none;
}
.partner-application-intro h1 {
  max-width: 900px;
}
.partner-application-lead {
  max-width: 760px;
}
.partner-application-guidance {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(32px, 5vw, 72px);
}
.partner-form-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px 24px;
}
.partner-form-grid label {
  grid-column: span 6;
  min-width: 0;
}
.partner-form-grid .partner-form-field--wide,
.partner-form-group > .partner-form-field--wide {
  grid-column: 1 / -1;
}
.partner-form-group > .partner-form-field--wide,
.partner-form-grid input,
.partner-form-grid select,
.partner-form-grid textarea {
  width: 100%;
}
.partner-consent,
.partner-legal,
.partner-form-actions {
  width: 100%;
}

@media (max-width: 760px) {
  .partner-form-grid {
    grid-template-columns: 1fr;
  }
  .partner-form-grid label,
  .partner-form-grid .partner-form-field--wide,
  .partner-form-group > .partner-form-field--wide {
    grid-column: 1 / -1;
  }
}

/* Cadastro de Partner: preenchimento compacto e com ritmo visual consistente. */
.partner-application-form-section {
  padding-top: 48px;
  padding-bottom: 20px;
}
.partner-application-section-heading {
  margin-bottom: 24px;
}
.partner-application-section-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin-bottom: 6px;
}
.partner-form-group {
  padding: 22px 0 24px;
}
.partner-form-group legend {
  margin-bottom: 16px;
  font-size: 18px;
  letter-spacing: -.025em;
}
.partner-form-grid {
  gap: 16px 24px;
}
.partner-form-grid label,
.partner-form-group > label {
  gap: 6px;
  font-size: 12px;
}
.partner-form-grid input,
.partner-form-grid select {
  height: 48px;
}
.partner-form-grid textarea,
.partner-form-group > label textarea {
  min-height: 104px;
}
.partner-form-grid textarea[name="offer"] {
  min-height: 112px;
}
.partner-form-grid textarea[name="benefit_offer"],
.partner-form-grid textarea[name="partnership"] {
  min-height: 96px;
}
.partner-consent {
  gap: 10px;
  margin-top: 20px;
  font-size: 12px;
}
.partner-legal {
  max-width: 760px;
  margin: 10px 0 18px;
  font-size: 11px;
}
.partner-form-actions {
  padding-top: 4px;
}

@media (max-width: 760px) {
  .partner-application-form-section {
    padding-top: 40px;
  }
  .partner-form-group {
    padding: 20px 0 22px;
  }
  .partner-form-grid {
    gap: 14px;
  }
}

/* Cadastro de Partner: wizard curto para revelar uma etapa por vez. */
.partner-form-progress {
  display: grid;
  gap: 14px;
  margin-bottom: 4px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.partner-form-progress-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.partner-form-progress-heading strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.partner-form-progress-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.partner-form-progress-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.partner-form-progress-list li span {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.partner-form-progress-list li strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
.partner-form-progress-list li.is-active,
.partner-form-progress-list li.is-complete {
  color: var(--ink);
}
.partner-form-progress-list li.is-active span {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
.partner-form-progress-list li.is-complete span {
  border-color: var(--orange);
  background: #fff0e9;
  color: var(--orange-dark);
}
.partner-form-progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}
.partner-form-progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width .22s ease;
}
.partner-form-global-status {
  min-height: 0;
  margin: 12px 0 0;
}
.partner-form-group[hidden],
.partner-form-final-step[hidden] {
  display: none;
}
.partner-form-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 18px 0 2px;
  border-top: 1px solid var(--line);
}
.partner-form-step-actions .detail-cta {
  min-width: 170px;
}
.partner-form-step-actions .outline-button {
  min-width: 92px;
}
.partner-form-final-step {
  padding-top: 22px;
}
.partner-form-final-step .partner-form-optional {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.partner-optional-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
.partner-optional-toggle > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.partner-optional-toggle em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}
.partner-optional-toggle > strong {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--orange-dark);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}
.partner-optional-toggle:hover,
.partner-optional-toggle:focus-visible {
  color: var(--orange-dark);
}
.partner-additional-panel {
  padding-top: 14px;
}
.partner-additional-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}
.partner-additional-panel textarea {
  width: 100%;
  min-height: 92px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}
.partner-form-final-step .partner-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.partner-form-final-step .partner-consent input {
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}
.partner-form-final-step .partner-consent > span {
  display: block;
  min-width: 0;
}

@media (max-width: 760px) {
  .partner-form-progress {
    padding: 14px 0 16px;
  }
  .partner-form-progress-list {
    gap: 6px;
  }
  .partner-form-progress-list li {
    gap: 5px;
    font-size: 10px;
  }
  .partner-form-progress-list li span {
    width: 20px;
    height: 20px;
  }
  .partner-form-step-actions {
    padding-top: 16px;
  }
  .partner-form-step-actions .detail-cta,
  .partner-form-step-actions .outline-button {
    min-width: 0;
  }
  .partner-optional-toggle {
    font-size: 12px;
  }
}
