/* ============================================================
   Fiesta Portal — Design System (Ford futurista · liquid glass)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* Marca Ford */
  --ford-blue: #1e6bff;
  --ford-blue-deep: #0a2a6b;
  --ford-blue-bright: #4f8bff;
  --cyan: #43d9ff;

  /* feedback */
  --success: #36e0a0;
  --warning: #ffb454;
  --danger: #ff5c72;

  /* radius / spacing */
  --r-card: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;
  --pad: clamp(16px, 4vw, 28px);

  --speed: .2s;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* z-index scale */
  --z-base: 0; --z-raised: 10; --z-sticky: 40; --z-overlay: 100; --z-toast: 1000;
}

/* DARK (primário) */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070e;
  --text: #f4f7ff;
  --text-dim: #9fb0ce;
  --text-faint: #6c7d9e;
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .09);
  --border: rgba(255, 255, 255, .13);
  --border-strong: rgba(255, 255, 255, .22);
  --glass-grad: linear-gradient(158deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .025));
  --glass-shadow: 0 10px 34px rgba(2, 8, 28, .5), inset 0 1px 0 rgba(255, 255, 255, .16);
  --scrim: rgba(3, 6, 16, .62);
  --field-bg: rgba(8, 14, 32, .55);
}

/* LIGHT */
[data-theme="light"] {
  color-scheme: light;
  --bg: #e9eef9;
  --text: #0b1530;
  --text-dim: #46577a;
  --text-faint: #6c7d9e;
  --surface: rgba(255, 255, 255, .6);
  --surface-2: rgba(255, 255, 255, .8);
  --border: rgba(20, 50, 120, .14);
  --border-strong: rgba(20, 50, 120, .26);
  --glass-grad: linear-gradient(158deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .55));
  --glass-shadow: 0 12px 30px rgba(20, 50, 120, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
  --scrim: rgba(15, 30, 70, .35);
  --field-bg: rgba(255, 255, 255, .72);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100dvh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; } /* tamanho base; regras específicas sobrescrevem */
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }

/* ---------- Background atmosférico ---------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 680px at 10% -12%, rgba(30, 107, 255, .30), transparent 60%),
    radial-gradient(860px 600px at 102% -4%, rgba(67, 217, 255, .16), transparent 55%),
    radial-gradient(760px 760px at 50% 122%, rgba(10, 42, 107, .55), transparent 60%);
}
[data-theme="light"] .bg-fx {
  background:
    radial-gradient(1100px 680px at 10% -12%, rgba(30, 107, 255, .22), transparent 60%),
    radial-gradient(860px 600px at 102% -4%, rgba(67, 217, 255, .18), transparent 55%),
    radial-gradient(760px 760px at 50% 122%, rgba(120, 160, 240, .35), transparent 60%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(20, 50, 120, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 50, 120, .05) 1px, transparent 1px);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-grad);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
}

/* ---------- Layout ---------- */
.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(5, 7, 14, .72), rgba(5, 7, 14, .35) 70%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(233, 238, 249, .82), rgba(233, 238, 249, .4) 70%, transparent);
}
.topbar .wrap { display: flex; align-items: center; gap: 14px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--ford-blue-bright), var(--ford-blue-deep));
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 6px 18px rgba(20, 90, 230, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
  color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: .14em; }
.brand-sub { font-size: .68rem; letter-spacing: .26em; color: var(--text-dim); text-transform: uppercase; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.topbar-actions .label { font-size: .9rem; }

/* search field in topbar */
.search {
  position: relative; display: flex; align-items: center;
  flex: 1; max-width: 420px; min-width: 0;
}
.search svg { position: absolute; left: 14px; color: var(--text-faint); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: var(--r-pill);
  background: var(--field-bg); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); outline: none; transition: border-color var(--speed), box-shadow var(--speed);
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { border-color: var(--ford-blue-bright); box-shadow: 0 0 0 3px rgba(79, 139, 255, .25); }

/* ---------- Buttons ---------- */
.btn {
  --glow: rgba(20, 90, 230, .45);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .68rem 1.1rem; border-radius: var(--r-md);
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  position: relative; overflow: hidden; isolation: isolate; white-space: nowrap;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform var(--speed) var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s;
}
.btn::before { /* sheen líquido */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(120px 80px at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .5), transparent 60%);
  transition: opacity .3s var(--ease);
}
.btn:hover::before { opacity: .5; }
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn .ico { width: 18px; height: 18px; }

.btn-primary {
  color: #f2f7ff; border-color: rgba(150, 190, 255, .55);
  background: linear-gradient(180deg, rgba(86, 150, 255, .98), rgba(22, 84, 224, .98));
  box-shadow: 0 8px 22px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn-primary:hover { box-shadow: 0 12px 32px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .55); }

