/*
 * Davix H2I Design System — shared tokens + primitives.
 *
 * Consumed by Studio (apps/studio/web), the Dashboard
 * (apps/dashboard/web), and the Admin Panel (assets/css/admin.css, which
 * imports this file). Centralizes brand colors, typography, spacing,
 * radii, and the handful of components that are IDENTICAL across all
 * three surfaces (buttons, icon buttons, sidebar nav shell, cards, pills,
 * tables, switches, tabs). Surface-specific layout (Studio's workspace
 * grid, Dashboard's chart/history-grid, Admin's env-bar) stays in each
 * surface's own stylesheet — see docs/phase2-execution-platform/
 * 00-artifact-inventory.md for the split rationale.
 *
 * Served at /assets/css/davix-h2i-design-system.css (server.js already
 * statically serves the whole assets/ directory).
 */

:root{
  color-scheme: dark;
  /* Fixed Davix H2I brand identity -- one background, not a light/dark
     toggle. Every color below is one of the 8 brand hexes, a
     transparent/lighter/darker derivation of one, or an ordinary
     green/amber/red kept deliberately OUT of the brand pair for status
     semantics (pink/blue stay about brand hierarchy, never "success"). */
  --bg:#12151b; --surface:#1a1e27; --surface-2:#212632; --surface-3:#2a3140;
  --border:#2a3140; --border-strong:#3a4257;
  --text:#f5f6f8; --text-muted:rgba(245,246,248,.62); --text-faint:rgba(245,246,248,.4);
  --ink:#0b0d10; --ink-2:#10131a; --ink-3:#171b24; --ink-border:#232833; --ink-text:#f5f6f8; --ink-text-muted:rgba(245,246,248,.55);

  /* Pink -- PRIMARY brand accent: every primary action, active/selected
     state, and highlight reaches for pink first. */
  --pink:#ff64b4; --pink-dark:#fc0082; --pink-light:#ffc9e5; --pink-soft:rgba(255,100,180,.16); --pink-on:#2a0619;
  /* Blue -- secondary accent, used deliberately less often than pink. */
  --blue:#4da3ff; --blue-dark:#006fe6; --blue-light:#b3d7ff; --blue-soft:rgba(77,163,255,.16); --blue-on:#00203d;
  --accent:var(--pink); --accent-strong:var(--pink-dark); --accent-soft:var(--pink-soft); --accent-ink-soft:rgba(255,100,180,.16);

  /* Status semantics -- ordinary green/amber/red, never the brand pair. */
  --success:#2fbf71; --success-soft:rgba(47,191,113,.16);
  --warn:#f5a623; --warn-soft:rgba(245,166,35,.16);
  --danger:#ff4d5e; --danger-soft:rgba(255,77,94,.16);

  --radius:10px; --radius-sm:6px; --radius-lg:12px;
  --font-ui:'Manrope',system-ui,-apple-system,sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;

  /* Device safe areas (notch, status bar, home bar, rounded corners). Every element that touches a screen edge
     reads these variables -- never padding on <html>, which fixed and sticky elements ignore. Tests can override
     them (document.documentElement.style.setProperty('--sat', '47px')) to emulate any phone. */
  --sat:env(safe-area-inset-top,0px); --sab:env(safe-area-inset-bottom,0px);
  --sal:env(safe-area-inset-left,0px); --sar:env(safe-area-inset-right,0px);
}
html{background:var(--bg);min-height:100%;}
/* Never a sideways page scroll: wide content (tables) scrolls inside its own .table-wrap, long words wrap. */
html,body{max-width:100%;overflow-x:clip;}
.main,.card,.settings-row>*{min-width:0;}
.settings-row .label,.settings-row .hint{overflow-wrap:anywhere;}
/* In a row the label side shrinks and wraps; capsules never squeeze (their text would spill), and long values (keys) wrap at the right edge. */
.settings-row>.wp-badge,.settings-row>.pill,.settings-row>.switch{flex:none;min-width:max-content;white-space:nowrap;}
.settings-row>.mono,.settings-row>div:last-child:not(:first-child){overflow-wrap:anywhere;word-break:break-all;text-align:right;min-width:0;}
.wp-badge,.pill{white-space:nowrap;}

*{box-sizing:border-box;}
body{margin:0;min-height:100vh;min-height:100dvh;background:var(--bg);color:var(--text);font-family:var(--font-ui);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;}
img{max-width:100%;}
[hidden]{display:none!important;}
::selection{background:var(--accent-soft);}
button{font-family:inherit;cursor:pointer;}
a{color:inherit;}
.tabular{font-variant-numeric:tabular-nums;}
h1,h2,h3{text-wrap:balance;margin:0;}

/* ---------- Scrollbars -- ONE brand-colored, slim design used everywhere
   (every sidebar, panel, dropdown, modal body...) across Studio, Dashboard
   and Admin, replacing each browser's native scrollbar chrome. Defined once
   here, the shared design-system file, so no surface can end up with a
   different or native-default scrollbar. Firefox uses scrollbar-color/
   -width; every Chromium/WebKit browser uses the ::-webkit-scrollbar*
   pseudo-elements -- both are declared so the same look applies everywhere
   this stylesheet loads. Subtle pink-tinted thumb at rest, full brand pink
   on hover/active, matching the same "hover reveals brand color" language
   Studio's own resize-handle grips use. ---------- */
*{scrollbar-width:thin;scrollbar-color:var(--pink-soft) transparent;}
*::-webkit-scrollbar{width:9px;height:9px;}
*::-webkit-scrollbar-track{background:transparent;}
*::-webkit-scrollbar-thumb{background-color:var(--pink-soft);border-radius:99px;border:2px solid transparent;background-clip:padding-box;}
*::-webkit-scrollbar-thumb:hover{background-color:var(--pink);}
*::-webkit-scrollbar-thumb:active{background-color:var(--pink-dark);}
*::-webkit-scrollbar-corner{background:transparent;}

