/*
 * LF Audio unified admin theme.
 *
 * Loaded once at the shell root — every view module's inline CSS references
 * these vars (--lf-*). Lifted verbatim from the dark/light palette that used
 * to live inside admin-hub/nav.js; splitting it into a real stylesheet means
 * a palette change is one edit instead of a nav.js redeploy propagating to
 * six separate hosting origins.
 *
 * IMPORTANT: <link>'d from index.html BEFORE any view-specific CSS so the
 * vars are defined before first paint (no FOUC).
 */

:root {
  --lf-nav-h: 44px;
  /* Left list-panel width — shared across every two-pane view (CRM,
     RMA, Jobs, OTA Logs) so switching views doesn't shift the eye. */
  --lf-list-w: 340px;
  /* Right sidebar (customer card in CRM) — separate because it only
     exists in CRM today. */
  --lf-sidebar-w: 320px;

  /* Surfaces — app.lf-audio.com dark palette */
  --lf-bg: #1a1a2e;
  --lf-panel: #22223a;
  --lf-panel-alt: #1f1f35;
  --lf-panel-hover: #2a2a45;

  /* Borders — bumped from #2d2d44/#3d3d5e to improve card-boundary
     perception on the dark surface (WCAG 1.4.11). The "strong" variant
     keeps a one-step distinction for callsites that asked for more
     definition (dividers, form-field separators). */
  --lf-border: #3d3d5e;
  --lf-border-strong: #4e4e73;

  /* Text */
  --lf-text: #d1d5db;
  --lf-text-muted: #9ca3af;
  --lf-text-dim: #6b7280;

  /* Accent — synced with app-portal/style.css, help-center/static/style.css
     and the AuralSync mobile app's lib/constants.dart `AppColors.accent`.
     Theme-token changes here MUST flow to all four projects. See repo
     CLAUDE.md "Theme sync". */
  --lf-accent: #00d3f3;
  --lf-accent-hover: #67e8f9;
  --lf-accent-bg: #164e63;
  --lf-accent-bg-hover: #155e75;
  --lf-accent-contrast: #0c1429;

  /* Status */
  --lf-success: #34d399;
  --lf-success-bg: #103828;
  --lf-success-border: rgba(52, 211, 153, 0.25);
  --lf-warn: #f59e0b;
  --lf-warn-bg: #3d2a0a;
  --lf-warn-border: rgba(245, 158, 11, 0.25);
  --lf-error: #f87171;
  --lf-error-bg: #3d1d1d;
  --lf-error-border: rgba(248, 113, 113, 0.25);
  /* Lightened from #6b8cff for better small-label contrast against
     info-bg (4.6:1 → 5.85:1). */
  --lf-info: #8aa2ff;
  --lf-info-bg: #1e2a4a;
  --lf-info-border: rgba(138, 162, 255, 0.25);
  --lf-purple: #caa4ff;
  --lf-purple-bg: #3a1f4d;
  --lf-purple-border: rgba(202, 164, 255, 0.25);

  /* Form elements */
  --lf-input-bg: #1a1a2e;
  --lf-btn-bg: #2d2d44;
  --lf-btn-hover: #383856;

  /* Nav chrome */
  --lf-nav-bg: #151528;
  --lf-nav-border: #2d2d44;
  --lf-nav-link: #9ca3af;
  --lf-nav-link-hover-bg: #22223a;
  --lf-nav-brand: #f3f4f6;

  /* Shadows */
  --lf-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --lf-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);

  /* ── Cross-project alias layer ─────────────────────────────────────────
   * Re-export the `--lf-*` tokens under the `--color-*` names that
   * app-portal/style.css and help-center/static/style.css use, so a single
   * find/replace across all four projects can locate every instance of a
   * given token. New admin views SHOULD prefer the `--color-*` names; old
   * `--lf-*` references are kept for backward compatibility.
   *
   * `var()` resolves at use-time, so light-theme overrides of `--lf-*`
   * automatically flow through these aliases without needing a parallel
   * block under `html[data-theme="light"]`. */
  --color-bg: var(--lf-bg);
  --color-surface: var(--lf-panel);
  --color-surface-alt: var(--lf-panel-alt);
  --color-surface-hover: var(--lf-panel-hover);
  --color-border: var(--lf-border);
  --color-border-strong: var(--lf-border-strong);
  --color-text: var(--lf-text);
  --color-heading: var(--lf-text);
  --color-muted: var(--lf-text-muted);
  --color-text-dim: var(--lf-text-dim);
  --color-accent: var(--lf-accent);
  --color-accent-hover: var(--lf-accent-hover);
  --color-accent-light: var(--lf-accent-bg);
  --color-accent-bg: var(--lf-accent-bg);
  --color-accent-bg-hover: var(--lf-accent-bg-hover);
  --color-accent-contrast: var(--lf-accent-contrast);
  --color-success: var(--lf-success);
  --color-success-bg: var(--lf-success-bg);
  --color-success-border: var(--lf-success-border);
  --color-warning: var(--lf-warn);
  --color-warning-bg: var(--lf-warn-bg);
  --color-warning-border: var(--lf-warn-border);
  --color-danger: var(--lf-error);
  --color-danger-bg: var(--lf-error-bg);
  --color-danger-border: var(--lf-error-border);
  --color-info: var(--lf-info);
  --color-info-bg: var(--lf-info-bg);
  --color-info-border: var(--lf-info-border);
  --color-purple: var(--lf-purple);
  --color-purple-bg: var(--lf-purple-bg);
  --color-purple-border: var(--lf-purple-border);

  /* ── Shape, type, spacing, shadow tokens ──────────────────────────────
   * Cross-project tokens shared with app-portal/style.css and
   * help-center/static/style.css. The web side already used `--radius`,
   * `--radius-sm` (un-namespaced) in those two; admin adopts the same
   * names so a single search-replace works. `--shadow` aliases the
   * pre-existing `--lf-shadow` (kept for back-compat with views that
   * already reference it). New admin views SHOULD prefer the un-prefixed
   * names; old `--lf-*` references continue to work.
   *
   * Both light + dark resolve via the source `--lf-shadow` so the alias
   * doesn't need to be re-declared in `html[data-theme="light"]`. */
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-large: 16px;
  --radius-pill: 999px;

  --shadow: var(--lf-shadow);
  --shadow-lg: var(--lf-shadow-lg);
}