.btn-ghost { background: var(--surface); }
.btn-danger { color: #fff; border-color: rgba(255, 120, 140, .5);
  background: linear-gradient(180deg, rgba(255, 110, 130, .96), rgba(220, 40, 70, .96));
  box-shadow: 0 8px 22px rgba(220, 40, 70, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }

.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--r-md); }
.btn-sm { min-height: 38px; padding: .45rem .8rem; font-size: .85rem; border-radius: var(--r-sm); }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 6vw, 64px) 0 18px; }
.hero-card {
  border-radius: var(--r-card); padding: clamp(22px, 4vw, 40px);
  position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(67, 217, 255, .22), transparent 65%); pointer-events: none;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--cyan);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--surface);
}
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); margin: 16px 0 6px; font-weight: 700; }
.hero h1 .accent { background: linear-gradient(100deg, var(--ford-blue-bright), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--text-dim); font-size: clamp(1rem, 2.5vw, 1.15rem); max-width: 56ch; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.stat {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); min-width: 0;
}
.stat .ico { width: 20px; height: 20px; color: var(--ford-blue-bright); flex-shrink: 0; }
.stat b { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; display: block; }
.stat span { font-size: .76rem; color: var(--text-dim); letter-spacing: .02em; }

/* ---------- Filtros (chips) ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 22px 0 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); cursor: pointer; font-weight: 500; font-size: .9rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: color var(--speed), border-color var(--speed), background var(--speed), transform var(--speed);
}
.chip .ico { width: 16px; height: 16px; }
.chip:hover { transform: translateY(-1px); color: var(--text); border-color: var(--border-strong); }
.chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.chip[aria-pressed="true"] {
  color: #eaf2ff; border-color: rgba(120, 175, 255, .6);
  background: linear-gradient(180deg, rgba(70, 130, 255, .35), rgba(30, 90, 220, .28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px rgba(20, 90, 230, .25);
}
.chip .count { font-size: .74rem; opacity: .7; font-variant-numeric: tabular-nums; }

/* ---------- Seções e grid ---------- */
.section { padding: 18px 0; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.section-head .ico { width: 22px; height: 22px; color: var(--ford-blue-bright); }
.section-head h2 { font-size: 1.25rem; }
.section-head .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.section-head .count { font-size: .78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* ---------- Card ---------- */
.card {
  position: relative; border-radius: var(--r-card); padding: 20px;
  display: flex; flex-direction: column; gap: 12px; min-height: 168px;
  border: 1px solid var(--border); background: var(--glass-grad);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--glass-shadow);
  transition: transform .22s var(--ease), box-shadow .28s var(--ease), border-color .28s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), rgba(79, 139, 255, .16), transparent 60%);
  transition: opacity .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong);
  box-shadow: 0 18px 44px rgba(2, 8, 28, .55), 0 0 0 1px rgba(79, 139, 255, .25), inset 0 1px 0 rgba(255, 255, 255, .2); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(160deg, rgba(79, 139, 255, .28), rgba(20, 80, 220, .12));
  border: 1px solid rgba(150, 190, 255, .28); color: var(--ford-blue-bright);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.card-icon .ico { width: 26px; height: 26px; }
.card-top { display: flex; align-items: flex-start; gap: 14px; }
.card-badge {
  margin-left: auto; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: var(--r-pill); color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); font-weight: 600;
}
.card h3 { font-size: 1.06rem; line-height: 1.25; }
.card p { color: var(--text-dim); font-size: .9rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.card-meta { font-size: .76rem; color: var(--text-faint); font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
/* link invisível que cobre o card inteiro (clicar em qualquer lugar abre) */
.card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-hit:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.card-open { margin-left: auto; pointer-events: none; } /* visual: o overlay cuida do clique */
.card-open .ico { width: 16px; height: 16px; transition: transform var(--speed); }
.card:hover .card-open .ico { transform: translateX(2px); }

/* admin handles on card */
.card-admin { position: absolute; top: 10px; right: 10px; display: none; gap: 6px; z-index: 2; }
body.admin-on .card-admin { display: flex; }
.card-admin .btn-icon { width: 34px; height: 34px; border-radius: 10px; }
.card-admin .btn-icon .ico { width: 16px; height: 16px; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty .ico { width: 46px; height: 46px; margin: 0 auto 14px; color: var(--text-faint); }
.empty h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--text); }

/* ---------- Admin bar ---------- */
.adminbar {
  position: sticky; bottom: 16px; z-index: var(--z-sticky); margin: 26px auto 32px;
  display: none; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  width: fit-content; max-width: 100%; padding: 10px; border-radius: var(--r-pill);
}
body.admin-on .adminbar { display: flex; }
.adminbar .tag { font-family: var(--font-display); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--cyan); padding-inline: 10px; }

