/* =========================================================================
   MERCH GRUPO - UI
   Mobile-first. Estética editorial/desportiva.
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:           #f5f3ee;
  --bg-alt:       #ebe8e0;
  --ink:          #0f0f0f;
  --ink-soft:     #2a2a2a;
  --muted:        #6b6b6b;
  --line:         #1a1a1a;
  --line-soft:    #d7d4cb;
  --accent:       #d0ff3f;   /* verde elétrico */
  --accent-ink:   #0f0f0f;
  --hot:          #ff3d6e;   /* magenta alerta */
  --ok:           #1f8a4c;
  --warn:         #c97a00;
  --card:         #ffffff;
  --shadow:       0 2px 0 #0f0f0f;
  --shadow-lg:    4px 4px 0 #0f0f0f;
  --radius:       14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter Tight', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 90px; /* espaço p/ nav bottom */
}

.display { font-family: 'Archivo Black', sans-serif; letter-spacing: -0.02em; }
.mono    { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* =========================================================================
   TOP BAR
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--accent);
}
.topbar .brand {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .brand .dot {
  width: 10px; height: 10px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 3px #ffffff20;
}
.topbar .topright { display: flex; align-items: center; gap: 10px; }
.topbar .avatar-sm {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  background: var(--bg-alt); border: 2px solid var(--accent);
}
.topbar .chip-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: var(--accent); color: var(--accent-ink);
  padding: 2px 6px; border-radius: 3px;
  text-transform: uppercase; font-weight: 600;
}

/* =========================================================================
   LAYOUT
   ========================================================================= */
main.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 20px;
}

.page-header {
  margin: 4px 0 18px;
}
.page-header .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-header h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 0.95;
  margin: 6px 0 4px;
  letter-spacing: -0.03em;
}
.page-header p.lead { color: var(--muted); margin: 4px 0 0; }

/* =========================================================================
   CARDS
   ========================================================================= */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card.flat { box-shadow: none; border-color: var(--line-soft); }
.card h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.card h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 15px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