/* ---------- Buttons (identical across Studio/Dashboard/Admin) ---------- */
a.btn,a.btn:hover{text-decoration:none;}
.btn{display:inline-flex;align-items:center;gap:6px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:13px;font-weight:600;padding:7px 12px;white-space:nowrap;}
.btn:hover{background:var(--surface-2);}
.btn svg{width:14px;height:14px;}
.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--pink-on);}
.btn-primary:hover{background:var(--accent-strong);border-color:var(--accent-strong);}
.btn-sm{padding:5px 9px;font-size:12px;border-radius:7px;}
.btn-ghost{background:transparent;border-color:transparent;}
.btn-ghost:hover{background:var(--surface-2);}
.btn-danger-ghost{color:var(--danger);border-color:var(--danger-soft);background:var(--danger-soft);}
.btn[disabled]{opacity:.45;cursor:default;}

.icon-btn{width:32px;height:32px;border-radius:8px;border:1px solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:center;color:var(--text-muted);flex:none;position:relative;}
.icon-btn:hover{background:var(--surface-2);color:var(--text);}
.icon-btn svg{width:15px;height:15px;}
.icon-btn .badge-dot{position:absolute;top:5px;right:5px;width:7px;height:7px;border-radius:99px;background:var(--pink);border:1.5px solid var(--surface);}

.avatar{width:30px;height:30px;border-radius:99px;background:var(--accent-soft);color:var(--accent-strong);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;border:1px solid var(--border);flex:none;}

/* ---------- Sidebar shell (Studio + Dashboard share this exact shape;
   Admin's is denser but reuses the same tokens/classes) ---------- */
.sidebar{width:236px;flex:none;padding-top:var(--sat);padding-bottom:var(--sab);padding-left:var(--sal);box-sizing:border-box;background:var(--ink);color:var(--ink-text);display:flex;flex-direction:column;border-right:1px solid var(--ink-border);transition:width .18s ease,min-width .18s ease,border-color .18s ease;}
/* Desktop/tablet sidebar collapse (DavixH2IUI.initSidebarToggle) -- the same
   hamburger-opens/X-closes control as the mobile drawer below, but since
   there's room to reflow, closing collapses the sidebar to zero width
   instead of overlaying it, giving the content area the freed space. Not
   gated by a width media query for the same reason .sidebar.open isn't
   (see the comment above it) -- JS only ever adds this class above each
   surface's own mobile breakpoint. */
.sidebar.desktop-collapsed{width:0;min-width:0;padding-left:0;padding-right:0;border-right-color:transparent;overflow:hidden;}
.sidebar-brand{display:flex;align-items:center;gap:10px;padding:18px 18px 16px;border-bottom:1px solid var(--ink-border);flex:none;}
/* Wraps the nav's .side-section groups so brand (top) and foot (bottom)
   stay pinned while only this middle region scrolls -- opt-in: only
   applies where a surface's markup actually wraps its links in
   <nav class="sidebar-nav">, so it's a no-op for any sidebar that doesn't. */