html[data-theme="light"] {
  --lf-bg: #f5f6f8;
  --lf-panel: #ffffff;
  --lf-panel-alt: #f9fafb;
  --lf-panel-hover: #f3f4f6;

  --lf-border: #e5e7eb;
  --lf-border-strong: #d1d5db;

  --lf-text: #111827;
  --lf-text-muted: #4b5563;
  --lf-text-dim: #9ca3af;

  --lf-accent: #0891b2;
  --lf-accent-hover: #0e7490;
  --lf-accent-bg: #cffafe;
  --lf-accent-bg-hover: #a5f3fc;
  /* Near-black — same value as the dark-theme contrast. White was
     3.68:1 against #0891b2, failing AA. This clears 4.91:1. */
  --lf-accent-contrast: #0c1429;

  --lf-success: #16a34a;
  --lf-success-bg: #dcfce7;
  --lf-success-border: #bbf7d0;
  --lf-warn: #d97706;
  --lf-warn-bg: #fef3c7;
  --lf-warn-border: #fde68a;
  --lf-error: #dc2626;
  --lf-error-bg: #fee2e2;
  --lf-error-border: #fecaca;
  --lf-info: #2563eb;
  --lf-info-bg: #eff6ff;
  --lf-info-border: #bfdbfe;
  --lf-purple: #9333ea;
  --lf-purple-bg: #f3e8ff;
  --lf-purple-border: #e9d5ff;

  --lf-input-bg: #ffffff;
  --lf-btn-bg: #f3f4f6;
  --lf-btn-hover: #e5e7eb;

  --lf-nav-bg: #ffffff;
  --lf-nav-border: #e5e7eb;
  --lf-nav-link: #6b7280;
  --lf-nav-link-hover-bg: #f3f4f6;
  --lf-nav-brand: #111827;

  --lf-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --lf-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ── Reset + base ────────────────────────────────────────────────────── */

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--lf-bg);
  color: var(--lf-text);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  font-size: 14px;
}

