/* weboom admin — quiet dark surfaces from the CI, crimson/cyan only as accents. */
:root {
  color-scheme: dark;
  --bg: #131217;
  --ink: #17151b;
  --surface: #1b1920;
  --surface-2: #211f27;
  --surface-3: #2a2731;
  --cream: #fbf1e0;
  --silver: #b8b8bc;
  --dim: #8b8891;
  --cyan: #17c9ff;
  --crimson: #ff315f;
  --green: #3ddc97;
  --line: rgba(251, 241, 224, 0.1);
  --line-strong: rgba(251, 241, 224, 0.18);
  --radius: 16px;
  --font: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--cream); font: 500 14px/1.45 var(--font); }
.hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ── Buttons & fields ───────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--cream); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); border-color: rgba(251, 241, 224, .35); }
.btn:disabled { opacity: .45; cursor: wait; }
.btn-primary { border-color: transparent; background: var(--cream); color: var(--ink); }
.btn-primary:hover { background: #fff; border-color: transparent; }
.btn-accent { border-color: transparent; background: var(--crimson); color: #fff; }
.btn-accent:hover { background: #ff4d74; border-color: transparent; }
.btn-danger { border-color: rgba(255, 49, 95, .45); color: var(--crimson); }
.btn-sm { min-height: 30px; padding: 0 11px; font-size: 12px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--silver); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--cream); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.field { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ink); color: var(--cream); outline: none; }
.field:focus { border-color: var(--cyan); }
.field::placeholder { color: var(--dim); }
textarea.field { resize: vertical; line-height: 1.45; }
input[type='file'].field { padding: 6px; }
input[type='file']::file-selector-button { margin-right: 10px; border: 0; border-radius: 999px; padding: 6px 12px; background: var(--surface-3); color: var(--cream); font: inherit; cursor: pointer; }
.label { display: block; margin-bottom: 6px; color: var(--silver); font-size: 12px; font-weight: 600; }

.muted { color: var(--silver); }
.dim { color: var(--dim); }
.eyebrow { color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ── Top bar ────────────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 0 24px; height: 64px; border-bottom: 1px solid var(--line); background: rgba(23, 21, 27, .92); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.admin-logo { width: 104px; height: auto; display: block; }
.brand-tag { padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--silver); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.nav-tab { height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--silver); font-weight: 600; cursor: pointer; }
.nav-tab:hover { color: var(--cream); background: var(--surface); }
.nav-tab[aria-selected='true'] { color: var(--cream); background: var(--surface-2); }
.topbar-end { display: flex; align-items: center; gap: 16px; margin-left: auto; min-width: 0; }
#admin-email { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-demo-banner { padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--ink); color: var(--cyan); font-size: 13px; }

.state { flex: 1; display: grid; place-items: center; padding: 32px; text-align: center; color: var(--silver); }

/* ── Layout ─────────────────────────────────────────────────────────────── */
#admin-main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.view-title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.kpi { padding: 16px 18px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: 0; }
.kpi-value { margin-top: 6px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { margin-top: 2px; color: var(--dim); font-size: 12px; }
.kpi-live .kpi-value { color: var(--green); }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 360px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; }
.search .field { padding-left: 36px; }
.chips { display: flex; gap: 6px; }
.chip { height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--silver); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed='true'] { border-color: var(--cream); color: var(--cream); background: var(--surface-2); }
.toolbar-count { margin-left: auto; color: var(--dim); font-size: 13px; }

/* Users table */
.table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th { padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.users-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.user-row { cursor: pointer; transition: background .12s; }
.user-row:hover { background: var(--surface-2); }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-open { min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.user-email { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.user-sub { display: block; margin-top: 1px; color: var(--dim); font-size: 12px; }
.avatar { position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-3); color: var(--cream); font-weight: 600; font-size: 14px; text-transform: uppercase; }
.avatar.is-online::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--surface); border-radius: 50%; background: var(--green); }
.role-pill { display: inline-block; margin-left: 6px; padding: 1px 7px; border: 1px solid rgba(23, 201, 255, .4); border-radius: 999px; color: var(--cyan); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; }
.presence { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-size: 13px; }
.presence::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.presence.is-online { color: var(--green); font-weight: 600; }
.presence.is-online::before { background: var(--green); box-shadow: 0 0 0 3px rgba(61, 220, 151, .18); }
.project-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.chat-with-user { color: var(--silver); }
.user-row:hover .chat-with-user, .chat-with-user.is-online { color: var(--cream); }
.chat-with-user.is-online { background: var(--surface-3); }
.empty { padding: 40px 16px; color: var(--dim); text-align: center; }