.sidebar-nav{flex:1;min-height:0;overflow-y:auto;}
.brand-mark{width:40px;height:40px;flex:none;display:flex;align-items:center;justify-content:center;}
.brand-mark img{height:100%;width:auto;max-width:100%;display:block;object-fit:contain;filter:drop-shadow(0 4px 14px rgba(120,90,255,.3));}
.brand-name{font-weight:700;font-size:15px;letter-spacing:.2px;}
.brand-sub{font-size:10.5px;color:var(--ink-text-muted);letter-spacing:.6px;text-transform:uppercase;margin-top:1px;}
.side-section{padding:14px 10px 6px;}
.side-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.8px;color:var(--ink-text-muted);padding:6px 12px 6px;}
.side-link{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:8px;color:var(--ink-text-muted);text-decoration:none;font-size:13.5px;font-weight:500;margin:1px 4px;transition:background .12s,color .12s;cursor:pointer;}
.side-link svg{width:16px;height:16px;flex:none;opacity:.85;}
.side-link:hover{background:var(--ink-3);color:var(--ink-text);}
.side-link.active{background:var(--accent-ink-soft);color:var(--accent-strong);}
.side-link.active svg{opacity:1;}
.side-link .ph{margin-left:auto;font-size:9px;background:var(--ink-3);color:var(--ink-text-muted);padding:1px 5px;border-radius:5px;font-weight:700;letter-spacing:.3px;}
.acct-row{display:flex;align-items:center;gap:9px;min-width:0;}
.acct-row .avatar{width:32px;height:32px;background:var(--accent-ink-soft);}
.acct-row .name{font-size:12.5px;font-weight:700;color:var(--ink-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.acct-row .email{font-size:11px;color:var(--ink-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.acct-row > div:last-child{min-width:0;}
.sidebar-foot{margin-top:auto;padding:14px 14px 16px;border-top:1px solid var(--ink-border);flex:none;}

/* ---------- Mobile sidebar close affordances (shared, DavixH2IUI.initSidebarToggle) ----------
   Deliberately NOT gated by a width media query here: each surface's own
   stylesheet only ever adds the `open` class via its mobile hamburger
   button (hidden above that surface's own breakpoint), so gating on
   `.sidebar.open` alone already only ever fires in the mobile/drawer
   context, without needing to duplicate each surface's own breakpoint
   value (900px for Studio, 760px for Dashboard/Admin) here. */
.sidebar-close-btn{display:none;position:absolute;top:calc(14px + var(--sat));right:14px;z-index:2;}
.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(5,6,8,.55);z-index:19;opacity:0;transition:opacity .15s;}
.sidebar-backdrop.visible{display:block;opacity:1;}
.sidebar.open .sidebar-close-btn{display:flex;}

/* ---------- Topbar ---------- */
.topbar{--topbar-h:calc(56px + var(--sat));position:sticky;top:0;z-index:6;box-sizing:border-box;min-height:var(--topbar-h);flex:none;display:flex;align-items:center;gap:14px;padding:var(--sat) max(20px,var(--sar)) 0 max(20px,var(--sal));border-bottom:1px solid var(--border);background:var(--surface);}
/* The controls on the right of the bar are one size: the bell is never bigger than the profile picture next to it (also on touch screens). */
.topbar .icon-btn,.topbar .avatar{width:34px;height:34px;min-height:34px;box-sizing:border-box;}
.topbar .icon-btn svg{width:16px;height:16px;}
.topbar h1{font-size:15.5px;font-weight:700;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.topbar .sub, .crumb{font-size:12px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
/* The h1/sub wrapper needs min-width:0 so this flex child can actually
   shrink and truncate instead of forcing the topbar to overflow or wrap
   into a second line the fixed-height bar can't fit (verified live at
   ~375-600px: a long dynamic title + subtitle previously overlapped the
   panel below it). */
.topbar-title{min-width:0;overflow:hidden;}
.topbar-spacer{flex:1;}
/* .menu-toggle (the sidebar hamburger) is visible at every width now --
   DavixH2IUI.initSidebarToggle() decides overlay-drawer vs. true-collapse
   behavior itself based on the current width, so the button no longer
   needs to be hidden above a mobile breakpoint. */

/* ---------- Cards ---------- */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);}
.card-pad{padding:16px 18px;}
.card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.card-title h3{font-size:13.5px;font-weight:700;}
.card-title .link{font-size:12.5px;color:var(--accent-strong);font-weight:600;cursor:pointer;}

/* ---------- Tables ---------- */
table{width:100%;border-collapse:collapse;}
th{text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.4px;color:var(--text-faint);font-weight:700;padding:8px 10px;border-bottom:1px solid var(--border);}
td{padding:10px 10px;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle;}
tr:last-child td{border-bottom:none;}
tbody tr:hover{background:var(--surface-2);}
.mono{font-family:var(--font-mono);font-size:12px;}
.table-wrap{overflow-x:auto;}

/* ---------- Status pills ---------- */
.pill{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;padding:3px 8px;border-radius:99px;text-transform:uppercase;letter-spacing:.3px;}
.pill.active,.pill.ok,.pill.done{background:var(--success-soft);color:var(--success);}
.pill.warn{background:var(--warn-soft);color:var(--warn);}
.pill.danger,.pill.failed,.pill.revoked{background:var(--danger-soft);color:var(--danger);}
.pill.off{background:var(--surface-3);color:var(--text-faint);}
.pill-dot{width:6px;height:6px;border-radius:99px;background:currentColor;}

/* ---------- Switch ---------- */
.switch{width:36px;height:21px;border-radius:99px;background:var(--surface-3);position:relative;flex:none;border:1px solid var(--border);cursor:pointer;}
.switch.on{background:var(--accent);border-color:var(--accent);}
.switch::after{content:'';position:absolute;top:2px;left:2px;width:15px;height:15px;border-radius:99px;background:#fff;transition:left .15s;}
.switch.on::after{left:17px;}

/* ---------- Tabs ---------- */
.tabs{display:flex;flex-wrap:nowrap;gap:4px;border-bottom:1px solid var(--border);margin-bottom:20px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;max-width:100%;}
.tabs::-webkit-scrollbar{display:none;}
.tab{flex:none;white-space:nowrap;padding:9px 4px;margin-right:18px;font-size:13.5px;font-weight:600;color:var(--text-muted);border-bottom:2px solid transparent;cursor:pointer;}
.tab.active{color:var(--text);border-color:var(--accent);}

/* ---------- Notification bell dropdown (new, shared across all three
   surfaces -- see src/platform/notifications/) ---------- */
.notif-panel{position:absolute;top:calc(100% + 8px);right:0;width:340px;max-height:420px;overflow-y:auto;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:0 12px 32px rgba(0,0,0,.4);z-index:50;}
.notif-panel-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border);}
.notif-panel-head h3{font-size:13px;font-weight:700;}
.notif-panel-head button{font-size:11.5px;color:var(--accent-strong);background:none;border:none;font-weight:600;}
.notif-item{display:flex;gap:10px;padding:11px 14px;border-bottom:1px solid var(--border);cursor:pointer;}
.notif-item:last-child{border-bottom:none;}
.notif-item:hover{background:var(--surface-2);}
.notif-item.unread{background:var(--pink-soft);}
.notif-item.unread:hover{background:var(--pink-soft);filter:brightness(1.15);}
.notif-dot{width:8px;height:8px;border-radius:99px;background:var(--pink);flex:none;margin-top:5px;}
.notif-item.read .notif-dot{background:transparent;}
.notif-body{flex:1;min-width:0;}
.notif-title{font-size:12.5px;font-weight:600;}
.notif-message{font-size:12px;color:var(--text-muted);margin-top:2px;}
.notif-time{font-size:10.5px;color:var(--text-faint);margin-top:4px;}
.notif-empty{padding:32px 20px;text-align:center;color:var(--text-faint);font-size:12.5px;}

/* ---------- User menu dropdown (new, shared) ---------- */
.user-menu-panel{position:absolute;top:calc(100% + 8px);right:0;width:200px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:0 12px 32px rgba(0,0,0,.4);z-index:50;padding:6px;}
.user-menu-item{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;font-size:12.5px;font-weight:500;color:var(--text);}
.user-menu-item:hover{background:var(--surface-2);}
.user-menu-item svg{width:14px;height:14px;color:var(--text-muted);}
.user-menu-sep{height:1px;background:var(--border);margin:5px 2px;}

/* ---------- Empty / loading states (shared vocabulary) ---------- */
.empty-state{text-align:center;padding:36px 20px;color:var(--text-faint);}
.empty-state .ico{width:40px;height:40px;border-radius:12px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;margin:0 auto 12px;color:var(--text-faint);}
.empty-state .ico svg{width:20px;height:20px;}
.empty-state h4{font-size:13.5px;font-weight:700;color:var(--text);margin-bottom:4px;}
.empty-state p{font-size:12px;max-width:320px;margin:0 auto;}
.skeleton{background:linear-gradient(90deg,var(--surface-2) 25%,var(--surface-3) 37%,var(--surface-2) 63%);background-size:400% 100%;animation:skeleton-loading 1.4s ease infinite;border-radius:6px;}
@keyframes skeleton-loading{0%{background-position:100% 50%;}100%{background-position:0 50%;}}
@media (prefers-reduced-motion: reduce){ .skeleton{animation:none;} }

/* ---------- Toast (shared) ---------- */
.toast-stack{position:fixed;top:calc(var(--sat,0px) + 72px);right:max(20px,var(--sar));display:flex;flex-direction:column;align-items:flex-end;gap:8px;z-index:600;max-width:min(400px,calc(100vw - 24px));pointer-events:none;}
.toast-stack > .toast{pointer-events:auto;position:relative;padding-right:36px;animation:toast-in .22s ease-out;}
@keyframes toast-in{from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion: reduce){ .toast-stack > .toast{animation:none;} }
.toast.toast-out{opacity:0;transform:translateY(-6px);transition:opacity .18s,transform .18s;}
.toast-x{position:absolute;top:6px;right:6px;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--text-muted);cursor:pointer;padding:0;}
.toast-x:hover{background:var(--surface-2);color:var(--text);}
.toast-x svg{width:12px;height:12px;}
.toast{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px 14px;font-size:12.5px;box-shadow:0 8px 24px rgba(0,0,0,.35);display:flex;align-items:center;gap:8px;min-width:220px;}
.toast.success{border-color:var(--success);}
.toast.error{border-color:var(--danger);}
.toast.warn{border-color:var(--warn);}
.toast .dot{width:8px;height:8px;border-radius:99px;flex:none;}
.toast.success .dot{background:var(--success);}
.toast.error .dot{background:var(--danger);}
.toast.warn .dot{background:var(--warn);}
.toast.info .dot{background:var(--pink);}

/* ---------- Modal (shared) ---------- */
.modal-backdrop{position:fixed;inset:0;background:rgba(5,6,8,.6);display:flex;align-items:center;justify-content:center;z-index:450;padding:max(16px,var(--sat)) max(16px,var(--sar)) max(16px,var(--sab)) max(16px,var(--sal));}
/* A popup is header + body + footer: header and footer are fixed, ONLY the body scrolls. */
.modal{background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-lg);width:100%;max-width:440px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.5);}
.modal-head{flex:none;display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border);}
.modal-head h3{font-size:14.5px;font-weight:700;}
.modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px;}
.modal-foot{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--border);}
/* on a phone the buttons of a popup share the width with the same space left and right (never one small button pushed to a corner, never text touching the edge) */
@media (max-width:520px){ .modal-foot{flex-wrap:wrap;} .modal-foot .btn{flex:1 1 auto;min-width:0;max-width:100%;white-space:normal;line-height:1.3;text-align:center;} }
/* ---------- Side panel (shared): click a row, edit it in a sheet from the right ---------- */
.side-panel-bg{position:fixed;inset:0;background:rgba(5,6,8,.55);z-index:80;opacity:0;transition:opacity .18s;}
.side-panel-bg.on{opacity:1;}
.side-panel{position:absolute;top:0;right:0;bottom:0;width:min(520px,100%);background:var(--surface);border-left:1px solid var(--border-strong);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .2s ease;box-shadow:-24px 0 60px rgba(0,0,0,.4);}
.side-panel.wide{width:min(680px,100%);}
.side-panel-bg.on .side-panel{transform:none;}
.side-panel-head{flex:none;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;padding-top:max(16px,var(--sat));border-bottom:1px solid var(--border);}
.side-panel-title{min-width:0;}
.side-panel-title h3{font-size:15px;font-weight:700;overflow-wrap:anywhere;}
.side-panel-sub{margin-top:4px;font-size:12.5px;color:var(--text-muted);overflow-wrap:anywhere;}
.side-panel-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px;-webkit-overflow-scrolling:touch;}
.side-panel-foot{flex:none;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:14px 18px;padding-bottom:max(14px,var(--sab));border-top:1px solid var(--border);background:var(--surface);}
.side-panel-foot .grow{margin-right:auto;}
/* the header and the footer of every side panel are the same solid black as the main menu */
.side-panel-head,.side-panel .side-panel-foot,.pe-drawer .side-panel-foot{background:var(--ink);color:var(--ink-text);border-color:var(--ink-border);}
.side-panel-head h3{color:var(--ink-text);}
.side-panel-head .side-panel-sub{color:var(--ink-text-muted);}
.side-panel-head .icon-btn{background:var(--ink-3);border-color:var(--ink-border);color:var(--ink-text);}
.side-panel-foot .btn:not(.btn-primary):not(.btn-danger-ghost):not(.btn-danger){background:var(--ink-3);border-color:var(--ink-border);color:var(--ink-text);}
/* a side panel scrolls up and down only: nothing inside may push it sideways (long words, paths, code and wide media wrap or shrink to the panel) */
.side-panel-body{overflow-x:hidden;}
.side-panel-body,.side-panel-body p,.side-panel-body li,.side-panel-body dt,.side-panel-body dd,.side-panel-body td,.side-panel-body th,.side-panel-body label,.side-panel-body a,.side-panel-body code,.side-panel-body .mono{overflow-wrap:anywhere;}
.side-panel-body pre:not(.dcs-pre){white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;}
.side-panel-body img,.side-panel-body video,.side-panel-body svg,.side-panel-body canvas,.side-panel-body table,.side-panel-body input,.side-panel-body select,.side-panel-body textarea{max-width:100%;}
.side-panel-body .sp-section{margin:0 0 20px;}
.side-panel-body .sp-section>h4{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);margin:0 0 8px;}
.side-panel-body .sp-kv{display:grid;grid-template-columns:minmax(110px,38%) 1fr;gap:8px 12px;font-size:13px;}
.side-panel-body .sp-kv dt{color:var(--text-muted);}
.side-panel-body .sp-kv dd{margin:0;overflow-wrap:anywhere;}
.side-panel-body .sp-note{font-size:12.5px;color:var(--text-muted);margin:0 0 12px;}
.side-panel-body .sp-warn{font-size:12.5px;border:1px solid var(--warn,#c28a00);border-radius:8px;padding:9px 11px;margin:0 0 14px;background:rgba(194,138,0,.08);}
.side-panel-body .field input,.side-panel-body .field select{min-height:40px;}
tr.row-click{cursor:pointer;}
tr.row-click:focus-visible{outline:2px solid var(--pink);outline-offset:-2px;}
@media (max-width:640px){.side-panel,.side-panel.wide{width:100%;border-left:0;}.side-panel-body .sp-kv{grid-template-columns:1fr;gap:2px 0;}.side-panel-body .sp-kv dd{margin-bottom:8px;}}
@media (prefers-reduced-motion:reduce){.side-panel,.side-panel-bg{transition:none;}}
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;}
.field label{font-size:12px;font-weight:600;}
.field input,.field select,.field textarea{border:1px solid var(--border);border-radius:7px;padding:8px 10px;font-size:13px;background:var(--surface-2);color:var(--text);font-family:inherit;}
.field .hint{font-size:11px;color:var(--text-faint);}
.field .error{font-size:11px;color:var(--danger);}

/* ---------- Hints: the small "?" beside a label + its popover (assets/js/davix-h2i-hints.js) ---------- */
.hint-btn{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;margin-left:6px;padding:0;border-radius:99px;border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text-muted);vertical-align:middle;flex:none;line-height:1;cursor:help;transition:color .12s,background .12s,border-color .12s,transform .12s;}
.hint-btn svg{width:9px;height:9px;}
html[data-h2i-intl] .hint-keep::before{content:"\2060";}
.hint-btn:hover,.hint-btn[aria-expanded="true"]{color:var(--pink-on);background:var(--accent);border-color:var(--accent);}
.hint-btn:focus-visible{outline:2px solid var(--blue);outline-offset:2px;}
@media (pointer:coarse){ .hint-btn{width:20px;height:20px;margin-left:8px;} .hint-btn svg{width:12px;height:12px;} .hint-btn::after{content:'';position:absolute;inset:-12px;} .hint-btn{position:relative;} }
.hint-pop{position:fixed;z-index:700;box-sizing:border-box;width:max-content;max-width:340px;overflow:visible;padding:14px 16px 14px;border-radius:14px;background:var(--surface);border:1px solid var(--border-strong);box-shadow:0 18px 48px rgba(0,0,0,.55),0 0 0 1px rgba(255,100,180,.08);color:var(--text);font-size:12.5px;line-height:1.55;opacity:0;transform:translateY(4px) scale(.98);transition:opacity .12s,transform .12s;pointer-events:auto;}
.hint-pop[data-side="above"]{transform:translateY(-4px) scale(.98);}
.hint-pop.show{opacity:1;transform:none;}
.hint-pop::before{content:'';position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:linear-gradient(180deg,var(--pink),var(--blue));}
.hint-scroll{overflow-y:auto;overscroll-behavior:contain;max-height:inherit;padding-right:2px;}
.hint-arrow{position:absolute;z-index:1;width:10px;height:10px;background:var(--surface);border:1px solid var(--border-strong);transform:translateX(-50%) rotate(45deg);}
.hint-pop[data-side="below"] .hint-arrow{top:-6px;border-right:0;border-bottom:0;}
.hint-pop[data-side="above"] .hint-arrow{bottom:-6px;border-left:0;border-top:0;}
.hint-title{font-size:13px;font-weight:800;margin:0 0 6px 0;letter-spacing:.1px;}
.hint-body p{margin:0 0 8px;color:var(--text);} .hint-body p:last-child{margin-bottom:0;}
.hint-body ul{margin:0 0 8px;padding-left:18px;color:var(--text);} .hint-body li{margin:2px 0;}
.hint-body code,.hint-example code{font-family:var(--font-mono);font-size:11.5px;padding:1px 5px;border-radius:5px;background:var(--surface-3);color:var(--pink-light);}
.hint-example{margin-top:10px;display:flex;flex-direction:column;gap:4px;}
.hint-example span{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.7px;color:var(--text-faint);}
.hint-example code{display:block;padding:7px 9px;border-radius:8px;white-space:pre-wrap;word-break:break-word;}
.hint-tip{margin-top:10px;display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border-radius:9px;background:var(--blue-soft);color:var(--blue-light);font-size:12px;}
.hint-tip svg{width:14px;height:14px;flex:none;margin-top:2px;}
@media (prefers-reduced-motion:reduce){ .hint-pop{transition:none;} }
@media (max-width:480px){ .hint-pop{max-width:calc(100vw - 20px);} }

