:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --card2:#ffffff;
  --text:#0b1220;
  --muted:#556575;
  --accent:#2563eb;
  --danger:#dc2626;
  --border:rgba(15,23,42,.12);
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --radius: 18px;
}

body.theme-dark{
  --bg:#0f1419;
  --card:#141b22;
  --card2:#10161c;
  --text:#e8eef5;
  --muted:#9aa7b3;
  --accent:#4f8cff;
  --danger:#ff5a6b;
  --border:rgba(255,255,255,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
a{color:inherit}

.muted{color:var(--muted)}
.small{font-size:12px}
.h1{margin:0;font-size:26px;letter-spacing:-.02em}
.authh{margin:0 0 12px 0}
.i{width:20px;height:20px;display:block}
.i-sm{width:16px;height:16px}
.iconbtn{border:1px solid var(--border);background:rgba(15,23,42,.02);color:var(--text);border-radius:14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px}
.iconbtn:hover{background:rgba(15,23,42,.04)}

/* --- Enterprise Shell --- */
.shell{min-height:100vh;display:flex}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .18s ease;z-index:40}
.overlay.is-open{opacity:1;pointer-events:auto}

.sidebar{position:fixed;inset:0 auto 0 0;width:280px;z-index:50;background:#0b1220;color:#e8eef5;border-right:1px solid rgba(255,255,255,.08);transform:translateX(-105%);transition:transform .18s ease;display:flex;flex-direction:column}
.sidebar.is-open{transform:translateX(0)}
.sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px;border-bottom:1px solid rgba(255,255,255,.08)}
.sidebar-close{display:none;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.10);color:#e8eef5}
.sidebar-close:hover{background:rgba(255,255,255,.10)}

.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;min-width:0}
.brand-logo{height:28px;width:auto;display:block}
.brand-mark{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-weight:800;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12)}
.brand-text{display:flex;flex-direction:column;min-width:0}
.brand-title{font-weight:700;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-sub{font-size:12px;color:rgba(232,238,245,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}

.sidebar-nav{padding:10px;display:flex;flex-direction:column;gap:6px;overflow:auto}
.snav{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;text-decoration:none;color:rgba(232,238,245,.88);border:1px solid transparent}
.snav:hover{background:rgba(255,255,255,.06)}
.snav.is-active{background:rgba(79,140,255,.18);border-color:rgba(79,140,255,.22)}
.snav-ic{width:24px;height:24px;display:grid;place-items:center;color:#cfe0ff}
.snav-ch{margin-left:auto;opacity:.55}

.sidebar-foot{margin-top:auto;padding:14px;border-top:1px solid rgba(255,255,255,.08)}
.userchip{display:flex;align-items:center;gap:10px}
.avatar{width:38px;height:38px;border-radius:999px;display:grid;place-items:center;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);font-weight:800;color:#fff}
.avatar-sm{width:34px;height:34px}
.userchip-meta{min-width:0}
.userchip-name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.userchip-role{font-size:12px;color:rgba(232,238,245,.70)}

.main{flex:1;min-width:0;margin-left:0}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:rgba(245,247,251,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}
body.theme-dark .topbar{background:rgba(15,20,25,.88)}
.burger{border-color:var(--border)}

/* Mobile-only topbar title */
.topbar-title-only{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px;align-items:flex-start}
.topbar-page{font-weight:900;letter-spacing:-.02em;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62vw}
.topbar-sub{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:62vw}

.container{width:100%;max-width:var(--container-max,1180px);margin:0 auto;padding:18px 16px 96px}
.container-app{max-width:100%}
.content{min-height:60vh}

@media (min-width: 980px){
  .overlay{display:none}
  .sidebar{position:fixed;top:0;bottom:0;left:0;transform:none;overflow-y:auto}
  .sidebar.is-open{transform:none}
  .sidebar-close{display:none}
  .topbar{display:none}
  .burger{display:none}
  .main{margin-left:280px}
  .container{padding-bottom:28px}
}

@media (max-width: 979px){
  .sidebar-close{display:inline-flex}
}

.flash{margin:0 0 12px 0;padding:10px 12px;border-radius:14px;border:1px solid var(--border);background:rgba(15,23,42,.02)}
.flash-success{border-color:rgba(16,185,129,.30);background:rgba(16,185,129,.08)}
.flash-error{border-color:rgba(220,38,38,.30);background:rgba(220,38,38,.08)}
.flash-warning{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.10)}
.flash-info{border-color:rgba(37,99,235,.30);background:rgba(37,99,235,.08)}


.flash{display:block}
.flash-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.flash-text{flex:1;line-height:1.35}
.flash-close{border:0;background:transparent;color:var(--muted);font-size:18px;line-height:1;padding:2px 6px;border-radius:10px;cursor:pointer}
.flash-close:hover{background:rgba(15,23,42,.06);color:var(--text)}
.flash-copy{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;padding-top:8px;border-top:1px dashed rgba(15,23,42,.18)}
.flash-code{display:block;max-width:100%;overflow:auto;padding:6px 10px;border-radius:12px;background:rgba(15,23,42,.06);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px}

/* --- Mobile Bottom Nav (kept, but premium) --- */
.mnav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;justify-content:space-around;gap:8px;padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:rgba(245,247,251,.92);backdrop-filter:blur(10px);border-top:1px solid var(--border);transition:transform .18s ease,opacity .18s ease}
.mnav.is-hidden{transform:translateY(110%);opacity:0;pointer-events:none}
.mnav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-decoration:none;padding:10px 6px;border-radius:16px;color:var(--muted);border:1px solid transparent}
.mnav-item:hover{background:rgba(15,23,42,.03)}
.mnav-item.is-active{background:rgba(37,99,235,.10);border-color:rgba(37,99,235,.18);color:var(--text)}
.mnav-item.is-primary{background:rgba(37,99,235,.14);border-color:rgba(37,99,235,.25);color:var(--text)}
.mnav-item.is-primary .mnav-ic{color:var(--accent)}
.mnav-ic{display:grid;place-items:center}
.mnav-tx{font-size:11px;white-space:nowrap;line-height:1.05}
@media (min-width: 980px){
  .mnav{display:none}
}