/* Usage view */
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.usage-card { padding: 20px; }
.usage-card h2 { margin-bottom: 16px; font-size: 15px; font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 96px; align-items: center; gap: 12px; }
.bar-label { font-weight: 600; }
.bar-model { display: block; color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--crimson), #ff6b8a); }
.bar-value { color: var(--silver); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }

/* Templates view */
.templates-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.form-card h2, .list-card h2 { font-size: 15px; font-weight: 600; }
.form-divider { height: 1px; background: var(--line); }
#ingest-status { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); font-size: 13px; }
#ingest-status.is-error { color: var(--crimson); border-color: rgba(255, 49, 95, .4); }
#ingest-status.is-success { color: var(--green); }
.list-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.template-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.template-row:last-child { border-bottom: 0; }
.template-row a { color: var(--cyan); font-size: 13px; text-decoration: none; }

/* ── User modal ─────────────────────────────────────────────────────────── */
dialog { color: var(--cream); }
.user-modal { width: min(1240px, calc(100vw - 48px)); height: min(860px, calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--bg); box-shadow: 0 40px 120px rgba(0, 0, 0, .6); overflow: hidden; }
.user-modal[open] { display: flex; flex-direction: column; }
.user-modal::backdrop { background: rgba(7, 7, 9, .7); backdrop-filter: blur(6px); }
.um-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 0; }
.um-head .avatar { width: 48px; height: 48px; font-size: 18px; }
.um-id { min-width: 0; flex: 1; }
.um-id h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.um-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 3px; color: var(--dim); font-size: 13px; }
.um-tabs { display: flex; gap: 4px; padding: 14px 20px 0; border-bottom: 1px solid var(--line); }
.um-tab { position: relative; height: 40px; padding: 0 14px; border: 0; background: none; color: var(--silver); font-weight: 600; cursor: pointer; }
.um-tab:hover { color: var(--cream); }
.um-tab[aria-selected='true'] { color: var(--cream); }
.um-tab[aria-selected='true']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--crimson); }
.um-tab .count { margin-left: 6px; color: var(--dim); font-weight: 500; }
.um-body { flex: 1; min-height: 0; overflow: auto; }
.um-panel { padding: 20px; }

/* Projects grid */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; }
.project-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.project-thumb { position: relative; height: 150px; background: var(--cream); overflow: hidden; }
.project-thumb iframe { width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: top left; pointer-events: none; }
.showcase-toggle { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(23, 21, 27, .8); color: var(--cream); font-size: 15px; cursor: pointer; }
.showcase-toggle.is-on { color: #ffc94d; }
.project-info { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.project-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.project-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-presence-label { margin-left: auto; flex: none; font-size: 11px; }
.session-presence-label.is-online { color: var(--green); font-weight: 600; }
.session-presence-label:not(.is-online) { color: var(--dim); }
.project-stats { color: var(--silver); font-size: 12px; }
.project-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.project-domain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cyan); font-size: 12px; }