/* ---------- Dropdowns: the styled button over every <select> + its menu (assets/js/davix-h2i-select.js) ---------- */
.pl-select{position:relative;display:inline-block;vertical-align:middle;max-width:100%;min-width:0;}
.pl-select.pl-fill{display:block;width:100%;}
.pl-select-native{display:block!important;visibility:hidden!important;margin:0!important;pointer-events:none!important;box-sizing:border-box!important;min-height:42px!important;height:42px!important;}
td .pl-select-native,.dm-table .pl-select-native{min-height:38px!important;height:38px!important;}
@media (pointer:coarse){ .pl-select-native{min-height:46px!important;height:46px!important;} }
.pl-select.pl-fill .pl-select-native{width:100%;}
.pl-select-trigger{position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:0 12px 0 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);font:inherit;font-weight:500;text-align:left;cursor:pointer;transition:border-color .12s,background .12s,box-shadow .12s;}
.pl-select-trigger:hover:not(:disabled){border-color:var(--border-strong);background:var(--surface-3);}
.pl-select-trigger:focus-visible,.pl-select-trigger.open{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);}
.pl-select-trigger:disabled{opacity:.5;cursor:not-allowed;}
.pl-select-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pl-select-label.pl-placeholder{color:var(--text-faint);}
.pl-select-chev{width:15px;height:15px;flex:none;color:var(--text-faint);transition:transform .15s,color .12s;}
.pl-select-trigger:hover:not(:disabled) .pl-select-chev,.pl-select-trigger.open .pl-select-chev{color:var(--text);}
.pl-select-trigger.open .pl-select-chev{transform:rotate(180deg);}
.has-error .pl-select-trigger{border-color:var(--danger);}
.pf-field.touched .pl-select-trigger{border-color:var(--accent);}