/* Balance hero */
.balance-hero {
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.balance-hero::after {
  content: '';
  position: absolute; inset: auto -30px -30px auto;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.35; pointer-events: none;
}
.balance-hero .label {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  opacity: 0.7;
}
.balance-hero .amount {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1;
  margin: 8px 0 6px;
  letter-spacing: -0.03em;
}
.balance-hero .amount .unit { font-size: 0.5em; opacity: 0.8; margin-left: 4px; }
.balance-hero .row {
  display: flex; gap: 14px; margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; opacity: 0.9;
  flex-wrap: wrap;
}
.balance-hero .row .in  { color: var(--accent); }
.balance-hero .row .out { color: var(--hot); }

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.stat .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.stat .value {
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  line-height: 1;
  margin-top: 6px;
  letter-spacing: -0.02em;
}
.stat.accent { background: var(--accent); border-color: var(--ink); }
.stat.dark   { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stat.dark .label { color: var(--accent); opacity: 0.85; }

/* =========================================================================
   FORMS
   ========================================================================= */
form.stack { display: flex; flex-direction: column; gap: 14px; }
.field label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type=text], .field input[type=email],
.field input[type=password], .field input[type=number],
.field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-size: 16px; /* evita zoom iOS */
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #d0ff3f55;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input[type=file] {
  width: 100%; padding: 8px;
  border: 2px dashed var(--line); background: var(--bg-alt); border-radius: 10px;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  font-weight: 600;
  font-family: 'Inter Tight', sans-serif;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-dark    { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-danger  { background: var(--hot); color: #fff; border-color: var(--ink); }
.btn-ghost   { background: transparent; box-shadow: none; border-color: var(--line-soft); }
.btn-full    { width: 100%; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========================================================================
   FLASH messages
   ========================================================================= */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.flash {
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-weight: 500;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash.success { background: var(--accent); }
.flash.error   { background: var(--hot); color: #fff; }

/* =========================================================================
   LIST / TABLE
   ========================================================================= */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.list-item .li-main { min-width: 0; flex: 1; }
.list-item .li-title {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-item .li-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.list-item .li-end {
  text-align: right;
  font-family: 'Archivo Black', sans-serif;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.badge.low    { background: var(--hot); color: #fff; }
.badge.cat    { background: var(--accent); }
.badge.in     { background: var(--ok); color: #fff; }
.badge.out    { background: var(--hot); color: #fff; }
.badge.admin  { background: var(--ink); color: var(--accent); }
.badge.preorder { background: #2563eb; color: #fff; }
.badge.user   { background: var(--bg-alt); }

.amount-in  { color: var(--ok); font-weight: 700; }
.amount-out { color: var(--hot); font-weight: 700; }

/* Filter chips */
.filter-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-chips a {
  padding: 7px 12px;
  border: 2px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.filter-chips a.active { background: var(--ink); color: var(--accent); }

/* Section header */
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin: 18px 0 10px;
}
.section-head h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head .action {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

/* Secções colapsáveis do dashboard */
details.dash-section {
  margin: 18px 0 10px;
}
details.dash-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
details.dash-section > summary::-webkit-details-marker { display: none; }
details.dash-section > summary::marker { content: ''; }
details.dash-section .dash-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid var(--line, #d8d3c8);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}
details.dash-section[open] .dash-toggle {
  border-color: var(--ink);
}

/* =========================================================================
   BOTTOM NAV (mobile)
   ========================================================================= */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 40;
  background: var(--ink);
  border-top: 3px solid var(--accent);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0));
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  color: #ffffff90;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.bottom-nav a svg { width: 22px; height: 22px; stroke: currentColor; }
.bottom-nav a.active {
  color: var(--accent);
  background: #ffffff10;
}

/* =========================================================================
   LOGIN
   ========================================================================= */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, #d0ff3f40, transparent 40%),
    radial-gradient(circle at 90% 90%, #ff3d6e40, transparent 40%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}
.login-card .brand-big {
  font-family: 'Archivo Black', sans-serif;
  font-size: 36px;
  line-height: 0.9;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
.login-card .brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.login-card .brand-big .hl {
  background: var(--accent);
  padding: 0 6px;
}
.login-card .hint-box {
  margin-top: 18px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* =========================================================================
   AVATAR (conta)
   ========================================================================= */
.avatar-block {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 6px;
}
.avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ink);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

/* =========================================================================
   DETAILS / LOG ROW
   ========================================================================= */
.log-row {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 6px;
}
.log-row .action {
  font-weight: 700;
  color: var(--ink);
}
.log-row .time { color: var(--muted); text-align: right; white-space: nowrap; }
.log-row .details { grid-column: 1 / -1; color: var(--ink-soft); font-family: 'Inter Tight', sans-serif; font-size: 13px; }
.log-row .user { color: var(--muted); }

/* =========================================================================
   HELPERS
   ========================================================================= */
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 14px; }
.mt-3 { margin-top: 22px; }
.mb-0 { margin-bottom: 0; }

hr.sep {
  border: none;
  border-top: 2px dashed var(--line-soft);
  margin: 18px 0;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  border: 2px dashed var(--line-soft);
  border-radius: var(--radius);
}
.empty .icon {
  font-size: 36px;
  margin-bottom: 8px;
  font-family: 'Archivo Black', sans-serif;
  color: var(--ink);
}

/* Tablet+ */
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  body { padding-bottom: 30px; }
  .bottom-nav {
    position: sticky; top: 61px; bottom: auto;
    border-top: none; border-bottom: 3px solid var(--accent);
    grid-template-columns: repeat(8, 1fr);
  }
  main.container { padding-top: 26px; }
}

/* =========================================================================
   V2: Size pills (variantes de tamanho) + status de encomendas
   ========================================================================= */
.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.size-pill {
  background: var(--bg-alt);
  border: 2px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.size-pill .sz {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.size-pill .qty {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.size-pill.low {
  background: #fff4d6;
  border-color: var(--warn);
}
.size-pill.low .qty { color: var(--warn); }
.size-pill.zero {
  background: #ffe0e6;
  border-color: var(--hot);
}
.size-pill.zero .qty { color: var(--hot); }

.order-status {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.order-status.status-pendente  { background: var(--warn);    color: #fff; }
.order-status.status-validada  { background: var(--ok);      color: #fff; }
.order-status.status-cancelada { background: var(--line-soft); color: var(--muted); }

/* =========================================================================
   V3: Logo + pills verde/amarelo/vermelho + PWA helpers
   ========================================================================= */

/* --- LOGO --- */
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.login-logo-img {
  width: 96px; height: 96px;
  border-radius: 22px;
}
.topbar-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  vertical-align: middle;
}

/* --- Override size-pill colors: verde normal/amarelo limite/vermelho esgotado --- */
.size-pill {
  background: #e6f8d9;              /* verde claro = normal */
  border-color: #69b93e;
}
.size-pill .qty { color: #2c6817; }
.size-pill.low {
  background: #fff4d6;               /* amarelo = limite */
  border-color: var(--warn);
}
.size-pill.low .qty { color: var(--warn); }
.size-pill.zero {
  background: #ffe0e6;               /* vermelho = esgotado */
  border-color: var(--hot);
}
.size-pill.zero .qty { color: var(--hot); }

/* --- Destacar botão "editar" no artigo --- */
.edit-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.edit-highlight:active {
  transform: translate(2px,2px);
  box-shadow: none;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  animation: fadein .15s ease-out;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg);
  border-top: 3px solid var(--accent);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  animation: slideup .22s cubic-bezier(.2,.9,.2,1);
}
@keyframes slideup { from { transform: translateY(30px); } to { transform: translateY(0); } }
@media (min-width: 720px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { border-radius: 18px; border: 3px solid var(--ink); border-top-color: var(--accent); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--line-soft);
}
.modal-head h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
}
.modal-close {
  background: none; border: none;
  font-size: 26px; line-height: 1;
  cursor: pointer; padding: 0 4px;
  color: var(--ink);
}

/* --- Pagination --- */
.pager {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 14px; flex-wrap: wrap;
}
.pager a, .pager span {
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  background: var(--card);
  color: var(--ink);
}
.pager a:hover { background: var(--accent); }
.pager .current { background: var(--ink); color: var(--accent); }
.pager .disabled { opacity: 0.3; pointer-events: none; }

/* --- User list with avatar --- */
.user-card {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .08s;
}
.user-card:active { transform: translate(2px,2px); box-shadow: none; }
.user-card-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  flex-shrink: 0;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black'; font-size: 18px;
}
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { font-weight: 700; font-size: 15px; }
.user-card-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* --- Checkbox groups (role permissions) --- */
.perm-group {
  margin-bottom: 18px;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: 10px;
}
.perm-group h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 13px;
  margin: 0 0 10px;
  letter-spacing: 0;
  color: var(--muted);
  text-transform: uppercase;
}
.perm-check {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 6px 0;
  cursor: pointer;
}
.perm-check input[type=checkbox] {
  margin-top: 3px; width: auto;
}
.perm-check .desc {
  font-size: 14px;
  line-height: 1.3;
}
.perm-check .key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

/* --- Filter bar for dates/selects --- */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.filter-bar .field { margin: 0; }
.filter-bar label {
  font-size: 9.5px;
  margin-bottom: 3px;
}
.filter-bar input, .filter-bar select {
  padding: 8px 10px;
  font-size: 14px;
}
.filter-bar.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 480px) {
  .filter-bar.three { grid-template-columns: 1fr 1fr; }
}

/* --- PWA install hint --- */
.pwa-install {
  display: none;
  padding: 10px 14px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 10px;
  margin: 10px 0 14px;
  font-size: 13px;
  box-shadow: var(--shadow);
}

/* topbar-name: nome do utilizador no topo (em vez do role) */
.topbar-name {
  background: transparent !important;
  color: var(--bg) !important;
  font-family: 'Inter Tight', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  padding: 4px 8px !important;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Utilizador bloqueado - visual opaco */
.user-card.blocked {
  opacity: 0.65;
  background: repeating-linear-gradient(
    45deg,
    var(--card),
    var(--card) 8px,
    var(--bg-alt) 8px,
    var(--bg-alt) 16px
  );
}
.user-card.blocked .user-card-name { color: var(--muted); }
