:root {
  --brand-ink: #0f172a;
  --brand-muted: #64748b;
  --brand-accent: #4f46e5;
  --brand-accent-strong: #4338ca;
  --brand-surface: #f8fafc;
  --brand-panel: #ffffff;
  --brand-line: #e2e8f0;
  --brand-sidebar: #f1f5f9;
  --brand-sidebar-fg: #0f172a;
  --brand-sidebar-muted: #64748b;
  --brand-sidebar-hover: rgba(15, 23, 42, 0.05);
  --brand-sidebar-active: #eef2ff;
  --brand-radius: 0.75rem;
  --brand-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --brand-sidebar-width: 16.5rem;
  --brand-font: "Inter", system-ui, sans-serif;
  --brand-display: "Inter", system-ui, sans-serif;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: #4338ca;
  --bs-link-color-rgb: 67, 56, 202;
  --bs-link-hover-color: #3730a3;
  --bs-link-hover-color-rgb: 55, 48, 163;
  --bs-focus-ring-color: rgba(79, 70, 229, 0.25);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--brand-surface);
  color: var(--brand-ink);
  font-family: var(--brand-font);
  -webkit-font-smoothing: antialiased;
}

/* —— App shell (inspirado em shadcn sidebar + inset) —— */
.app-body {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(79, 70, 229, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--brand-surface) 100%);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: var(--brand-sidebar-width);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--brand-sidebar);
  color: var(--brand-sidebar-fg);
  border-right: 1px solid var(--brand-line);
  z-index: 30;
}

.sidebar-brand {
  flex-shrink: 0;
  padding: 1rem 1rem 0.75rem;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem;
  border-radius: 0.65rem;
}

.sidebar-brand-link:hover {
  background: var(--brand-sidebar-hover);
  color: inherit;
}

.sidebar-brand-mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: var(--brand-accent);
  color: #fff;
  font-family: var(--brand-font);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.sidebar-brand-name {
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
}

.sidebar-brand-sub {
  font-size: 0.72rem;
  color: var(--brand-sidebar-muted);
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.5rem 0.65rem 1rem;
  overflow-y: auto;
}

.sidebar-group-label {
  margin: 1rem 0.65rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-sidebar-muted);
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link i {
  font-size: 1.05rem;
  opacity: 0.9;
  width: 1.15rem;
  text-align: center;
}

.sidebar-link:hover {
  background: var(--brand-sidebar-hover);
  color: var(--brand-ink);
}

.sidebar-link.is-active {
  background: var(--brand-sidebar-active);
  color: var(--brand-accent-strong);
  font-weight: 600;
}

.sidebar-link.is-active i {
  opacity: 1;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.75rem;
  border-top: 1px solid var(--brand-line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.4rem;
}

.sidebar-user-avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  flex-shrink: 0;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-action {
  font-size: 0.72rem;
  color: var(--brand-sidebar-muted);
  text-decoration: none;
}

.sidebar-user-action:hover {
  color: var(--brand-accent-strong);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  border: 1px solid var(--brand-line);
  background: var(--brand-panel);
  color: #334155;
  border-radius: 0.55rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-logout:hover {
  background: var(--brand-sidebar-hover);
  border-color: color-mix(in srgb, var(--brand-accent) 35%, var(--brand-line));
  color: var(--brand-accent-strong);
}

.app-offcanvas {
  width: min(18rem, 88vw);
  background: var(--brand-sidebar);
  color: var(--brand-sidebar-fg);
}

.app-offcanvas .btn-close {
  filter: none;
  opacity: 0.65;
}

/* Garante toque/navegação nos links do menu mobile (evita ícone “roubar” o alvo). */
.app-offcanvas .sidebar-link {
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: rgba(79, 70, 229, 0.16);
  touch-action: manipulation;
}

.app-offcanvas .sidebar-link i,
.app-offcanvas .sidebar-link span {
  pointer-events: none;
}

.app-inset {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brand-line);
}

.app-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--brand-line);
  background: var(--brand-panel);
  border-radius: 0.55rem;
  color: var(--brand-ink);
}