.pl-menu{position:fixed;z-index:460;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:5px;border-radius:12px;background:var(--surface);border:1px solid var(--border-strong);box-shadow:0 16px 44px rgba(0,0,0,.5);color:var(--text);font-size:13px;opacity:0;transform:translateY(-4px);transition:opacity .12s,transform .12s;outline:none;}
.pl-menu[data-side="above"]{transform:translateY(4px);}
.pl-menu.show{opacity:1;transform:none;}
.pl-menu-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer;line-height:1.35;font-weight:500;color:var(--text);}
.pl-menu-item.grouped{padding-left:16px;}
.pl-menu-item.active{background:var(--surface-3);}
.pl-menu-item.selected{color:var(--accent);font-weight:700;}
.pl-menu-item.disabled{opacity:.4;cursor:not-allowed;}
.pl-menu-text{flex:1;min-width:0;overflow-wrap:anywhere;}
.pl-menu-check{width:14px;height:14px;flex:none;color:var(--accent);}
.pl-menu-group{padding:9px 10px 4px;font-size:10px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:var(--text-faint);}
.pl-menu-group:not(:first-child){margin-top:4px;border-top:1px solid var(--border);}
.pl-menu-backdrop{position:fixed;inset:0;z-index:459;background:rgba(5,6,8,.55);opacity:0;transition:opacity .15s;}
.pl-menu-backdrop.show{opacity:1;}
.pl-menu.pl-sheet{left:0;right:0;bottom:0;top:auto;width:auto;max-height:min(70vh,70dvh);border-radius:18px 18px 0 0;border-width:1px 0 0;padding:8px 8px calc(10px + var(--sab));transform:translateY(24px);transition:opacity .16s,transform .2s;}
.pl-menu.pl-sheet.show{transform:none;}
.pl-menu.pl-sheet::before{content:'';display:block;width:38px;height:4px;border-radius:99px;background:var(--border-strong);margin:2px auto 8px;}
@media (pointer:coarse){ .pl-menu-item{padding:12px 12px;font-size:14px;} }
@media (prefers-reduced-motion:reduce){ .pl-menu,.pl-menu.pl-sheet,.pl-select-chev{transition:none;} }