body {
  padding-top: var(--lf-nav-h);
  min-height: 100dvh;
}

a {
  color: var(--lf-accent);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Global focus ring — synced with app-portal's focus-visible rule. Uses
 * :focus-visible so mouse clicks don't get the outline, only keyboard
 * navigation does. Theme-sync rule: mirrored in app-portal + help-center. */
:focus-visible {
  outline: 2px solid var(--lf-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respect user preference for reduced motion. WCAG 2.3.3. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Global form controls ──────────────────────────────────────────── */
/* Baseline styling for bare text inputs, textareas, and selects so any
 * callsite that doesn't wrap them in `.adm-field` still adopts the
 * theme. Without this, the browser default renders white + black text
 * on the dark surface (drift). `.adm-field` rules above still override
 * with their specific dialog-form styling where applied. */
textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="password"],
select {
  background: var(--lf-input-bg);
  color: var(--lf-text);
  border: 1px solid var(--lf-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--lf-accent);
}
textarea::placeholder,
input::placeholder {
  color: var(--lf-text-dim);
}
textarea:disabled,
input:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Scrollbars ────────────────────────────────────────────────────── */
/* Firefox + webkit-based browsers. Default OS scrollbars render bright
 * white on the dark surface (visible drift); these rules tint them to
 * the panel palette so they blend. Uses transparent track so the
 * underlying surface color shows through — one style works over every
 * panel/dialog without per-container overrides. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--lf-border-strong) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--lf-border-strong);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--lf-text-dim);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ── Shell nav ───────────────────────────────────────────────────────── */

#lf-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--lf-nav-h);
  background: var(--lf-nav-bg);
  border-bottom: 1px solid var(--lf-nav-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 13px;
  color: var(--lf-text);
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

#lf-nav .lf-nav-brand {
  font-weight: 700;
  color: var(--lf-nav-brand);
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid var(--lf-nav-border);
  letter-spacing: 0.3px;
}
#lf-nav .lf-nav-brand:hover { color: var(--lf-accent); }

#lf-nav .lf-nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

#lf-nav .lf-nav-link {
  color: var(--lf-nav-link);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
}
#lf-nav .lf-nav-link:hover { background: var(--lf-nav-link-hover-bg); color: var(--lf-text); }
#lf-nav .lf-nav-link.active { background: var(--lf-accent-bg); color: var(--lf-accent); }
#lf-nav .lf-nav-link.denied { opacity: 0.35; pointer-events: none; }

#lf-nav .lf-nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--lf-text-muted);
  font-size: 12px;
  border-left: 1px solid var(--lf-nav-border);
  margin-left: 8px;
  height: 100%;
}
#lf-nav .lf-nav-user .lf-nav-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lf-nav .lf-nav-user .lf-nav-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--lf-panel);
  color: var(--lf-text-muted);
}
#lf-nav .lf-nav-user .lf-nav-role.admin { background: var(--lf-accent-bg); color: var(--lf-accent); }

#lf-nav .lf-nav-signout {
  background: transparent;
  border: 1px solid var(--lf-nav-border);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--lf-nav-link);
  font-size: 12px;
}
#lf-nav .lf-nav-signout:hover { background: var(--lf-nav-link-hover-bg); color: var(--lf-text); }

