/* =============================================================================
   LeoCore DMS :: TAILORED CSS LAYER
   -----------------------------------------------------------------------------
   Tailwind (loaded from the CDN in index.html) handles layout and spacing.
   This file supplies what a utility framework cannot:

     * the design-token palette shared by both form factors
     * native system font stacks (San Francisco on iOS, Roboto on Android)
     * high-density widescreen table alignment modifiers
     * mobile capture ergonomics (safe-area insets, tap targets, no zoom-on-tap)
     * motion, focus and print behaviour

   Everything here is additive - remove this file and the app still functions,
   it simply loses its density and polish.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Structural surfaces - deep slate, tuned for long auditing sessions. */
  --lc-bg: #0b1120;
  --lc-surface: #111a2e;
  --lc-surface-raised: #16203a;
  --lc-surface-hover: #1b2745;
  --lc-border: #243154;
  --lc-border-strong: #33436d;

  /* Typography */
  --lc-text: #e8edf7;
  --lc-text-muted: #93a1c0;
  --lc-text-dim: #64729180;

  /* Brand + semantics */
  --lc-accent: #3b82f6;
  --lc-accent-soft: #1d4ed8;
  --lc-accent-glow: rgba(59, 130, 246, 0.35);
  --lc-success: #10b981;
  --lc-warning: #f59e0b;
  --lc-danger: #ef4444;
  --lc-sealed: #8b5cf6;

  /* Geometry */
  --lc-radius: 10px;
  --lc-radius-sm: 6px;
  --lc-radius-lg: 16px;

  /* Density scale used by the auditor grid. */
  --lc-row-height: 38px;
  --lc-grid-font: 12.5px;

  /* Native font stacks: San Francisco on Apple, Roboto on Android, Segoe on
     Windows. Never ships a webfont, so first paint is instant on 3G. */
  --lc-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "Noto Sans", Ubuntu, Cantarell, "Open Sans", sans-serif;
  --lc-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Roboto Mono", monospace;
}

/* -----------------------------------------------------------------------------
   2. BASE RESET AND SHELL
   -------------------------------------------------------------------------- */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  /* Stops iOS Safari from inflating text in landscape orientation. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--lc-bg);
  color: var(--lc-text);
  font-family: var(--lc-font-ui);
  font-feature-settings: "tnum" 1, "cv05" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* The capture deck is a fixed app shell; the panes scroll internally. */
  overscroll-behavior-y: none;
}

/* Ambient depth so the dark shell does not read as flat black. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(59, 130, 246, 0.10), transparent 62%),
    radial-gradient(900px 520px at 96% 4%, rgba(139, 92, 246, 0.08), transparent 58%);
}

#app-root {
  position: relative;
  z-index: 1;
}

/* -----------------------------------------------------------------------------
   3. SCROLLBARS - thin and unobtrusive inside dense panes
   -------------------------------------------------------------------------- */
.lc-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--lc-border-strong) transparent;
}

.lc-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.lc-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.lc-scroll::-webkit-scrollbar-thumb {
  background-color: var(--lc-border-strong);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.lc-scroll::-webkit-scrollbar-thumb:hover {
  background-color: #47598c;
  background-clip: content-box;
}

/* -----------------------------------------------------------------------------
   4. SURFACES
   -------------------------------------------------------------------------- */
.lc-panel {
  background: var(--lc-surface);
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-lg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 18px 40px -24px rgba(0, 0, 0, 0.85);
}

.lc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lc-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
  border-radius: var(--lc-radius-lg) var(--lc-radius-lg) 0 0;
}

.lc-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--lc-text-muted);
}

/* Numeric stat tiles across the dashboard header. */
.lc-stat {
  background: var(--lc-surface-raised);
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius);
  padding: 10px 12px;
}

.lc-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lc-text-muted);
}

.lc-stat-value {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* -----------------------------------------------------------------------------
   5. HIGH-DENSITY AUDITOR GRID
   -------------------------------------------------------------------------- */
.lc-grid-wrap {
  overflow: auto;
  border-radius: 0 0 var(--lc-radius-lg) var(--lc-radius-lg);
}

table.lc-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--lc-grid-font);
  line-height: 1.35;
}

table.lc-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #0e1728;
  color: var(--lc-text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  text-align: left;
  padding: 9px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--lc-border-strong);
  user-select: none;
}