/* The account / notification dropdown menus share the same minimal look */
.user-menu-panel,.notif-panel{background:var(--surface);border:1px solid var(--border-strong);border-radius:12px;box-shadow:0 16px 44px rgba(0,0,0,.5);}
.user-menu-panel{padding:5px;}
.user-menu-item{padding:8px 10px;border-radius:8px;font-weight:500;line-height:1.35;cursor:pointer;}
.user-menu-item:hover{background:var(--surface-3);}
.user-menu-item svg{width:15px;height:15px;color:var(--text-faint);}
.user-menu-sep{height:1px;background:var(--border);margin:5px 4px;}

/* Notification panel: action button + pinned reminder + narrow screens */
.notif-panel{max-width:calc(100vw - 20px);}
.notif-action{margin-top:8px;padding:6px 12px;border-radius:8px;border:1px solid var(--accent);background:var(--accent);color:var(--pink-on);font:inherit;font-size:12px;font-weight:700;cursor:pointer;}
.notif-action:hover{background:var(--accent-strong);border-color:var(--accent-strong);}
.notif-item.pinned{border-left:3px solid var(--accent);}
.notif-item.sev-error .notif-dot{background:var(--danger);} .notif-item.sev-warn .notif-dot{background:var(--warn);} .notif-item.sev-success .notif-dot{background:var(--success);}
.notif-panel-head button{cursor:pointer;}

/* the member's picture inside a round avatar (DavixH2IUI.setAvatar) */
.avatar{position:relative;overflow:hidden;}
.avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit;}