/* ---------- Modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: var(--z-overlay); display: none;
  background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 20px; overflow-y: auto;
}
.modal-scrim.open { display: grid; place-items: center; animation: fade .2s var(--ease); }
.modal {
  width: min(560px, 100%); border-radius: var(--r-card); padding: clamp(20px, 4vw, 30px);
  background: var(--glass-grad); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 30px 80px rgba(2, 8, 28, .65), inset 0 1px 0 rgba(255, 255, 255, .2);
  animation: pop .24s var(--ease);
}
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.modal-head h2 { font-size: 1.25rem; }
.modal-head .btn-icon { margin-left: auto; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-dim);
  margin-bottom: 7px; letter-spacing: .01em; }
.field .req { color: var(--cyan); }
.input, .textarea, .select {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--field-bg); border: 1px solid var(--border); color: var(--text);
  outline: none; transition: border-color var(--speed), box-shadow var(--speed);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239fb0ce' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--ford-blue-bright);
  box-shadow: 0 0 0 3px rgba(79, 139, 255, .22); }
.field .hint { font-size: .76rem; color: var(--text-faint); margin-top: 6px; }
.field .err { font-size: .8rem; color: var(--danger); margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.field.invalid .input, .field.invalid .select { border-color: var(--danger); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .btn { flex: 1; }

/* icon picker */
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.icon-opt { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-dim);
  transition: all var(--speed); }
.icon-opt .ico { width: 20px; height: 20px; }
.icon-opt:hover { color: var(--text); border-color: var(--border-strong); }
.icon-opt[aria-pressed="true"] { color: var(--ford-blue-bright); border-color: rgba(120, 175, 255, .6);
  background: rgba(70, 130, 255, .18); box-shadow: inset 0 0 0 1px rgba(120, 175, 255, .4); }

/* file drop */
.drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); padding: 22px;
  text-align: center; color: var(--text-dim); cursor: pointer; transition: all var(--speed);
  background: var(--field-bg);
}
.drop:hover, .drop.over { border-color: var(--ford-blue-bright); color: var(--text);
  background: rgba(70, 130, 255, .08); }
.drop .ico { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--ford-blue-bright); }
.drop b { color: var(--text); }
.drop .fname { margin-top: 8px; font-size: .85rem; color: var(--cyan); word-break: break-all; }
.progress { height: 6px; border-radius: 99px; background: var(--surface); overflow: hidden; margin-top: 12px; display: none; }
.progress.show { display: block; }
.progress > i { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--ford-blue-bright), var(--cyan)); transition: width .2s; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; width: min(420px, 92vw); }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: var(--r-md);
  background: var(--glass-grad); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 14px 40px rgba(2, 8, 28, .5); animation: slideup .25s var(--ease); }
.toast .ico { width: 20px; height: 20px; flex-shrink: 0; }
.toast.ok .ico { color: var(--success); }
.toast.err .ico { color: var(--danger); }
.toast.info .ico { color: var(--cyan); }
.toast span { font-size: .9rem; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); border-radius: var(--r-card); padding: clamp(26px, 6vw, 40px);
  background: var(--glass-grad); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 30px 80px rgba(2, 8, 28, .6), inset 0 1px 0 rgba(255, 255, 255, .2);
  animation: pop .3s var(--ease); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; text-align: center; }
.login-brand .brand-badge { width: 64px; height: 64px; border-radius: 19px; }
.login-brand .brand-badge .ico { width: 34px; height: 34px; }
.login-brand h1 { font-size: 1.5rem; letter-spacing: .16em; }
.login-brand p { color: var(--text-dim); font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; }
.login-err { display: none; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r-sm);
  background: rgba(255, 92, 114, .12); border: 1px solid rgba(255, 92, 114, .4); color: #ffc2cb;
  font-size: .88rem; margin-bottom: 16px; }
.login-err.show { display: flex; }
.pw-wrap { position: relative; }
.pw-wrap .toggle-pw { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-faint); padding: 8px; }
.pw-wrap .toggle-pw:hover { color: var(--text); }

/* ---------- util ---------- */
.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; }
.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; }

/* ---------- Animations ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slideup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { animation: pop .4s var(--ease) backwards; }

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
  .brand-text { display: none; }
  .search { max-width: none; }
  .topbar .wrap { flex-wrap: wrap; }
  .stats { gap: 8px; }
  .stat { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 460px) {
  .topbar-actions .label { display: none; }
}

/* ---------- Acessibilidade: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .card:hover, .btn:hover { transform: none; }
}

/* foco global */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
