/* Ekline Claims: Ekline Health brand colours on a light "glass" interface. */
:root {
  --ink: #161B3D;          /* Ekline Ink: text, primary buttons */
  --signal: #F25C3B;       /* Ekline Signal: one highlight per screen */
  --signal-deep: #C2401F;  /* orange text on light backgrounds */
  --paper: #F4F5F9;
  --mist: #E3E6F3;
  --slate: #4B5170;
  --line: #D9DCEA;
  --surface: #FCFCFE;
  --glass: rgba(252, 252, 254, .72);
  --glass-strong: rgba(252, 252, 254, .88);
  --glass-line: rgba(255, 255, 255, .7);
  --muted: #5F6585;
  --ess: #B42318; --ess-bg: #FEF3F2;
  --semi: #9A5B00; --semi-bg: #FFF6E5;
  --non: #4B5170; --non-bg: #EEF0F7;
  --ok: #1E7A55; --ok-bg: #E9F7F0;
  /* older names kept for the landing page */
  --brand: var(--ink); --brand-ink: var(--ink); --brand-2: var(--signal-deep); --accent: var(--signal); --bg: var(--paper);
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 1px rgba(22, 27, 61, .04), 0 8px 24px rgba(22, 27, 61, .07);
  --shadow-lg: 0 20px 50px rgba(22, 27, 61, .14);
  --blur: saturate(170%) blur(22px);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--ink); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background: var(--paper);
  background-image: radial-gradient(900px 600px at 100% -10%, rgba(242, 92, 59, .10), transparent 60%), radial-gradient(800px 700px at -10% 110%, rgba(75, 81, 112, .14), transparent 60%);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--ink); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }
p a, .hint a, .notice a, .small a { text-decoration: underline; text-decoration-color: rgba(22, 27, 61, .3); text-underline-offset: 2px; }
h1, h2, h3, .display { font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 26px; margin: 0 0 4px; line-height: 1.15; }
h2 { font-size: 17px; margin: 0 0 10px; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0 0 8px; letter-spacing: -.005em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.orange { color: var(--signal-deep); }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12.5px; }

