.stage-mode .bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))}
.stage-mode .nav-item .stage-nav-icon{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.stage-mode .bottom-nav .stage-nav-icon{width:21px;height:21px;flex:0 0 21px}
.stage-mode .sidebar{gap:0;background:linear-gradient(170deg,#fbf7f2ed,#f7efeaed)}
.stage-mode .sidebar nav{margin-top:10px;gap:6px}
.stage-mode .sidebar nav::before{content:"";display:block;width:100%;height:1px;margin:0 0 18px;background:linear-gradient(90deg,transparent,#d7c5c3 18%,#bb9ba1 50%,#d7c5c3 82%,transparent)}
.stage-mode .sidebar .nav-item{position:relative;width:100%;border:1px solid transparent;border-radius:15px;color:#6e575d;transition:background-color .22s ease,border-color .22s ease,box-shadow .22s ease,transform .22s ease,color .22s ease}
.stage-mode .sidebar .nav-item .stage-nav-icon{transition:transform .22s ease,color .22s ease}
.stage-mode .sidebar .nav-item.active{border-color:#e5d1d5;background:linear-gradient(105deg,#f5e9e9,#efdee2);color:#793f4e;box-shadow:0 5px 16px #774c5810}
.stage-mode .sidebar .nav-item.active::before{content:"";position:absolute;inset-block:12px;inset-inline-start:0;width:2px;border-radius:2px;background:#9e6a77}
@media(hover:hover){.stage-mode .sidebar .nav-item:hover{background:#fffdfa;border-color:#eadbd9;box-shadow:0 7px 18px #774c5810;transform:translateY(-1px)}.stage-mode .sidebar .nav-item:hover .stage-nav-icon{transform:scale(1.09)}.stage-mode .sidebar .nav-item.active:hover{background:#f1e0e3}}
@media(prefers-reduced-motion:reduce){.stage-mode .sidebar .nav-item,.stage-mode .sidebar .nav-item .stage-nav-icon{transition:none}.stage-mode .sidebar .nav-item:hover,.stage-mode .sidebar .nav-item:hover .stage-nav-icon{transform:none}}
.stage-mode .stage-logo-button{border:0;background:transparent;padding:0;display:block;width:100%;cursor:pointer}
.stage-mode .stage-logo-button .brand-image{display:block}
.stage-mode .topbar .stage-logo-button{display:none}
.stage-mode .home-management{padding:17px 18px}
.stage-mode .home-management h2{font-size:15px;margin-bottom:12px}
.stage-mode .home-management-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.stage-mode .home-management-links button{min-width:0;min-height:42px;padding:8px 10px;font-size:13px}
.stage-mode .stage-connections{display:grid;margin-top:12px}
.stage-mode .stage-connection-row{gap:12px;align-items:center}
.stage-mode .stage-connection-row small{display:block;margin-top:4px;color:var(--muted);line-height:1.45}
.stage-mode .stage-connection-row .badge{flex:0 0 auto}
.stage-mode .stage-connection-dot{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#b7aaa5}
.stage-mode .stage-connection-dot.live{background:#438b69}
.stage-mode .billing-facts{display:grid;gap:5px;margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fffdfa}
.stage-mode .billing-facts span{font-size:13px;line-height:1.5}
.stage-mode .billing-lines{display:grid;gap:10px;margin:16px 0}
.stage-mode .billing-line{display:grid;grid-template-columns:minmax(0,2fr) minmax(110px,1fr);gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px}
.stage-mode .billing-line .field{min-width:0;margin:0}
.stage-mode .billing-review-lines{display:grid;margin:14px 0}
@media(max-width:480px){.stage-mode .billing-line{grid-template-columns:1fr}}
@media(max-width:700px){.stage-mode .stage-connection-row{flex-wrap:wrap}.stage-mode .stage-connection-row .badge{margin-inline-start:21px}}
.stage-mode .sample-open{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;text-align:start;padding:17px 20px;border-color:#eadbd7;background:#fffaf8}
.stage-mode .sample-open strong,.stage-mode .sample-open small{display:block}
.stage-mode .sample-open strong{font-size:15px;color:var(--accent)}
.stage-mode .sample-open small{max-width:60ch;margin-top:5px;color:var(--muted);font-size:12px;line-height:1.5}
.stage-mode .sample-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:16px}
.stage-mode .sample-tile{display:grid;align-content:start;gap:8px;min-height:120px}
.stage-mode .sample-tile h2{font-size:16px}
.stage-mode .sample-tile p{color:var(--muted);font-size:14px}
.stage-mode .sample-tile .stage-product-image{margin-top:4px}
.stage-mode .sample-tile .badge{justify-self:start}
@media(max-width:700px){.stage-mode .sample-grid{grid-template-columns:1fr}.stage-mode .sample-tile{min-height:0}}
.stage-mode .stage-product-image{width:64px;height:64px;flex:0 0 64px;object-fit:contain;border:1px solid var(--line);border-radius:14px;background:#fff;padding:4px}
.stage-mode .finance-month{max-width:260px}
.stage-mode .finance-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stage-mode .finance-stat{display:flex;flex-direction:column;gap:8px;min-width:0}
.stage-mode .finance-stat strong{font-size:clamp(18px,2vw,25px);font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.stage-mode .calendar-stage-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.8fr);gap:24px;align-items:start}
.stage-mode .calendar-work-card{min-width:0;min-height:230px;padding:21px 22px}
.stage-mode .calendar-work-card .page-heading{align-items:center;margin-bottom:12px}
.stage-mode .calendar-work-card .page-heading h2{display:flex;align-items:center;gap:8px}
.stage-mode .calendar-stage-grid+.panel{margin-top:18px}
.stage-mode .calendar-month-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin:16px 0}
.stage-mode .calendar-month-controls .field{min-width:0;margin:0}
.stage-mode .calendar-month-controls input{width:100%}
.stage-mode .calendar-month-controls [data-stage=thisMonth]{grid-column:1/-1;justify-self:center}
.stage-mode .document-preview{display:block;width:100%;max-width:100%;height:min(65vh,700px);object-fit:contain;margin-top:14px;border:0;background:#f8f5ef}
@media(max-width:700px){.stage-mode .finance-stats{grid-template-columns:1fr}.stage-mode .finance-stat{flex-direction:row;align-items:center;justify-content:space-between}}
.stage-mode .calendar-stage-grid section{min-width:0}
.stage-mode .stage-appointment{display:flex;flex-direction:column;align-items:flex-start;text-align:start;padding:0;min-width:0}
.stage-mode .topbar{gap:8px}
.stage-mode .stage-header-actions{display:flex;align-items:center;gap:6px;direction:ltr;position:relative}
html[dir=rtl] .stage-mode .stage-header-actions{direction:ltr;margin-right:auto}
html[dir=ltr] .stage-mode .stage-header-actions{direction:rtl;margin-left:auto}
.stage-mode .language-menu{position:relative;display:flex}
.stage-mode .language-trigger{width:34px;min-width:34px;height:34px;min-height:34px;padding:7px!important;border:1px solid #e4d6cf;background:#fffdfad9;border-radius:999px;color:var(--accent)}
.stage-mode .language-trigger svg{width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.stage-mode .language-options{position:absolute;top:calc(100% + 7px);left:0;z-index:50;min-width:88px;padding:4px;border:1px solid #e4d6cf;border-radius:12px;background:#fffdfa;box-shadow:0 12px 28px #573b401f;direction:rtl}
.stage-mode .language-options[hidden]{display:none}
.stage-mode .language-options button{display:block;width:100%;border:0;border-radius:8px;padding:8px 10px;background:transparent;text-align:start;font-size:11px;color:var(--ink)}
.stage-mode .language-options button[aria-pressed=true]{background:#f1e4e4;color:var(--accent);font-weight:600}
.stage-mode .stage-logout{min-height:34px;padding:6px 8px!important;border:1px solid #e4d6cf;background:#fffdfad9;border-radius:999px;font-size:11px;white-space:nowrap}
.stage-mode .stage-logout svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.stage-mode .page-heading{gap:16px}
.stage-mode .page-heading h1{min-width:0;overflow-wrap:anywhere}
.stage-mode .login-panel{overflow-wrap:anywhere}
.stage-mode #factor-setup img{display:block;max-width:100%;height:auto;margin:16px auto}
.stage-mode .sync-status-panel{margin-bottom:24px;padding:20px 22px}
.stage-mode .sync-status-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.stage-mode .sync-status-head h2{margin-bottom:6px}
.stage-mode .sync-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}
.stage-mode .sync-stat{padding:13px;border:1px solid var(--line);border-radius:14px;background:#fffdfa99}
.stage-mode .sync-stat strong{display:block;font-size:24px;font-weight:500;font-variant-numeric:tabular-nums;color:var(--accent)}
.stage-mode .sync-stat span{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.4}
.stage-mode .sync-readonly{margin-top:14px}
.stage-mode .sync-review-panel{margin-bottom:24px;padding:20px 22px}
.stage-mode .sync-conflict-list{display:grid;margin-top:12px}
.stage-mode .sync-conflict-row{display:flex;align-items:flex-start;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}
.stage-mode .sync-conflict-row:last-child{border-bottom:0;padding-bottom:0}
.stage-mode .sync-conflict-row strong{display:block;font-size:14px;font-weight:600}
.stage-mode .sync-conflict-row small{display:block;margin-top:5px;color:var(--muted);font-size:12px;line-height:1.5}
.stage-mode .sync-conflict-row p{margin-top:8px;font-size:13px;line-height:1.5}
.stage-mode .decision-panel{border:1px solid var(--line);border-radius:16px;padding:16px;background:#fffdfa80}
.stage-mode .decision-panel>legend{padding-inline:8px;font-weight:600;color:var(--accent)}
.stage-mode .client-main{padding:0;text-align:start;background:transparent;border:0;box-shadow:none;min-width:0}
.stage-mode .client-card>.secondary{flex:0 0 auto}
.stage-mode .protocol-options{display:grid;gap:3px;margin:12px 0}
.stage-mode .message-review-row{flex-wrap:wrap;align-items:flex-start}
.stage-mode .message-review-row>.grow{flex:1 1 100%;min-width:100%;overflow-wrap:anywhere}
.stage-mode .message-review-row>.secondary{flex:1 1 140px;white-space:normal;text-align:center}
@media(max-width:700px){
  .stage-mode .calendar-stage-grid{grid-template-columns:1fr}
  .stage-mode .calendar-work-card{min-height:0;padding:17px 16px}
  .stage-mode .calendar-stage-grid>section:first-child .task-row{flex-wrap:wrap;align-items:stretch}
  .stage-mode .calendar-stage-grid>section:first-child .stage-appointment{flex:1 0 100%;width:100%;padding:4px 0 8px}
  .stage-mode .calendar-stage-grid>section:first-child .task-row>.primary,
  .stage-mode .calendar-stage-grid>section:first-child .task-row>.ghost:not(.stage-appointment){flex:1;min-width:88px;padding-inline:9px}
  .stage-mode .sync-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stage-mode .topbar{position:sticky;top:max(8px,env(safe-area-inset-top));z-index:35;display:flex;direction:rtl;align-items:center;justify-content:space-between;gap:6px;min-height:64px;margin:10px 12px 0;padding:5px 10px;border:1px solid #dae7e8;border-radius:20px;background:rgba(255,255,255,.94);box-shadow:0 8px 30px #28535b12;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  html[dir=ltr] .stage-mode .topbar{direction:ltr}
  .stage-mode .topbar .stage-logo-button{display:block;position:relative;isolation:isolate;flex:0 0 166px;width:166px;height:52px;overflow:hidden}
  .stage-mode .topbar .stage-logo-button .brand-image{position:relative;z-index:1;width:100%;height:100%;object-fit:contain}
  .stage-mode .topbar .stage-header-actions{direction:ltr;flex:0 0 auto;gap:4px}
  .stage-mode .topbar .language-trigger{width:31px;min-width:31px;height:31px;min-height:31px;padding:6px!important}
  .stage-mode .topbar .language-trigger svg{width:15px;height:15px}
  .stage-mode .topbar .stage-header-actions>.stage-logout{flex:0 0 auto;min-height:31px;margin:0;padding:5px 7px!important;font-size:10px;gap:4px}
  .stage-mode .topbar .stage-logout svg{width:14px;height:14px}
  .stage-mode .topbar .site-header-logo::after{content:"";position:absolute;z-index:2;inset:4px 0;pointer-events:none;background:linear-gradient(104deg,transparent 44%,rgba(225,249,252,0) 47%,rgba(233,251,253,.92) 50%,rgba(225,249,252,0) 53%,transparent 56%);background-size:260% 100%;-webkit-mask:url("/assets/logo-wordmark-n-dominant-pearl.svg") center/contain no-repeat;mask:url("/assets/logo-wordmark-n-dominant-pearl.svg") center/contain no-repeat;animation:stage-header-logo-sheen 6.6s ease-in-out infinite}
  .stage-mode .topbar .site-header-logo::before{content:"";position:absolute;z-index:3;left:65%;top:15%;width:9px;height:9px;pointer-events:none;background:#bddde2;clip-path:polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%);filter:drop-shadow(0 0 2px rgba(76,126,137,.45));transform:translate(-50%,-50%) scale(.4);animation:stage-header-logo-glint 6.6s ease-in-out infinite}
  .stage-mode .bottom-nav button{min-height:56px}
}
@media(max-width:355px){
  .stage-mode .topbar{display:grid;grid-template-columns:1fr auto;gap:2px 8px}
  .stage-mode .topbar .stage-logo-button{grid-column:1/-1;justify-self:end}
  .stage-mode .topbar .stage-header-actions{grid-column:1/-1;grid-row:2;justify-self:end;margin-right:0}
  html[dir=ltr] .stage-mode .topbar .stage-logo-button{justify-self:start}
  html[dir=ltr] .stage-mode .topbar .stage-header-actions{margin-left:0}
}
@keyframes stage-header-logo-sheen{0%,17%{opacity:0;background-position:140% 0}23%{opacity:.46}34%{opacity:.46;background-position:-45% 0}40%,100%{opacity:0;background-position:-110% 0}}
@keyframes stage-header-logo-glint{0%,24%,33%,100%{opacity:0;transform:translate(-50%,-50%) scale(.4)}27%,29%{opacity:.75;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.stage-mode .topbar .site-header-logo::before,.stage-mode .topbar .site-header-logo::after{animation:none;opacity:0}}

/* The sign-in screen is its own quiet composition, separate from CRM navigation. */
.stage-mode .login-panel{max-width:500px;margin:clamp(18px,6vh,68px) auto;padding:26px clamp(22px,4vw,42px) 31px;background:linear-gradient(155deg,#fffefc,#fffaf7f8);border:1px solid #dfd0c9;box-shadow:0 34px 76px #53343b1a,0 12px 24px #53343b12,0 2px 5px #53343b0b}
.stage-mode .login-languages{display:flex;direction:ltr;justify-content:flex-start;margin-bottom:8px}
.stage-mode .login-panel .locale-picker{display:inline-flex;width:auto;gap:2px;padding:3px;border:1px solid #e8dcd8;background:#fffdfaa6;border-radius:999px;box-shadow:0 2px 8px #60444b08}
.stage-mode .login-panel .locale-picker button{min-width:61px;min-height:33px;padding:5px 8px;border-radius:999px;font-size:11px}
.stage-mode .login-panel .locale-picker button[aria-pressed=true]{background:#efe2e3;color:#763d4e;font-weight:600}
.stage-mode .login-brand{display:flex;justify-content:center;align-items:center;margin:0 auto 16px}
.stage-mode .login-brand-gleam{position:relative;display:block;width:min(100%,380px)}
.stage-mode .login-brand .brand-image{display:block;width:100%;height:139px;max-height:none;margin:0;object-fit:contain;opacity:1}
.stage-mode .login-panel h1{text-align:center;margin:0;font-size:clamp(27px,3vw,34px)}
.stage-mode .login-hint{margin:10px auto 0;max-width:36ch;text-align:center;line-height:1.55}
.stage-mode .login-panel .login-note{width:100%;max-width:100%;margin:14px 0 0;padding:10px 12px;border:1px solid #e9ded9;border-radius:13px;background:#f8f2ef;color:#685a57;font-size:12px;line-height:1.5;text-align:center;overflow-wrap:anywhere}
.stage-mode .login-panel .login-status{background:#f4e9e9;border-color:#e5d3d5;color:var(--accent)}
.stage-mode .login-panel .login-environment{margin-top:10px;background:#faf6f2;color:#756965;font-size:11px}
.stage-mode .login-panel #stage-login{margin-top:26px;text-align:start}
.stage-mode .login-panel #stage-login .primary{margin-top:5px}
.stage-mode .login-panel a.login-note{display:block;width:max-content;max-width:100%;margin:18px auto 0;padding:0;border:0;background:transparent;color:#786b67;line-height:1.35;text-align:center;text-decoration:underline;text-decoration-color:#cfc0ba;text-underline-offset:3px}
.stage-mode .login-panel .password-wrap{position:relative;margin-top:7px}
.stage-mode .login-panel .password-wrap input{margin-top:0;padding-left:55px}
.stage-mode .login-panel .password-toggle{position:absolute;left:2px;top:1px;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:#74666a;cursor:pointer}
.stage-mode .login-panel .password-toggle:hover,.stage-mode .login-panel .password-toggle:focus-visible{background:#f3e9e7;color:#713d4b}
.stage-mode .login-panel .password-toggle svg{width:21px;height:21px}
.stage-mode .login-panel .password-eye-slash{display:none}
.stage-mode .login-panel .password-toggle[aria-pressed="true"] .password-eye-slash{display:block}
.stage-mode .oversight-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.stage-mode .oversight-metric{display:grid;gap:8px;padding:17px}
.stage-mode .oversight-metric strong{font-size:clamp(19px,2vw,26px);font-weight:600;font-variant-numeric:tabular-nums;color:var(--accent)}
.stage-mode .oversight-metric span{font-size:12px;color:var(--muted)}
.stage-mode .oversight-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:18px 0;font-size:12px;color:var(--muted)}
.stage-mode .oversight-legend span{width:13px;height:13px;border-radius:4px}
.stage-mode .oversight-legend .received,.stage-mode .oversight-bar.received{background:#86515f}
.stage-mode .oversight-legend .purchases,.stage-mode .oversight-bar.purchases{background:#d2aaa1}
.stage-mode .oversight-chart{display:grid;gap:14px}
.stage-mode .oversight-month{display:grid;grid-template-columns:100px minmax(0,1fr) 110px;align-items:center;gap:12px;font-size:12px}
.stage-mode .oversight-month>strong{font-weight:500}
.stage-mode .oversight-bars{display:grid;gap:4px}
.stage-mode .oversight-bars>div{position:relative;min-height:18px;background:#f8f2ee;border-radius:5px;overflow:hidden}
.stage-mode .oversight-bar{display:block;min-height:18px;border-radius:5px}
.stage-mode .oversight-bars small{position:absolute;inset-block-start:1px;inset-inline-end:6px;color:#34262a;font-size:10px;font-variant-numeric:tabular-nums}
@media(max-width:700px){.stage-mode .oversight-month{grid-template-columns:70px minmax(0,1fr);gap:8px}.stage-mode .oversight-month>.small{grid-column:2}.stage-mode .oversight-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.stage-mode .login-panel #factor-setup .login-note{margin-top:12px}
@media(max-width:700px){.stage-mode .login-panel{margin:18px 12px;padding:19px 21px 26px}.stage-mode .login-brand-gleam{width:min(100%,320px)}.stage-mode .login-brand .brand-image{height:118px}}
@media(max-width:355px){.stage-mode .login-panel{margin-inline:9px;padding-inline:17px}.stage-mode .login-panel .locale-picker button{min-width:55px;padding-inline:6px}}

.stage-mode .stage-connection-check{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;margin-top:10px;border:1px solid #cbb3bb;border-radius:12px;background:#f5ecef;color:#663745;font:inherit;font-size:13px;font-weight:600;box-shadow:0 2px 5px rgba(93,53,65,.08);cursor:pointer;transition:background .15s,box-shadow .15s}
.stage-mode .stage-connection-check:hover{background:#ecdee3;box-shadow:0 3px 7px rgba(93,53,65,.12)}
.stage-mode .stage-connection-check:focus-visible{outline:2px solid #8b4d60;outline-offset:3px}
.stage-mode .stage-connection-check:disabled{opacity:.65;cursor:wait}
.stage-mode .stage-settings-section{display:grid;gap:10px}
.stage-mode .stage-settings-section h2,.stage-mode .stage-settings-section p{margin:0}
.stage-mode .stage-settings-section .locale-picker{justify-self:start;margin-top:4px}
.stage-mode .stage-setting-row{padding:14px 16px;border:1px solid #eadfe0;border-radius:14px;background:#fbf7f6}
.stage-mode .stage-setting-row small{display:block;margin-top:6px;color:var(--muted);line-height:1.5}
@media(max-width:700px){.stage-mode .stage-connection-check{min-height:44px}}
.stage-mode .login-panel .password-save{display:block;width:100%;margin-top:8px;text-align:start;color:#705963}.stage-mode .login-panel .password-save[aria-pressed="true"]{background:#f4e9e9;color:var(--accent)}
