/* Self-hosted Inter Variable fonts (RGPD-compliant: zero external font pings) */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Canonical design tokens & brt-* component styles (Baudea Registro Tempo) */
:root {
  --font-sans: "Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-surface-subtle: #f8f9fb;
  --color-border: #dce1e8;
  --color-border-strong: #94a3b8;
  --color-text: #0f172a;
  --color-muted: #4b5563;

  --color-entry: #15803d;
  --color-entry-hover: #166534;
  --color-pause: #b45309;
  --color-pause-hover: #92400e;
  --color-resume: #1d4ed8;
  --color-resume-hover: #1e40af;
  --color-exit: #b91c1c;
  --color-exit-hover: #991b1b;
  --color-primary: #111827;
  --color-primary-hover: #1f2937;
  --color-focus: #1d4ed8;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px -4px rgba(15, 23, 42, 0.04);
  --shadow-hero: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 28px -10px rgba(15, 23, 42, 0.07);
}

html {
  font-family: var(--font-sans);
  scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

body.brt-shell {
  font-family: var(--font-sans);
  font-size-adjust: from-font;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
  min-block-size: 100dvh;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}

.brt-main {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .brt-main {
    padding-bottom: var(--space-8);
  }
}

h1, h2, h3 {
  letter-spacing: -0.02em;
  text-wrap: balance;
}

[hidden] {
  display: none !important;
}

p, li {
  text-wrap: pretty;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.brt-skip-link:focus {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

:where(a:any-link, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.brt-tabular {
  font-variant-numeric: tabular-nums;
}

.brt-clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* Architectural Topbar */
.brt-topbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brt-topbar--dark {
  background: #0c1322;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.brt-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 36px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.brt-nav-link:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
  border-color: var(--color-border);
}

.brt-nav-link[aria-current="page"] {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
}

.brt-nav-link--dark {
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.brt-nav-link--dark:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Cards & Metric Grids */
.brt-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

.brt-kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
}

.brt-hero-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-hero);
}

@media (min-width: 640px) {
  .brt-hero-card {
    padding: var(--space-6);
  }
}

.brt-hero-card--working {
  border-color: #bbf7d0;
}

.brt-hero-card--paused {
  border-color: #fde68a;
}

/* Clean 3-column summary bar without rainbow stripes */
.brt-metric-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.brt-metric-cell {
  padding: var(--space-3);
  min-width: 0;
}

.brt-metric-cell:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

/* Form Controls */
.brt-input,
.brt-select,
.brt-textarea {
  font: inherit;
  font-size: max(1rem, 0.9375rem);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid #94a3b8;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  box-sizing: border-box;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.brt-select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.brt-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.brt-select-wrap__icon {
  position: absolute;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.brt-select--with-icon {
  padding-left: 2.5rem;
}

.brt-remember-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.brt-remember-pill:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.brt-remember-pill input[type="checkbox"] {
  accent-color: #111827;
}

.brt-remember-pill:has(input:checked) {
  background: #f1f3f6;
  border-color: #111827;
  color: #111827;
  font-weight: 600;
}

.brt-remember-pill:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.brt-remember-pill:has(input:focus-visible) {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.brt-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.brt-icon-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.brt-icon-pick-btn:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.brt-icon-pick-btn[aria-pressed="true"] {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.brt-input:focus,
.brt-select:focus,
.brt-textarea:focus {
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

.brt-input:user-invalid,
.brt-select:user-invalid,
.brt-textarea:user-invalid {
  border-color: var(--color-exit);
}

.brt-pin-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.brt-pin-wrap .brt-input {
  padding-right: 5.25rem;
}

.brt-pin-toggle {
  position: absolute;
  right: var(--space-1);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 36px;
  padding: 0 var(--space-2);
  border-radius: calc(var(--radius-md) - 2px);
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.brt-pin-toggle:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

/* Segmented Project Selector */
.brt-seg-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  padding: var(--space-1);
  background: #edf0f4;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.brt-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2);
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.brt-seg-btn:hover:not([aria-checked="true"]) {
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-text);
}

.brt-seg-btn[aria-checked="true"] {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  border-color: var(--color-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.brt-seg-btn--card {
  justify-content: flex-start;
  padding: 6px 8px;
  min-height: 50px;
}

.brt-proj-icon-box {
  width: 34px;
  height: 34px;
  border-radius: calc(var(--radius-lg) - 6px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brt-seg-btn[aria-checked="true"] .brt-proj-icon-box {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* Accessible tablist & mobile thumb-zone bottom bar */
.brt-tablist {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-1) var(--space-2) 0;
  box-shadow: var(--shadow-xs);
}

.brt-tab {
  position: relative;
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}

.brt-tab:hover {
  color: var(--color-text);
}

.brt-tab[aria-selected="true"] {
  color: var(--color-text);
  font-weight: 600;
}

.brt-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  border-block-end: 2px solid var(--color-primary);
}

.brt-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: #edf0f4;
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.brt-tab[aria-selected="true"] .brt-tab-badge {
  background: var(--color-primary);
  color: #ffffff;
}

@media (max-width: 767px) {
  .brt-tablist--mobile-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    border-bottom: 0;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    padding: var(--space-1) max(var(--space-2), env(safe-area-inset-right, 0px)) max(var(--space-2), env(safe-area-inset-bottom, 0px)) max(var(--space-2), env(safe-area-inset-left, 0px));
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  }

  .brt-tablist--mobile-bottom .brt-tab {
    flex: 1 1 0;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-1);
    font-size: 0.75rem;
    min-height: 52px;
  }

  .brt-tablist--mobile-bottom .brt-tab[aria-selected="true"]::after {
    inset: 0 14px auto;
    border-block-end: 0;
    border-block-start: 2px solid var(--color-primary);
  }
}

/* Buttons & Primary Punch CTAs */
.brt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

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

.brt-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.brt-btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.brt-btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.brt-btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.brt-btn-secondary:hover:not(:disabled) {
  background: var(--color-surface-subtle);
  border-color: #64748b;
}

.brt-btn-danger {
  background: var(--color-exit);
  color: #ffffff;
  font-weight: 600;
}

.brt-btn-danger:hover:not(:disabled) {
  background: var(--color-exit-hover);
}

.brt-punch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 64px;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background-color 0.15s ease, transform 0.08s ease;
}

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

.brt-punch-btn--neutral {
  background: var(--color-primary);
  color: #ffffff;
}
.brt-punch-btn--neutral:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.brt-punch-btn--entry {
  background: var(--color-entry);
  color: #ffffff;
}
.brt-punch-btn--entry:hover:not(:disabled) {
  background: var(--color-entry-hover);
}

.brt-punch-btn--pause {
  background: #fef3c7;
  color: #78350f;
  border-color: #d97706;
  box-shadow: var(--shadow-xs);
}
.brt-punch-btn--pause:hover:not(:disabled) {
  background: #fde68a;
}

.brt-punch-btn--resume {
  background: var(--color-resume);
  color: #ffffff;
}
.brt-punch-btn--resume:hover:not(:disabled) {
  background: var(--color-resume-hover);
}

.brt-punch-btn--exit {
  background: var(--color-exit);
  color: #ffffff;
}
.brt-punch-btn--exit:hover:not(:disabled) {
  background: var(--color-exit-hover);
}

/* Kiosk Terminal Keypad (compact, balanced, centered) */
body.brt-kiosk-page .brt-main {
  padding-top: var(--space-3);
  padding-bottom: var(--space-6);
}

.brt-kiosk-terminal {
  width: 100%;
  max-width: 336px;
  margin-inline: auto;
}

.brt-kiosk-pin-well {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.brt-kiosk-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: var(--space-2);
}

.brt-kiosk-key {
  min-width: 64px;
  min-height: 50px;
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 0 #cbd5e1, var(--shadow-xs);
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.06s ease, box-shadow 0.06s ease;
}

.brt-kiosk-key:hover {
  background: var(--color-surface-subtle);
}

.brt-kiosk-key:active {
  transform: translateY(1px);
  box-shadow: none;
}

.brt-kiosk-key--fn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  background: var(--color-surface-subtle);
}

/* Semantic Status Pills with Built-In Dot Indicator (never color alone) */
.brt-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.brt-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: currentColor;
  flex-shrink: 0;
}

.brt-status-pill--off {
  background: #edf0f4;
  color: #334155;
  border-color: #dce1e8;
}
.brt-status-pill--working {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}
.brt-status-pill--paused {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.brt-status-pill--warning {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.brt-status-pill--danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.brt-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: brt-spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

/* Mandatory native <dialog> scroll containment */
dialog:modal {
  overscroll-behavior: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: min(92vw, 520px);
  width: 100%;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.25);
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

/* Precision Data Tables */
.brt-table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(520px, 75vh);
  container-type: inline-size;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.brt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.brt-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: var(--color-surface-subtle);
}

.brt-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}

.brt-table td,
.brt-table tbody th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-text);
  border-bottom: 1px solid #eef1f5;
}

.brt-table tbody th[scope="row"] {
  font-weight: 600;
}

.brt-table tbody tr:hover {
  background: #f9fafb;
}

.brt-table tbody tr:last-child td,
.brt-table tbody tr:last-child th {
  border-bottom: 0;
}

/* Container-adaptive mobile card rows */
@container (max-width: 560px) {
  .brt-table--cards {
    border: 0;
  }
  .brt-table--cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .brt-table--cards tbody,
  .brt-table--cards tr,
  .brt-table--cards th,
  .brt-table--cards td {
    display: block;
    width: 100%;
  }
  .brt-table--cards tr {
    padding: var(--space-2) var(--space-3);
    border-bottom: 8px solid var(--color-bg);
    background: var(--color-surface);
  }
  .brt-table--cards th[scope="row"],
  .brt-table--cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid #f1f3f6;
    text-align: right;
  }
  .brt-table--cards tr > :last-child {
    border-bottom: 0;
  }
  .brt-table--cards [data-label]::before {
    content: attr(data-label);
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--color-muted);
    text-align: left;
    flex-shrink: 0;
  }
}