/* App shell: translucent sidebar, glass top bar */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 14px 12px 12px;
  background: rgba(244, 245, 249, .62); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-right: 1px solid rgba(217, 220, 234, .8);
}
.side .nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.logo-box { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--r); padding: 10px 12px; min-height: 60px; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 8px; }
.logo-box img.org { max-width: 100%; max-height: 52px; object-fit: contain; }
.lockup { display: flex; align-items: center; gap: 9px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.lockup img { width: 30px; height: 30px; border-radius: 7px; }
.lockup b { font-weight: 800; color: var(--ink); }
.lockup i { font-style: normal; font-weight: 700; color: var(--signal); }
.lockup .sub { font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; margin-left: 2px; }
.side .org-name { font-size: 12px; color: var(--muted); padding: 2px 10px 10px; font-weight: 500; }
.side .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #8A8FA8; padding: 14px 10px 4px; font-weight: 600; }
.side a.nl { display: flex; align-items: center; gap: 8px; color: var(--ink); padding: 7px 10px; border-radius: var(--r-sm); font-size: 14px; text-decoration: none; font-weight: 500; }
.side a.nl:hover { background: rgba(22, 27, 61, .06); }
.side a.nl.on { background: var(--ink); color: #fff; font-weight: 600; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; display: grid; gap: 10px; }
.wallet { display: block; text-decoration: none; background: var(--glass-strong); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; }
.wallet:hover { border-color: var(--signal); }
.wallet .t { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.wallet .b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; margin: 2px 0 6px; }
.wallet .b small { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 12px; color: var(--muted); }
.wallet .meter { height: 6px; border-radius: 99px; background: var(--mist); overflow: hidden; }
.wallet .meter span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.wallet.low .meter span { background: var(--signal); }
.wallet.low .b { color: var(--signal-deep); }
.powered { display: flex; align-items: center; gap: 9px; padding: 2px 4px; }
.powered img { width: 28px; height: 28px; border-radius: 6px; }
.powered strong { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 13.5px; line-height: 1.1; }
.powered span { display: block; font-size: 11px; color: var(--muted); }
.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 28px; position: sticky; top: 0; z-index: 5;
  background: rgba(244, 245, 249, .7); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-bottom: 1px solid rgba(217, 220, 234, .7);
}
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.content { padding: 26px 30px 70px; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.btn.menu-btn { display: none; }

/* Glass building blocks */
.card, .stat {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line); outline: 1px solid rgba(217, 220, 234, .55); outline-offset: -1px;
  border-radius: var(--r); box-shadow: var(--shadow);
}
.card { padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 16px 18px; }
.stat .n { font-family: 'Bricolage Grotesque', sans-serif; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { font-size: 12.5px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  padding: 8px 15px; border-radius: var(--r-sm); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .15s, background .15s;
}
.btn:hover { box-shadow: 0 4px 14px rgba(22, 27, 61, .2); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.light { background: rgba(255, 255, 255, .8); color: var(--ink); border-color: var(--line); }
.btn.light:hover { border-color: #B9BED6; }
.btn.danger { background: var(--ess); border-color: var(--ess); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.accent { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-decoration-color: rgba(22, 27, 61, .25); text-underline-offset: 2px; }
.linkbtn.danger { color: var(--ess); }
.iconbtn { background: none; border: 0; cursor: pointer; padding: 2px 4px; border-radius: 6px; color: var(--muted); font: inherit; line-height: 1; }
.iconbtn:hover { background: var(--mist); color: var(--ink); }
form.inline { display: inline; }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 5px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=datetime-local], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; background: rgba(255, 255, 255, .85); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
::placeholder { color: #A3A8C0; opacity: 1; }
textarea { min-height: 90px; resize: vertical; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; min-height: 520px; }
textarea.letter { min-height: 460px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 27, 61, .12); background: #fff; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 16px; height: 16px; vertical-align: -3px; }
.field { margin-bottom: 13px; }
.row { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: flex-start; }
.row > .field { flex: 1 1 200px; min-width: 0; }
.row > .btn, .row > button, .row > .acts-end { align-self: flex-end; margin-bottom: 13px; }
/* Form grid: fields line up in columns whatever their hints are. --cols sets the column count on wide screens. */
.fgrid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 4px 16px; align-items: start; }
.fgrid > .field { min-width: 0; }
.fgrid > .span2 { grid-column: span 2; }
.fgrid > .full { grid-column: 1 / -1; }
.fgrid.c2 { --cols: 2; } .fgrid.c4 { --cols: 4; }
.form-sec { margin: 18px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 900px) { .fgrid, .fgrid.c4 { --cols: 2; } }
@media (max-width: 560px) { .fgrid, .fgrid.c2, .fgrid.c4 { --cols: 1; } .fgrid > .span2 { grid-column: auto; } }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid rgba(217, 220, 234, .65); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 0; font-family: inherit; }
.pill.ess { background: var(--ess-bg); color: var(--ess); }
.pill.semi { background: var(--semi-bg); color: var(--semi); }
.pill.non { background: var(--non-bg); color: var(--non); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.info { background: var(--mist); color: var(--ink); }
.pill.warn { background: #FDE7E1; color: var(--signal-deep); }
.flash { padding: 11px 15px; border-radius: var(--r); margin-bottom: 16px; font-weight: 500; backdrop-filter: var(--blur); }
.flash.ok { background: rgba(233, 247, 240, .9); color: var(--ok); border: 1px solid #B5E3CC; }
.flash.error { background: rgba(254, 243, 242, .92); color: var(--ess); border: 1px solid #FECDCA; }
.notice { background: rgba(255, 246, 229, .9); border: 1px solid #F5D9A8; color: #7A4A00; padding: 10px 14px; border-radius: var(--r); margin-bottom: 14px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; overflow-x: auto; max-width: 100%; background: rgba(227, 230, 243, .7); border-radius: 10px; backdrop-filter: var(--blur); }
.tabs a, .tabs button.tab { padding: 6px 13px; color: var(--slate); font-weight: 600; font-size: 13.5px; border-radius: 8px; white-space: nowrap; text-decoration: none; }
.tabs a.on, .tabs button.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22, 27, 61, .12); }
.tabs a:hover { color: var(--ink); }
.tabs .count { background: var(--non-bg); color: var(--non); border-radius: 999px; padding: 0 7px; font-size: 11.5px; margin-left: 5px; }
.verdict { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: var(--r); margin-bottom: 16px; flex-wrap: wrap; backdrop-filter: var(--blur); }
.verdict.bad { background: rgba(254, 243, 242, .85); border: 1px solid #FECDCA; }
.verdict.good { background: rgba(233, 247, 240, .85); border: 1px solid #B5E3CC; }
.verdict .v { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.verdict.bad .v { color: var(--ess); }
.verdict.good .v { color: var(--ok); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.tracker { display: flex; gap: 0; overflow-x: auto; padding: 6px 0 2px; }
.tracker .st { flex: 1 0 96px; text-align: center; position: relative; font-size: 11.5px; color: var(--muted); padding-top: 26px; }
.tracker .st::before { content: ''; position: absolute; top: 8px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 2px solid #C5C9DD; z-index: 1; }
.tracker .st::after { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.tracker .st:first-child::after { display: none; }
.tracker .st.done::before { background: var(--ink); border-color: var(--ink); }
.tracker .st.done::after, .tracker .st.cur::after { background: var(--ink); }
.tracker .st.cur::before { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 4px rgba(242, 92, 59, .22); }
.tracker .st.cur { color: var(--ink); font-weight: 700; }
.desk { margin-bottom: 18px; }
.desk h3 { display: flex; align-items: center; gap: 8px; }
.progress { height: 8px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ink); width: 40%; border-radius: 99px; animation: slide 1.4s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--mist); }
.bar span { display: block; height: 100%; }
.bar .e { background: var(--ess); } .bar .s { background: #E89A2C; } .bar .n { background: #9AA0BC; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.secret { font-family: ui-monospace, Consolas, monospace; background: var(--mist); padding: 4px 8px; border-radius: 6px; }

/* Drag-and-drop upload */
.dropzone { position: relative; display: block; border: 1.5px dashed #B9BED6; border-radius: var(--r-lg); padding: 38px 20px; text-align: center; background: rgba(255, 255, 255, .55); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: rgba(255, 255, 255, .9); }
.dropzone.over { transform: scale(1.01); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone .ico { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; }
.dropzone .ico svg { width: 24px; height: 24px; }
.dropzone strong { display: block; font-size: 16px; }
.dropzone .files { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dropzone .files span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.dropzone.compact { padding: 20px 16px; }

/* Password rules: red cross turns into green tick */
.pw-rules { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 3px; font-size: 12.5px; }
.pw-rules li { display: flex; align-items: center; gap: 7px; color: var(--ess); }
.pw-rules li::before { content: '✕'; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ess-bg); font-size: 10px; font-weight: 700; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: '✓'; background: var(--ok-bg); }

/* Integrations */
.integ { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.integ .card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.integ .head { display: flex; align-items: center; gap: 12px; }
.integ .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; flex: none; }
.integ .ic svg { width: 22px; height: 22px; }
.connected { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; font-size: 13.5px; }
.connected::before { content: '✓'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 11px; }
.providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.prov { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; background: rgba(255, 255, 255, .8); color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.prov:hover { border-color: var(--ink); }
.prov small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.prov.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.prov.soon { opacity: .55; cursor: default; }
.oauth-btn { display: flex; align-items: center; gap: 10px; justify-content: center; width: 100%; padding: 11px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; font-size: 15px; }
.oauth-btn:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.tile { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: rgba(255, 255, 255, .8); }
.tile.on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.tile .nm { font-weight: 700; font-size: 14px; }
.tile .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }

/* Segmented switch (auto / manual) */
.seg { display: inline-flex; background: var(--mist); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 13px; color: var(--slate); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22, 27, 61, .14); }

/* Roles and access matrix */
.matrix th, .matrix td { text-align: center; vertical-align: middle; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: var(--glass-strong); }
.matrix th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); white-space: nowrap; }
.matrix .rn { display: inline-flex; align-items: center; gap: 4px; }
.matrix tr:hover td { background: rgba(227, 230, 243, .35); }
.rename { display: none; gap: 4px; justify-content: center; margin-top: 4px; }
.rename.open { display: flex; }
.rename input { width: 130px; padding: 4px 7px; font-size: 13px; }

/* Packs */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pack { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: rgba(255, 255, 255, .75); display: flex; flex-direction: column; gap: 4px; }
.pack button { margin-top: auto !important; }
.pack .amt { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 22px; }
.pack .bonus { color: var(--signal-deep); font-weight: 700; font-size: 13px; }
.pack.best { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 420px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); outline: 1px solid rgba(217, 220, 234, .6); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 30px; }
.auth .lockup { margin-bottom: 20px; font-size: 22px; }
.auth .lockup img { width: 36px; height: 36px; }
.auth .btn { width: 100%; padding: 10px; }
.auth-foot { margin-top: 18px; display: flex; justify-content: center; }
.otp-input { font-size: 26px !important; letter-spacing: .5em; text-align: center; font-family: ui-monospace, Consolas, monospace; }

@media (max-width: 960px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: -270px; width: 256px; z-index: 20; transition: left .2s; background: rgba(244, 245, 249, .96); }
  .side.open { left: 0; box-shadow: var(--shadow-lg); }
  .btn.menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
}

/* Plan picker (master hospital form and plan switch) */
.plan-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.plan-opt { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 400; margin: 0; }
.plan-opt:has(input:checked) { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(242, 92, 59, .12); }
.plan-opt input { margin-top: 3px; accent-color: var(--signal); width: auto; }
.plan-opt > span { display: flex; flex-direction: column; gap: 2px; }
.plan-opt .price { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 22px; color: var(--ink); }
.plan-opt .price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
@media (max-width: 760px) { .plan-pick { grid-template-columns: 1fr; } }

/* "ekline claims" wordmark in the Powered-by block */
.powered .wm { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 14.5px; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.powered .wm b { font-weight: 800; } .powered .wm i { font-style: normal; font-weight: 700; color: var(--signal); }

/* Plan and validity chip in the top bar (hospital admins) */
.sub-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); font-size: 12.5px; color: var(--slate, #4B5170); text-decoration: none; white-space: nowrap; }
.sub-chip span:first-child { font-weight: 700; color: var(--ink); }
.sub-chip .sep { width: 1px; height: 12px; background: var(--line); }
.sub-chip.warn { border-color: #F2C94C; background: #FFF8E6; }
.sub-chip:hover { text-decoration: none; border-color: var(--signal); }
@media (max-width: 760px) { .sub-chip .sep, .sub-chip span:first-child { display: none; } }

/* 30-minute idle timer: small, nearly transparent ring, bottom right */
.idle-timer { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 99px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(22, 27, 61, .08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--muted); font: 600 11.5px/1 'DM Sans', sans-serif; opacity: .45; transition: opacity .3s, background .3s; font-variant-numeric: tabular-nums; }
.idle-timer:hover { opacity: 1; }
.idle-timer svg { width: 22px; height: 22px; transform: rotate(-90deg); }
.idle-timer .trk { stroke: rgba(22, 27, 61, .1); }
.idle-timer .arc { stroke: var(--ink); transition: stroke-dashoffset 1s linear, stroke .3s; }
.idle-timer.soon { opacity: 1; background: #FFF4F0; border-color: rgba(242, 92, 59, .4); color: var(--signal-deep); animation: idle-pulse 1.6s ease-in-out infinite; }
.idle-timer.soon .arc { stroke: var(--signal); }
@keyframes idle-pulse { 50% { box-shadow: 0 0 0 6px rgba(242, 92, 59, .12); } }
@media (prefers-reduced-motion: reduce) { .idle-timer.soon { animation: none; } .idle-timer .arc { transition: none; } }
@media print { .idle-timer { display: none; } }
.servers .srv-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) 1.2fr 96px 1.2fr 96px auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.servers .srv-row .acts { display: flex; gap: 8px; align-items: center; }
@media (max-width: 900px) { .servers .srv-row { grid-template-columns: 1fr 1fr; } .servers tr:first-child { display: none; } }
.keys-list .key-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.notice + p { margin-top: 10px; }

/* Insurers and TPAs, hospital rates */
.payers .emails div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.inline-check { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 500; margin: 0; }
.inline-check input { width: auto; margin-top: 3px; accent-color: var(--signal); }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; max-height: 330px; overflow: auto; padding: 4px 2px; }
@media (max-width: 760px) { .check-list { grid-template-columns: 1fr; } }
.rate-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.rate-toc a { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.rate-toc a span { color: var(--muted); font-weight: 500; margin-left: 3px; }
.rate-toc a.empty { opacity: .55; }
.rate-sec { scroll-margin-top: 70px; }
table.rates td.num, table.rates th.num { text-align: right; white-space: nowrap; }
.rate-form { background: var(--paper, #F4F5F9); border-radius: 10px; padding: 12px; }
.spinner { display: inline-block; vertical-align: middle; width: 42px; height: 4px; border-radius: 99px; background: var(--mist); position: relative; overflow: hidden; flex: 0 0 auto; }
.spinner::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 99px; background: linear-gradient(90deg, var(--signal), #ff9a5a); animation: lbar-run 1.2s ease-in-out infinite; }
@keyframes lbar-run { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
/* v5 line progress bar with percent and time left */
.lbar-host { width: 100%; }
.lbar-wrap { margin-top: 12px; width: 100%; max-width: 520px; }
.lbar { height: 6px; border-radius: 99px; background: rgba(22, 27, 61, .08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(22, 27, 61, .08); }
.lbar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--signal), #ff9a5a, var(--signal)); background-size: 200% 100%; transition: width .4s ease; animation: lbar-sheen 1.6s linear infinite; }
@keyframes lbar-sheen { to { background-position: -200% 0; } }
.lbar-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.topbar-load { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; }
.topbar-load > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--signal), #ff9a5a); box-shadow: 0 0 8px rgba(242, 92, 59, .6); animation: toplbar 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes toplbar { 0% { width: 0; } 30% { width: 55%; } 100% { width: 92%; } }
@media (prefers-reduced-motion: reduce) { .lbar > i, .spinner::after { animation: none; } .topbar-load > i { animation-duration: .01s; width: 90%; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pre-auth and TPA mailbox */
.field.bad input, .field.bad select, .field.bad textarea { border-color: #F04438; background: #FFFBFA; }
.hint.req { color: #B42318; }
.mail-list td { vertical-align: top; }
.mail-list tr.unread td { font-weight: 600; }
.mail-list .snip { color: var(--slate); font-weight: 400; font-size: 12.5px; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-body { white-space: pre-wrap; font-size: 14px; line-height: 1.55; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; max-height: 560px; overflow: auto; overflow-wrap: anywhere; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-list a { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; text-decoration: none; background: #fff; }
.compose textarea[name=body] { min-height: 300px; font-family: inherit; }
.pick-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: rgba(255,255,255,.6); }
.pick-list label { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; font-weight: 400; }
.thread-list { display: grid; gap: 6px; }
.thread-list a { display: block; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.thread-list a.on { border-color: var(--signal, #F25C3B); }
.nl .count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--signal, #F25C3B); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.field input[type=datetime-local], .field input[type=date] { width: 100%; }
/* One-click sign-in: a single glass button with the provider's mark. */
.sso { display: flex; justify-content: center; padding: 10px 0 2px; }
.sso-btn { position: relative; width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; text-decoration: none !important;
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(244,245,249,.75)); border: 1px solid rgba(22,27,61,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(22,27,61,.06), 0 10px 26px rgba(22,27,61,.10);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); overflow: hidden; isolation: isolate;
  transition: transform .45s cubic-bezier(.2,.9,.25,1.25), box-shadow .35s ease; animation: sso-in .7s cubic-bezier(.2,.9,.25,1.2) both; }
.sso-btn svg { width: 28px; height: 28px; transition: transform .45s cubic-bezier(.2,.9,.25,1.3); }
.sso-btn::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.85) 50%, transparent 60%); transform: translateX(-70%); transition: transform .8s ease; z-index: 1; pointer-events: none; }
.sso-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(22,27,61,.06), 0 16px 34px rgba(22,27,61,.14); }
.sso-btn:hover::after { transform: translateX(70%); }
.sso-btn:hover svg { transform: scale(1.08); }
.sso-btn:active { transform: scale(.94); transition-duration: .12s; }
.sso-btn:focus-visible { outline: 3px solid rgba(66,133,244,.45); outline-offset: 3px; }
.sso-ring { position: absolute; inset: -2px; border-radius: inherit; padding: 2px; opacity: 0; transition: opacity .3s;
  background: conic-gradient(from var(--sso-a), #4285F4, #34A853, #FBBC05, #EA4335, #4285F4);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 0; }
.sso-btn.busy .sso-ring { opacity: 1; animation: sso-rot 1.1s linear infinite; }
@property --sso-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes sso-rot { to { --sso-a: 360deg; } }
.sso-btn.busy svg { animation: sso-breathe 1.4s ease-in-out infinite; }
@keyframes sso-in { from { opacity: 0; transform: translateY(6px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes sso-spin { to { transform: rotate(360deg); } }
@keyframes sso-breathe { 50% { transform: scale(.9); } }
.auth .or { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.auth .or::before, .auth .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (prefers-reduced-motion: reduce) { .sso-btn, .sso-btn svg, .sso-btn::after, .sso-ring { animation: none !important; transition: none !important; } }
/* The page a sign-in window shows before it closes */
body.oauth-done { display: grid; place-items: center; min-height: 100vh; }
.od-card { text-align: center; padding: 28px; }
.od-icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: sso-spin .9s linear infinite; }
.od-icon.bad { border-color: var(--ess); animation: none; }

/* Notifications and announcements */
.bell { position: relative; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 999px; color: var(--ink); }
.bell:hover { background: rgba(22, 27, 61, .06); }
.bell svg { width: 19px; height: 19px; }
.bell .badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--signal, #F25C3B); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.dot-new { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--signal, #F25C3B); box-shadow: 0 0 0 3px rgba(242, 92, 59, .2); animation: dotpulse 1.8s ease-in-out infinite; vertical-align: middle; }
@keyframes dotpulse { 50% { box-shadow: 0 0 0 6px rgba(242, 92, 59, 0); } }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.notif-list li.unread .t { font-weight: 700; }
.notif-list .when { font-size: 12.5px; color: var(--slate); white-space: nowrap; }
.notif-list .k { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--slate); }
.notif-list .k.ok { background: #12B76A; } .notif-list .k.warn { background: #F79009; } .notif-list .k.bad { background: #F04438; } .notif-list .k.info { background: #2E90FA; }
.ann { border: 1px solid var(--line); border-radius: var(--r); background: rgba(255,255,255,.75); margin-bottom: 14px; transition: box-shadow .3s; }
.ann > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ann > summary::-webkit-details-marker { display: none; }
.ann .body { padding: 0 18px 18px; }
.ann .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--slate); margin: 4px 0 12px; }
.ann .text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; }
.ann.unseen { border-color: var(--signal, #F25C3B); animation: annglow 2.2s ease-in-out infinite; }
@keyframes annglow { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 92, 59, .0), 0 0 12px 1px rgba(242, 92, 59, .25); } 50% { box-shadow: 0 0 0 4px rgba(242, 92, 59, .12), 0 0 22px 4px rgba(242, 92, 59, .35); } }
.ann .shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.ann .shots figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ann .shots img { width: 100%; display: block; }
.ann .shots figcaption { font-size: 12.5px; padding: 6px 10px; color: var(--slate); }
@media (prefers-reduced-motion: reduce) { .ann.unseen, .dot-new { animation: none; } }
/* If Google's own button styles cannot load (offline, blocked network) keep the fallback button small. */
.gsi-wrap .gsi-btn svg { width: 18px !important; height: 18px !important; flex: none; }
.gsi-wrap .gsi-btn > div:not([style]) { display: flex; align-items: center; gap: 8px; }

/* Authenticator app backup codes */
.backup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.backup-codes code { background: var(--mist); padding: 8px 10px; border-radius: 8px; font-size: 15px; text-align: center; letter-spacing: .5px; }
.chain-ok { border-color: #B5E3CC !important; }
.chain-bad { border-color: #F2B8A8 !important; }
@media print { .side, .topbar, .page-head, form, .flash { display: none !important; } }

/* API documentation */
.dev-docs pre { white-space: pre-wrap; word-break: break-word; background: var(--mist); padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.dev-docs h2 { margin-top: 26px; }

/* v4: account menu in the round photo */
.acct { position: relative; }
.avatar-btn { border: 0; padding: 2px; background: transparent; border-radius: 50%; cursor: pointer; display: grid; transition: transform .25s cubic-bezier(.2,.9,.25,1.3), box-shadow .2s; }
.avatar-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(22,27,61,.08); }
.avatar-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(242,92,59,.35); }
.avatar-btn:focus-visible { outline: 3px solid rgba(242,92,59,.5); outline-offset: 2px; }
img.avatar { object-fit: cover; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; flex: none; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 290px; z-index: 30; padding: 8px; border-radius: 16px;
  background: rgba(252,252,254,.97); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 24px 60px rgba(22,27,61,.18), 0 2px 6px rgba(22,27,61,.06); transform-origin: top right; animation: acct-in .22s cubic-bezier(.2,.9,.25,1.15); }
.acct-menu[hidden] { display: none; }
@keyframes acct-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
.acct-head { display: flex; gap: 12px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-head strong { font-size: 14px; }
.acct-head .small { word-break: break-all; line-height: 1.35; }
.acct-menu a, .acct-menu button.acct-out { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.acct-menu a:hover, .acct-menu a:focus-visible, .acct-menu button.acct-out:hover, .acct-menu button.acct-out:focus-visible { background: rgba(22,27,61,.06); outline: none; text-decoration: none; }
.acct-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--slate); flex: none; }
.acct-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.acct-menu button.acct-out { color: var(--ess); }
.acct-menu button.acct-out svg { color: var(--ess); }

/* v4: collapsible sidebar. Open (default) | collapsed (point at it to peek) | locked (hidden until unlocked). */
.shell { transition: grid-template-columns .38s cubic-bezier(.2,.8,.2,1); }
.side-ctrl { position: absolute; top: 18px; right: -15px; z-index: 25; display: flex; flex-direction: column; gap: 6px; }
.side-toggle, .side-lock { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0;
  background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(236,238,246,.7)); border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 14px rgba(22,27,61,.14); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: transform .35s cubic-bezier(.2,.9,.25,1.3), box-shadow .2s, opacity .2s; }
.side-toggle:hover, .side-lock:hover { transform: scale(1.1); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 6px 18px rgba(22,27,61,.2); }
.side-toggle:active, .side-lock:active { transform: scale(.92); }
.side-toggle svg { width: 16px; height: 16px; transition: transform .45s cubic-bezier(.2,.9,.25,1.3); }
.side-lock svg { width: 14px; height: 14px; }
.side-lock .shackle { transition: transform .3s; transform-origin: 16px 11px; }
.side-lock { opacity: 0; pointer-events: none; transform: scale(.6); }
.shell.side-collapsed .side-lock, .shell.side-locked .side-lock, .shell.peek .side-lock { opacity: 1; pointer-events: auto; transform: none; }
.shell.side-collapsed .side-lock .shackle { transform: translateY(-2px) rotate(-18deg); }
.shell.side-locked .side-lock { color: #fff; background: var(--ink); border-color: var(--ink); }
.shell.side-collapsed, .shell.side-locked { grid-template-columns: 14px 1fr; }
.shell > .main { grid-column: 2; }
@media (max-width: 760px) { .shell > .main { grid-column: 1; } }
.shell.side-collapsed .side, .shell.side-locked .side { width: 252px; transform: translateX(-238px); position: fixed; left: 0; top: 0; z-index: 24;
  transition: transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.shell.side-collapsed .side > :not(.side-ctrl), .shell.side-locked .side > :not(.side-ctrl) { opacity: 0; transition: opacity .2s; }
.shell.side-collapsed .side-toggle svg, .shell.side-locked .side-toggle svg { transform: rotate(180deg); }
.shell.side-collapsed.peek .side { transform: none; box-shadow: 0 24px 60px rgba(22,27,61,.2); background: rgba(244,245,249,.9); }
.shell.side-collapsed.peek .side > :not(.side-ctrl) { opacity: 1; }
.shell.side-collapsed.peek .side-toggle svg { transform: rotate(0deg); }
.shell.side-collapsed .side::after, .shell.side-locked .side::after { content: ''; position: absolute; top: 0; right: 0; width: 14px; height: 100%; background: linear-gradient(90deg, transparent, rgba(22,27,61,.05)); }
.shell.side-collapsed.peek .side::after { display: none; }
@media (max-width: 760px) { .side-ctrl { display: none; } .shell.side-collapsed, .shell.side-locked { grid-template-columns: 1fr; } .shell.side-collapsed .side, .shell.side-locked .side { transform: none; } .shell.side-collapsed .side > *, .shell.side-locked .side > * { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .shell, .side, .side-toggle svg, .acct-menu { transition: none !important; animation: none !important; } }

/* v4: profile */
.profile-card { margin-bottom: 16px; scroll-margin-top: 80px; }
.profile-grid { display: grid; grid-template-columns: 170px 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }
.photo-drop { position: relative; display: grid; place-items: center; width: 150px; height: 150px; margin: 0 auto; cursor: pointer; overflow: hidden;
  background: linear-gradient(150deg, #fff, var(--mist)); border: 2px dashed rgba(22,27,61,.18); transition: border-color .2s, transform .3s cubic-bezier(.2,.9,.25,1.3), box-shadow .2s; }
.photo-drop.round { border-radius: 50%; }
.photo-drop.square { border-radius: 24px; }
.photo-drop:hover, .photo-drop.over { border-color: var(--signal); transform: scale(1.03); box-shadow: 0 10px 30px rgba(22,27,61,.12); }
.photo-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-drop.square img { object-fit: contain; padding: 12px; background: #fff; }
.photo-drop .initials { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 40px; color: var(--slate); pointer-events: none; }
.photo-drop .photo-hint { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; pointer-events: none; box-shadow: 0 4px 12px rgba(22,27,61,.25); }
.photo-drop.round .photo-hint { right: 14px; bottom: 6px; }
.photo-drop .photo-hint svg { width: 17px; height: 17px; }
.photo-err { color: var(--ess); min-height: 1em; }
.center { text-align: center; }
input.locked, select.locked, textarea.locked { background: rgba(227,230,243,.5) !important; color: var(--slate); cursor: not-allowed; }
h3.sub { font-size: 14px; margin: 14px 0 8px; }
.grid.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .grid.g4 { grid-template-columns: 1fr 1fr; } }
/* v4: choose how to confirm sign-in */
.mfa-switch { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mfa-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mfa-opts form { margin: 0; }
.mfa-opt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--ink); font: 500 13px 'DM Sans', sans-serif; cursor: pointer; transition: transform .2s cubic-bezier(.2,.9,.25,1.3), border-color .2s; }
.mfa-opt:hover { transform: translateY(-1px); border-color: var(--ink); }
.mfa-opt svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mfa-pref { display: grid; gap: 8px; margin-bottom: 8px; }
.mfa-pref-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.6); }
.mfa-pref-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.mfa-pref-opt.off { opacity: .55; cursor: not-allowed; }
.mfa-pref-opt > span { display: grid; }
.mfa-actions .field { max-width: 360px; }
.mfa-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mfa-btns .btn { min-height: 40px; }
.btn.danger-outline { background: #fff; color: var(--ess); border: 1px solid #F1B8B2; }
.btn.danger-outline:hover { background: var(--ess); color: #fff; border-color: var(--ess); }
.btn.light.danger { background: #fff; color: var(--ess); border-color: #F1B8B2; }
/* v4: AI companies in Integrations */
.ai-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 14px; align-items: start; }
.ai-tile { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.66); transition: border-color .2s, box-shadow .2s; }
.ai-tile.on { border-color: #34A26F; box-shadow: 0 0 0 1px #34A26F inset, 0 6px 18px rgba(30,122,85,.10); }
.ai-tile > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; }
.ai-tile > summary::-webkit-details-marker { display: none; }
.ai-tile[open] > summary .ai-act { background: var(--mist); color: var(--ink); border-color: var(--line); }
.ai-nm { flex: 1; min-width: 0; display: grid; }
.ai-nm strong { font-size: 14px; }
.ai-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font: 800 13px 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; flex: none; overflow: hidden; box-shadow: 0 2px 6px rgba(22,27,61,.15); }
.ai-logo.sm { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.ai-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ai-tile.on .ai-nm .small { color: var(--ok); }
.ai-body { padding: 0 12px 12px; border-top: 1px solid var(--line); }
.ai-models { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.ai-model { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--mist); }
.ai-model.use { background: var(--ink); color: #fff; }
.ai-key-form { margin-top: 10px; }
.ai-pick { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.fgrid.c4 { --cols: 4; }
.clock-input { width: 150px; font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; letter-spacing: .02em; }

/* ---------- v4 billing: plans, pay, coins ---------- */
label.check { display: inline-flex; gap: 7px; align-items: center; font-weight: 500; cursor: pointer; margin: 0 12px 4px 0; }
label.check input { width: auto; margin: 0; }
.inline-input { display: flex; gap: 6px; align-items: center; }
.inline-input input { flex: 1 1 auto; min-width: 0; }
.btn.full { width: 100%; justify-content: center; }
.btn.big { padding: 12px 18px; font-size: 15.5px; }
.btn.wa { background: #E8F8EE; color: #146C3A; border-color: #BFE8CF; }
.btn.wa:hover { background: #D6F2E1; }
.doc-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-acts form { margin: 0; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.sec-title { margin: 26px 0 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }

.plans-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .plans-wrap { grid-template-columns: 1fr; } }
.cycle-switch { display: inline-flex; padding: 5px; gap: 4px; border-radius: 16px; background: rgba(255, 255, 255, .45); backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); border: 1px solid rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 8px 24px rgba(22, 27, 61, .08); margin-bottom: 18px; flex-wrap: wrap; }
.addon.locked { opacity: .5; filter: grayscale(.4); cursor: not-allowed; }
.cycle-switch .cyc { margin: 0; cursor: pointer; }
.cycle-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cycle-switch span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-weight: 600; color: var(--slate); transition: background .25s, color .25s, box-shadow .25s; }
.cycle-switch input:checked + span { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .85)); color: var(--ink); box-shadow: 0 2px 8px rgba(22, 27, 61, .12); }
.cycle-switch input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.cycle-switch em { font-style: normal; font-size: 11.5px; background: var(--signal); color: #fff; padding: 2px 8px; border-radius: 999px; animation: ek-pulse 2.4s ease-in-out infinite; }
.cycle-switch small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
@keyframes ek-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 92, 59, .35); } 50% { box-shadow: 0 0 0 6px rgba(242, 92, 59, 0); } }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .plan-cards { grid-template-columns: 1fr; } }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 18px; border-radius: 16px; background: var(--glass-strong); border: 1.5px solid var(--line); cursor: pointer; font-weight: 400; margin: 0; transition: transform .2s, box-shadow .25s, border-color .2s; }
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.plan-card > input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 27, 61, .1), var(--shadow); }
.plan-card:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 3px; }
.plan-card.pop { border-color: rgba(242, 92, 59, .5); }
.ribbon { position: absolute; top: -10px; right: 14px; background: var(--signal); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.pc-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pc-line { color: var(--muted); font-size: 13px; }
.pc-price { display: none; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.pc-price.on { display: flex; animation: ek-rise .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes ek-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pc-price s { color: var(--muted); font-size: 14px; }
.pc-price b { font-family: 'Bricolage Grotesque', sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pc-price b + small { font-size: 13px; color: var(--muted); margin-top: -2px; }
.pc-sub { font-size: 12.5px; color: var(--slate); }
.pc-save { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.pc-save.mild { color: var(--semi); font-weight: 600; }
.pc-save.warn { color: var(--signal-deep); font-weight: 600; }
.pc-day { font-size: 12px; color: var(--muted); }
.pc-points { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--slate); }
.addon-only { display: inline-flex; gap: 8px; align-items: center; margin: 12px 0 0; font-weight: 500; color: var(--slate); cursor: pointer; }
.addon-only input { width: auto; }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.addon { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 40px; position: relative; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .8); cursor: pointer; font-weight: 400; margin: 0; transition: border-color .2s, background .2s; }
.addon > input[type=checkbox] { position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.addon:has(input[type=checkbox]:checked) { border-color: var(--ink); background: #fff; }
.addon.inc { opacity: .75; cursor: default; }
.ad-top { display: flex; justify-content: space-between; gap: 8px; }
.ad-price { white-space: nowrap; font-weight: 700; }
.ad-price small { font-weight: 500; color: var(--muted); }
.ad-desc { font-size: 12.5px; color: var(--muted); }
.ad-inc { font-size: 12px; font-weight: 700; color: var(--ok); }
.ad-qty { font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.ad-qty input { width: 70px; padding: 4px 6px; }
.review { position: sticky; top: 76px; }
.review h2 { margin-top: 0; }
.rv-lines .ln, .rv-sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 4px 0; }
.rv-lines .ln span:last-child, .rv-sum dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rv-sum { margin: 12px 0 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.rv-sum dt { color: var(--slate); }
.rv-sum dd { margin: 0; font-weight: 600; }
.rv-sum .good dd, .rv-sum .good dt { color: var(--ok); }
.rv-sum .tot { font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.rv-sum .tot dd { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; }
.rv-sum .tot dd.bump { animation: ek-bump .4s ease; }
@keyframes ek-bump { 40% { transform: scale(1.06); } }
.rv-codes, .rv-coins { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.rv-period { margin-bottom: 12px; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--ess); }
.sum-table { width: 100%; }
.sum-table td { padding: 6px 0; border: 0; }
.sum-table .good td { color: var(--ok); }
.sum-table .tot td { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); padding-top: 10px; }
pre.bank { white-space: pre-wrap; font-family: inherit; background: var(--paper); padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.paid-hero { text-align: center; max-width: 640px; margin: 30px auto; padding: 34px 26px; }
.paid-hero h1 { margin: 10px 0 6px; }
.tick svg { width: 64px; height: 64px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: ek-draw .6s ease forwards; }
.tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: ek-draw .4s .45s ease forwards; }
@keyframes ek-draw { to { stroke-dashoffset: 0; } }
.share-row { margin: 18px 0 8px; gap: 8px; }
.addon-gate { max-width: 560px; margin: 40px auto; text-align: center; }

.coin-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border-radius: 18px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(500px 200px at 90% 0%, rgba(242, 92, 59, .55), transparent 60%), linear-gradient(135deg, #161B3D, #2B3270); box-shadow: var(--shadow-lg); }
.coin-hero .small { color: #D7DAF0; }
@media (max-width: 760px) { .coin-hero { grid-template-columns: auto 1fr; } .coin-stats { grid-column: 1 / -1; } }
.coin-face { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: #7A4A00; font-size: 20px;
  background: radial-gradient(circle at 30% 30%, #FFE7A3, #F4B73E 60%, #C98A12); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15), 0 6px 18px rgba(244, 183, 62, .45); animation: ek-coin 6s ease-in-out infinite; }
@keyframes ek-coin { 0%, 80%, 100% { transform: rotateY(0); } 90% { transform: rotateY(180deg); } }
@media (prefers-reduced-motion: reduce) { .coin-face, .cycle-switch em, .pc-price.on, .tick circle, .tick path { animation: none; stroke-dashoffset: 0; } }
.coin-bal { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 38px; letter-spacing: -.02em; line-height: 1.1; }
.coin-stats { display: flex; gap: 10px; }
.coin-stats div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 8px 14px; min-width: 92px; }
.coin-stats b { display: block; font-size: 17px; }
.coin-stats span { font-size: 12px; color: #D7DAF0; }
.coin-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.coin-pack { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: rgba(255, 255, 255, .85); display: flex; flex-direction: column; gap: 4px; transition: transform .2s, box-shadow .2s; }
.coin-pack:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.coin-pack.best { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.coin-pack .btn { margin-top: 10px; }
.cp-coins { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 24px; }
.cp-coins small { font-size: 13px; color: var(--muted); font-weight: 600; }
.cp-bonus { color: var(--signal-deep); font-weight: 700; font-size: 13px; }
.cp-price { font-weight: 700; }
.cp-price small { color: var(--muted); font-weight: 500; }
.ref-code { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px dashed var(--ink); border-radius: 12px; background: #fff; }
.ref-code .mono { font-size: 20px; font-weight: 800; letter-spacing: .08em; flex: 1; }
.rules { padding-left: 20px; } .rules li { margin-bottom: 6px; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.billto { background: var(--paper); border-radius: 10px; padding: 10px 12px; margin: -4px 0 12px; }
.addon-ticks { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.desc-list { list-style: none; padding: 0; } .desc-list li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.price-table input, .addon-table input[type=text] { width: 100%; }

/* ---------- v4 lifecycle: renewal banner, expired lock, popup ---------- */
.renew-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border-radius: 12px; background: linear-gradient(90deg, #FFF6E5, #FFFBF3); border: 1px solid #F5D9A8; color: #7A4A00; animation: ek-drop .45s cubic-bezier(.2, .8, .2, 1); }
.renew-banner.trial { background: linear-gradient(90deg, #EEF0FB, #F7F8FE); border-color: #CDD2EE; color: var(--ink); }
.renew-banner.grace { background: linear-gradient(90deg, #FEF3F2, #FFF8F7); border-color: #F9C9C4; color: var(--ess); }
.renew-banner .rb-txt { flex: 1 1 320px; font-size: 13.5px; }
.renew-banner .rb-x { background: none; border: 0; font-size: 20px; line-height: 1; color: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.renew-banner .rb-x:hover { background: rgba(0, 0, 0, .06); }
.renew-banner.closing { animation: ek-up .3s ease forwards; }
@keyframes ek-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes ek-up { to { opacity: 0; transform: translateY(-8px); height: 0; padding: 0; margin: 0; border-width: 0; } }
.plan-locked .side .nl:not([href^="/billing"]):not([href^="/coins"]) { opacity: .38; pointer-events: none; filter: grayscale(1); }
.modal-back { position: fixed; inset: 0; background: rgba(22, 27, 61, .45); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: ek-fade .25s ease; }
.modal { max-width: 400px; text-align: center; padding: 26px 24px; animation: ek-pop .35s cubic-bezier(.2, .9, .3, 1.2); }
.modal h2 { margin: 6px 0; }
.modal-ic { font-size: 34px; }
@keyframes ek-fade { from { opacity: 0; } }
@keyframes ek-pop { from { opacity: 0; transform: scale(.92); } }
@media (prefers-reduced-motion: reduce) { .renew-banner, .modal, .modal-back { animation: none; } }

/* ---------- Insurer form designer ---------- */
.fd { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.fd-palette { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.fd-palette h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-chip { display: inline-block; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12.5px; cursor: grab; user-select: none; transition: transform .12s, box-shadow .12s, border-color .12s; }
.fd-chip:hover, .fd-chip:focus-visible { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); transform: translateY(-1px); outline: none; }
.fd-chip.armed { background: var(--accent); border-color: var(--accent); color: #fff; }
.fd-pages { display: grid; gap: 18px; }
.fd-page { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; }
.fd-page img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.fd-page.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.fd.placing .fd-page { cursor: crosshair; }
.fd-pno { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, .85); padding: 1px 6px; border-radius: 4px; }
.fd-field { position: absolute; min-height: 1.3em; padding: 0 14px 0 3px; background: rgba(37, 99, 235, .12); border: 1px solid rgba(37, 99, 235, .6); border-radius: 3px; color: #12245c; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: move; touch-action: none; }
.fd-field:focus-visible, .fd-field.moving { outline: 2px solid var(--accent); z-index: 2; }
.fd-field.pop { animation: fdpop .25s ease-out; }
@keyframes fdpop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.fd-x { position: absolute; top: 0; right: 0; width: 13px; height: 100%; border: 0; padding: 0; background: rgba(220, 38, 38, .85); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; }
.fd-r { position: absolute; right: 13px; bottom: 0; width: 6px; height: 100%; cursor: ew-resize; background: rgba(37, 99, 235, .35); }
@media (max-width: 860px) { .fd { grid-template-columns: 1fr; } .fd-palette { position: static; max-height: none; } }
@media (prefers-reduced-motion: reduce) { .fd-field.pop { animation: none; } .fd-chip { transition: none; } }

/* v5: remove-photo button on the picture */
.profile-grid > div:first-child { position: relative; }
.photo-x { position: absolute; top: -6px; left: calc(50% + 46px); width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(22, 27, 61, .12); background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(22, 27, 61, .15); display: grid; place-items: center; padding: 0; }
.photo-x:hover { background: #fff1ee; color: var(--signal); border-color: rgba(242, 92, 59, .4); }
.photo-x.sq { left: calc(50% + 58px); }
.sec-top .card { margin: 0; }

/* v5: API key box and on/off switch */
.key-box { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; word-break: break-all; }
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--slate); cursor: pointer; padding: 0; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover, .icon-btn.on { color: var(--signal); border-color: rgba(242, 92, 59, .4); }
.icon-btn.done { color: #12805c; border-color: #9fd9bf; }
.switch { width: 42px; height: 24px; border-radius: 99px; border: 0; padding: 3px; background: #cfd3e4; cursor: pointer; transition: background .2s; display: inline-flex; }
.switch > span { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch.on { background: #19a974; }
.switch.on > span { transform: translateX(18px); }

/* v5: backups with a 3D clock */
.bk-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.clock3d { width: 72px; height: 72px; flex: 0 0 auto; perspective: 400px; }
.clock3d .c-face { position: relative; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, #f1f3fb 45%, #d9ddef 100%); box-shadow: inset -4px -6px 12px rgba(22, 27, 61, .18), inset 3px 4px 8px rgba(255, 255, 255, .9), 0 10px 22px rgba(22, 27, 61, .22), 0 0 0 4px #fff, 0 0 0 6px rgba(242, 92, 59, .5); transform: rotateX(14deg) rotateY(-16deg); animation: clock-float 6s ease-in-out infinite; transform-style: preserve-3d; }
.clock3d .c-face > span { position: absolute; left: 50%; top: 5px; width: 2px; height: 6px; margin-left: -1px; background: #9aa1bf; border-radius: 2px; transform-origin: 1px 31px; transform: rotate(calc(var(--i) * 30deg)); }
.clock3d .c-face > i { position: absolute; left: 50%; bottom: 50%; border-radius: 3px; transform-origin: 50% 100%; }
.clock3d .h { width: 4px; height: 18px; margin-left: -2px; background: var(--ink); animation: clock-turn 120s linear infinite; }
.clock3d .m { width: 3px; height: 25px; margin-left: -1.5px; background: #3b4270; animation: clock-turn 10s linear infinite; }
.clock3d .s { width: 1.5px; height: 28px; margin-left: -.75px; background: var(--signal); animation: clock-turn 2s steps(60) infinite; }
.clock3d .c-face > b { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--signal); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
@keyframes clock-turn { to { transform: rotate(360deg); } }
@keyframes clock-float { 0%, 100% { transform: rotateX(14deg) rotateY(-16deg) translateY(0); } 50% { transform: rotateX(8deg) rotateY(12deg) translateY(-3px); } }
.bk-types { margin-top: 10px; }
.bk-type { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: linear-gradient(180deg, #fff, #fafbfe); }
.bk-type h3 { margin: 0 0 4px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .clock3d .c-face, .clock3d .c-face > i { animation: none; } }

/* v5: simpler one-click sign-in buttons */
.oauth-row { display: grid; gap: 10px; }
.oauth-btn.v5 { justify-content: flex-start; gap: 14px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(180deg, #fff, #f8f9fd); transition: transform .15s, box-shadow .15s; }
.oauth-btn.v5:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(22, 27, 61, .12); }
.oauth-btn.v5 svg { width: 24px; height: 24px; flex: 0 0 auto; }
.oauth-btn.v5 span { display: flex; flex-direction: column; line-height: 1.2; }
.oauth-btn.v5 small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.oauth-help { margin-top: 10px; } .oauth-help summary { cursor: pointer; }

/* v5: two-pillar glass menu. Left pillar: groups (icons with short names). Right pillar: the pages of the chosen group. */
.shell { grid-template-columns: 300px 1fr; }
.side { display: grid; grid-template-columns: 68px 1fr; padding: 0; width: 300px; background: rgba(246, 247, 251, .55); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 12px; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .25)); border-right: 1px solid rgba(255, 255, 255, .7); box-shadow: inset -1px 0 0 rgba(22, 27, 61, .06); overflow-y: auto; }
.rail-logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: #fff; box-shadow: 0 6px 16px rgba(22, 27, 61, .14), inset 0 1px 0 #fff; margin-bottom: 8px; }
.rail-logo img { width: 28px; height: 28px; border-radius: 7px; }
.rail-btn { position: relative; width: 56px; padding: 8px 2px 6px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: var(--slate); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; transition: background .2s, color .2s, box-shadow .2s, transform .15s; }
.rail-btn .ic { width: 21px; height: 21px; }
.rail-btn span { font-size: 10.5px; font-weight: 600; line-height: 1.15; text-align: center; letter-spacing: -.01em; }
.rail-btn:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.rail-btn:active { transform: scale(.95); }
.rail-btn.on { color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .7)); border-color: rgba(255, 255, 255, .9); box-shadow: 0 6px 18px rgba(22, 27, 61, .12), inset 0 1px 0 #fff; }
.rail-btn.on .ic { color: var(--signal); }
.rail-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.rail-dot { position: absolute; top: 6px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px #fff; }
.panel { display: flex; flex-direction: column; min-width: 0; padding: 14px 12px 12px; height: 100vh; }
.side .grp { display: none; }
.side .grp.on { display: block; animation: grp-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes grp-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.side .sec { padding-top: 8px; }
.side a.nl { gap: 10px; padding: 8px 10px; border-radius: 11px; border: 1px solid transparent; }
.side a.nl .ic { width: 18px; height: 18px; flex: 0 0 auto; color: var(--slate); }
.side a.nl span:first-of-type { flex: 1; min-width: 0; }
.side a.nl:hover { background: rgba(255, 255, 255, .7); }
.side a.nl.on { background: linear-gradient(180deg, #232a5c, var(--ink)); color: #fff; box-shadow: 0 6px 16px rgba(22, 27, 61, .25), inset 0 1px 0 rgba(255, 255, 255, .15); }
.side a.nl.on .ic { color: #fff; }
/* Collapsed: icons only (the rail); pointing at it shows the pages beside it. */
.shell.side-collapsed { grid-template-columns: 68px 1fr; }
.shell.side-collapsed .side { width: 68px; transform: none; position: sticky; top: 0; z-index: 24; overflow: visible; }
.shell.side-collapsed .side > :not(.side-ctrl) { opacity: 1; }
.shell.side-collapsed .side::after { display: none; }
.shell.side-collapsed .panel { display: none; }
.shell.side-collapsed.peek .side { box-shadow: none; background: rgba(246, 247, 251, .55); }
.shell.side-collapsed.peek .panel { display: flex; position: fixed; left: 68px; top: 0; width: 232px; background: rgba(247, 248, 252, .985); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); border-right: 1px solid rgba(217, 220, 234, .8); box-shadow: 18px 0 50px rgba(22, 27, 61, .16); animation: grp-in .2s ease; }
.shell.side-collapsed .side-ctrl { right: -15px; }
/* Locked: hidden completely. */
.shell.side-locked .side { width: 300px; transform: translateX(-286px); }
@media (max-width: 760px) {
  .side { width: 300px; left: -320px; }
  .shell.side-collapsed .side, .shell.side-locked .side { width: 300px; position: fixed; }
  .shell.side-collapsed .panel { display: flex; }
  .panel { height: 100vh; overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) { .side .grp.on, .shell.side-collapsed.peek .panel { animation: none; } }

/* v5: users list and popups */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.user-add { display: grid; grid-template-columns: 100px 1.2fr 1fr 1.4fr 1fr auto auto; gap: 0 12px; align-items: start; }
@media (max-width: 1100px) { .user-add { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .user-add { grid-template-columns: 1fr; } }
.users-card { padding: 8px 8px 12px; }
.users-table td { vertical-align: middle; }
.users-table tr.blocked td { opacity: .55; }
.users-table tr.blocked td:last-child, .users-table tr.blocked td:nth-last-child(2) { opacity: 1; }
.u-name { display: flex; align-items: center; gap: 10px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; flex: 0 0 auto; }
.dot-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #19a974; margin-right: 5px; vertical-align: 1px; }
.u-acts { white-space: nowrap; }
.u-acts .icon-btn { margin-right: 4px; }
.ib-txt { font-size: 10.5px; font-weight: 700; }
.bulk-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 4px 4px 10px; border-radius: 12px; background: linear-gradient(180deg, #232a5c, var(--ink)); color: #fff; font-weight: 600; font-size: 14px; }
.bulk-bar .btn { background: #fff; color: var(--ink); }
.btn .ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
dialog.dlg { border: 1px solid rgba(255, 255, 255, .8); border-radius: 20px; padding: 22px 24px; width: min(560px, calc(100vw - 32px)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 30px 80px rgba(22, 27, 61, .3); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(22, 27, 61, .35); backdrop-filter: blur(3px); }
dialog.dlg[open] { animation: dlg-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
dialog.dlg h2 { margin-top: 0; }
.dlg-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 16px; }
.dlg-more { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.prefix-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.prefix-pick label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; }
.prefix-pick label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.prefix-pick input { position: absolute; opacity: 0; pointer-events: none; }
.sig-prev { display: block; max-width: 100%; max-height: 120px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px; background: #fff; margin-bottom: 10px; }
dialog.dlg.wide { width: min(1040px, calc(100vw - 32px)); height: min(760px, calc(100vh - 40px)); padding: 0; overflow: hidden; }
dialog.dlg.wide[open] { display: flex; flex-direction: column; }
.dlg-frame-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
dialog.dlg.wide iframe { flex: 1; width: 100%; border: 0; background: transparent; }
@media (prefers-reduced-motion: reduce) { dialog.dlg[open] { animation: none; } }

/* v5: roles popup */
.embed-page { padding: 18px 20px; }
.roles-box.embed { padding: 0; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(227, 230, 243, .7); margin-bottom: 16px; }
.tabs .tab { padding: 8px 18px; border-radius: 10px; font-weight: 600; color: var(--slate); text-decoration: none; }
.tabs .tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(22, 27, 61, .12); }
.role-add { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; max-width: 520px; }
.roles-table td { vertical-align: middle; }
.r-acts { white-space: nowrap; text-align: right; }
.r-acts .icon-btn { margin-left: 4px; text-decoration: none; }
.icon-btn.danger:hover:not([disabled]) { color: #c0392b; border-color: #f0b4ab; }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.count-btn { min-width: 34px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.rn-box summary { cursor: pointer; color: var(--muted); }
.mem-row td { background: rgba(227, 230, 243, .3); }
.mem-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mem { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.mem small { font-weight: 500; color: var(--muted); }
.mem.off { opacity: .55; }
tr.rename:not(.open) { display: none; }
.perm-tree { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pt-group { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: linear-gradient(180deg, #fff, #fafbfe); }
.pt-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pt-head .small { margin-left: auto; }
.pt-group ul { list-style: none; padding: 6px 0 0 26px; margin: 0; border-left: 2px solid rgba(227, 230, 243, .9); margin-left: 7px; }
.pt-group li label { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; cursor: pointer; font-size: 14px; }
.print-only { display: none; }
@media print { body.printing-role > *:not(#role-print) { display: none !important; } body.printing-role #role-print { display: block !important; } }
tr.rename.open { display: table-row; }
.bulk-bar[hidden] { display: none; }
#mr-role { min-width: 280px; max-width: 360px; }

/* v5 stage 3: Help button, help topics, ticket form and the support desk */
.help-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 10px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(22, 27, 61, .88); color: #fff; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; box-shadow: 0 12px 30px rgba(22, 27, 61, .28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.help-fab .ic { width: 20px; height: 20px; }
.help-fab:hover { background: var(--ink); }
.help-fab:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.help-fab .rail-dot { position: absolute; top: 6px; right: 8px; }
dialog.help-dlg { width: min(620px, calc(100vw - 24px)); max-height: min(86vh, 760px); padding: 18px 20px; }
.help-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.help-head h2 { flex: 1; margin: 0; font-size: 20px; }
.help-search { width: 100%; margin-bottom: 10px; }
.help-tree { max-height: 46vh; overflow: auto; display: grid; gap: 8px; }
.help-topic { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .7); }
.help-topic > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.help-topic > summary::after { content: '+'; color: var(--muted); font-weight: 400; }
.help-topic[open] > summary::after { content: '−'; }
.help-q { border-top: 1px solid var(--line); }
.help-q > summary { cursor: pointer; padding: 9px 14px 9px 22px; list-style: none; }
.help-q > summary:hover { background: var(--mist); }
.help-q[open] > summary { font-weight: 600; }
.help-a { padding: 0 14px 12px 22px; color: var(--slate); line-height: 1.55; }
.help-vote { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.help-vote button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 10px; cursor: pointer; font: inherit; }
.help-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.help-form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.help-form .field { margin-bottom: 10px; }
.urg-pick { border: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.urg-pick legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.urg-pick label { border: 1px solid var(--line); border-radius: 12px; padding: 7px 9px; cursor: pointer; font-weight: 600; font-size: 13.5px; background: #fff; }
.urg-pick label small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.urg-pick label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(22, 27, 61, .12); }
.urg-pick label:has(input[value=critical]:checked) { border-color: var(--signal-deep); background: #FDE7E1; }
.urg-pick input { margin: 0 4px 0 0; }
.help-shots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.help-shots .ic { width: 16px; height: 16px; vertical-align: -3px; }
.help-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.help-thumbs figure { position: relative; margin: 0; width: 110px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--mist); }
.help-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.help-thumbs figcaption { position: absolute; left: 0; bottom: 0; right: 0; font-size: 10.5px; background: rgba(22, 27, 61, .7); color: #fff; padding: 1px 5px; }
.help-thumbs button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(22, 27, 61, .75); color: #fff; cursor: pointer; line-height: 1; }
.bad-text { color: var(--signal-deep); }
.help-done { text-align: center; padding: 10px 0; }
.help-done .help-foot { justify-content: center; }
.big-tick { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 30px; line-height: 56px; font-weight: 700; }
body.capturing .help-fab { visibility: hidden; }
@media (max-width: 640px) {
  .help-fab span { display: none; } .help-fab { padding: 12px; }
  .help-form .grid2, .urg-pick { grid-template-columns: 1fr 1fr; }
}
/* Tickets */
.urg { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.urg.low { background: var(--mist); color: var(--slate); } .urg.normal { background: #E8F1FE; color: #1D5FB8; }
.urg.high { background: #FEF0C7; color: #93370D; } .urg.critical { background: #FDE7E1; color: var(--signal-deep); }
.st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mist); color: var(--ink); }
.st.open { background: #E8F1FE; color: #1D5FB8; } .st.answered { background: var(--ok-bg); color: var(--ok); } .st.waiting { background: #FEF0C7; color: #93370D; } .st.closed { background: #EEF0F4; color: var(--muted); }
.prio { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: linear-gradient(90deg, #F25C3B, #F79009); color: #fff; }
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
.over { color: var(--signal-deep); font-weight: 600; }
.desk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.desk-stats .card { padding: 14px 16px; margin: 0; }
.desk-stats b { display: block; font-size: 24px; }
.desk-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.thread { display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; background: #fff; max-width: 86%; }
.msg.ekline { justify-self: end; background: #F3F6FF; border-color: #D6DEFA; }
.msg.note { justify-self: stretch; max-width: none; background: #FFFAEB; border-style: dashed; border-color: #F5C26B; }
.msg .who { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.msg .body { white-space: pre-wrap; line-height: 1.55; }
.msg .pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg .pics img { width: 160px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ticket-side .card { margin-bottom: 12px; }
.ticket-side dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 13.5px; }
.ticket-side dt { color: var(--muted); }
.ticket-side dd { margin: 0; overflow-wrap: anywhere; }
.reply-box textarea { width: 100%; }
.faq-ed .topic { margin-bottom: 14px; }
.faq-ed details.ans { border-top: 1px solid var(--line); padding: 8px 0; }
.faq-ed details.ans > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.faq-ed .off { opacity: .55; }
.faq-ed textarea { width: 100%; }
@media (max-width: 900px) { .ticket-grid { grid-template-columns: 1fr; } .desk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .msg { max-width: 100%; } }
@media print { .help-fab, dialog.help-dlg { display: none !important; } }
/* The idle timer sits just left of the Help button so neither hides the other. */
body:has(.help-fab) .idle-timer { right: 124px; bottom: 24px; }
@media (max-width: 640px) { body:has(.help-fab) .idle-timer { right: 76px; } }

/* v5 stage 4: CRM and staff */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg a { padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--slate); text-decoration: none; }
.seg a.on { background: var(--ink); color: #fff; }
.src-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.src-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--mist); color: var(--ink); text-decoration: none; white-space: nowrap; }
.src-chip.on { outline: 2px solid var(--ink); }
.src-chip.meta { background: #E7EEFE; color: #1D4ED8; } .src-chip.google { background: #E6F4EA; color: #137333; } .src-chip.indiamart { background: #FDECEA; color: #B42318; }
.src-chip.justdial { background: #FFF4E5; color: #B54708; } .src-chip.website { background: #EEF0FF; color: #3E3F9C; } .src-chip.chatbot { background: #F2EBFF; color: #6B2BD9; }
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 8px; }
.crm-col { background: rgba(255, 255, 255, .55); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 260px; display: flex; flex-direction: column; }
.crm-col.over { outline: 2px dashed var(--ink); background: rgba(232, 241, 254, .7); }
.crm-col header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.crm-col header b { flex: 1; font-size: 13.5px; }
.count-pill { min-width: 22px; text-align: center; padding: 0 7px; border-radius: 999px; background: var(--mist); font-size: 12px; font-weight: 700; }
.crm-cards { display: grid; gap: 8px; align-content: start; flex: 1; }
.crm-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; cursor: grab; box-shadow: 0 2px 6px rgba(22, 27, 61, .05); }
.crm-card:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
.crm-card.dragging { opacity: .5; }
.crm-card.overdue { box-shadow: inset 3px 0 0 var(--signal); }
.crm-card a { color: inherit; text-decoration: none; }
.crm-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 5px 0 2px; }
.crm-col[data-stage=won] { background: rgba(230, 246, 238, .6); } .crm-col[data-stage=lost] { background: rgba(238, 240, 244, .7); }
.stage-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mist); }
.stage-pill.won { background: var(--ok-bg); color: var(--ok); } .stage-pill.lost { background: #EEF0F4; color: var(--muted); } .stage-pill.new { background: #E8F1FE; color: #1D5FB8; }
.stage-track { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.st-step { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--mist); color: var(--muted); }
.st-step.past { background: #DCE6FB; color: var(--ink); } .st-step.on { background: var(--ink); color: #fff; } .st-step.on.won { background: var(--ok); } .st-step.on.lost { background: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tl { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; border-left-width: 4px; }
.tl.call { border-left-color: #2E90FA; } .tl.email { border-left-color: #7A5AF8; } .tl.meeting { border-left-color: #12B76A; } .tl.stage { border-left-color: var(--ink); } .tl.system { border-left-color: var(--line); background: #FAFBFD; }
.tl .body { white-space: pre-wrap; margin-top: 3px; line-height: 1.5; }
.tool-pick { grid-template-columns: repeat(3, 1fr); }
.hook-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.hook-row code { overflow-wrap: anywhere; font-size: 12px; background: var(--mist); padding: 4px 8px; border-radius: 8px; }
.crm-set .card { margin-bottom: 14px; } .crm-set .grid2, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.steps { padding-left: 18px; margin: 0 0 10px; }
@media (max-width: 760px) { .hook-row { grid-template-columns: 1fr; } .crm-set .grid2, .grid2 { grid-template-columns: 1fr; } .crm-board { grid-auto-columns: 82vw; } }
button.tab { border: 0; background: none; font: inherit; cursor: pointer; }

/* v5 payment links */
.paylink{max-width:520px;margin:24px auto;padding:0 4px}
.paylink-card{padding:22px}
.paylink-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}
.paylink-top h1{font-size:20px;margin:2px 0}
.paylink-amt{text-align:right}.paylink-amt strong{font-size:24px}
.upi-box{display:flex;gap:14px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:10px;margin:12px 0;background:var(--card,#fff)}
.upi-box img{border-radius:8px;background:#fff;flex:none}
.center{text-align:center}
.notice.ok{background:rgba(229,248,238,.95);border-color:#A9E2C4;color:#0E6B3D}
.notice.err{background:rgba(253,236,236,.95);border-color:#F2B8B8;color:#9B1C1C}

/* v5 finance */
.gw-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.gw-card.is-active{border-color:var(--ok);box-shadow:0 0 0 2px var(--ok-bg)}
.gw-fees{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:8px;margin-top:8px}
.gw-fees .field{margin-bottom:6px}
.stack-sm{display:grid;gap:6px;margin-top:6px;min-width:160px}
tr.row-late td{background:rgba(253,236,236,.6)}
.late{color:#B42318;font-weight:600}
@media (max-width:600px){.gw-fees{grid-template-columns:1fr 1fr}}
.grid.g2.fin-ex{grid-template-columns:minmax(0,2fr) minmax(280px,1fr)}
.fin-ex td:first-child{white-space:nowrap}
.fin-ex .table-wrap{overflow-x:auto}
@media (max-width:1000px){.grid.g2.fin-ex{grid-template-columns:1fr}}
/* v5 reconciliation */
.dropzone{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;padding:22px 14px;border:2px dashed var(--line,#d6daea);border-radius:14px;background:rgba(255,255,255,.6);cursor:pointer;transition:border-color .15s,background .15s}
.dropzone input[type=file]{position:absolute;width:1px;height:1px;opacity:0}
.dropzone:focus-within{outline:2px solid var(--signal,#4F46E5);outline-offset:2px}
.dropzone.over,.dropzone:hover{border-color:var(--signal,#4F46E5);background:rgba(79,70,229,.05)}
.dropzone.has-files{border-style:solid;border-color:var(--ok)}
.dz-icon svg{width:28px;height:28px}
.dz-files{color:var(--ok);font-weight:600;word-break:break-word}
.nowrap{white-space:nowrap}
.red-count{background:#FDECEC;color:#B42318}
/* v5 Tally */
.tally-badge{background:#EAF1FB;color:#1B4F9C;font-weight:600}
.tally-steps{padding-left:20px;margin:6px 0 14px}.tally-steps li{margin-bottom:8px;font-size:14px}
.tally-what{padding-left:18px;margin:6px 0 12px}.tally-what li{margin-bottom:4px}
.tally-key code{background:#fff;border:1px dashed var(--line);padding:6px 10px;border-radius:8px;word-break:break-all}
/* v5 couriers */
.empty-state{text-align:center;padding:36px 20px}.empty-state h2{margin:8px 0 4px}.empty-state .es-icon{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#EAF3FE;color:#3B8FE8}.empty-state .es-icon svg{width:34px;height:34px}
.empty-state a{font-weight:600}
.notice.warn{background:#FFF1DC;border-color:#F5C27A;color:#8A4B00;font-weight:600}
.partner-list{display:grid;gap:8px}.partner-opt{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.partner-opt:has(input:checked){border-color:var(--ink);box-shadow:0 0 0 2px rgba(22,27,61,.08)}.partner-opt.short{opacity:.55;cursor:not-allowed}
.partner-opt input{width:auto;margin:0}.po-name{display:flex;flex-direction:column;flex:1}.po-coins{font-size:15px;white-space:nowrap}.po-coins b{font-size:20px}
.addr-card{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:10px;background:#fff}.addr-card.unset{border-color:#F5C27A;background:#FFFBF3}
.addr-card select{max-width:100%}.ship-table td{vertical-align:top}
@media (max-width:640px){.partner-opt{flex-wrap:wrap}.po-coins{width:100%;text-align:right}}

/* Updates: install now / schedule picker */
.when-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.when-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.when-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.when-opt span { display: flex; flex-direction: column; gap: 2px; }
.when-opt small { color: var(--muted); font-size: 12.5px; }
.maint-banner { background: var(--ink); color: #fff; padding: 8px 16px; font-size: 13.5px; text-align: center; }
.maint-banner strong { color: #FFB59F; }

/* Legal pages (Privacy policy, Terms of use) */
.legal-page { background: #fff; background-image: none; }
.legal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 1080px; margin: 0 auto; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.legal-top nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.legal-top nav a:not(.btn) { color: var(--slate); font-weight: 600; font-size: 14px; }
.legal-top nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.legal-doc { max-width: 760px; margin: 0 auto; padding: 44px 20px 64px; font-size: 16px; line-height: 1.7; color: var(--ink); }
.legal-doc .eyebrow { color: var(--signal-deep); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.legal-doc h1 { font-size: clamp(32px, 5vw, 46px); margin: 6px 0 4px; letter-spacing: -.03em; }
.legal-doc h2 { font-size: 21px; margin: 36px 0 8px; scroll-margin-top: 20px; }
.legal-doc p, .legal-doc li { color: #2A3054; }
.legal-doc ul { padding-left: 22px; }
.legal-doc li { margin: 4px 0; }
.legal-toc { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; margin: 24px 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-size: 14px; }
.legal-toc strong { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.legal-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1080px; margin: 0 auto; padding: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.acct-legal { display: flex; gap: 6px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.acct-legal a { color: var(--muted); font-weight: 500; }
.legal-line a { text-decoration: underline; }
.mod-switch { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.mod-switch select { width: 130px; } .mod-switch input[type=date] { width: 150px; }

/* 4.10.0 Tally pages */
.tally-tabs { display: flex; width: max-content; margin-bottom: 14px; }
.tally-filter { gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 14px; }
.tally-filter .field { margin: 0; }
.tally-filter input, .tally-filter select { min-width: 140px; }
.tally-bar { justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.tally-list td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.tl-map input { width: 100%; min-width: 120px; font: inherit; font-size: 13.5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.tl-map input:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: transparent; }
.tl-map td, .tl-map th { padding: 6px 8px; }
.tl-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 14px; align-items: start; }
.note-acct { background: var(--mist); border-left: 3px solid var(--signal); border-radius: 8px; padding: 8px 12px; margin: 8px 0 12px; }
.tl-report { display: grid; gap: 8px; }
.tl-vch { padding: 0; }
.tl-vch summary { display: grid; grid-template-columns: 96px 150px 90px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.tl-vch summary::-webkit-details-marker { display: none; }
.tl-vch summary::before { content: none; }
.tl-vch[open] summary { border-bottom: 1px solid var(--line, #E3E6F3); }
.tl-vch .table-wrap { padding: 8px 14px 12px; }
.tl-narr { color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-tot td { font-weight: 700; border-top: 2px solid var(--ink); }
table.kv th { width: 220px; text-align: left; color: var(--slate); font-weight: 600; }
@media (max-width: 720px) { .tl-vch summary { grid-template-columns: 1fr auto; } .tl-vch summary .tl-narr, .tl-vch summary > span:nth-child(3) { display: none; } .tl-settings { grid-template-columns: 1fr; } }

/* 4.11.0 branches, reports and analytics */
.org-switch { margin-left: 6px; font-size: 11.5px; font-weight: 700; color: var(--signal); text-decoration: none; }
.org-switch:hover { text-decoration: underline; }
.org-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.org-card button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 6px; width: 100%; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.org-card button:hover, .org-card button:focus-visible { border-color: var(--signal); outline: none; }
.org-card.on button { border: 2px solid var(--ink); }
.oc-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; overflow: hidden; color: var(--ink); }
.oc-logo img { max-width: 100%; max-height: 100%; }
.oc-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 17px; color: var(--ink); }
.oc-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.br-grid td, .br-grid th { text-align: center; }
.br-grid td:first-child, .br-grid th:first-child, .br-grid td:nth-child(2), .br-grid th:nth-child(2) { text-align: left; }
.rep-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 14px; margin-bottom: 14px; }
.rep-filter .field { margin: 0; min-width: 150px; }
.rep-filter select, .rep-filter input { min-width: 150px; }
.org-lock { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--mist); font-weight: 600; font-size: 14px; }
.org-lock .ic { width: 16px; height: 16px; }
.rep-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; }
.rep-tiles .n, .mr-n { font-size: 22px; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.an-grid.loading { opacity: .5; transition: opacity .2s; }
.an-wide { grid-column: 1 / -1; }
.an-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.an-chart { min-height: 120px; }
.an-chart svg { display: block; overflow: visible; }
.an-chart rect, .an-chart circle, .an-chart path[fill] { cursor: pointer; }
.an-chart rect:hover, .an-chart rect:focus { opacity: .8; outline: none; }
.an-ax { font: 11px 'DM Sans', sans-serif; fill: var(--slate); }
.an-big { font: 800 24px 'Bricolage Grotesque', sans-serif; fill: var(--ink); }
.an-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.an-key { font: inherit; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.an-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.an-key.off { opacity: .45; text-decoration: line-through; }
.an-hbars { display: grid; gap: 7px; }
.an-hrow { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.an-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--slate); }
.an-ht { height: 10px; border-radius: 5px; background: var(--mist); overflow: hidden; }
.an-ht i { display: block; height: 100%; border-radius: 5px; }
.an-hrow b { font-size: 12.5px; white-space: nowrap; }
.an-donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.an-keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.an-keys li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.an-keys i { width: 12px; height: 12px; border-radius: 3px; }
.an-empty { padding: 30px 0; text-align: center; color: var(--slate); font-size: 13px; }
.an-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(22, 27, 61, .25); white-space: nowrap; }
.mr-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 760px) { .an-grid { grid-template-columns: 1fr; } .mr-tables { grid-template-columns: 1fr; } .rep-filter .field, .rep-filter select, .rep-filter input { min-width: 0; width: 100%; } .rep-filter .field { flex: 1 1 140px; } }

/* 4.12.0 screen share */
.share-dlg { width: min(460px, calc(100vw - 32px)); }
.share-dlg h2 { display: flex; gap: 8px; align-items: center; }
.share-dlg h2 .ic { color: var(--signal); }
.share-body { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 6px 6px 4px; }
.share-hero .ic { width: 64px; height: 64px; color: var(--signal); stroke-width: 1.6; }
.share-code { font: 700 26px 'DM Sans', sans-serif; letter-spacing: .5em; text-align: center; width: 220px; padding: 10px 12px 10px 22px; border: 1px solid var(--line); border-radius: 12px; }
.share-code:focus { outline: 2px solid var(--signal); border-color: transparent; }
.share-go { width: 240px; justify-content: center; background: var(--signal); }
.share-err { color: var(--ess); font-size: 13px; font-weight: 600; }
.share-note { max-width: 360px; margin: 2px 0 0; }
.share-bar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; gap: 12px; align-items: center; padding: 8px 10px 8px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(22, 27, 61, .35); max-width: calc(100vw - 24px); }
.share-bar .btn { background: var(--signal); }
.share-bar.done .share-dot { animation: none; background: #9AA0C3; }
.share-bar.done .btn { display: none; }
.share-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); animation: sharepulse 1.4s infinite; flex: none; }
@keyframes sharepulse { 50% { opacity: .35; } }
.code-big { font: 800 56px 'Bricolage Grotesque', sans-serif; letter-spacing: .18em; color: var(--ink); }
.scr-wrap { background: #0E1230; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.scr-wrap video { width: 100%; height: 100%; object-fit: contain; background: #0E1230; }
.scr-wait { color: #C9CDE4; font-size: 14px; text-align: center; padding: 20px; }

/* 4.12.0 MRD */
.mrd-types { display: flex; flex-wrap: wrap; gap: 8px; }
.mrd-types .chip { text-decoration: none; }
.mrd-types .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat .n.ok, td .ok { color: var(--ok); }
.share-bar[hidden] { display: none; }
.share-dlg h2 .ic { width: 22px; height: 22px; flex: none; }
.share-dlg .help-head { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.share-go .ic { width: 18px; height: 18px; }