.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:8px 0 16px}
.page-header h1{margin:0;font-size:22px}
.page-header p{margin:6px 0 0}
.header-actions{display:flex;gap:8px;flex-wrap:wrap}

.text-muted{color:var(--muted)}
.text-danger{color:var(--danger)}
.link{color:var(--accent);cursor:pointer}

.section{margin:18px 0}
.section-title{margin:0 0 10px;font-size:16px}
.section-header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.section-link{color:var(--accent);text-decoration:none}

.card{border:1px solid var(--border);background:var(--card);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
body.theme-dark .card{background:linear-gradient(180deg,var(--card),var(--card2));box-shadow:none}
.card-body{padding:12px 12px}
.card-link{text-decoration:none;display:block}
.card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.card-meta{margin-top:6px;font-size:12px}

.kpi{display:flex;align-items:flex-end;justify-content:space-between}
.kpi-label{font-size:12px;color:var(--muted)}
.kpi-value{font-size:18px;font-weight:800}

.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:640px){.grid-2{grid-template-columns:1fr}}

.quick-actions{display:flex;gap:10px;flex-wrap:wrap}
.action-btn{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;border:1px solid var(--border);background:rgba(15,23,42,.02);text-decoration:none}
.action-btn.accent{border-color:rgba(37,99,235,.25);background:rgba(37,99,235,.10)}
.action-btn.danger{border-color:rgba(220,38,38,.25);background:rgba(220,38,38,.08)}

.btn{border:1px solid var(--border);background:rgba(15,23,42,.02);color:var(--text);padding:10px 12px;border-radius:14px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn:hover{background:rgba(15,23,42,.04)}
.btn-sm{padding:7px 10px;border-radius:12px;font-size:12px}
.btn-full{width:100%}
.btn-primary{border-color:rgba(37,99,235,.30);background:rgba(37,99,235,.12)}
.btn-primary:hover{background:rgba(37,99,235,.16)}
.btn-accent{border-color:rgba(37,99,235,.30);background:rgba(37,99,235,.12)}
.btn-accent:hover{background:rgba(37,99,235,.16)}
.btn-danger{border-color:rgba(220,38,38,.30);background:rgba(220,38,38,.10)}
.btn-danger:hover{background:rgba(220,38,38,.14)}
.btn-outline{background:transparent}

.pill{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.02);font-size:12px}
.pill-muted{color:var(--muted)}

