/* ==========================================================================
   LCL portal shell + views (app.html)
   ========================================================================== */
body.portal { background: var(--bg); }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: 60px;
  display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .lockup img { height: 30px; }
.topbar .lockup { padding-right: 8px; }
.nav-toggle { display: none; margin-left: -6px; }
.search { position: relative; flex: 1; max-width: 520px; margin-left: 24px; }
.search > .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search input { width: 100%; height: 36px; padding: 0 40px 0 38px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.search input::placeholder { color: var(--text-3); }
.search input:hover { border-color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); background: var(--surface); }
.search input::-webkit-search-cancel-button { display: none; }
.kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; line-height: 1; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--text-3); background: var(--surface); pointer-events: none; }
.search input:focus ~ .kbd { display: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.search-toggle { display: none; }
.bell-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.avatar-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 4px; margin-left: 6px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; text-align: left; }
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { background: var(--surface-3); }
.avatar-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.avatar-btn .who { display: grid; line-height: 1.2; }
.avatar-btn .who b { font-weight: 600; font-size: 13px; }
.avatar-btn .who small { font-size: 12px; color: var(--text-2); }
.avatar-btn > .ico { width: 16px; height: 16px; color: var(--text-3); }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, var(--blue-deep), var(--sky)); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.t1 { background: linear-gradient(135deg, #0B4FD9, #39B6FF); }
.avatar.t2 { background: linear-gradient(135deg, #0B0F19, #3A4560); }
.avatar.t3 { background: linear-gradient(135deg, #0E8F55, #3DD68C); }
.avatar.t4 { background: linear-gradient(135deg, #5B3FD9, #9C85FF); }
.avatar.t5 { background: linear-gradient(135deg, #B66A00, #F5B544); }
.avatar.ghost { background: var(--surface-3); color: var(--text-2); border: 1px dashed var(--text-3); }

/* ---- Popovers (notifications, user menu, search) ---- */
.menu-wrap { position: relative; }
.popover {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 360px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.pop-head h2 { font-size: 14px; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); position: relative; }
.notif:last-child { border-bottom: 0; }
.notif .ico-tile { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.notif .ico-tile .ico { width: 18px; height: 18px; }
.notif b { display: block; font-weight: 600; font-size: 13.5px; }
.notif p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.notif time { font-size: 12px; color: var(--text-3); display: block; margin-top: 4px; }
.notif.unread::after { content: ""; position: absolute; right: 16px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notif.unread b { padding-right: 18px; }
.user-menu { width: 280px; padding: 6px; }
.user-menu .me { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.user-menu .me b { display: block; font-weight: 600; }
.user-menu .me span { display: block; font-size: 12.5px; color: var(--text-2); word-break: break-all; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font-size: 13.5px; text-align: left; text-decoration: none !important; }
.menu-item .ico { width: 18px; height: 18px; color: var(--text-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .ico { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line-soft); margin: 6px 0; }
.search-pop { left: 0; right: auto; width: 100%; max-height: min(420px, 70vh); overflow: auto; padding: 6px; }
.search-group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 4px; }
.search-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.search-opt img { width: 24px; height: 24px; }
.search-opt .ico { color: var(--text-2); width: 18px; height: 18px; margin: 0 3px; }
.search-opt small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.search-opt[aria-selected="true"] { background: var(--accent-soft); }
.search-empty { padding: 22px 12px; text-align: center; color: var(--text-2); font-size: 13.5px; }

/* ---- Shell ---- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 60px); background: linear-gradient(90deg, var(--surface) 247px, var(--line) 247px, var(--line) 248px, transparent 248px); }
.sidenav {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px; padding: 20px 14px 16px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.nav-label { padding: 0 10px 8px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-list a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 14px; text-decoration: none !important;
  transition: background .15s, color .15s;
}
.nav-list a .ico { width: 20px; height: 20px; }
.nav-list a:hover { background: var(--surface-3); color: var(--text); }
.nav-list a[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.nav-list a[aria-current="page"] .ico { color: var(--link); }
.nav-list a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.nav-list a:focus-visible { outline: none; box-shadow: var(--focus); }
.nav-list .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.nav-foot { margin-top: auto; display: grid; gap: 12px; }
.ws-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--surface-2); }
.ws-card b { display: block; font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.ws-card .muted { font-size: 12.5px; }
.ws-card .meter { margin-top: 10px; }
.nav-help { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); padding: 0 4px; }
.nav-help .ico { width: 16px; height: 16px; }
.scrim { display: none; }

.main { min-width: 0; padding: 32px 40px 64px; }
.main:focus { outline: none; }
.view { max-width: 1180px; margin: 0 auto; animation: view-in .25s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- Page header ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.022em; }
.page-head h1:focus { outline: none; }
.page-head p { color: var(--text-2); margin-top: 6px; font-size: 14.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 16px; letter-spacing: -0.01em; }
.section-head .eyebrow + h2 { margin-top: 4px; }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---- Product cards ---- */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product {
  --app: var(--accent);
  position: relative; display: flex; flex-direction: column; padding: 20px; min-height: 248px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.product:hover { border-color: color-mix(in srgb, var(--app) 45%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.product-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.product-top img { width: 52px; height: 52px; }
.product h3 { margin-top: 18px; font-size: 18px; letter-spacing: -0.015em; }
.product .desc { margin-top: 4px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.kind { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.kind::before { content: ""; width: 14px; height: 4px; background: var(--app); clip-path: polygon(26% 0, 100% 0, 74% 100%, 0 100%); }
.product-actions { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 14px; }
.product-actions .btn { flex: none; }
.product-actions .btn .ico { width: 16px; height: 16px; }
.product-actions .btn-link { font-size: 13.5px; color: var(--text-2); }
.product-actions .btn-link:hover { color: var(--link); }

/* ---- Quasar banner (black band + rising band) ---- */
.qbanner {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 16px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 26px 28px 46px; border-radius: var(--r-lg); background: var(--black); color: #EEF2F8; border: 1px solid var(--band-border);
}
.art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.art-band { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; width: 100%; height: 30px; }
.qbanner img.qicon { width: 64px; height: 64px; }
.qbanner .eyebrow { color: var(--sky); }
.qbanner h2 { margin-top: 6px; font-size: 20px; color: #fff; }
.qbanner p { margin-top: 4px; color: #A0A9BB; font-size: 14px; max-width: 520px; }
.qbanner .q-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.qbanner .q-actions .btn { height: 40px; }
.qbanner .q-meta { font-family: var(--mono); font-size: 11px; color: #6E788C; text-align: center; letter-spacing: .04em; }

/* ---- Two-column dashboard row ---- */
.dash-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; margin-top: 36px; align-items: start; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.activity li:last-child { border-bottom: 0; }
.activity .a-ico { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); position: relative; }
.activity .a-ico .ico { width: 18px; height: 18px; }
.activity .a-ico img { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; box-shadow: 0 0 0 2px var(--surface); border-radius: 4px; }
.activity p { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.activity p b { color: var(--text); font-weight: 500; }
.activity time { margin-left: auto; white-space: nowrap; font-size: 12.5px; color: var(--text-3); padding-left: 12px; }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-name b { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-deep), var(--sky)); }
.meter-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.help-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; }
.help-card .ico-tile { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); color: var(--link); display: grid; place-items: center; flex: none; }
.help-card b { display: block; font-weight: 600; font-size: 14px; }
.help-card p { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* ---- Stat tiles ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px 20px; }
.stat .eyebrow { font-size: 10.5px; }
.stat .v { margin-top: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .s { margin-top: 4px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat .meter { margin-top: 12px; }

/* ---- Plans ---- */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; padding: 22px 20px 20px; position: relative; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-md); }
.plan h3 { font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan .blurb { margin-top: 6px; font-size: 13px; color: var(--text-2); min-height: 38px; }
.plan .price { margin-top: 16px; display: flex; align-items: baseline; gap: 6px; }
.plan .price b { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan .price span { font-size: 12.5px; color: var(--text-2); }
.plan ul { list-style: none; margin: 18px 0 20px; padding: 16px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 9px; }
.plan li { display: flex; gap: 10px; font-size: 13.5px; align-items: flex-start; }
.plan li .ico { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.plan .btn { margin-top: auto; width: 100%; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table { font-size: 13.5px; }
.table th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .r { text-align: right; }
.table .id { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.who-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-cell b { display: block; font-weight: 500; }
.who-cell > div > span { display: block; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.you { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--text-3); margin-left: 6px; font-weight: 500; }
.app-dots { display: flex; gap: 4px; }
.app-dots img { width: 22px; height: 22px; }
.table-tools { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.filter { position: relative; width: 260px; max-width: 100%; }
.filter .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.filter .input { height: 34px; padding-left: 34px; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-2); }
.empty .ico-tile { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; margin: 0 auto 12px; }
.empty b { display: block; color: var(--text); font-weight: 600; font-size: 14.5px; }
.empty p { font-size: 13.5px; margin-top: 4px; }

/* ---- Downloads ---- */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dl { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dl-top { display: flex; gap: 14px; align-items: center; }
.dl-top img { width: 44px; height: 44px; }
.dl-top b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.dl-top span { display: block; font-size: 13px; color: var(--text-2); }
.dl .kv > div { padding: 9px 0; }
.hash { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hash code { font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hash .icon-btn { width: 28px; height: 28px; flex: none; }
.hash .icon-btn .ico { width: 16px; height: 16px; }
.dl-actions { display: flex; gap: 8px; margin-top: auto; }
.dl-actions .btn { flex: 1; height: 40px; }
.locked-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.locked-row:last-child { border-bottom: 0; }
.locked-row img { width: 36px; height: 36px; }
.locked-row b { display: block; font-weight: 600; font-size: 14px; }
.locked-row span { display: block; font-size: 13px; color: var(--text-2); }
.locked-row .btn { margin-left: auto; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: grid; grid-template-columns: 140px 110px 1fr; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.notes li:last-child { border-bottom: 0; }
.notes .mono { font-size: 12.5px; color: var(--text); font-weight: 500; }
.notes time { color: var(--text-3); }
.notes p { color: var(--text-2); }

/* ---- Forms in views ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
.form-grid .field + .field { margin-top: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
.invite-form { display: grid; grid-template-columns: minmax(0, 1.4fr) 160px auto; gap: 12px; align-items: start; }
.invite-form .btn { height: 40px; margin-top: 26px; }
.invite-form .field + .field { margin-top: 0; }
.app-checks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip-check { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chip-check img { width: 20px; height: 20px; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chip-check:has(input:focus-visible) { box-shadow: var(--focus); }
.chip-check .tick { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--text-3); display: grid; place-items: center; }
.chip-check:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); }
.chip-check:has(input:checked) .tick::after { content: ""; width: 6px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.chip-check.disabled { opacity: .5; cursor: not-allowed; }

/* ---- Support ---- */
.support-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ico-tile { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.contact-list .ico-tile .ico { width: 18px; height: 18px; }
.contact-list .eyebrow { font-size: 10px; }
.contact-list b, .contact-list a, .contact-list address { display: block; font-style: normal; font-weight: 500; font-size: 14px; margin-top: 2px; color: var(--text); }
.contact-list a:hover { color: var(--link); }
.contact-band { position: relative; overflow: hidden; isolation: isolate; padding: 20px 20px 40px; background: var(--black); color: #EEF2F8; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.contact-band .eyebrow { color: var(--sky); }
.contact-band b { display: block; margin-top: 6px; font-size: 16px; font-weight: 600; color: #fff; }
.contact-band p { font-size: 13px; color: #A0A9BB; margin-top: 2px; }

/* ---- Settings ---- */
.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-toc { position: sticky; top: 92px; display: grid; gap: 2px; }
.settings-toc a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; text-decoration: none !important; border-left: 2px solid transparent; }
.settings-toc a:hover { color: var(--text); background: var(--surface-3); }
.settings-stack { display: grid; gap: 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; font-weight: 500; font-size: 14px; }
.setting-row p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.setting-row .left { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.setting-row .left > .ico { color: var(--text-2); margin-top: 1px; }
.profile-id { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.profile-id b { display: block; font-size: 16px; font-weight: 600; }
.profile-id div > span { font-size: 13px; color: var(--text-2); }
.segmented { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-soft); }
.segmented label { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.segmented label .ico { width: 16px; height: 16px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented label:has(input:focus-visible) { box-shadow: var(--focus); }

/* ---- Product dialog ---- */
dialog.sheet { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.sheet::backdrop { background: rgba(5, 7, 13, .55); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: pop .18s var(--ease); }
.sheet-head { position: relative; overflow: hidden; isolation: isolate; display: flex; gap: 16px; align-items: center; padding: 24px 24px 44px; background: var(--black); color: #fff; }
.sheet-head img { width: 64px; height: 64px; }
.sheet-head h2 { font-size: 22px; color: #fff; }
.sheet-head p { color: #A0A9BB; font-size: 14px; margin-top: 2px; }
.sheet-head .icon-btn { position: absolute; top: 12px; right: 12px; color: #A0A9BB; }
.sheet-head .icon-btn:hover { background: #141A29; color: #fff; }
.sheet-body { padding: 22px 24px 8px; }
.sheet-body > p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.feature-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.feature-list li { display: flex; gap: 10px; font-size: 13.5px; align-items: flex-start; }
.feature-list .ico { width: 16px; height: 16px; color: var(--link); margin-top: 2px; --lcl-accent: var(--link); }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 18px 24px 22px; }
.sheet-foot .pill { margin-right: auto; }

/* ---- Skeletons ---- */
.sk-card { padding: 20px; min-height: 248px; display: grid; align-content: start; gap: 12px; }
.sk-card .skel.box { width: 52px; height: 52px; border-radius: 12px; }

/* ---- Responsive ---- */
@media (max-width: 1280px) {
  .products, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dash-row, .support-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-toc { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .nav-toggle { display: inline-grid; }
  .sidenav {
    position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--shadow-lg); padding-top: 16px;
    visibility: hidden;
  }
  .sidenav.open { transform: none; visibility: visible; }
  .sidenav .drawer-head { display: flex; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(5, 7, 13, .5); }
  .scrim.show { display: block; }
  .main { padding: 24px 24px 56px; }
  .qbanner { grid-template-columns: auto 1fr; }
  .qbanner .q-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .qbanner .q-actions .btn { flex: 1; }
  .qbanner .q-meta { width: 100%; text-align: left; }
}
.drawer-head { display: none; align-items: center; justify-content: space-between; padding: 0 4px 8px 8px; }
.drawer-head .lockup img { height: 26px; }

@media (max-width: 720px) {
  .topbar { padding: 0 8px 0 12px; gap: 8px; }
  .topbar .lockup img { height: 24px; }
  .topbar .lockup { gap: 8px; padding-right: 0; }
  .topbar .labs-tag { font-size: 9.5px; padding: 4px 4px 4px 6px; }
  .search { display: none; position: absolute; left: 0; right: 0; top: 60px; margin: 0; max-width: none; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .search.open { display: block; }
  .search > .ico { left: 23px; }
  .search .kbd { display: none; }
  .search-pop { left: 12px; width: calc(100% - 24px); }
  .search-toggle { display: inline-grid; }
  .avatar-btn .who, .avatar-btn > .ico, .help-btn { display: none; }
  .avatar-btn { padding: 0 2px; margin-left: 0; }
  .top-actions { gap: 0; }
  .main { padding: 20px 16px 48px; }
  .page-head { margin-bottom: 20px; }
  .page-head h1 { font-size: 22px; }
  .products, .plans, .stats, .dl-grid, .form-grid { grid-template-columns: 1fr; }
  .product { min-height: 0; }
  .qbanner { padding: 20px; gap: 16px; }
  .qbanner img.qicon { width: 48px; height: 48px; }
  .qbanner h2 { font-size: 18px; }
  .qbanner .q-actions .btn { flex: 1 1 100%; }
  .activity li { padding: 12px 16px; flex-wrap: wrap; }
  .activity li > div { flex: 1; min-width: 0; }
  .activity time { margin-left: 46px; padding-left: 0; width: 100%; margin-top: -6px; }
  .card-head, .card-body, .card-pad { padding-left: 16px; padding-right: 16px; }
  .invite-form { grid-template-columns: 1fr; }
  .invite-form .btn { margin-top: 0; }
  .notes li { grid-template-columns: 1fr; gap: 2px; padding: 12px 16px; }
  .locked-row { flex-wrap: wrap; padding: 14px 16px; }
  .locked-row .btn { margin-left: 52px; }
  .feature-list { grid-template-columns: 1fr; }
  .popover { position: fixed; left: 12px; right: 12px; top: 68px; width: auto; max-width: none; }
  .table-tools { padding: 12px 16px; }
  .filter { width: 100%; }
  /* Stack tables into rows of label/value */
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.stack td[data-label]::before { content: attr(data-label); font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); text-align: left; padding-top: 2px; }
  .table.stack td.first { text-align: left; padding-bottom: 8px; }
  .table.stack td.first::before { display: none; }
  .table.stack td:not([data-label]):not(.first) { justify-content: flex-end; }
  .table.stack tbody tr:hover td { background: none; }
  .setting-row { flex-wrap: wrap; padding: 14px 16px; }
  .setting-row:has(> .switch) { flex-wrap: nowrap; align-items: flex-start; }
  .search .search-pop { position: absolute; top: calc(100% - 4px); left: 12px; right: 12px; width: auto; }
  .search-opt small { display: none; }
  .sheet-head { padding: 20px 20px 40px; }
  .sheet-body { padding: 18px 20px 4px; }
  .sheet-foot { padding: 16px 20px 20px; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .topbar .labs-tag { display: none; }
}