table.lc-grid thead th.sortable {
  cursor: pointer;
}

table.lc-grid thead th.sortable:hover {
  color: var(--lc-text);
  background: #131e35;
}

table.lc-grid thead th .sort-caret {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.55;
  font-size: 9px;
}

table.lc-grid tbody td {
  padding: 0 12px;
  height: var(--lc-row-height);
  border-bottom: 1px solid rgba(36, 49, 84, 0.55);
  white-space: nowrap;
  vertical-align: middle;
}

table.lc-grid tbody tr {
  transition: background-color 90ms linear;
}

table.lc-grid tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.014);
}

table.lc-grid tbody tr:hover {
  background: var(--lc-surface-hover);
}

table.lc-grid tbody tr.is-selected {
  background: rgba(59, 130, 246, 0.16);
  box-shadow: inset 3px 0 0 var(--lc-accent);
}

/* Right-align every monetary and byte column; tabular figures keep the decimal
   points in a straight vertical line across hundreds of rows. */
.lc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--lc-font-mono);
  font-size: 12px;
}

.lc-mono {
  font-family: var(--lc-font-mono);
  font-size: 11.5px;
  color: var(--lc-text-muted);
}

/* Folder path cell: truncates from the left so the filename stays visible. */
.lc-path {
  font-family: var(--lc-font-mono);
  font-size: 11px;
  color: var(--lc-text-muted);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

.lc-path > span {
  direction: ltr;
  unicode-bidi: bidi-override;
}

.lc-truncate {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   6. BADGES, PILLS AND FILTER TOGGLES
   -------------------------------------------------------------------------- */
.lc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.lc-badge-sealed {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.35);
}

.lc-badge-ok {
  background: rgba(16, 185, 129, 0.13);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.32);
}

.lc-badge-warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

.lc-badge-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.lc-badge-neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--lc-text-muted);
  border-color: rgba(148, 163, 184, 0.24);
}

/* Category dot used in the grid and the facet toggles. */
.lc-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.lc-cat-goods-purchase { background: #38bdf8; }
.lc-cat-expense-bill { background: #f472b6; }
.lc-cat-vehicle-expense { background: #fbbf24; }
.lc-cat-payment-receipt { background: #34d399; }
.lc-cat-legal-document { background: #a78bfa; }

/* Query filter toggle chips above the grid. */
.lc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--lc-border);
  background: var(--lc-surface-raised);
  color: var(--lc-text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 110ms ease;
  white-space: nowrap;
}

.lc-chip:hover {
  border-color: var(--lc-border-strong);
  color: var(--lc-text);
  background: var(--lc-surface-hover);
}

.lc-chip[aria-pressed="true"] {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.55);
  color: #bfdbfe;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.16);
}

.lc-chip-count {
  font-family: var(--lc-font-mono);
  font-size: 10px;
  opacity: 0.75;
}

/* -----------------------------------------------------------------------------
   7. FORM CONTROLS
   -------------------------------------------------------------------------- */
.lc-input,
.lc-select,
.lc-textarea {
  width: 100%;
  background: #0d1524;
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-radius-sm);
  color: var(--lc-text);
  /* 16px minimum stops iOS Safari zooming the viewport on focus. */
  font-size: 16px;
  font-family: inherit;
  padding: 9px 11px;
  transition: border-color 110ms ease, box-shadow 110ms ease;
  appearance: none;
}

@media (min-width: 1024px) {
  /* Desktop has no zoom-on-focus behaviour, so density wins. */
  .lc-input,
  .lc-select,
  .lc-textarea {
    font-size: 13px;
    padding: 7px 10px;
  }
}

.lc-input::placeholder,
.lc-textarea::placeholder {
  color: #55617f;
}

.lc-input:focus,
.lc-select:focus,
.lc-textarea:focus {
  outline: none;
  border-color: var(--lc-accent);
  box-shadow: 0 0 0 3px var(--lc-accent-glow);
}

.lc-input:disabled,
.lc-select:disabled,
.lc-textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lc-select {
  background-image: linear-gradient(45deg, transparent 50%, #7c8aab 50%),
    linear-gradient(135deg, #7c8aab 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.lc-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lc-text-muted);
  margin-bottom: 5px;
}

/* A field the operator has been told to double-check. */
.lc-field-flagged .lc-input,
.lc-field-flagged .lc-select,
.lc-field-flagged .lc-textarea {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.06);
}

.lc-field-flagged .lc-label {
  color: #fcd34d;
}

/* -----------------------------------------------------------------------------
   8. BUTTONS
   -------------------------------------------------------------------------- */
.lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--lc-radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 15px;
  cursor: pointer;
  transition: transform 90ms ease, background-color 110ms ease, border-color 110ms ease;
  /* Apple's 44px minimum touch target on the capture deck. */
  min-height: 40px;
  user-select: none;
}

.lc-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.lc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--lc-accent-glow);
}