.form{border:1px solid var(--border);background:rgba(15,23,42,.02);border-radius:16px;padding:12px}
.form-compact{margin-top:10px}
.form-inline{display:flex;gap:10px;align-items:end;flex-wrap:wrap;border:0;background:transparent;padding:0}
.form-row{display:flex;gap:10px;flex-wrap:wrap}
.form-group{flex:1;min-width:180px}
.form-group label{display:block;font-size:12px;color:var(--muted);margin:0 0 6px}
input,select,textarea{width:100%;padding:10px 10px;border-radius:14px;border:1px solid var(--border);background:#fff;color:var(--text);outline:none}
body.theme-dark input,body.theme-dark select,body.theme-dark textarea{background:rgba(0,0,0,.28);color:var(--text)}
input:focus,select:focus,textarea:focus{border-color:rgba(37,99,235,.40)}
.input-sm{padding:8px 10px;border-radius:12px;font-size:12px}
.check{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.check input{width:auto}

.alert{padding:10px 12px;border-radius:14px;border:1px solid var(--border);background:rgba(15,23,42,.02)}
.alert-warning{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.10)}
.alert-info{border-color:rgba(37,99,235,.30);background:rgba(37,99,235,.08)}

.status-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.02)}
.status-live{border-color:rgba(220,38,38,.30);background:rgba(220,38,38,.08)}
.status-completed{border-color:rgba(16,185,129,.25)}

.table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--border)}
.table{width:100%;border-collapse:separate;border-spacing:0;background:#fff}
body.theme-dark .table{background:rgba(0,0,0,.18)}
.table th,.table td{padding:10px 10px;border-bottom:1px solid var(--border);vertical-align:top}
.table th{font-size:12px;color:var(--muted);text-align:left;background:rgba(15,23,42,.02)}
.table tr:last-child td{border-bottom:0}

.empty-state{padding:16px;border:1px dashed var(--border);border-radius:16px;color:var(--muted);background:rgba(15,23,42,.02)}

.pills{display:flex;gap:8px;flex-wrap:wrap}
.pill{padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.02);font-size:12px}

.code-inline{display:inline-block;padding:4px 8px;border-radius:12px;border:1px solid var(--border);background:rgba(15,23,42,.02);color:var(--muted)}

/* Global form/wizard utilities */
.form-hint{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.wiz-section-title{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;color:var(--text)}
.status-badge--info{border-color:rgba(37,99,235,.25);background:rgba(37,99,235,.08)}
.status-badge--warning{border-color:rgba(245,158,11,.30);background:rgba(245,158,11,.08)}
.status-badge--success{border-color:rgba(16,185,129,.25);background:rgba(16,185,129,.08)}

/* Auth form utilities */
.auth-header{margin-bottom:16px}
.auth-header h1{font-size:22px;margin:0 0 4px}
.auth-form{display:flex;flex-direction:column;gap:10px}
.auth-footer{text-align:center;font-size:13px;color:var(--muted);margin-top:10px}

details summary{list-style:none}
details summary::-webkit-details-marker{display:none}

/* ---- Public layout ---- */
.pheader{position:sticky;top:0;z-index:20;background:rgba(245,247,251,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}
.pheader-inner{max-width:1180px;margin:0 auto;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.pnav{display:flex;gap:8px;align-items:center}
.pmain{max-width:1180px;margin:0 auto;padding:26px 16px 40px}
.pfooter{border-top:1px solid var(--border)}
.pfooter-inner{max-width:1180px;margin:0 auto;padding:18px 16px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}

.pulse-public__hero{margin:12px 0 22px}
.pulse-public__hero h1{margin:0 0 8px;font-size:44px;letter-spacing:-.02em}
.pulse-public__hero p{margin:0;color:var(--muted)}

.pulse-view{max-width:1040px;margin:0 auto}
.pulse-section{margin:18px 0}
.pulse-section-title{margin:0 0 10px;font-size:16px;color:var(--text)}
.pulse-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (max-width:900px){.pulse-list{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:620px){.pulse-list{grid-template-columns:1fr;}.pulse-public__hero h1{font-size:34px}}
.pulse-card{border:1px solid var(--border);background:var(--card);border-radius:16px;padding:12px;text-decoration:none;display:block;box-shadow:0 10px 30px rgba(15,23,42,.06)}
.pulse-card--accent{border-color:rgba(37,99,235,.25);background:rgba(37,99,235,.06)}
.pulse-muted{color:var(--muted);font-size:12px}
.pulse-badge{display:inline-flex;align-items:center;font-size:11px;padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.02);margin-top:8px}
.pulse-badge--info{border-color:rgba(37,99,235,.25)}
.pulse-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px;border-radius:14px;border:1px solid var(--border);text-decoration:none;margin:6px 6px 0 0}
.pulse-btn--primary{border-color:rgba(37,99,235,.30);background:rgba(37,99,235,.12)}
.pulse-btn--secondary{background:rgba(15,23,42,.02)}

/* ---- Schedule ---- */
.sch-match-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--muted);font-size:13px}
.sch-ref-pill{display:inline-flex;align-items:center;gap:6px;max-width:260px;min-width:0;white-space:nowrap;overflow:hidden}
.sch-ref-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis}