/* Notification rows: a small x in the browser; in the installed app the row slides left to show Delete */
.notif-row{position:relative;overflow:hidden;border-bottom:1px solid var(--border);}
.notif-row:last-child{border-bottom:none;}
.notif-row .notif-item{position:relative;z-index:1;border-bottom:none;background:var(--surface);transition:transform .18s ease;}
.notif-row .notif-item.unread{background:linear-gradient(var(--pink-soft),var(--pink-soft)),var(--surface);}
.notif-x{position:relative;flex:none;align-self:flex-start;width:14px;height:14px;margin:2px 0 0 0;display:inline-flex;align-items:center;justify-content:center;border-radius:99px;border:1px solid transparent;background:none;color:var(--text-faint);cursor:pointer;padding:0;opacity:.75;}
.notif-x svg{width:8px;height:8px;}
.notif-x::after{content:"";position:absolute;inset:-9px;}
.notif-item:hover .notif-x,.notif-x:focus-visible{opacity:1;color:var(--danger);background:var(--danger-soft);}
.notif-x:hover{border-color:var(--danger);}
.notif-swipe-del{display:none;visibility:hidden;position:absolute;top:0;right:0;bottom:0;width:88px;border:0;background:var(--danger);color:#fff;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;}
/* the delete x is the same in the browser and in the installed app (no slide-to-delete) */
.notif-row.swiped .notif-swipe-del,.notif-row.dragging .notif-swipe-del{visibility:visible;}
@media (hover:none) and (pointer:coarse){ .notif-x{opacity:1;width:16px;height:16px;} .notif-x svg{width:9px;height:9px;} .notif-x::after{inset:-12px;} }
html.is-standalone .notif-item{touch-action:pan-y;}
.notif-row,.notif-row .notif-item{text-align:left;}
.notif-panel-head button[disabled]{opacity:.4;cursor:default;}

/* ---- the brand form field: the safety net. Any text field, number field, search, date, textarea or select that no component styled itself is drawn like
   the rest of the app (rounded, dark surface, thin border, pink focus), never as the browser's own control. Zero specificity: every component's own style wins. ---- */
:where(.pl-input, input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=hidden],[type=button],[type=submit],[type=reset],[type=image]), textarea, select:not(.pl-select-native)) {
  box-sizing: border-box; min-height: 42px; padding: 0 13px; font: inherit; font-size: 13.5px; color: var(--text);
  background-color: var(--surface); border: 1px solid var(--border-strong, var(--border)); border-radius: 10px;
}
:where(textarea) { padding: 10px 13px; min-height: 88px; line-height: 1.5; }
:where(.pl-input, input, textarea, select):where(:focus-visible) { outline: 2px solid var(--accent, var(--pink)); outline-offset: 1px; }
:where(input, textarea)::placeholder { color: var(--text-faint); }
:where(input, textarea, select):where(:disabled) { opacity: .6; cursor: not-allowed; }

/* "Rows per page": the small drop-down in the footer of a table with page navigation (Admin Portal, Studio and Dashboard). On a wide screen it sits right
   after the "Showing 1-40 of 225" text, on the left; the page buttons stay on the right. On a narrow screen the footer wraps as before. */
.pg-size { display: inline-flex; align-items: center; }
.pg-size .pl-select-native, .pg-size select { min-height: 34px !important; height: 34px !important; }
.pg-size .pl-select { min-width: 74px; }
.pg-size .pl-select-trigger { min-height: 34px; height: 34px; padding: 0 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
@media (min-width: 561px) { .pg-size { margin-right: auto; } }

/* The width of the menu when it slides over the page on a small screen: one value for Studio and the Customer Portal. */
:root{--sidebar-drawer-w:min(320px,86vw);}

/* monthly usage in the profile at the bottom of the menu */
.side-usage{margin:0 4px 12px;padding:0 8px;font-size:11px;}
.side-usage .su-line{display:flex;justify-content:space-between;align-items:baseline;gap:8px;}
.side-usage .su-label{color:var(--ink-text-muted);}
.side-usage .su-val{font-weight:700;color:var(--ink-text);}
.side-usage .su-bar{height:5px;border-radius:99px;background:var(--ink-border);box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);margin-top:7px;overflow:hidden;}
.side-usage .su-bar.mini{height:3px;margin-top:4px;}
.side-usage .su-bar i{display:block;height:100%;min-width:0;border-radius:99px;background:linear-gradient(90deg,var(--accent-strong,var(--accent)),var(--accent));transition:width .45s cubic-bezier(.2,.8,.2,1);}
.side-usage.warn .su-bar i{background:var(--warn);} .side-usage.hot .su-bar i{background:var(--danger);}

.user-menu-cur{margin-inline-start:auto;display:inline-flex;align-items:center;gap:6px;color:var(--text-muted);font-size:12px;font-weight:600;max-width:55%;} .user-menu-cur>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.user-menu-item .user-menu-cur .h2i-flag{width:24px;height:16px;border-radius:3px;box-shadow:0 0 0 1px rgba(255,255,255,.18);}
.user-menu-item .user-menu-cur .h2i-flag svg{width:24px;height:16px;color:inherit;}