#lf-nav .lf-nav-chat-status {
  background: transparent;
  border: 1px solid var(--lf-nav-border);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--lf-nav-link);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
#lf-nav .lf-nav-chat-status:hover { background: var(--lf-nav-link-hover-bg); color: var(--lf-text); }
#lf-nav .lf-nav-chat-status:focus { outline: none; border-color: var(--lf-accent, #7C4396); }
#lf-nav .lf-nav-chat-status option { background: var(--lf-bg); color: var(--lf-text); }

#lf-theme-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--lf-nav-border);
  border-radius: 8px;
  color: var(--lf-nav-link);
  margin-left: 8px;
  padding: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
#lf-theme-toggle:hover {
  background: var(--lf-nav-link-hover-bg);
  color: var(--lf-text);
  border-color: var(--lf-border-strong);
}
#lf-theme-toggle svg { width: 16px; height: 16px; }

@media (max-width: 760px) {
  #lf-nav .lf-nav-user { display: none; }
}
@media (max-width: 640px) {
  #lf-nav { padding: 0 10px; }
  #lf-nav .lf-nav-brand { padding-right: 10px; margin-right: 10px; font-size: 12px; letter-spacing: 0; }
  #lf-nav .lf-nav-links { gap: 2px; overflow-x: auto; flex-wrap: nowrap; }
  #lf-nav .lf-nav-link { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
  #lf-theme-toggle { width: 28px; height: 28px; }
  #lf-theme-toggle svg { width: 14px; height: 14px; }
}
@media (max-width: 400px) {
  #lf-nav .lf-nav-brand { display: none; }
}

/* ── View container + shell states ───────────────────────────────────── */

#lf-view {
  min-height: calc(100dvh - var(--lf-nav-h));
}