/* ---- Auth ---- */
.auth{background:linear-gradient(180deg,#0b1220 0%, #0f172a 100%);color:#e8eef5;min-height:100vh}
.auth-shell{max-width:1180px;margin:0 auto;min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;gap:24px;padding:28px 16px;align-items:center;justify-content:center}
.auth-panel{padding:18px 18px 18px 18px;border-radius:24px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04)}
.auth-brand{display:flex;gap:14px;align-items:center}
.auth-title{font-size:22px;font-weight:800;letter-spacing:-.01em}
.auth-sub{color:rgba(232,238,245,.75);margin-top:3px}
.auth-points{margin-top:18px;display:grid;gap:10px}
.auth-point{padding:10px 12px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03);color:rgba(232,238,245,.85)}
.auth-card{background:#ffffff;color:var(--text);border-radius:24px;border:1px solid rgba(255,255,255,.08);box-shadow:0 30px 60px rgba(0,0,0,.25);padding:18px}
.auth-card-brand{display:none;margin-bottom:14px;justify-content:center}
.auth-card-brand .brand{justify-content:center}
.auth-card-brand .brand-logo{height:30px}
.auth-card-brand .brand-title{font-size:15px}
.auth-card-brand .brand-mark{background:rgba(15,23,42,.06);border-color:rgba(15,23,42,.10);color:var(--text)}
.auth-card-brand .brand-sub{color:var(--muted)}
@media (max-width: 980px){
  .auth-shell{grid-template-columns:1fr;align-items:center;justify-content:center;padding:20px 16px}
  .auth-panel{display:none}
  .auth-card-brand{display:block}
}


/* --- Team documents panel --- */
.docs-details summary::-webkit-details-marker{display:none}
.docs-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;user-select:none;padding:6px 0}
.docs-left{display:flex;align-items:center;gap:10px}
.docs-title{font-weight:700}
.docs-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 8px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.02);font-size:12px}
.docs-right{display:flex;align-items:center;gap:8px}
.docs-caret{transition:transform .18s ease}
details[open] .docs-caret{transform:rotate(90deg)}

.doc-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.02);white-space:nowrap}
.doc-badge--ok{border-color:rgba(16,185,129,.25);background:rgba(16,185,129,.08)}
.doc-badge--pending{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.10)}
.doc-badge--bad{border-color:rgba(220,38,38,.30);background:rgba(220,38,38,.08)}

