/* MultiTenantOS admin: frosted aero glass, dark + light. No native controls are shown. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --accent: #5b8cff;
  --accent-2: #8f6bff;
  --danger: #ff5d6c;
  --ok: #2fd39a;
}
[data-theme="dark"] {
  --bg: #070b16;
  --text: #eef2ff;
  --muted: rgba(226, 232, 255, .62);
  --glass: rgba(22, 28, 48, .52);
  --glass-strong: rgba(28, 35, 60, .72);
  --stroke: rgba(255, 255, 255, .12);
  --stroke-strong: rgba(255, 255, 255, .22);
  --hi: rgba(255, 255, 255, .08);
  --field: rgba(255, 255, 255, .06);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --b1: #2346ff; --b2: #8a2bff; --b3: #00c2ff;
}
[data-theme="light"] {
  --bg: #eef2fb;
  --text: #121a33;
  --muted: rgba(18, 26, 51, .6);
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --stroke: rgba(18, 26, 51, .1);
  --stroke-strong: rgba(18, 26, 51, .2);
  --hi: rgba(255, 255, 255, .7);
  --field: rgba(255, 255, 255, .6);
  --shadow: 0 20px 50px rgba(40, 60, 120, .18);
  --b1: #7aa2ff; --b2: #c39bff; --b3: #7fe3ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 14px/1.45 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; transition: background .4s var(--ease), color .4s var(--ease);
}
[hidden] { display: none !important; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }

/* background */
.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: .55; transition: background .6s var(--ease); }
.b1 { background: var(--b1); top: -18vmax; left: -12vmax; }
.b2 { background: var(--b2); bottom: -20vmax; right: -10vmax; }
.b3 { background: var(--b3); top: 30%; left: 45%; width: 28vmax; height: 28vmax; opacity: .35; }

/* glass */
.glass {
  background: linear-gradient(180deg, var(--hi), transparent 40%), var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hi);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.topbar { position: sticky; top: 12px; margin: 12px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; }
.logo { width: 28px; height: 28px; display: block; filter: drop-shadow(0 3px 10px rgba(91, 140, 255, .45)); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--stroke-strong); color: var(--muted); }