.lf-shell-loading,
.lf-shell-auth,
.lf-shell-denied {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--lf-nav-h));
  padding: 40px 20px;
}
.lf-shell-card {
  background: var(--lf-panel);
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--lf-shadow-lg);
}
.lf-shell-card h1 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
}
.lf-shell-card p {
  margin: 0 0 20px 0;
  color: var(--lf-text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.lf-shell-card button.lf-primary {
  background: var(--lf-accent);
  color: var(--lf-accent-contrast);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
}
.lf-shell-card button.lf-primary:hover { background: var(--lf-accent-hover); }
.lf-shell-card .lf-error {
  color: var(--lf-error);
  font-size: 12px;
  margin-top: 12px;
}

.lf-flash {
  position: fixed;
  top: calc(var(--lf-nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--lf-panel);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--lf-text);
  box-shadow: var(--lf-shadow-lg);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.lf-flash.show { opacity: 1; }
.lf-flash.error { border-color: var(--lf-error-border); color: var(--lf-error); }

/* ── Universal card container ─────────────────────────────────────── */
/* Shared visual grouping primitive. Any view can use these classes to
 * keep sections visually consistent with the Dashboard + Admin Users
 * tabs. Structure:
 *   <div class="lf-card">
 *     <div class="lf-card-head">Title <span class="lf-card-meta">...</span></div>
 *     <div class="lf-card-body">...</div>
 *   </div>
 */
.lf-card {
  background: var(--lf-panel);
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--lf-shadow);
}
.lf-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lf-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lf-text-muted);
  margin: 0;
}
.lf-card-meta {
  font-size: 11px;
  color: var(--lf-text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.lf-card-body {
  font-size: 13px;
  color: var(--lf-text);
  line-height: 1.5;
}
.lf-card-body > *:last-child { margin-bottom: 0; }

/* Compact variant for dense sections. */
.lf-card.lf-card-compact {
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* Emphasize variant for the top-of-page identity/header card. */
.lf-card.lf-card-header {
  background: var(--lf-panel);
}

/* ── Shared button system ────────────────────────────────────────── */

.btn {
  background: var(--lf-btn-bg);
  color: var(--lf-text);
  border: 1px solid var(--lf-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.btn:hover { background: var(--lf-btn-hover); border-color: var(--lf-border-strong); }
.btn:disabled { cursor: wait; opacity: 0.75; }
.btn.busy { pointer-events: none; }
.btn-small { padding: 5px 11px; font-size: 12px; }
.btn-ghost {
  background: transparent;
  border-color: var(--lf-border);
}
.btn-ghost:hover { background: var(--lf-panel-hover); }
.btn-primary {
  background: var(--lf-accent);
  color: var(--lf-accent-contrast);
  border-color: var(--lf-accent);
}
.btn-primary:hover {
  background: var(--lf-accent-hover);
  border-color: var(--lf-accent-hover);
}
.btn-danger {
  color: var(--lf-error);
  border-color: var(--lf-error-border);
}
.btn-danger:hover { background: var(--lf-error-bg); }

/* ── Utility classes ─────────────────────────────────────────────── */

.muted { color: var(--lf-text-muted); }
.small { font-size: 12px; }
.error { color: var(--lf-error); margin-top: 12px; font-size: 13px; }

/* ── Universal inline spinner for async buttons ───────────────────── */

.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lf-spin 0.7s linear infinite;
  vertical-align: -1px;
}
@keyframes lf-spin { to { transform: rotate(360deg); } }

/* When a button is swapped into its busy state: */
button.busy {
  pointer-events: none;
  cursor: wait;
  opacity: 0.85;
}
button:disabled {
  cursor: not-allowed;
}

/* ── Shell-wide dialog primitive ───────────────────────────────── */
/* Used by any view that needs a modal — RMA Create wizard, RMA
 * outbound-order picker, Admin Users add/edit, etc. Lives in theme.css
 * (not a view CSS) so dialogs open correctly regardless of which view
 * is currently mounted. */

.adm-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}
.adm-dialog {
  background: var(--lf-panel);
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--lf-shadow-lg);
}
.adm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--lf-border);
}
.adm-dialog-head h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--lf-text);
}
.adm-dialog-close {
  background: transparent;
  border: none;
  color: var(--lf-text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
}
.adm-dialog-close:hover { color: var(--lf-text); }
.adm-dialog-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.adm-dialog-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--lf-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Fields inside dialogs — shared form-field primitive. */
.adm-field {
  display: block;
  margin-bottom: 16px;
}
.adm-field > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lf-text-muted);
  margin-bottom: 6px;
}
.adm-field input[type="email"],
.adm-field input[type="text"],
.adm-field input[type="url"],
.adm-field textarea,
.adm-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--lf-border);
  background: var(--lf-input-bg);
  color: var(--lf-text);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.adm-field textarea {
  min-height: 68px;
  resize: vertical;
}
.adm-field input:focus,
.adm-field textarea:focus,
.adm-field select:focus {
  outline: none;
  border-color: var(--lf-accent);
}
.adm-field input:disabled {
  opacity: 0.6;
}

/* Dialog buttons — small convenience primitive. */
.adm-btn {
  background: var(--lf-btn-bg);
  border: 1px solid var(--lf-border);
  color: var(--lf-text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.adm-btn:hover { background: var(--lf-btn-hover); }
.adm-btn-primary {
  background: var(--lf-accent);
  border-color: var(--lf-accent);
  color: var(--lf-accent-contrast);
}
.adm-btn-primary:hover {
  background: var(--lf-accent-hover);
  border-color: var(--lf-accent-hover);
}
.adm-btn-danger {
  color: var(--lf-error);
  border-color: var(--lf-error-border);
}
.adm-btn-danger:hover {
  background: var(--lf-error-bg);
}

/* Generic error banner used in dialogs + view bodies. */
.adm-error {
  color: var(--lf-error);
  background: var(--lf-error-bg);
  border: 1px solid var(--lf-error-border);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
}