/* Project detail */
.pd-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pd-bar h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 600; }
#detail-chat-presence { flex: none; font-size: 12px; color: var(--dim); }
#detail-chat-presence.is-online { color: var(--green); }
.pd-actions { display: flex; gap: 8px; margin-left: auto; }
.pd-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; min-height: 560px; }
.pd-preview { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.pd-preview-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pd-preview-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.pd-preview-url { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12px; }
#detail-iframe { flex: 1; width: 100%; min-height: 480px; border: 0; background: var(--cream); }
.pd-side { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.seg { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.seg button { flex: 1; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--silver); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--cream); }
.seg button[aria-selected='true'] { background: var(--surface-3); color: var(--cream); }
.pd-panel { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; }
.pd-panel-scroll { max-height: 600px; }
.support-box { display: flex; flex-direction: column; gap: 10px; }
.support-row { display: flex; gap: 8px; align-items: center; }
.support-row select { width: auto; }
#detail-support-status { color: var(--cyan); font-size: 13px; }
.note { color: var(--dim); font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); }
.tile-wide { grid-column: 1 / -1; }
.tile-label { color: var(--dim); font-size: 12px; }
.tile-value { margin-top: 3px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: var(--silver); font-size: 12px; }
.prompt { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); font-size: 13px; }
.prompt-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--dim); font-size: 12px; }
.prompt-type { color: var(--cyan); font-weight: 600; }
.prompt-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-summary { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--silver); white-space: pre-wrap; overflow-wrap: anywhere; }
.activity-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#detail-logs { display: flex; flex-direction: column; gap: 6px; font: 500 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.log-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.log-head { display: flex; gap: 8px; }
.log-source { color: var(--cyan); }
.log-time { margin-left: auto; color: var(--dim); }
.log-details { margin-top: 4px; color: var(--silver); white-space: pre-wrap; word-break: break-all; }
.log-shot { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--ink); text-decoration: none; }
.log-shot img { display: block; width: 100%; max-height: 200px; object-fit: cover; background: var(--cream); }
.log-shot .log-head { padding: 8px 10px; }
.log-error { padding: 10px; border: 1px solid rgba(255, 49, 95, .4); border-radius: 8px; background: rgba(255, 49, 95, .08); font-family: var(--font); font-size: 12px; }
.file-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.media-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.media-grid img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: 100%; max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.um-panel-chat { height: 100%; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
#admin-chat-presence { font-size: 13px; color: var(--dim); }
#admin-chat-presence.is-online { color: var(--green); font-weight: 600; }
#admin-chat-messages { flex: 1; min-height: 240px; display: flex; flex-direction: column; gap: 10px; padding: 18px; overflow-y: auto; background: var(--bg); }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.from-admin { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--crimson); color: #fff; }
.bubble.from-user { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 6px; background: var(--surface-2); }
.bubble-meta { margin-top: 4px; font-size: 11px; opacity: .65; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form .field { flex: 1; min-width: 0; }

/* Account */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 900px; }
.account-card { padding: 18px; }
.account-card h3 { margin-bottom: 14px; font-size: 15px; font-weight: 600; }
.inline-form { display: flex; gap: 8px; }
.inline-form .field { width: 120px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.saved { color: var(--green); font-size: 12px; }

/* ── Confirm + notice dialogs ───────────────────────────────────────────── */
#support-confirm-dialog, #admin-message { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); color: var(--cream); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
#support-confirm-dialog::backdrop, #admin-message::backdrop { background: rgba(7, 7, 9, .72); backdrop-filter: blur(8px); }
#support-confirm-dialog h2, #admin-message h2 { margin: 6px 0 8px; font-size: 20px; font-weight: 600; }
#support-confirm-description, #admin-message p { color: var(--silver); white-space: pre-wrap; overflow-wrap: anywhere; }
#support-confirm-command { max-height: 40vh; margin-top: 14px; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions, #admin-message .admin-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#support-confirm-mode { margin-right: auto; color: var(--dim); font-size: 12px; font-weight: 600; text-transform: uppercase; }
#admin-message .admin-dialog-actions button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; font-weight: 600; cursor: pointer; }
#admin-message-confirm { border-color: rgba(255, 49, 95, .5) !important; color: var(--crimson); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .pd-body { grid-template-columns: minmax(0, 1fr); }
  #detail-iframe { min-height: 360px; }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; height: auto; min-height: 56px; padding: 8px 16px; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  #admin-email { display: none; }
  #admin-main { padding: 20px 16px 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(4) { border-left: 1px solid var(--line); }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .toolbar { flex-wrap: wrap; }
  .search { max-width: none; flex-basis: 100%; }
  .col-optional, .col-status { display: none; }
  .user-email { max-width: 180px; }
  .usage-grid, .templates-layout, .account-grid { grid-template-columns: minmax(0, 1fr); }
  .user-modal { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .um-head { padding: 14px 16px 0; }
  .um-tabs { padding: 10px 12px 0; overflow-x: auto; }
  .um-panel { padding: 16px; }
  .pd-bar { flex-wrap: wrap; }
  .pd-actions { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