.brt-toast {
  position: fixed;
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  right: var(--space-4);
  left: var(--space-4);
  z-index: 60;
  max-width: 420px;
  margin-left: auto;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

@media (min-width: 768px) {
  .brt-toast {
    bottom: var(--space-4);
    left: auto;
  }
}

.brt-toast--error {
  background: #991b1b;
}

.brt-toast--success,
.brt-toast--entry {
  background: #166534;
}

.brt-toast--exit {
  background: #111827;
  border-left: 4px solid #dc2626;
}

.brt-toast--pause {
  background: #92400e;
}

.brt-toast--resume {
  background: #1e40af;
}

/* Kiosk distinct ENTRADA / SAÍDA feedback notices */
.brt-kiosk-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  border-left-width: 4px;
}

.brt-kiosk-notice--entry {
  background: #ecfdf5;
  border-color: #86efac;
  border-left-color: #15803d;
  color: #14532d;
}

.brt-kiosk-notice--exit {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left-color: #b91c1c;
  color: #7f1d1d;
}

.brt-kiosk-notice--pause {
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #b45309;
  color: #78350f;
}

.brt-kiosk-notice--resume {
  background: #eff6ff;
  border-color: #bfdbfe;
  border-left-color: #1d4ed8;
  color: #1e3a8a;
}

@media (forced-colors: active) {
  .brt-card,
  .brt-kpi-card,
  .brt-hero-card,
  .brt-metric-bar,
  .brt-status-pill,
  .brt-seg-btn[aria-checked="true"],
  .brt-kiosk-notice {
    border: 1px solid CanvasText;
  }
  .brt-status-pill::before {
    background: CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brt-spinner {
    animation-duration: 0.01ms;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}