/* buttons (styled; never the browser look) */
button { font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; border: 0; background: none; }
button:focus { outline: none; }
button:focus-visible { box-shadow: 0 0 0 3px rgba(91, 140, 255, .45); }
.primary-btn {
  padding: 9px 16px; border-radius: 12px; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(91, 140, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
}
.primary-btn:hover { transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0) scale(.98); }
.primary-btn[disabled] { opacity: .55; pointer-events: none; }
.primary-btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.primary-btn.danger { background: linear-gradient(135deg, #ff5d6c, #ff7a45); box-shadow: 0 6px 18px rgba(255, 93, 108, .35); }
.ghost-btn { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--stroke-strong); background: var(--field); transition: background .2s var(--ease); }
.ghost-btn:hover { background: var(--hi); }
.ghost-btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.ghost-btn.danger { color: var(--danger); }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--stroke); background: var(--field); transition: transform .35s var(--ease), background .2s; }
.icon-btn:hover { background: var(--hi); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spin { transform: rotate(180deg); }

/* inputs */
.field { display: grid; gap: 6px; margin: 12px 0; }
.field > span { font-size: 12.5px; color: var(--muted); }
.input {
  width: 100%; padding: 10px 12px; border-radius: 12px; font: inherit; color: var(--text);
  background: var(--field); border: 1px solid var(--stroke); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus { border-color: rgba(91, 140, 255, .7); box-shadow: 0 0 0 3px rgba(91, 140, 255, .18); }
.input::placeholder { color: var(--muted); opacity: .7; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* search: icon inside, no focus ring */
.search { position: relative; margin: 12px 0 10px; }
.search-icon { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-input {
  width: 100%; padding: 10px 12px 10px 36px; border-radius: 12px; font: inherit; color: var(--text);
  background: var(--field); border: 1px solid var(--stroke); -webkit-appearance: none; appearance: none;
}
.search-input:focus, .search-input:focus-visible { outline: none; box-shadow: none; border-color: var(--stroke); }
.search-input::placeholder { color: var(--muted); opacity: .75; }

/* sliding pill selector */
.pills { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--field); border: 1px solid var(--stroke); }
.pills button { position: relative; z-index: 1; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 550; color: var(--muted); transition: color .3s var(--ease); }
.pills button[aria-selected="true"] { color: var(--text); }
.pill-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px; z-index: 0;
  background: var(--glass-strong); border: 1px solid var(--stroke-strong); box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  transition: transform .42s var(--ease), width .42s var(--ease);
}
/* multi-select chips (scopes) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; padding: 7px 12px 7px 30px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--stroke);
  background: var(--field); color: var(--muted); transition: all .3s var(--ease);
}
.chip::before { content: ""; position: absolute; left: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 1.5px solid var(--stroke-strong); transition: all .3s var(--ease); }
.chip[aria-pressed="true"] { color: var(--text); border-color: rgba(91, 140, 255, .55); background: rgba(91, 140, 255, .14); }
.chip[aria-pressed="true"]::before { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: 0 0 0 3px rgba(91, 140, 255, .18); }

/* layout */
.center { min-height: calc(100vh - 100px); display: grid; place-items: center; padding: 16px; }
.card { padding: 22px; }
.login-card { width: min(420px, 100%); }
.login-card .primary-btn { width: 100%; margin-top: 6px; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 12px; padding: 0 12px 12px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
.panel { padding: 16px; min-height: 60vh; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 10px; gap: 12px; flex-wrap: wrap; }
.asc-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.asc-item { width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; transition: background .25s var(--ease), border-color .25s var(--ease); display: grid; gap: 2px; }
.asc-item:hover { background: var(--field); }
.asc-item[aria-current="true"] { background: var(--glass-strong); border-color: var(--stroke-strong); }
.asc-item .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: none; }
.dot.off { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.empty { text-align: center; margin-top: 24px; }
.empty-state { display: grid; place-items: center; min-height: 50vh; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.fact { padding: 10px 12px; border-radius: 14px; background: var(--field); border: 1px solid var(--stroke); }
.fact small { display: block; color: var(--muted); font-size: 11.5px; }
.key-list { display: grid; gap: 8px; }
.key { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--stroke); animation: rise .35s var(--ease); }
.key .meta { font-size: 12px; color: var(--muted); }
.key .btns { display: flex; gap: 6px; align-items: center; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--stroke-strong); margin-right: 4px; color: var(--muted); }
.tag.on { color: var(--ok); border-color: rgba(47, 211, 154, .45); }
.tag.off { color: var(--danger); border-color: rgba(255, 93, 108, .45); }
.err { color: var(--danger); font-size: 13px; margin: 8px 0 0; }

/* secret, shown once */
.secret { margin: 12px 0; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px dashed var(--stroke-strong); font-family: var(--mono); font-size: 12.5px; word-break: break-all; user-select: all; }
[data-theme="light"] .secret { background: rgba(18, 26, 51, .06); }
.warn { padding: 10px 12px; border-radius: 12px; background: rgba(255, 180, 60, .12); border: 1px solid rgba(255, 180, 60, .35); font-size: 13px; }

/* modal */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; padding: 16px; }
.scrim { position: absolute; inset: 0; background: rgba(5, 8, 20, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s var(--ease); }
.dialog { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; background: linear-gradient(180deg, var(--hi), transparent 40%), var(--glass-strong); animation: pop .35s var(--ease); }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; }
.toast { padding: 10px 14px; border-radius: 14px; animation: rise .35s var(--ease); }
.toast.bad { border-color: rgba(255, 93, 108, .5); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }

/* Creates still being retried: the on-screen warning with the expected timeline. */
.banner { margin: 0 12px 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(255, 184, 77, .45); }
.banner.inline { margin: 12px 0; background: rgba(255, 184, 77, .08); }
.banner-head { display: flex; align-items: center; gap: 10px; }
.warn-dot { width: 10px; height: 10px; border-radius: 50%; background: #ffb84d; box-shadow: 0 0 10px #ffb84d; flex: none; }
.banner-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.banner-list li, .banner.inline p { font-size: 13px; line-height: 1.45; margin: 0; }
.banner-list .when { color: var(--muted); }

/* Product links (t1269): inline editor, one row per product with a sliding Linked / Not linked pill. */
.link-fact small { display: flex; align-items: center; gap: 6px; }
.link-fact .id { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.link-edit { display: grid; gap: 10px; margin-top: 4px; animation: rise .35s var(--ease); }
.link-row { padding: 12px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--stroke); min-width: 0; }
.link-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.link-id { display: grid; grid-template-rows: 1fr; margin-top: 10px; transition: grid-template-rows .35s var(--ease), opacity .3s var(--ease), margin .35s var(--ease); }
.link-id > .input { min-height: 0; min-width: 0; }
.link-id.off { grid-template-rows: 0fr; opacity: 0; margin-top: 0; overflow: hidden; }
.link-id.off > .input { padding-top: 0; padding-bottom: 0; border-width: 0; }
.link-note { margin: 8px 0 0; }
.link-note:empty { display: none; }
.actions.start { justify-content: flex-start; flex-wrap: wrap; margin-top: 10px; }
.warn p { margin: 0 0 6px; }
@media (max-width: 860px) { .panel { min-width: 0; } .detail-panel { overflow-wrap: anywhere; } }

/* ── Sign-in, set-password, account (t1298). Same layout as the DropOS / AIU platform-admin sign-in: a brand panel on
   desktop, the form on its own on a phone. Custom controls only; nothing scrolls sideways. ── */
html, body { overflow-x: clip; } /* clip, not hidden: hidden turns body into a scroller and cuts the backdrop off */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 12px; padding: 0 12px 12px; min-height: calc(100vh - 88px); align-items: stretch; }
.auth-hero { padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 0; }
.hero-mark { width: 44px; height: 44px; filter: drop-shadow(0 6px 18px rgba(91, 140, 255, .45)); }
.hero-line { margin: 0; max-width: 440px; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -.03em; }
.auth-card { padding: 32px 28px; display: flex; flex-direction: column; justify-content: center; min-width: 0; animation: rise .4s var(--ease); }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card > .muted { margin: 0 0 8px; }
.auth-form { margin: 8px 0 0; }
.wide { width: 100%; display: inline-flex; justify-content: center; margin-top: 8px; min-height: 44px; align-items: center; }
.link-as-btn { text-decoration: none; color: #fff; margin-top: 16px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-hero { display: none; }
  .auth-card { padding: 24px 18px; }
  .user-name { display: none; }
}
.input { font-size: 16px; }
@media (min-width: 861px) { .input { font-size: 14px; } }

.pw-wrap { position: relative; display: block; }
.pw-wrap .input { width: 100%; padding-right: 46px; }
.eye-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: color .2s var(--ease), background .2s var(--ease); }
.eye-btn:hover { color: var(--text); background: var(--hi); }
.eye-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.err-box { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; font-size: 13px; border: 1px solid #e7c4c4; background: #fdf1f1; color: #9b1c1c; animation: rise .3s var(--ease); }
[data-theme="dark"] .err-box { border-color: #6e3030; background: #2b1518; color: #ffb4b4; }
.note { margin: 6px 0; padding: 8px 12px; border-radius: 12px; font-size: 13px; animation: rise .3s var(--ease); }
.note.ok { background: rgba(47, 211, 154, .12); border: 1px solid rgba(47, 211, 154, .4); }
.note.bad { background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .4); }
.text-btn { padding: 0; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.reveal-toggle { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.chev { width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .34s var(--ease); }
.reveal-toggle[aria-expanded="true"] .chev { transform: rotate(225deg) translateY(-2px); }
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.reveal[data-open="true"] { grid-template-rows: 1fr; }
.reveal-inner { min-height: 0; overflow: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .34s var(--ease), transform .34s var(--ease); }
.reveal[data-open="true"] .reveal-inner { opacity: 1; transform: none; padding: 2px; }
.reveal[data-open="false"] .reveal-inner { visibility: hidden; }

.meter { height: 6px; border-radius: 999px; background: var(--field); border: 1px solid var(--stroke); overflow: hidden; margin: -4px 0 10px; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .4s var(--ease), background .4s var(--ease); background: var(--danger); }
.meter span.s2 { background: #ffb84d; }
.meter span.s3 { background: var(--accent); }
.meter span.s4 { background: var(--ok); }
.rules { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; transition: color .3s var(--ease); }
.rules li.on { color: var(--text); }
.tick { position: relative; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--stroke-strong); flex: none; transform: scale(.9); transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); }
.rules li.on .tick { background: var(--ok); border-color: var(--ok); transform: scale(1); }
.tick::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border-right: 1.8px solid #fff; border-bottom: 1.8px solid #fff; transform: rotate(45deg) scale(0); transition: transform .3s var(--ease); }
.rules li.on .tick::after { transform: rotate(45deg) scale(1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--field); transition: background .2s var(--ease); max-width: 220px; }
.user-chip:hover { background: var(--hi); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.user-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .topbar { padding: 8px 10px; } .top-actions { gap: 6px; } .badge { display: none; } .brand small { display: none; } }