.app-menu-toggle:hover {
  background: #f1f5f9;
}

.app-topbar-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.app-topbar-kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-muted);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-heading {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-user {
  font-size: 0.8rem;
  color: var(--brand-muted);
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-main {
  flex: 1;
  padding: 1rem 1rem 1.5rem;
}

@media (min-width: 768px) {
  .app-main {
    padding: 1.25rem 1.5rem 2rem;
  }

  .app-topbar {
    padding: 0.75rem 1.5rem;
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.page-header h1,
.page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin: 0.25rem 0 0;
  color: var(--brand-muted);
  font-size: 0.9rem;
}

/* —— Surfaces —— */
.surface,
.panel,
.kpi-card,
.table-shell,
.form-panel {
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  box-shadow: var(--brand-shadow);
}

.kpi-card {
  padding: 1.1rem 1.2rem;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--brand-muted);
  font-weight: 500;
}

.kpi-hint {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--brand-muted);
}

.kpi-value {
  margin-top: 0.25rem;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.table-shell {
  overflow: hidden;
}

.table-responsive.table-shell {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-shell .table {
  margin-bottom: 0;
}

.table-shell .table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.mesa-tile {
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  box-shadow: var(--brand-shadow);
  padding: 1rem;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.mesa-tile:hover {
  border-color: #a5b4fc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.mesa-tile-link {
  display: flex;
  flex-direction: column;
  min-height: 7.5rem;
  color: inherit;
}

.mesa-tile-link:hover {
  border-color: transparent;
  color: inherit;
}

button.mesa-tile-link {
  background: none;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.sale-mobile-card {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  box-shadow: var(--brand-shadow);
  color: inherit;
  -webkit-tap-highlight-color: rgba(79, 70, 229, 0.16);
  touch-action: manipulation;
}

.sale-mobile-card:active {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.brand-title {
  font-family: var(--brand-display);
  font-size: 2.4rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

/* —— Auth —— */
.login-page {
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(79, 70, 229, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(79, 70, 229, 0.06), transparent 50%),
    var(--brand-surface);
  min-height: 100vh;
}

.login-panel,
.auth-panel {
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(79, 70, 229, 0.1), transparent 60%),
    var(--brand-surface);
}

/* —— PDV —— */
.pdv-page .app-main {
  padding-top: 0.85rem;
}

.pdv-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.pdv-scan,
.pdv-catalog,
.pdv-items,
.pdv-total,
.pdv-checkout {
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  box-shadow: var(--brand-shadow);
}

.pdv-total {
  background: linear-gradient(160deg, #eef2ff, #ffffff 55%);
  border-color: #c7d2fe;
}

.pdv-items {
  overflow: hidden;
}

.pdv-filter {
  max-width: 16rem;
}

.pdv-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  max-height: min(42vh, 28rem);
  overflow: auto;
  padding: 0.15rem;
}

.pdv-product-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.25rem;
  min-height: 7.25rem;
  padding: 0.85rem 0.8rem;
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  background: #ffffff;
  box-shadow: none;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
  cursor: pointer;
}

.pdv-product-tile:hover,
.pdv-product-tile:focus-visible {
  border-color: #a5b4fc;
  background: linear-gradient(165deg, #eef2ff, #ffffff 50%);
  outline: none;
  transform: translateY(-1px);
}

.pdv-product-tile:active {
  transform: translateY(0);
}

.pdv-product-tile .tile-stock {
  font-size: 0.7rem;
  font-weight: 650;
  color: #15803d;
  background: #dcfce7;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  margin-bottom: 0.15rem;
}

.pdv-product-tile .tile-pack-cap {
  font-size: 0.68rem;
  color: var(--brand-muted);
  margin-bottom: 0.1rem;
}

.pdv-product-tile.is-low .tile-stock {
  color: #b45309;
  background: #ffedd5;
}

.pdv-product-tile.is-empty .tile-stock {
  color: #b91c1c;
  background: #fee2e2;
}

.pdv-product-tile .tile-name {
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--brand-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pdv-product-tile .tile-brand,
.pdv-product-tile .tile-ean {
  font-size: 0.72rem;
  color: var(--brand-muted);
}

.pdv-product-tile .tile-price {
  margin-top: auto;
  font-weight: 700;
  color: var(--brand-accent-strong);
  font-size: 0.95rem;
}

.pdv-product-tile .tile-pack {
  font-size: 0.7rem;
  color: var(--brand-muted);
}

@media (max-width: 767.98px) {
  .pdv-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(8.25rem, 1fr));
    max-height: 36vh;
  }

  .pdv-filter {
    max-width: none;
    width: 100%;
  }
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand-accent);
  --bs-btn-border-color: var(--brand-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-accent-strong);
  --bs-btn-hover-border-color: var(--brand-accent-strong);
  --bs-btn-focus-shadow-rgb: 79, 70, 229;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #3730a3;
  --bs-btn-active-border-color: #3730a3;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--brand-accent);
  --bs-btn-disabled-border-color: var(--brand-accent);
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--brand-accent-strong);
  border-color: var(--brand-accent-strong);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-accent);
  --bs-btn-border-color: var(--brand-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-accent);
  --bs-btn-hover-border-color: var(--brand-accent);
  --bs-btn-focus-shadow-rgb: 79, 70, 229;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-accent-strong);
  --bs-btn-active-border-color: var(--brand-accent-strong);
  --bs-btn-disabled-color: var(--brand-accent);
  --bs-btn-disabled-border-color: var(--brand-accent);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.22);
}