/* One loader for every page that waits for its data (DavixH2IUI.loaderHtml): a ring of pink and blue arcs with a line of text, centred in the page. */
.pl-pageload{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;width:100%;min-height:calc(100dvh - var(--topbar-h,60px) - 24px);box-sizing:border-box;padding:24px;text-align:center;color:var(--text-muted);grid-column:1/-1;}
.pl-pageload-ring{position:relative;display:block;width:60px;height:60px;filter:drop-shadow(0 0 14px rgba(255,100,180,.25));}
.pl-pageload-ring::before,.pl-pageload-ring::after{content:'';position:absolute;inset:0;border-radius:50%;border:3px solid transparent;}
.pl-pageload-ring::before{border-top-color:var(--accent);border-right-color:var(--accent);animation:pl-pageload-spin 1s linear infinite;}
.pl-pageload-ring::after{inset:11px;border-bottom-color:var(--blue,#4da3ff);border-left-color:var(--blue,#4da3ff);opacity:.9;animation:pl-pageload-spin 1.6s linear infinite reverse;}
.pl-pageload-label{font-size:13px;font-weight:600;letter-spacing:.01em;}
@keyframes pl-pageload-spin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.pl-pageload-ring::before,.pl-pageload-ring::after{animation-duration:3s;}}

/* A small screen: a long page title wraps onto a second line in the top bar instead of being cut off with "…". */
@media (max-width:520px){ .topbar h1{white-space:normal;overflow:visible;text-overflow:clip;font-size:14.5px;line-height:1.18;overflow-wrap:anywhere;} .topbar-title{overflow:visible;} }

/* Touch: a tab that is only a few letters wide (like "AI") keeps its look but gets a wider invisible area to tap. */
@media (pointer:coarse){ .tab{position:relative;} .tab::before{content:'';position:absolute;left:-9px;right:-9px;top:0;bottom:0;} }

/* a long dropdown has a search box that stays at the top while the list scrolls */
.pl-menu-search{position:sticky;top:-5px;z-index:1;margin:-5px -5px 4px;padding:8px 8px 6px;background:var(--surface);border-bottom:1px solid var(--border);}
.pl-menu-search-in{width:100%;box-sizing:border-box;height:34px;padding:0 10px;border-radius:8px;border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);font:inherit;font-size:13px;}
.pl-menu-search-in:focus{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent);}
.pl-menu-empty{padding:12px 10px;color:var(--text-muted);font-size:13px;}
@media (pointer:coarse){ .pl-menu-search-in{height:42px;font-size:16px;} }

/* the second step of the profile menu (the language list) */
.user-menu-panel.um-sub{padding:5px;}
.user-menu-panel .um-back{display:flex;align-items:center;gap:8px;width:100%;padding:9px 10px;border:0;border-radius:8px;background:none;color:var(--text);font:inherit;font-weight:700;font-size:13px;cursor:pointer;text-align:start;}
.user-menu-panel .um-back:hover{background:var(--surface-3);}
.user-menu-panel .um-back svg{color:var(--accent);flex:none;}
.user-menu-panel .um-sep{height:1px;background:var(--border);margin:4px 6px;}
.user-menu-panel.um-sub{display:flex;flex-direction:column;}
.user-menu-panel .um-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
.user-menu-panel .um-opt{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:8px;background:none;color:var(--text);font:inherit;font-weight:500;font-size:13px;cursor:pointer;text-align:start;}
.user-menu-panel .um-opt:hover,.user-menu-panel .um-opt:focus-visible{background:var(--surface-3);outline:none;}
.user-menu-panel .um-opt[aria-selected="true"]{color:var(--accent);font-weight:700;}
.user-menu-panel .um-opt>span:not(.h2i-flag){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.user-menu-panel .um-opt .um-check{flex:none;margin-inline-start:auto;}
.user-menu-panel .um-opt .h2i-flag{flex:none;width:24px;height:16px;border-radius:3px;box-shadow:0 0 0 1px rgba(255,255,255,.18);}
.user-menu-panel .um-opt .h2i-flag svg{width:24px;height:16px;}

/* back to the top (shared: Studio and the Customer Portal) */
.to-top{position:fixed;inset-inline-end:16px;bottom:calc(16px + var(--pwa-nav-offset,0px) + env(safe-area-inset-bottom,0px));z-index:40;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#fff;border:1px solid rgba(255,255,255,.22);background:linear-gradient(145deg,var(--accent),var(--accent-strong,var(--accent)));box-shadow:0 6px 18px rgba(255,60,160,.34),0 1px 4px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.28);transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;animation:toTopIn .22s ease both;-webkit-tap-highlight-color:transparent;}
.to-top[hidden]{display:none;}
.to-top:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(255,60,160,.5),0 2px 6px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.3);}
.to-top:active{transform:translateY(0) scale(.94);}
.to-top:focus-visible{outline:2px solid #fff;outline-offset:3px;}
@keyframes toTopIn{from{opacity:0;transform:translateY(10px) scale(.9);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion:reduce){.to-top{animation:none;transition:none;}}

.to-top svg{width:15px;height:15px;}
@media (max-width:600px){.to-top{width:30px;height:30px;inset-inline-end:12px;bottom:calc(12px + var(--pwa-nav-offset,0px) + env(safe-area-inset-bottom,0px));}.to-top svg{width:14px;height:14px;}}

/* Side panels on a phone: the sheet and its header are their own crisp layers. Safari (and the installed web app, whose status bar is see-through)
   can keep a panel that slid in as a blurry, low-resolution picture, which made the title of the header look faded. Resting at translate3d(0,0,0) keeps
   it sharp; the header is opaque and sits above the body, so nothing scrolls under it. */
.side-panel-bg.on .side-panel{transform:translate3d(0,0,0);backface-visibility:hidden;-webkit-backface-visibility:hidden;}
.side-panel-head{position:relative;z-index:2;isolation:isolate;-webkit-font-smoothing:antialiased;}
.side-panel-head h3,.side-panel-head .side-panel-sub{opacity:1;filter:none;text-shadow:none;}
@media (max-width:640px){
  .side-panel{height:100%;max-height:100dvh;}
  .side-panel-head{padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(18px,env(safe-area-inset-right,0px));}
  .side-panel-foot{padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(18px,env(safe-area-inset-right,0px));}
}