.lc-btn-primary {
  background: var(--lc-accent);
  color: #ffffff;
}

.lc-btn-primary:hover:not(:disabled) {
  background: #2f74e8;
}

.lc-btn-seal {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
}

.lc-btn-seal:hover:not(:disabled) {
  filter: brightness(1.08);
}

.lc-btn-ghost {
  background: var(--lc-surface-raised);
  border-color: var(--lc-border);
  color: var(--lc-text-muted);
}

.lc-btn-ghost:hover:not(:disabled) {
  background: var(--lc-surface-hover);
  color: var(--lc-text);
  border-color: var(--lc-border-strong);
}

.lc-btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.lc-btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22);
}

.lc-btn-icon {
  min-height: 28px;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: var(--lc-radius-sm);
}

/* -----------------------------------------------------------------------------
   9. MOBILE CAPTURE DECK
   -------------------------------------------------------------------------- */

/* The oversized camera trigger. The <input type="file" capture="environment">
   sits invisibly on top of it so a single tap opens the native camera app. */
.lc-capture-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 208px;
  padding: 24px;
  border-radius: var(--lc-radius-lg);
  border: 2px dashed var(--lc-border-strong);
  background:
    linear-gradient(160deg, rgba(59, 130, 246, 0.09), rgba(139, 92, 246, 0.05)),
    var(--lc-surface-raised);
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
  overflow: hidden;
}

.lc-capture-tile:hover,
.lc-capture-tile:focus-within {
  border-color: var(--lc-accent);
  background:
    linear-gradient(160deg, rgba(59, 130, 246, 0.16), rgba(139, 92, 246, 0.08)),
    var(--lc-surface-hover);
}

.lc-capture-tile input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.lc-capture-ring {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.07);
}

/* Optimised preview thumbnail beside the review form. */
.lc-thumb {
  width: 100%;
  border-radius: var(--lc-radius);
  border: 1px solid var(--lc-border);
  background: #060a13;
  object-fit: contain;
  display: block;
}

/* Compression telemetry bar shown after the canvas pass. */
.lc-compress-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.lc-compress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lc-success), #22d3ee);
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* -----------------------------------------------------------------------------
   10. FORM-FACTOR SWITCHING
   -------------------------------------------------------------------------- */

/* Advanced auditing tools are hidden entirely below the desktop breakpoint so
   the field worker gets a streamlined single-purpose application deck. */
.lc-desktop-only {
  display: none;
}

@media (min-width: 1024px) {
  .lc-desktop-only {
    display: revert;
  }

  .lc-mobile-only {
    display: none !important;
  }
}

/* Widescreen split-pane workstation: fixed verification deck on the left, the
   elastic auditor browser on the right. */
@media (min-width: 1024px) {
  .lc-workstation {
    display: grid;
    grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
    gap: 16px;
    height: calc(100dvh - 118px);
    align-items: stretch;
  }

  .lc-workstation > * {
    min-height: 0;
    min-width: 0;
  }
}

@media (min-width: 1800px) {
  .lc-workstation {
    grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
  }

  :root {
    --lc-grid-font: 13px;
    --lc-row-height: 40px;
  }
}

/* Mobile: safe-area padding for notches and the iOS home indicator. */
@media (max-width: 1023px) {
  .lc-safe-top {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .lc-safe-bottom {
    padding-bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  }
}

/* -----------------------------------------------------------------------------
   11. TOASTS, MODAL AND OVERLAYS
   -------------------------------------------------------------------------- */
.lc-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--lc-radius);
  border: 1px solid var(--lc-border-strong);
  background: var(--lc-surface-raised);
  box-shadow: 0 18px 45px -22px rgba(0, 0, 0, 0.9);
  font-size: 13px;
  animation: lc-toast-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 420px;
}