.form-check-input:checked {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-muted);
  font-weight: 600;
  background: #f8fafc;
  border-bottom-color: var(--brand-line);
}

.barcode-reader {
  width: 100%;
  min-height: 240px;
  max-height: 55vh;
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  background: #111827;
}

.barcode-reader video,
.barcode-reader canvas {
  width: 100% !important;
  border-radius: var(--brand-radius);
}

@media (max-width: 576px) {
  #btnScanBarcode {
    font-weight: 600;
  }
}

/* —— Manual de ajuda —— */
.help-panel {
  max-width: 46rem;
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.help-panel h1 {
  font-family: var(--brand-display);
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.help-panel h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-top: 1.75rem;
  scroll-margin-top: 1rem;
}

.help-nav a {
  color: var(--brand-muted);
  text-decoration: none;
}

.help-nav a:hover {
  color: var(--brand-accent);
}

.help-toc {
  padding: 0.85rem 1rem;
  border: 1px solid var(--brand-line);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.02);
}

.help-toc-list {
  padding-left: 1.25rem;
  margin: 0;
  columns: 1;
}

@media (min-width: 576px) {
  .help-toc-list {
    columns: 2;
    column-gap: 1.5rem;
  }
}

.help-toc-list a {
  color: var(--brand-accent);
  text-decoration: none;
}

.help-toc-list a:hover {
  text-decoration: underline;
}

.help-module-note {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--brand-accent);
  background: rgba(15, 23, 42, 0.03);
  font-size: 0.92rem;
}