/* ── Status badges (global) ── */
.hub-status{display:inline-flex;align-items:center;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px;border:1px solid var(--border);white-space:nowrap}
.hub-status--muted{color:var(--muted);background:rgba(15,23,42,.04)}
.hub-status--info{color:#2563eb;background:rgba(37,99,235,.08);border-color:rgba(37,99,235,.20)}
.hub-status--success{color:#059669;background:rgba(16,185,129,.08);border-color:rgba(16,185,129,.20)}
.hub-status--warning{color:#d97706;background:rgba(245,158,11,.08);border-color:rgba(245,158,11,.20)}
.hub-status--danger{color:#dc2626;background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.20)}

/* ── S3.5 product-grade error states ── */
.pulse-error-body{min-height:100vh;margin:0;background:
  radial-gradient(circle at 18% 12%,rgba(46,113,255,.19),transparent 34%),
  radial-gradient(circle at 86% 88%,rgba(23,193,170,.12),transparent 31%),#071426;color:#eaf1fb;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.pulse-error-shell{width:min(720px,calc(100% - 32px));min-height:100vh;margin:0 auto;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px;padding:32px 0;box-sizing:border-box}
.pulse-error-brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;font-size:18px;letter-spacing:-.02em}.pulse-error-brand img{width:38px;height:38px}.pulse-error-brand b{color:#72a7ff}
.pulse-error-card{width:100%;box-sizing:border-box;padding:clamp(26px,5vw,48px);border:1px solid rgba(255,255,255,.12);border-radius:28px;background:rgba(255,255,255,.075);box-shadow:0 28px 80px rgba(0,0,0,.28);backdrop-filter:blur(18px);text-align:center}
.pulse-error-code{display:inline-flex;padding:7px 11px;border:1px solid rgba(114,167,255,.28);border-radius:999px;background:rgba(114,167,255,.11);color:#a9c9ff;font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.pulse-error-card h1{max-width:600px;margin:18px auto 12px;color:#fff;font-size:clamp(28px,5vw,46px);line-height:1.04;letter-spacing:-.045em}.pulse-error-card>p{max-width:590px;margin:0 auto;color:rgba(234,241,251,.74);font-size:15px;line-height:1.7}
.pulse-error-context{max-width:460px;margin:20px auto 0;padding:13px 15px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:rgba(0,0,0,.13);display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}.pulse-error-context span{color:rgba(234,241,251,.58);font-size:12px}.pulse-error-context strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pulse-error-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:24px}.pulse-error-actions .btn{min-height:44px;padding:11px 17px;border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff}.pulse-error-actions .btn-accent{border-color:transparent;background:linear-gradient(135deg,#2867f0,#164bd0)}
.pulse-error-body--suspended .pulse-error-code,.pulse-error-body--failure .pulse-error-code{border-color:rgba(255,105,120,.32);background:rgba(255,105,120,.1);color:#ffb2bc}.pulse-error-body--pending .pulse-error-code{border-color:rgba(255,191,71,.35);background:rgba(255,191,71,.1);color:#ffd28a}
@media(max-width:560px){.pulse-error-shell{width:min(100% - 20px,720px);padding:16px 0}.pulse-error-card{padding:25px 18px;border-radius:22px}.pulse-error-actions{align-items:stretch;flex-direction:column}.pulse-error-actions .btn{width:100%}}

/* S3.57 — PWA foundation: install/update notices and iOS install guide. */
.pulse-pwa-notice{position:fixed;z-index:1200;right:18px;bottom:calc(18px + env(safe-area-inset-bottom));width:min(430px,calc(100vw - 28px));display:flex;gap:14px;align-items:center;justify-content:space-between;padding:14px 15px;border:1px solid rgba(148,163,184,.28);border-radius:18px;background:#0b1220;color:#e8eef5;box-shadow:0 20px 50px rgba(2,6,23,.28);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.pulse-pwa-notice-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.pulse-pwa-notice-copy strong{font-size:13px;line-height:1.25}.pulse-pwa-notice-copy span{font-size:11px;line-height:1.4;color:#a8b8cb}.pulse-pwa-notice-actions{display:flex;gap:6px;flex:0 0 auto}.pulse-pwa-notice button{border:0;border-radius:11px;padding:8px 10px;font:inherit;font-size:11px;font-weight:800;cursor:pointer}.pulse-pwa-notice-primary{background:#2b83f6;color:#fff}.pulse-pwa-notice-secondary{background:rgba(255,255,255,.08);color:#dbe7f4}
.pulse-pwa-modal-backdrop{position:fixed;z-index:1300;inset:0;display:grid;place-items:center;padding:20px;background:rgba(2,6,23,.72);backdrop-filter:blur(5px)}.pulse-pwa-modal{width:min(440px,100%);padding:22px;border-radius:22px;background:#fff;color:#0f172a;box-shadow:0 28px 80px rgba(0,0,0,.38);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.pulse-pwa-modal strong{display:block;font-size:18px}.pulse-pwa-modal p{margin:10px 0 18px;color:#475569;line-height:1.55}.pulse-pwa-modal button{border:0;border-radius:13px;padding:10px 14px;background:#2563eb;color:#fff;font:inherit;font-weight:800;cursor:pointer}
@media(max-width:640px){.pulse-pwa-notice{left:14px;right:14px;bottom:calc(14px + env(safe-area-inset-bottom));width:auto;align-items:flex-start;flex-direction:column}.pulse-pwa-notice-actions{width:100%}.pulse-pwa-notice-actions button{flex:1}}
@media(max-width:900px){body.pulse-app .pulse-pwa-notice{bottom:calc(86px + env(safe-area-inset-bottom))}}

/* Areno Pulse S3.12 — QR discoverability, reusable sessions and billing clarity */

/* Auth: visible QR entry */
.af-qr-entry{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px 13px;border:1.5px solid #dbe5ef;border-radius:15px;background:#f8fbfe;color:#17263b;text-decoration:none;transition:border-color .15s,box-shadow .15s,transform .15s}.af-qr-entry:hover{border-color:#8bcbbb;box-shadow:0 8px 22px rgba(18,104,84,.10);transform:translateY(-1px)}.af-qr-entry__icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e8f7f2;color:#13735d}.af-qr-entry__icon .i{width:22px;height:22px}.af-qr-entry__copy{display:grid;gap:2px;min-width:0}.af-qr-entry__copy strong{font-size:13px}.af-qr-entry__copy small{font-size:11px;line-height:1.4;color:#718096}.af-qr-entry__arrow{font-size:19px;color:#2b806b}.af-alt--signup{margin-top:16px}.af-access-kicker{display:inline-block;margin-bottom:6px;color:#15806a;font-size:11px;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.af-access-code{resize:vertical;min-height:84px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;line-height:1.45}.af-access-ended{display:flex;gap:9px;align-items:flex-start;margin:0 0 14px;padding:11px 12px;border:1px solid #bce4d8;border-radius:13px;background:#eef9f5;color:#285f51;font-size:12px;line-height:1.45}.af-access-ended .i{flex:none;width:17px;height:17px}.af-access-camera{display:flex;gap:11px;align-items:flex-start;margin-top:16px;padding:12px;border-radius:14px;background:#f6f8fb;color:#3d4b60}.af-access-camera__icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#fff;border:1px solid #e1e7ef;color:#526c88;flex:none}.af-access-camera__icon .i{width:20px;height:20px}.af-access-camera>span:last-child{display:grid;gap:3px}.af-access-camera strong{font-size:12px}.af-access-camera small{font-size:11px;line-height:1.45;color:#7a8798}

/* Staff: QR access is a first-class access method */
.s312-staff-qr__list{display:grid;gap:8px;padding:14px}.s312-staff-qr__item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 13px;border:1px solid var(--border);border-radius:15px;background:var(--surface);color:var(--text);text-decoration:none;transition:border-color .15s,box-shadow .15s,transform .15s}.s312-staff-qr__item:hover{border-color:#9ccfc2;box-shadow:0 8px 20px rgba(17,86,70,.08);transform:translateY(-1px)}.s312-staff-qr__mark{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#eaf8f4;color:#14775f}.s312-staff-qr__mark .i{width:22px;height:22px}.s312-staff-qr__copy{display:grid;gap:3px;min-width:0}.s312-staff-qr__copy strong{overflow-wrap:anywhere}.s312-staff-qr__copy small{color:var(--muted);line-height:1.4}.s312-staff-qr__action{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:800;color:#176e5b}.s312-staff-qr__action .i{width:15px;height:15px}.s312-staff-qr__empty{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px;border:1px dashed var(--border);border-radius:15px;background:var(--surface-subtle,#f8fafc)}.s312-staff-qr__empty>span:nth-child(2){display:grid;gap:3px}.s312-staff-qr__empty small{color:var(--muted);line-height:1.4}

/* Billing: compact, operational and self-explanatory */
.s312-billing-page{display:grid;gap:16px}.s312-page-header{margin-bottom:0}.s312-page-header h1{font-size:clamp(1.55rem,2.4vw,2.05rem);line-height:1.08}.s312-page-header .op-subtitle{max-width:780px;font-size:.9rem;line-height:1.5}.s312-billing-summary{display:grid;grid-template-columns:minmax(260px,1.35fr) repeat(3,minmax(140px,.65fr));gap:1px;overflow:hidden;border:1px solid #dfe6ee;border-radius:18px;background:#dfe6ee;box-shadow:0 8px 24px rgba(22,39,65,.05)}.s312-billing-summary>div{display:grid;align-content:center;gap:4px;min-height:92px;padding:15px 17px;background:#fff}.s312-billing-summary span{font-size:.71rem;font-weight:800;letter-spacing:.065em;text-transform:uppercase;color:#7c8999}.s312-billing-summary strong{font-size:.95rem;overflow-wrap:anywhere}.s312-billing-summary small{font-size:.78rem;line-height:1.4;color:#68768a}.s312-billing-summary__status{background:linear-gradient(135deg,#f7fafc,#fff)!important}.s312-billing-summary--success .s312-billing-summary__status{background:linear-gradient(135deg,#edf9f5,#fff)!important}.s312-billing-summary--warning .s312-billing-summary__status{background:linear-gradient(135deg,#fff8e8,#fff)!important}.s312-billing-summary--danger .s312-billing-summary__status{background:linear-gradient(135deg,#fff2f4,#fff)!important}.s312-billing-explainer{border:1px solid #e1e7ef;border-radius:15px;background:#fff}.s312-billing-explainer summary{display:flex;align-items:center;gap:8px;padding:12px 14px;cursor:pointer;font-size:.84rem;font-weight:800;list-style:none}.s312-billing-explainer summary::-webkit-details-marker{display:none}.s312-billing-explainer summary .i{width:17px;height:17px;color:#57718c}.s312-billing-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;border-top:1px solid #e7ecf2;background:#e7ecf2}.s312-billing-steps span{display:flex;align-items:center;gap:9px;padding:12px;background:#fbfcfd}.s312-billing-steps b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#233a55;color:#fff;font-size:.72rem;flex:none}.s312-billing-steps small{color:#69778a;line-height:1.35}.s312-billing-card{overflow:hidden}.s312-admin-billing .s311-admin-grid{align-items:start}.s312-admin-billing .s311-form-card,.s312-admin-billing .s311-list-card,.s312-admin-billing .s311-table-card{border-radius:18px}.s312-admin-billing .s311-section-heading h2{font-size:1.05rem}.s312-calculation-help{display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:center;padding:13px 15px;border:1px solid #cfe2ed;border-radius:16px;background:#f4f9fc}.s312-calculation-help__title{display:flex;align-items:center;gap:9px}.s312-calculation-help__title>.i{width:20px;height:20px;color:#44708a}.s312-calculation-help__title>span{display:grid;gap:1px}.s312-calculation-help__title small{color:#718095}.s312-calculation-help__formula{padding:9px 12px;border-radius:11px;background:#fff;border:1px solid #dfe9ef;color:#394b61;font-size:.79rem;line-height:1.45}.s312-field-help{display:inline-grid;place-items:center;width:16px;height:16px;margin-left:3px;border:1px solid #b9c6d4;border-radius:50%;color:#607187;font-size:10px;font-weight:900;cursor:help;vertical-align:1px}.s312-form-hint{display:block;margin-top:5px;color:#7a8797;font-size:.7rem;line-height:1.38}.s312-form-hint b{color:#40536a}.s312-admin-billing .form-group label{font-size:.76rem}.s312-admin-billing .form-group input,.s312-admin-billing .form-group select,.s312-admin-billing .form-group textarea{font-size:.86rem}.s312-admin-billing .s311-policy-row p{font-size:.82rem}

@media(max-width:980px){.s312-billing-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.s312-billing-summary__status{grid-column:1/-1}.s312-calculation-help{grid-template-columns:1fr}.s312-billing-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.s312-staff-qr__item,.s312-staff-qr__empty{grid-template-columns:42px minmax(0,1fr)}.s312-staff-qr__empty .btn{grid-column:2;justify-self:start}.s312-staff-qr__action{grid-column:2}.s312-billing-summary{grid-template-columns:1fr}.s312-billing-summary__status{grid-column:auto}.s312-billing-steps{grid-template-columns:1fr}.s312-calculation-help__formula{font-size:.75rem}.af-qr-entry{grid-template-columns:40px minmax(0,1fr) auto}}

/* S3.31 — account recovery */
.af-recovery-link{margin-top:-4px;text-align:right;font-size:12px}.af-recovery-note{padding:12px 13px;border:1px solid #dbe5ef;border-radius:14px;background:#f8fbfe;color:#526174;font-size:12px;line-height:1.5}.af-recovery-note strong{color:#22344a}