.lc-toast-success { border-left: 3px solid var(--lc-success); }
.lc-toast-error { border-left: 3px solid var(--lc-danger); }
.lc-toast-warn { border-left: 3px solid var(--lc-warning); }
.lc-toast-info { border-left: 3px solid var(--lc-accent); }

@keyframes lc-toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(4px);
  animation: lc-fade-in 140ms ease;
}

@keyframes lc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -----------------------------------------------------------------------------
   12. LOADING STATES
   -------------------------------------------------------------------------- */
.lc-spinner {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  animation: lc-spin 640ms linear infinite;
  flex: 0 0 auto;
}

@keyframes lc-spin {
  to { transform: rotate(360deg); }
}

.lc-skeleton {
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.07) 25%,
    rgba(148, 163, 184, 0.15) 37%,
    rgba(148, 163, 184, 0.07) 63%
  );
  background-size: 400% 100%;
  animation: lc-shimmer 1.3s ease-in-out infinite;
  border-radius: var(--lc-radius-sm);
}

@keyframes lc-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Indeterminate progress rail on the upload pipeline. */
.lc-progress {
  height: 3px;
  width: 100%;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
}

.lc-progress-bar {
  height: 100%;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--lc-accent), transparent);
  animation: lc-indeterminate 1.15s ease-in-out infinite;
}

@keyframes lc-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

/* Pipeline step list shown while a capture is processing. */
.lc-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--lc-text-dim);
  padding: 3px 0;
}

.lc-step[data-state="active"] { color: var(--lc-text); }
.lc-step[data-state="done"] { color: #6ee7b7; }
.lc-step[data-state="failed"] { color: #fca5a5; }

.lc-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}

.lc-step[data-state="active"] .lc-step-dot {
  animation: lc-pulse 900ms ease-in-out infinite;
}

@keyframes lc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

/* -----------------------------------------------------------------------------
   13. CONFIDENCE WARNING BANNER
   -------------------------------------------------------------------------- */
.lc-confidence-warning {
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.13), rgba(245, 158, 11, 0.05));
  border-radius: var(--lc-radius);
  padding: 11px 13px;
  font-size: 12.5px;
  color: #fde68a;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: lc-attention 1.6s ease-in-out 2;
}

@keyframes lc-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16); }
}

/* -----------------------------------------------------------------------------
   14. NAVIGATION TABS
   -------------------------------------------------------------------------- */
.lc-tab {
  position: relative;
  padding: 9px 14px;
  border-radius: var(--lc-radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lc-text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
  transition: color 110ms ease, background-color 110ms ease;
}

.lc-tab:hover {
  color: var(--lc-text);
  background: var(--lc-surface-hover);
}

.lc-tab[aria-selected="true"] {
  color: var(--lc-text);
  background: var(--lc-surface-raised);
  border-color: var(--lc-border-strong);
}

.lc-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--lc-accent);
}

/* Bottom navigation bar on the mobile deck. */
.lc-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  background: rgba(11, 17, 32, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--lc-border);
  padding-bottom: env(safe-area-inset-bottom);
}

.lc-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--lc-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  min-height: 54px;
}

.lc-tabbar button[aria-selected="true"] {
  color: var(--lc-accent);
}

/* -----------------------------------------------------------------------------
   15. UTILITIES
   -------------------------------------------------------------------------- */
.lc-divider {
  height: 1px;
  background: var(--lc-border);
  border: none;
  margin: 0;
}

.lc-hairline-top {
  border-top: 1px solid var(--lc-border);
}

.lc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 44px 20px;
  color: var(--lc-text-dim);
  font-size: 13px;
  text-align: center;
}

/* -----------------------------------------------------------------------------
   16. ACCESSIBILITY AND PRINT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  body::before,
  .lc-tabbar,
  .lc-btn,
  .lc-chip,
  header {
    display: none !important;
  }

  .lc-panel {
    border: 1px solid #cccccc;
    box-shadow: none;
    break-inside: avoid;
  }

  table.lc-grid thead th {
    background: #eeeeee;
    color: #000000;
  }

  table.lc-grid tbody td {
    border-bottom: 1px solid #dddddd;
  }
}
