/* Portal. The palette is Muximux's default dark theme, kept so the dashboard
   looks the way it did. */

:root {
  color-scheme: dark;
  --bg-base: #09090b;
  --bg-surface: #111114;
  --bg-elevated: #18181c;
  --bg-overlay: #1f1f24;
  --bg-hover: #27272d;
  --bg-active: #2f2f36;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #848490;
  --text-disabled: #52525b;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-input: rgba(255, 255, 255, 0.22);
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --accent-subtle: rgba(45, 212, 191, 0.1);
  --on-accent: #042f2e;
  --danger: #f87171;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --radius: 8px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  color: var(--text-primary);
  font: 14px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form.inline { display: contents; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.bar {
  flex: none;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 20;
}

.bar-apps {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bar-pinned {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.bar-pinned::-webkit-scrollbar { display: none; }

.bar-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--border-subtle); flex: none; }

.bar-actions { flex: none; display: flex; align-items: center; gap: 4px; }

/* Claude usage: the account's name, then two thin meters, session over week.
   The whole readout is a button that opens the accounts. */
.usage { display: flex; align-items: center; gap: 8px; margin-right: 8px; flex: none; min-height: 44px; padding: 0 6px; border: 0; border-radius: 6px; background: none; text-align: left; white-space: nowrap; font-size: 11px; line-height: 1.1; color: var(--text-secondary); }
.usage:hover { background: var(--bg-hover); }
.usage[hidden] { display: none; }
.usage.stale { opacity: .5; }
.usage-account { max-width: 88px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: var(--text-primary); }
.usage.unknown .usage-account { color: #f59e0b; }
.usage-rows { display: flex; flex-direction: column; gap: 3px; }
.usage-row { display: flex; align-items: center; gap: 6px; }
.usage-label { width: 14px; color: var(--text-muted); }
.usage-meter { width: 56px; height: 5px; border-radius: 3px; background: var(--bg-active); overflow: hidden; flex: none; }
.usage-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.usage-row.mid .usage-fill { background: #f59e0b; }
.usage-row.high .usage-fill { background: #ef4444; }
.usage-pct { width: 28px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.usage-reset { min-width: 48px; font-variant-numeric: tabular-nums; color: var(--text-muted); }
/* Narrow screens: no meters, just the name over "5h 22%" over "7d 95%", the
   number tinted, so the readout stays as narrow as the numbers. */
@media (max-width: 900px) {
  .usage { margin-right: 0; padding: 0 4px; flex-direction: column; align-items: stretch; justify-content: center; gap: 2px; }
  .usage-account { max-width: 60px; font-size: 10px; }
  .usage-rows { gap: 2px; }
  .usage-meter, .usage-reset { display: none; }
  .usage-label { width: auto; }
  .usage-pct { width: auto; min-width: 28px; }
  .usage-row.mid .usage-pct { color: #f59e0b; }
  .usage-row.high .usage-pct { color: #ef4444; }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; color: var(--text-muted); }

.app-btn, .group-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}
.app-btn:hover, .group-btn:hover, .group-btn.open { background: var(--bg-hover); color: var(--text-primary); }
.app-btn { gap: 6px; }
/* The underline is a shadow, not a border, so it does not push the icon and
   the label above the middle of the button. */
.app-btn.active { background: var(--bg-base); color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--app-color, var(--accent)); }

.group { position: relative; flex: none; }
.group-btn { gap: 6px; padding: 8px 10px; color: var(--text-muted); }
.group-btn.active { color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--group-color, var(--accent)); }
.chevron { width: 12px; height: 12px; opacity: .5; }

.new-tab-mark { font-size: 12px; opacity: .6; margin-left: 4px; }

/* Badges sent by the apps in frames: a pill per tone, or a dot. */
.nbadges { display: inline-flex; align-items: center; gap: 3px; flex: none; margin-left: 2px; }
.nbadge {
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.nbadge.info { background: var(--accent-strong); color: var(--on-accent); }
.nbadge.warning { background: #f59e0b; color: #1c1206; }
.nbadge.error { background: #ef4444; color: #fff; }
.ndot { width: 8px; height: 8px; border-radius: 50%; }
.ndot.info { background: var(--accent); }
.ndot.warning { background: #f59e0b; }
.ndot.error { background: #ef4444; }
.dd-item .nbadges { margin-left: auto; }
.tile { position: relative; }
.tile .nbadges { position: absolute; top: 6px; right: 6px; }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 200px;
  max-width: 280px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  z-index: 50;
}

.dd-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
}
.dd-item:hover { color: var(--text-primary); background: var(--bg-elevated); }
.dd-item.active { color: var(--text-primary); background: var(--bg-hover); }
.dd-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: var(--app-color, var(--accent));
}
.dd-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* Narrow screens: icons only, and the pinned apps and the groups scroll
   sideways as one strip, so neither is squeezed out or slides under the
   actions. The drop-downs are fixed so the strip does not cut them off;
   placeDropdown in app.js puts them under their button. */
@media (max-width: 900px) {
  .app-btn .label { display: none; }
  .group-btn .label { display: none; }
  .group-btn .chevron { display: none; }
  .group-btn { padding: 8px; }
  .bar { gap: 8px; padding: 0 8px; }
  .bar-apps { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .bar-apps::-webkit-scrollbar { display: none; }
  .bar-pinned { flex: none; overflow: visible; }
  .dropdown { position: fixed; margin-top: 0; max-width: calc(100vw - 16px); }
  .bar-actions { gap: 0; }
  .bar-actions .icon-btn { padding: 6px; }
}

/* ── Icons ───────────────────────────────────────────────────────────────── */

.icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
}
.icon img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.icon .mask {
  width: 100%;
  height: 100%;
  padding: 4px;
  background-color: var(--text-primary);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-origin: content-box; mask-origin: content-box;
}
.icon.md { width: 32px; height: 32px; font-size: 14px; }
.icon.lg { width: 48px; height: 48px; font-size: 18px; border-radius: 8px; }
.icon.lg img, .icon.lg .mask { padding: 8px; }

/* ── Frames ──────────────────────────────────────────────────────────────── */

.frames { flex: 1; position: relative; min-height: 0; }
.frames iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg-base);
  visibility: hidden;
}
.frames iframe.active { visibility: visible; }

.empty {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 48px 24px;
}
.empty-inner { max-width: 960px; margin: 0 auto; }
.empty h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 24px 0 12px; font-weight: 600; }
.empty p { color: var(--text-secondary); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}
.tile:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-default); }

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 420px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
  z-index: 200;
}
.toast.error { border-color: rgba(248, 113, 113, .5); color: var(--danger); }

/* ── Forms and buttons ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-subtle); }
.btn-small { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.field small { color: var(--text-muted); font-size: 12px; }
input[type=text], input[type=url], input[type=password], input[type=search], input[type=number], input:not([type]), select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  background: var(--bg-base);
  color: var(--text-primary);
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
input[type=color] {
  width: 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  background: transparent;
  flex: none;
}
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: none; border-radius: 4px; }
input[type=color]::-moz-color-swatch { border: none; border-radius: 4px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.inline-field { display: flex; gap: 8px; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); margin-bottom: 10px; }
.check small { display: block; color: var(--text-muted); font-size: 12px; }

.alert {
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(248, 113, 113, .45);
  border-radius: 6px;
  background: var(--danger-subtle);
  color: var(--danger);
  font-size: 13px;
}

/* ── Login ───────────────────────────────────────────────────────────────── */

.login-page { overflow: auto; }
.login-wrap { margin: auto; width: 100%; max-width: 400px; padding: 32px 16px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.login-brand h1 { margin: 0; font: 600 22px/1 var(--font-mono); letter-spacing: -.01em; }
.login-card {
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
}
.login-card .btn { margin-top: 8px; padding: 10px 14px; }
.login-note { margin: 0 0 16px; color: var(--text-secondary); }

/* ── Editor ──────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal {
  width: 100%;
  max-width: 980px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.modal.small { max-width: 560px; }
.modal:focus { outline: none; }
.modal.picker { height: min(720px, 100%); }
.modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-head h2 { margin: 0; font: 600 16px/1.2 var(--font-mono); flex: 1; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; min-height: 0; }
.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
}
.modal-foot .spacer { flex: 1; }
.modal-foot .status { color: var(--text-muted); font-size: 13px; }
.modal-foot .status.error { color: var(--danger); }

.tabs { display: flex; gap: 4px; }
.tab {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-weight: 500;
}
.tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.tab.active { color: var(--text-primary); background: var(--bg-active); }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.toolbar .hint { color: var(--text-muted); font-size: 12px; margin-left: auto; }

.ed-group {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--bg-base);
}
.ed-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  border-radius: var(--radius) var(--radius) 0 0;
}
.ed-group-head .title { font-weight: 600; flex: 1; display: flex; align-items: center; gap: 8px; }
.ed-group-head .count { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ed-apps { min-height: 44px; padding: 4px; }
.ed-apps-empty { padding: 10px; color: var(--text-disabled); font-size: 13px; text-align: center; }

.ed-app {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
}
.ed-app:hover { background: var(--bg-elevated); }
.ed-app.disabled .ed-name, .ed-app.disabled .icon { opacity: .45; }
.ed-name { font-weight: 500; min-width: 140px; }
.ed-url { color: var(--text-muted); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; gap: 4px; flex: none; }
.badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-hover);
}
.badge.accent { color: var(--accent); background: var(--accent-subtle); }
.handle { color: var(--text-disabled); cursor: grab; display: flex; padding: 2px; }
.handle:hover { color: var(--text-secondary); }
.handle svg { width: 16px; height: 16px; }
.ed-app .icon-btn, .ed-group-head .icon-btn { padding: 5px; }
.ed-app .icon-btn svg, .ed-group-head .icon-btn svg { width: 16px; height: 16px; }

.dragging { opacity: .4; }
.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.drop-into { outline: 2px dashed var(--accent); outline-offset: -2px; }

.icon-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  background: var(--bg-base);
  width: 100%;
  text-align: left;
}
.icon-choice:hover { border-color: var(--border-strong); }
.icon-choice .label { flex: 1; color: var(--text-secondary); }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-base);
  color: var(--text-muted);
  font-size: 11px;
  position: relative;
}
.picker-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-item:hover { border-color: var(--accent); color: var(--text-primary); }
.picker-item.selected { border-color: var(--accent); background: var(--accent-subtle); color: var(--text-primary); }
.picker-item .del {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 2px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--text-muted);
  display: none;
}
.picker-item:hover .del { display: flex; }
.picker-item .del:hover { color: var(--danger); background: var(--danger-subtle); }
.picker-item .del svg { width: 14px; height: 14px; }
.picker-msg { color: var(--text-muted); padding: 24px 0; text-align: center; }

.section-title { font: 600 13px/1 var(--font-body); color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; margin: 8px 0 14px; }
.general { max-width: 460px; }
.general hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 24px 0; }

/* ── Claude accounts ─────────────────────────────────────────────────────── */

.modal.accounts .modal-body { padding: 16px; }
.modal.accounts .modal-foot { padding: 10px 16px; }
.accts-msg { margin: 0; padding: 24px 0; text-align: center; color: var(--text-muted); }
.accts-msg.error { color: var(--danger); }
.accts-banner { margin-bottom: 12px; padding: 10px 12px; border: 1px solid rgba(245, 158, 11, .5); border-radius: var(--radius); background: rgba(245, 158, 11, .1); color: #fbbf24; font-size: 13px; }
.accts-banner small { display: block; margin-top: 4px; color: var(--text-secondary); }
.accts-banner.error { border-color: rgba(248, 113, 113, .5); background: var(--danger-subtle); color: var(--danger); }
.accts-problems { margin: 0 0 12px; padding: 8px 12px 8px 28px; border: 1px solid rgba(245, 158, 11, .35); border-radius: var(--radius); color: #fbbf24; font-size: 12px; }
.acct-list { display: flex; flex-direction: column; gap: 12px; }
.acct { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-elevated); }
.acct.active { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.acct-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.acct-badge, .acct-status { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.acct-badge { background: var(--accent); color: var(--on-accent); text-transform: uppercase; letter-spacing: .04em; }
.acct-status.warning { background: rgba(245, 158, 11, .12); color: #fbbf24; }
.acct-status.error { background: var(--danger-subtle); color: var(--danger); }
.acct-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font: 12px/1.4 var(--font-mono); color: var(--text-muted); }
.acct-chip { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
.acct-chip.open { overflow-wrap: anywhere; text-decoration: none; }
.acct-same { color: #fbbf24; }
.acct-limit-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.acct-limit-label { color: var(--text-secondary); }
.acct-limit-pct { font-variant-numeric: tabular-nums; }
.acct-meter { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--bg-active); overflow: hidden; }
.acct-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.acct-limit.mid .acct-fill { background: #f59e0b; }
.acct-limit.high .acct-fill { background: #ef4444; }
.acct-limit.mid .acct-limit-pct { color: #f59e0b; }
.acct-limit.high .acct-limit-pct { color: #ef4444; }
.acct-reset { margin-top: 4px; font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.acct-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.acct-checked { font-size: 12px; color: var(--text-muted); }
.accts-foot { font-size: 12px; color: var(--text-muted); }
.accts-foot p { margin: 0; }
.accts-foot p + p { margin-top: 2px; }

/* A phone held sideways is too low for a floating dialog. */
@media (max-height: 500px) {
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; height: 100%; }
}

/* Fingers need bigger targets than a mouse. */
@media (pointer: coarse) {
  .acct-chip, .acct-switch, .modal-head .icon-btn { min-height: 44px; min-width: 44px; }
}

@media (max-width: 700px) {
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; height: 100%; }
  .ed-url { display: none; }
  .ed-name { min-width: 0; flex: 1; }
  .row { flex-direction: column; gap: 0; }
  .acct-switch { flex: 1 0 100%; }
}
