/*
 * Titan Lock — panel theme (WS5 S0, frozen). Loaded on every panel AFTER
 * tokens.css (a copy of branding/tokens.css, brand palette v0.2) and BEFORE
 * the module stylesheets. Plain CSS — there is no Tailwind/Vite build [D], so
 * custom Blade uses Filament Blade components plus the .tl-* classes defined
 * in these files; arbitrary Tailwind utilities are not compiled.
 *
 * Rules:
 *   - light only (darkMode(false) on every panel; tokens have no dark variants);
 *   - a ladder state is never shown by colour alone (icon + label + colour);
 *   - gold (--tl-gold-*) is ONLY the key economy, never a status;
 *   - each module styles only its own .tl-* classes in its own file, panel
 *     rules scoped under .fi-panel-{admin|portal|counter}.
 */

/* ── Type: Inter (self-hosted by Filament's local font provider), then system ── */
.fi-body {
  font-family: var(--font-family), "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Sidebar: the dark-teal (ink) surface of the brand ── */
.fi-sidebar {
  background-color: var(--tl-ink-900) !important;
}
.fi-sidebar .fi-sidebar-header,
.fi-sidebar .fi-sidebar-header-ctn {
  background-color: var(--tl-ink-900) !important;
  border-color: var(--tl-ink-800) !important;
}
.fi-sidebar .fi-logo,
.fi-sidebar .fi-sidebar-header a {
  color: #FFFFFF !important;
}
.fi-sidebar .fi-sidebar-group-label,
.fi-sidebar .fi-sidebar-group-btn {
  color: #9FC7BF !important;
}
.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item-icon {
  color: #E6F2EF !important;
}
.fi-sidebar .fi-sidebar-item-btn:hover {
  background-color: var(--tl-ink-800) !important;
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn {
  background-color: var(--tl-ink-700) !important;
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
  color: var(--tl-orange-400) !important;
}
.fi-sidebar .fi-sidebar-footer {
  border-color: var(--tl-ink-800) !important;
}

/* ── Focus: always visible (keyboard users, shop counters with a keypad) ── */
.fi-body a:focus-visible,
.fi-body button:focus-visible,
.fi-body [role="button"]:focus-visible,
.fi-body input:focus-visible,
.fi-body select:focus-visible,
.fi-body textarea:focus-visible {
  outline: 2px solid var(--tl-orange-600);
  outline-offset: 2px;
}
.fi-sidebar a:focus-visible,
.fi-sidebar button:focus-visible {
  outline-color: var(--tl-orange-400);
}

/* ── Brand logo (resources/views/filament/brand/logo.blade.php) ── */
.tl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 100%;
  font-family: var(--tl-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--tl-ink-900);
  white-space: nowrap;
}
.tl-brand__mark {
  height: 100%;
  width: auto;
  flex: none;
}
.tl-brand__mark--on-dark {
  display: none;
}
.fi-sidebar .tl-brand {
  color: #FFFFFF;
}
.fi-sidebar .tl-brand__mark--on-light {
  display: none;
}
.fi-sidebar .tl-brand__mark--on-dark {
  display: inline-block;
}

/* ── Negative disclosure line (<x-titan.disclosure>) ── */
.tl-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--tl-radius-sm);
  background: var(--tl-steel-50);
  color: var(--tl-steel-600);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.tl-disclosure__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 0.1rem;
  color: var(--tl-steel-500);
}

/* ── "What we never do" (<x-titan.never-do>) ── */
.tl-never-do {
  padding: 0.875rem 1rem;
  border-radius: var(--tl-radius-md);
  border: 1px solid var(--tl-steel-200);
  background: #FFFFFF;
}
.tl-never-do__title {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tl-ink-900);
}
.tl-never-do__intro {
  margin: 0 0 0.375rem;
  color: var(--tl-steel-600);
  font-size: 0.875rem;
}
.tl-never-do__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.375rem;
}
.tl-never-do__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--tl-ink-800);
}
.tl-never-do__icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  color: var(--tl-lock-solid);
}

/* ── Stage chips for custom Blade (Filament badges use StageBadge colours instead).
 *    Always icon + label inside: <span class="tl-chip tl-chip--lock">@svg('heroicon-o-lock-closed') Locked</span> ── */
.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem 0.25rem 0.5rem;
  border-radius: var(--tl-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.tl-chip svg {
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
}
.tl-chip--normal { background: var(--tl-normal-bg); color: var(--tl-normal-fg); }
.tl-chip--remind { background: var(--tl-remind-bg); color: var(--tl-remind-fg); }
.tl-chip--warn { background: var(--tl-warn-bg); color: var(--tl-warn-fg); }
.tl-chip--restrict { background: var(--tl-restrict-bg); color: var(--tl-restrict-fg); }
.tl-chip--lock { background: var(--tl-lock-bg); color: var(--tl-lock-fg); }
.tl-chip--success { background: var(--tl-green-50); color: var(--tl-green-800); }
.tl-chip--neutral,
.tl-chip--gray { background: var(--tl-steel-100); color: var(--tl-steel-600); }
.tl-chip--key { background: var(--tl-gold-50); color: var(--tl-gold-700); box-shadow: inset 0 0 0 1px var(--tl-gold-400); }

/* ── Small shared atoms ── */
.tl-mono {
  font-family: var(--tl-font-code);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.tl-muted {
  color: var(--tl-steel-500);
}
.tl-key-balance {
  color: var(--tl-gold-700);
  font-weight: 700;
}
/* Emergency 999: its own red, same look everywhere, never reused. */
.tl-sos {
  background: var(--tl-sos);
  color: #FFFFFF;
}
.tl-pending {
  color: var(--tl-steel-500);
  font-style: italic;
}
