/* Zoo Account Portal — approved light "Zoo Account" dashboard design. No JavaScript. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --violet: #7C3AED; --violet-2: #6D28D9; --violet-deep: #3B1D8F; --violet-soft: #EFE9FF; --violet-ring: rgba(124,58,237,.25);
  --blue: #2563EB; --blue-soft: #E8F0FF; --pink-soft: #FBE8F6; --pink: #C026D3;
  --bg: #F4F5FB; --surface: #FFFFFF; --field: #F8F9FD; --text: #0F172A; --muted: #64748B; --faint: #94A3B8;
  --border: #E6E8F0; --soft: #EEF0F6; --ok: #16A34A; --ok-soft: #DCFCE7; --warn: #B45309; --warn-soft: #FEF3C7; --danger: #DC2626; --danger-soft: #FEE2E2;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12);
  --border-strong: #CBD1DE; --shadow-lg: 0 12px 40px -12px rgba(15,23,42,.25); --ctl-sm: 2.25rem;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", "Noto Sans Bengali", Arial, sans-serif;
  --side: 272px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text); font: 400 .9375rem/1.5 var(--font); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.0625rem; font-weight: 700; }
h3 { font-size: .9375rem; font-weight: 650; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--violet); color: #fff; padding: .5rem .75rem; border-radius: 0 0 8px 0; z-index: 50; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.ic { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(90deg, var(--surface) calc(var(--side) - 1px), var(--border) calc(var(--side) - 1px), var(--border) var(--side), var(--bg) var(--side)); }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 1.25rem 1rem; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .625rem; color: var(--text); padding: .25rem .5rem .5rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand strong { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.brand small { display: block; font-size: .75rem; color: var(--muted); font-weight: 500; }
.nav { margin-top: 1.25rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.nav a, .nav-help { position: relative; display: flex; align-items: center; gap: .75rem; padding: .6875rem .875rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .9375rem; }
.nav a .ic, .nav-help .ic { color: var(--muted); width: 1.3em; height: 1.3em; }
.nav a span, .nav-help span { flex: 1; }
.nav a .badge { flex: none; }
.nav a:hover, .nav-help:hover { background: var(--bg); text-decoration: none; }
.nav a:hover .ic, .nav-help:hover .ic { color: var(--text); }
.nav a:focus-visible, .nav-help:focus-visible { outline-offset: -2px; border-radius: var(--radius-sm); }
.nav a[aria-current], .nav-help[aria-current] { background: var(--violet-soft); color: var(--violet-2); }
.nav a[aria-current] .ic, .nav-help[aria-current] .ic { color: var(--violet); }
.nav a[aria-current]::before, .nav-help[aria-current]::before { content: ""; position: absolute; left: 0; top: .625rem; bottom: .625rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); }
.nav-hr { height: 1px; background: var(--border); margin: .75rem .5rem; }
.side-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.content { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.75rem; background: var(--bg); position: sticky; top: 0; z-index: 20; }
.search { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: .625rem; max-width: 42rem; min-height: 2.75rem; padding: 0 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }
.search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-ring); }
.search input { flex: 1 1 0; width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--text); outline: none; padding: .5rem 0; }
.iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); cursor: pointer; list-style: none; }
.iconbtn:hover { color: var(--violet); border-color: var(--border-strong); text-decoration: none; }
.iconbtn:active { background: var(--violet-soft); }
.iconbtn:focus-visible, .usermenu summary:focus-visible { outline-offset: 2px; border-radius: 999px; }
.iconbtn .ic { width: 1.35rem; height: 1.35rem; }
.pip { position: absolute; top: -2px; right: -2px; min-width: 1.125rem; height: 1.125rem; padding: 0 .25rem; border-radius: 999px; background: var(--violet); color: #fff; font-size: .6875rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
summary::-webkit-details-marker { display: none; }
.usermenu { position: relative; margin-left: .25rem; }
.usermenu summary { display: flex; align-items: center; gap: .625rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--text); }
.usermenu summary:hover, .usermenu[open] summary { background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.usermenu summary .ic { color: var(--muted); width: 1rem; height: 1rem; }
.usermenu[open] summary::before { content: ""; position: fixed; inset: 0; }
.menu { position: absolute; right: 0; top: calc(100% + .5rem); width: 16rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem; z-index: 30; }
.menu-head { display: flex; align-items: center; gap: .625rem; padding: .5rem .625rem .75rem; border-bottom: 1px solid var(--border); margin-bottom: .375rem; }
.menu-head strong { display: block; font-size: .9375rem; }
.menu-head span { font-size: .8125rem; color: var(--muted); }
.menu-head span.avatar { color: #fff; }
.menu a, .menu button { display: flex; align-items: center; gap: .625rem; width: 100%; padding: .5625rem .625rem; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); text-decoration: none; }
.menu a:focus-visible, .menu button:focus-visible { outline-offset: -2px; border-radius: 8px; }
.menu .ic { color: var(--muted); }
.menu a:hover .ic, .menu button:hover .ic { color: var(--text); }
.menu form { margin: .25rem 0 0; padding-top: .25rem; border-top: 1px solid var(--border); }
.drawer { display: none; position: relative; }
main { padding: .5rem 1.75rem 2rem; min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
main:focus { outline: none; }
.foot { margin-top: auto; padding-top: 1.5rem; text-align: center; font-size: .75rem; color: var(--faint); }

/* ---------- avatars, tiles, badges ---------- */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 999px; background: linear-gradient(135deg, var(--violet), #A78BFA); color: #fff; font-weight: 700; letter-spacing: .02em; }
.avatar-sm { width: 2.5rem; height: 2.5rem; font-size: .875rem; }
.avatar-md { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar-lg { width: 5.5rem; height: 5.5rem; font-size: 1.75rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--violet-soft); }
.tile { display: inline-grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 12px; background: var(--violet-soft); color: var(--violet); }
.tile .ic { width: 1.5rem; height: 1.5rem; }
.tile-blue { background: var(--blue-soft); color: var(--blue); }
.tile-pink { background: var(--pink-soft); color: var(--pink); }
.tile-white { background: var(--surface); border: 1px solid var(--border); }
.badge { display: inline-flex; align-items: center; gap: .3em; padding: .1875rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.badge .ic { width: .9em; height: .9em; }
.badge-ok { color: #15803D; background: var(--ok-soft); }
.badge-warn { color: var(--warn); background: var(--warn-soft); }
.badge-info { color: var(--blue); background: var(--blue-soft); }
.badge-muted { color: var(--muted); background: var(--soft); }
.dot { display: inline-grid; place-items: center; flex: none; width: 1.375rem; height: 1.375rem; border-radius: 999px; }
.dot .ic { width: .875rem; height: .875rem; stroke-width: 3; }
.dot-ok { background: var(--ok); color: #fff; }
.dot-off { background: var(--soft); color: var(--muted); }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.375rem; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: .875rem; margin-bottom: 1rem; }
.card-title { flex: 1; min-width: 0; }
.card-title p { margin: .125rem 0 0; font-size: .8125rem; color: var(--muted); }
.viewall { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; font-size: .875rem; white-space: nowrap; }
.viewall .ic { width: 1em; height: 1em; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .5rem 0 .25rem; }
.page-head p { margin: .25rem 0 0; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1rem; align-items: start; }
.col { display: grid; gap: 1rem; min-width: 0; }

/* ---------- overview ---------- */
.banner { position: relative; overflow: hidden; border-radius: 20px; padding: 2rem 2.25rem; color: #fff; min-height: 13rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: linear-gradient(100deg, #1E1446 0%, #3B1D8F 38%, #6D28D9 70%, #8B5CF6 100%); box-shadow: 0 18px 40px -22px rgba(59,29,143,.7); }
.banner::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 85% 10%, rgba(255,255,255,.22), transparent 60%); pointer-events: none; }
.banner-text { position: relative; z-index: 1; max-width: 32rem; }
.banner-hi { margin: 0; font-size: 1.125rem; opacity: .9; }
.banner h1 { font-size: 2.25rem; line-height: 1.1; margin: .125rem 0 .625rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wave { width: 2rem; height: 2rem; flex: none; }
.banner-text p { color: rgba(255,255,255,.85); font-size: .9375rem; }
.banner-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.125rem; }
.banner-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 1rem; margin-right: 3rem; }
.banner-brand strong { display: block; white-space: nowrap; font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.banner-brand span { font-size: .9375rem; color: rgba(255,255,255,.85); }
.banner-art { position: absolute; right: 0; bottom: 0; width: 52%; height: 70%; pointer-events: none; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.quick-item { display: flex; align-items: center; gap: .875rem; padding: 1rem 1.125rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); }
.quick-item:hover { text-decoration: none; border-color: var(--violet); }
.quick-item strong { display: block; font-size: 1rem; }
.quick-item small { display: block; color: var(--muted); font-size: .8125rem; }
/* My Apps. The grid follows the width it actually has (container query), so the Overview column and the
   My Apps page both get 4 columns when there is room, 2 when not, and 1 on very narrow phones. */
.apps-wrap { container: apps / inline-size; }
.apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@container apps (max-width: 35.99rem) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container apps (min-width: 36rem) and (max-width: 41.99rem) { .app-name { font-size: .875rem; } }
@container apps (max-width: 17.99rem) { .apps { grid-template-columns: minmax(0, 1fr); } }
.app { position: relative; display: flex; min-width: 0; height: 9.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--field); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .625rem; padding: 1rem .5rem; border-radius: inherit; color: var(--text); text-align: center; text-decoration: none; }
a.app-main:hover, a.app-main:focus { text-decoration: none; }
a.app-main:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; border-radius: var(--radius); }
.app:has(a.app-main:hover) { border-color: var(--violet-ring); background: var(--surface); box-shadow: var(--shadow); }
.app:has(a.app-main:focus-visible) { background: var(--surface); }
.app .tile { width: 2.75rem; height: 2.75rem; border-radius: 12px; }
.app .tile .ic { width: 1.375rem; height: 1.375rem; }
.app-name { display: block; max-width: 100%; padding: 0; font-size: .9375rem; font-weight: 700; line-height: 1.25; letter-spacing: -.005em; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app .badge { line-height: 1.25; }
div.app-main { cursor: default; }
div.app-main .tile { filter: grayscale(1); opacity: .55; }
div.app-main .app-name { color: var(--muted); }
/* Info button: icon only, no border or fill; 32px visual, 44px touch target. */
.app-info { -webkit-appearance: none; appearance: none; position: absolute; top: .375rem; right: .375rem; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--faint); font: inherit; line-height: 0; cursor: pointer; }
.app-info::before { content: ""; position: absolute; inset: -.375rem; border-radius: 999px; }
.app-info:hover { background: var(--soft); color: var(--text); }
.app-info:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; border-radius: 999px; color: var(--violet); }
.app-info .ic { width: 1.125rem; height: 1.125rem; }
.apps-wrap + .help { margin-top: 1rem; }
.ic.inline-ic { width: 1em; height: 1em; vertical-align: -.125em; }
.tile-green { background: var(--ok-soft); color: #15803D; }
/* App details dialog (native popover, top layer): centred card on wide screens, bottom sheet on phones. */
.app-pop { width: min(26rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; margin: auto; padding: 1.25rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px -16px rgba(15,23,42,.35); text-align: left; font: inherit; }
.app-pop::backdrop { background: rgba(15,23,42,.38); }
.app-pop-head { display: flex; align-items: center; gap: .875rem; }
.app-pop-head > div { flex: 1; min-width: 0; }
.app-pop-head h3 { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.app-pop-head p { margin: .125rem 0 0; color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.app-pop-x { -webkit-appearance: none; appearance: none; font: inherit; line-height: 0; margin: 0; display: grid; place-items: center; flex: none; align-self: flex-start; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.app-pop-x:hover { background: var(--soft); color: var(--text); }
.app-pop-x .ic { width: 1.125rem; height: 1.125rem; }
.app-pop-about { margin: 1rem 0 0; line-height: 1.55; }
.app-pop-status { display: flex; align-items: flex-start; gap: .625rem; margin-top: 1rem; padding: .75rem .875rem; border-radius: var(--radius-sm); background: var(--field); border: 1px solid var(--border); font-size: .875rem; color: var(--muted); }
.app-pop-status .badge { flex: none; margin-top: .0625rem; }
.app-pop-note { display: flex; gap: .5rem; margin: .75rem 0 0; font-size: .8125rem; color: var(--muted); }
.app-pop-note .ic { flex: none; width: 1rem; height: 1rem; margin-top: .125rem; }
.app-pop-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.125rem; }
.org-row { display: grid; gap: .5rem; }
.org { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
.org .ic { color: var(--muted); }
.verif { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; }
.verif-item { display: flex; align-items: center; gap: .625rem; padding: .75rem .875rem; border-radius: var(--radius-sm); background: var(--field); font-weight: 600; font-size: .875rem; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: .875rem; padding: .75rem 0; border-top: 1px solid var(--soft); }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed li > div { flex: 1; min-width: 0; }
.feed strong { display: block; font-size: .9375rem; overflow-wrap: anywhere; }
.feed span:not(.badge):not(.feed-ic) { display: block; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.feed-ic { display: inline-grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--field); color: var(--muted); }
.profile-card { text-align: left; }
.profile-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-top h2 { font-size: 1.375rem; font-weight: 800; }
.profile-top .muted { margin: 0 0 .5rem; font-size: .875rem; }
.kv { list-style: none; margin: 0 0 1rem; padding: 0; }
.kv li { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; padding: .75rem 0; border-top: 1px solid var(--soft); font-size: .9375rem; }
.kv li .ic { color: var(--muted); }
.kv li > span:not(.badge) { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; }
.secov { display: flex; align-items: center; gap: 1.25rem; }
.ring { position: relative; flex: none; width: 7.25rem; height: 7.25rem; border-radius: 999px; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--soft) 0); }
.ring::before { content: ""; position: absolute; inset: 11px; border-radius: 999px; background: var(--surface); }
.ring span { position: relative; font-size: 1.625rem; font-weight: 800; line-height: 1; }
.ring.p0 { --p: 0; } .ring.p5 { --p: 5; } .ring.p10 { --p: 10; } .ring.p15 { --p: 15; } .ring.p20 { --p: 20; } .ring.p25 { --p: 25; } .ring.p30 { --p: 30; } .ring.p35 { --p: 35; } .ring.p40 { --p: 40; } .ring.p45 { --p: 45; } .ring.p50 { --p: 50; } .ring.p55 { --p: 55; } .ring.p60 { --p: 60; } .ring.p65 { --p: 65; } .ring.p70 { --p: 70; } .ring.p75 { --p: 75; } .ring.p80 { --p: 80; } .ring.p85 { --p: 85; } .ring.p90 { --p: 90; } .ring.p95 { --p: 95; } .ring.p100 { --p: 100; }
.ring small { position: relative; font-size: .6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; flex: 1; }
.checks li { display: flex; align-items: center; gap: .625rem; font-size: .9375rem; font-weight: 500; }

/* ---------- rows, forms, buttons ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--soft); flex-wrap: wrap; }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows li > div:first-child { min-width: 0; flex: 1 1 14rem; }
.row-ic { display: flex; align-items: center; gap: .875rem; }
.k { display: block; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.v { display: block; font-weight: 600; overflow-wrap: anywhere; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.help, .empty { color: var(--muted); font-size: .875rem; }
.empty { margin: .25rem 0; display: flex; align-items: center; gap: .375rem; }
.bullets { margin: 0 0 .75rem; padding-left: 1.125rem; display: grid; gap: .375rem; }
.method { border-top: 1px solid var(--soft); padding: 1rem 0 .25rem; }
.method:first-of-type { border-top: 0; }
.method-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.method .help { margin: .25rem 0 .5rem; }
.method .rows li:first-child { border-top: 1px solid var(--soft); padding-top: .75rem; }
form.inline { display: inline; margin: 0; }
form.stack { display: grid; gap: .375rem; max-width: 30rem; }
.divide { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--soft); }
/* A divided form draws its rule across the card; its fields keep the usual form width. */
form.stack.divide { max-width: none; }
form.stack.divide > :is(label, input, select, textarea, .help) { max-width: 30rem; }
/* A plain group of action forms (e.g. Admin > Users > Identity verification controls). */
div.stack { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
label { font-size: .875rem; font-weight: 600; margin-top: .5rem; }
input:not([type=search]), select, textarea { width: 100%; min-height: 2.75rem; padding: .625rem .875rem; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
textarea { display: block; resize: vertical; line-height: 1.5; }
input:not([type=search]):not([type=checkbox]):not([type=radio]):not([type=range]):not([readonly]):not(:disabled):hover, select:not(:disabled):hover, textarea:not(:disabled):hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus, input:not([type=search]):focus:hover, select:focus:hover, textarea:focus:hover { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-ring); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input[readonly] { color: var(--muted); background: var(--field); }
input:disabled, select:disabled, textarea:disabled { color: var(--faint); background-color: var(--field); cursor: not-allowed; }
/* Dropdowns: one chevron in every browser (drawn with gradients: the CSP allows no data: images). */
select { -webkit-appearance: none; appearance: none; padding-right: 2.5rem; cursor: pointer; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 1rem) 50%; background-size: .25rem .25rem; background-repeat: no-repeat; }
select:disabled { cursor: not-allowed; }
.actions { margin-top: .875rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.625rem; padding: .5rem 1.125rem; font: 600 .9375rem var(--font); border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: var(--radius-sm); }
.btn .ic { width: 1.1em; height: 1.1em; }
.btn-primary { border-color: transparent; background: linear-gradient(120deg, var(--violet-2), var(--violet)); color: #fff; box-shadow: 0 8px 18px -10px rgba(124,58,237,.8); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; background: linear-gradient(120deg, var(--violet-2), var(--violet)); }
.btn-light { border-color: transparent; background: #fff; color: var(--violet-2); }
.btn-light:hover { background: #F3EEFF; border-color: transparent; }
.btn-outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.75); }
.btn-light:focus-visible, .btn-outline:focus-visible { outline-color: #fff; }
.btn-danger { color: var(--danger); border-color: #FCA5A5; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: transparent; background: var(--soft); color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }
.btn.wide { width: 100%; }
.alert { display: flex; align-items: center; gap: .625rem; padding: .75rem .875rem; border: 1px solid var(--border); border-left: 4px solid var(--violet); border-radius: var(--radius-sm); background: var(--surface); font-size: .9375rem; }
.alert .ic { color: var(--violet); }
.alert-error { border-left-color: var(--danger); }
.alert-error .ic { color: var(--danger); }

/* ---------- standalone pages ---------- */
.center { display: grid; place-items: center; padding: 1.5rem; }
.panel { width: 100%; max-width: 26rem; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); display: grid; gap: .75rem; justify-items: start; }
.panel h1 { font-size: 1.375rem; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) { .grid2 { grid-template-columns: minmax(0, 1fr) 340px; } .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .banner-brand { display: none; } }
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .side { display: none; }
  .drawer { display: block; }
  .drawer summary { list-style: none; }
  .drawer[open] summary::before { content: ""; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 39; }
  .drawer-panel { position: fixed; top: 0; left: 0; bottom: 0; width: min(20rem, 86vw); background: var(--surface); padding: 1.25rem 1rem; overflow-y: auto; z-index: 40; box-shadow: 0 0 40px rgba(15,23,42,.25); display: flex; flex-direction: column; }
  .drawer-panel .nav-help { margin-top: auto; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .top { padding: .875rem 1rem; }
  main { padding: .25rem 1rem 1.5rem; }
}
@media (max-width: 640px) {
  .usermenu-name { display: none; }
  .banner { padding: 1.5rem 1.25rem; min-height: 0; }
  .banner h1 { font-size: 1.75rem; }
  .banner-art { width: 90%; height: 40%; opacity: .6; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 1rem; }
  .secov { flex-direction: column; align-items: flex-start; }
  .app { height: 8.75rem; }
  .app-pop { width: 100%; max-width: none; max-height: 85dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
  .app-pop-actions .btn { flex: 1 1 auto; justify-content: center; }
  .page-head { padding-top: .25rem; }
  .search { min-height: 2.5rem; padding: 0 .75rem; }
  .top { gap: .5rem; padding: .75rem .75rem; }
  .iconbtn { width: 2.5rem; height: 2.5rem; }
  .usermenu summary { padding: .125rem; gap: .25rem; }
}
/* Tablets: two columns, whatever the container width. */
@media (min-width: 641px) and (max-width: 1023px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Subtle state changes only (colour, border, shadow); nothing moves or waits. */
@media (prefers-reduced-motion: no-preference) {
  .app, .quick-item, .app-info, .btn, .iconbtn, .usermenu summary, .nav a, .nav-help, .menu a, .menu button, .tabs a, input, select, textarea, .table td {
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s, filter .15s; }
}

/* ---------- Access Management and Request Access ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.small { font-size: .8125rem; }
/* Section tabs. A second row of tabs (a filter, or an organization's sections under Access Management)
   and tabs inside a card are drawn as chips, so the two levels never look alike. */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: .25rem; }
.tabs a { display: inline-flex; align-items: center; gap: .375rem; padding: .5rem .75rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.tabs a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.tabs a:focus-visible { outline-offset: -2px; border-radius: 8px; }
.tabs a[aria-current] { background: var(--violet-soft); color: var(--violet-2); }
.tabs .count { min-width: 1.375rem; padding: 0 .375rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .75rem; text-align: center; }
.tabs a[aria-current] .count { background: var(--surface); color: var(--violet-2); }
.tabs + .tabs, .card .tabs { gap: .375rem; border-bottom: 0; padding-bottom: 0; }
.tabs + .tabs a, .card .tabs a { padding: .3125rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.tabs + .tabs a:hover, .card .tabs a:hover { border-color: var(--border-strong); }
.tabs + .tabs a:focus-visible, .card .tabs a:focus-visible { border-radius: 999px; }
.tabs + .tabs a[aria-current], .card .tabs a[aria-current] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-2); }
.card .tabs { margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; margin: 0 -.25rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .5rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .75rem .5rem; border-bottom: 1px solid var(--soft); vertical-align: middle; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--field); }
.table td .k { display: inline; }
/* Row actions: compact controls, kept on one line, with even spacing when there are several. */
.table .btn, form.inline-row .btn { min-height: var(--ctl-sm); padding: .375rem .875rem; }
.table select, form.inline-row select, form.inline-row input:not([type=checkbox]) { min-height: var(--ctl-sm); padding-top: .3125rem; padding-bottom: .3125rem; }
.table form.inline { display: inline-block; vertical-align: middle; }
.table td:last-child:has(> .btn, > form.inline) { white-space: nowrap; }
.table td > .btn + form.inline, .table td > form.inline + form.inline, .table td > form.inline + .btn { margin-left: .375rem; }
label.check { display: flex; align-items: flex-start; gap: .625rem; margin: .25rem 0; font-weight: 400; cursor: pointer; }
label.check input { width: 1.125rem; height: 1.125rem; min-height: 0; margin: .1875rem 0 0; flex: none; accent-color: var(--violet); cursor: pointer; }
label.check strong { display: block; font-weight: 600; font-size: .9375rem; }
label.check small { display: block; color: var(--muted); font-size: .8125rem; }
label.check:has(input:disabled) { cursor: not-allowed; opacity: .6; }
label.check input:disabled { cursor: not-allowed; }
.checks-col { display: grid; gap: .25rem; margin: .5rem 0; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; margin: .75rem 0 .25rem; }
legend { font-size: .875rem; font-weight: 700; padding: 0 .25rem; }
h3.sub { margin-top: 1rem; }
h3.sub + .rows { margin-top: .625rem; }
form.wide-form { max-width: none; }
form.inline-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
form.inline-row select { width: auto; min-width: 12rem; }
form.inline-row input:not([type=checkbox]) { width: auto; flex: 1 1 14rem; }
form.inline-row label.check { flex: none; align-items: center; margin: 0; white-space: nowrap; }
form.inline-row label.check input { margin: 0; }
/* Two-column field groups inside forms (invitation, wizard): equal columns, field spacing like a stacked form. */
form .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
form .grid2 > .col { gap: .375rem; align-content: start; }
form.stack:has(> .grid2) { max-width: 46rem; }
@media (max-width: 640px) {
  /* Tabs: one swipeable row instead of several wrapped rows. */
  .tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; scroll-padding: 0 1rem; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; }
  .tabs + .tabs, .card .tabs { padding-bottom: .125rem; }
  form .grid2 { grid-template-columns: minmax(0, 1fr); }
  /* Tables scroll sideways instead of breaking names and emails in the middle of a word. */
  .table td { overflow-wrap: break-word; }
  .table td.mono, .table td code { overflow-wrap: anywhere; }
}
.field-error { margin: .125rem 0 0; color: var(--danger); font-size: .8125rem; font-weight: 600; }
input[aria-invalid="true"] { border-color: var(--danger); }
.panel-wide { max-width: 34rem; justify-items: stretch; }
.panel-wide .brand { justify-self: start; }
.panel-wide form.stack { max-width: none; }
.panel-wide .foot { margin-top: .5rem; }
.app-context { display: flex; align-items: center; gap: .875rem; flex-wrap: wrap; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--field); }
.app-context > div { flex: 1; min-width: 10rem; }
.app-context strong { display: block; font-size: 1.0625rem; }
.app-context small { color: var(--muted); }
@media (max-width: 640px) { .table th:nth-child(n+4), .table td:nth-child(n+4) { white-space: normal; } form.inline-row { flex-wrap: wrap; } form.inline-row select { min-width: 0; width: 100%; } .panel { padding: 1.25rem; } }
main > .card, .col > .card { min-width: 0; max-width: 100%; }
.table-wrap { max-width: 100%; position: relative; }
.table select { max-width: 14rem; }
@media (max-width: 640px) { .table select { max-width: 9rem; } .page-head > div { min-width: 0; overflow-wrap: anywhere; } }
/* ---------- profile photo ---------- */
.avatar-img { object-fit: cover; background: var(--soft); padding: 0; }
.avatar-xl { width: 6.5rem; height: 6.5rem; font-size: 2.25rem; border-radius: 999px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--violet-soft); flex: none; }
.photo-row { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.photo-row > div { flex: 1 1 14rem; min-width: 0; }
input[type=file] { padding: .5rem; font-size: .9375rem; }
.crop { display: grid; gap: .375rem; margin-top: .5rem; }
.crop[hidden] { display: none; }
.crop-frame { position: relative; width: min(15rem, 100%); aspect-ratio: 1; overflow: hidden; border-radius: 999px; background: var(--soft); cursor: grab; touch-action: none; box-shadow: 0 0 0 1px var(--border); }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
input[type=range] { min-height: 0; padding: 0; accent-color: var(--violet); }
/* Request Access: centred heading, policy line, full-width dark action (matches the sign-in card) */
.panel-wide { border-radius: 28px; padding: 2.25rem 2rem; }
.panel-wide > .brand { justify-self: center; }
.panel-wide > h1 { text-align: center; font-size: 1.625rem; letter-spacing: -.02em; }
.panel-wide > p.muted { text-align: center; }
.panel-wide .actions .btn-primary, .panel-wide form.stack > .actions .btn { width: 100%; border-radius: 999px; min-height: 3rem; background: #161A23; box-shadow: 0 10px 24px -14px rgba(15,23,42,.65); }
.policy-line { display: flex; gap: .625rem; align-items: center; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--violet-soft); color: var(--violet-2); font-size: .875rem; }
.policy-line .ic { width: 1.1rem; height: 1.1rem; }
@media (max-width: 640px) { .panel-wide { padding: 1.5rem 1.125rem; border-radius: 22px; } }

/* ---------- Organization console (views-orgs.js) ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; list-style: none; margin: 0 0 1.25rem; padding: 0 0 1rem; border-bottom: 1px solid var(--soft); }
.steps li { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .5rem .25rem; border-radius: var(--radius-sm); color: var(--muted); font-size: .8125rem; text-align: center; min-width: 0; }
.steps li .n { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .8125rem; }
.steps li .l { overflow-wrap: anywhere; }
.steps li.current { background: var(--violet-soft); color: var(--violet-deep); font-weight: 600; }
.steps li.current .n { border-color: var(--violet); background: var(--violet); color: #fff; }
.steps li.done { color: var(--text); }
/* A finished step shows a check instead of its number (the number stays in the text for screen readers). */
.steps li.done .n { border-color: transparent; background: var(--ok-soft); color: #15803D; font-size: 0; }
.steps li.done .n::after { content: "✓"; font-size: .8125rem; font-weight: 700; }
@media (max-width: 520px) { .steps li .l { font-size: .6875rem; } }
.identity { border: 1px solid var(--border); border-left: 4px solid var(--violet); border-radius: var(--radius-sm); padding: .875rem 1rem; background: var(--field); display: grid; gap: .5rem; }
.identity + .identity { margin-top: .75rem; }
.identity form + form { margin-top: .5rem; }
.identity p { margin: 0; overflow-wrap: anywhere; }
dl.org-kv { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); gap: .5rem 1rem; margin: 0 0 1rem; }
dl.org-kv dt { color: var(--muted); font-size: .875rem; }
dl.org-kv dd { margin: 0; overflow-wrap: anywhere; }
code.wrap { overflow-wrap: anywhere; word-break: break-all; }
.alert-info { border-left-color: var(--blue); }
.alert-info .ic { color: var(--blue); }

/* Zoo Verify: identity verification prompt for employees (overview) */
.idv-cta { margin: 0 0 1.25rem; border-left: 4px solid var(--violet); background: linear-gradient(90deg, var(--violet-soft), var(--surface) 60%); }
.idv-cta .card-title p { margin-top: .25rem; }
.idv-cta .help { margin: .75rem 0 0; }

/* Identity verification gate (views-verify.js) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.stat { display: grid; gap: .125rem; padding: .75rem .875rem; border: 1px solid var(--soft); border-radius: var(--radius-sm); }
.stat strong { font-size: 1.375rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .8125rem; }
.idv-steps { margin: 0 0 1rem; padding-left: 1.25rem; display: grid; gap: .375rem; }
.idv-locked { border-color: var(--warn, #b45309); }
fieldset.checks-col { border: 0; margin: 0 0 1rem; padding: 0; }
fieldset.checks-col legend { font-weight: 600; margin-bottom: .5rem; }
fieldset.idv-fields { display: grid; gap: .375rem; max-width: 34rem; }
fieldset.idv-fields input:not([type=checkbox]) { max-width: 100%; }