/* —— Páginas legais públicas —— */
.legal-panel {
  max-width: 46rem;
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.legal-panel h1 {
  font-family: var(--brand-display);
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.legal-panel h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-top: 1.5rem;
}

.legal-nav a {
  color: var(--brand-muted);
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a.is-active {
  color: var(--brand-accent);
}

.login-privacy-note {
  font-size: 0.78rem;
  line-height: 1.45;
}

.app-legal-footer {
  padding: 0.65rem 1rem 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.78rem;
  color: var(--brand-muted);
  border-top: 1px solid var(--brand-line);
}

.app-legal-footer a {
  color: var(--brand-muted);
  text-decoration: none;
}

.app-legal-footer a:hover {
  color: var(--brand-accent);
}

@media (min-width: 768px) {
  .app-legal-footer {
    padding: 0.75rem 1.5rem 1.35rem;
  }
}

/* Super Admin module toggles */
.module-toggle-card {
  position: relative;
  height: 100%;
  padding: 1rem 2.75rem 1rem 1.1rem;
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  background: var(--brand-panel);
  box-shadow: var(--brand-shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.module-toggle-card:hover {
  border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--brand-line));
  transform: translateY(-1px);
}
.module-toggle-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  margin: 0;
}
.module-toggle-card input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand-accent);
}
.module-toggle-title {
  font-weight: 650;
  font-size: 0.95rem;
}
.module-toggle-desc {
  font-size: 0.8rem;
  color: var(--brand-muted);
  line-height: 1.35;
}
.module-help-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-panel) 88%, var(--brand-muted));
  color: var(--brand-muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.module-help-btn:hover,
.module-help-btn:focus-visible {
  border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--brand-line));
  color: var(--brand-accent);
  background: var(--brand-panel);
  outline: 2px solid color-mix(in srgb, var(--brand-accent) 35%, transparent);
  outline-offset: 2px;
}
@media (max-width: 575.98px) {
  .module-toggle-card {
    padding-right: 3.25rem;
  }
  .module-help-btn {
    top: 0.4rem;
    right: 0.4rem;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
    font-size: 1rem;
  }
}

.offline-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #fffbeb;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
  font-size: 0.9rem;
}
.offline-banner.is-visible {
  display: flex;
}
.stock-alert {
  color: #b45309;
  font-weight: 600;
}

/* FullCalendar agenda toolbar — brand outline pills */
#agendaCalendar .fc-toolbar {
  gap: 0.75rem;
  flex-wrap: wrap;
}

#agendaCalendar .fc-button-group {
  display: inline-flex;
  gap: 0.35rem;
}

#agendaCalendar .fc-button-group > .fc-button {
  border-radius: 999px !important;
  margin: 0 !important;
}

#agendaCalendar .fc-button,
#agendaCalendar .fc-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--brand-panel);
  border: 1px solid var(--brand-line);
  color: var(--brand-ink);
  border-radius: 999px;
  box-shadow: none;
  font-family: var(--brand-font);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.2;
  padding: 0.4rem 0.9rem;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

#agendaCalendar .fc-button:not(:disabled):hover,
#agendaCalendar .fc-button:not(:disabled):focus,
#agendaCalendar .fc-button-primary:not(:disabled):hover,
#agendaCalendar .fc-button-primary:not(:disabled):focus {
  background: color-mix(in srgb, var(--brand-accent) 10%, var(--brand-panel));
  border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--brand-line));
  color: var(--brand-ink);
  box-shadow: var(--brand-shadow);
  outline: none;
}

#agendaCalendar .fc-button:not(:disabled):active,
#agendaCalendar .fc-button-primary:not(:disabled):active,
#agendaCalendar .fc-button-active,
#agendaCalendar .fc-button-primary.fc-button-active {
  background: color-mix(in srgb, var(--brand-accent) 16%, var(--brand-panel));
  border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--brand-line));
  color: var(--brand-accent-strong);
  box-shadow: none;
}

#agendaCalendar .fc-button:disabled,
#agendaCalendar .fc-button-primary:disabled {
  opacity: 0.5;
  background: var(--brand-panel);
  border-color: var(--brand-line);
  color: var(--brand-muted);
}

#agendaCalendar .fc-prev-button,
#agendaCalendar .fc-next-button {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  font-size: 0;
  gap: 0;
}

#agendaCalendar .fc-prev-button::before,
#agendaCalendar .fc-next-button::before {
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  speak: never;
}

#agendaCalendar .fc-prev-button::before {
  content: "\f284";
}

#agendaCalendar .fc-next-button::before {
  content: "\f285";
}

#agendaCalendar .fc-today-button {
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
}

#agendaCalendar .fc-toolbar-title {
  color: var(--brand-ink);
  font-family: var(--brand-font);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
