/* Amber palette — caneta amarela na folha de respostas.
   Mirror PicoCSS's own selector specificity so our values win the cascade. */

/* ---- Light mode ---------------------------------------------------------------- */
:root:not([data-theme=dark]), [data-theme=light] {
  --pico-font-family-sans-serif:   'Inter', system-ui, sans-serif;

  --pico-primary:                  #d97706;
  --pico-primary-background:       #d97706;
  --pico-primary-border:           #d97706;
  --pico-primary-underline:        rgba(217, 119, 6, 0.5);
  --pico-primary-hover:            #b45309;
  --pico-primary-hover-background: #b45309;
  --pico-primary-hover-border:     #b45309;
  --pico-primary-focus:            rgba(217, 119, 6, 0.35);
  --pico-primary-inverse:          #fff;
}

/* ---- Dark mode — brighter amber so it reads well on dark backgrounds ----------- */
[data-theme=dark] {
  --pico-font-family-sans-serif:   'Inter', system-ui, sans-serif;

  --pico-primary:                  #fbbf24;   /* amber-400 */
  --pico-primary-background:       #fbbf24;
  --pico-primary-border:           #fbbf24;
  --pico-primary-underline:        rgba(251, 191, 36, 0.5);
  --pico-primary-hover:            #fcd34d;   /* amber-300 */
  --pico-primary-hover-background: #fcd34d;
  --pico-primary-hover-border:     #fcd34d;
  --pico-primary-focus:            rgba(251, 191, 36, 0.35);
  --pico-primary-inverse:          #18181b;   /* dark text on bright amber buttons */
}

/* ---- Typography ---------------------------------------------------------------- */
body {
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* ---- Article / card shadow ----------------------------------------------------- */
/* Light: Pico's signature soft layered shadow */
article {
  box-shadow:
    0.0145rem 0.029rem 0.174rem rgba(129, 145, 181, 0.017),
    0.0335rem 0.067rem 0.402rem rgba(129, 145, 181, 0.024),
    0.0625rem 0.125rem 0.75rem  rgba(129, 145, 181, 0.030),
    0.1125rem 0.225rem 1.35rem  rgba(129, 145, 181, 0.036),
    0.5rem    1rem    6rem      rgba(129, 145, 181, 0.060),
    0 0 0 0.0625rem             rgba(129, 145, 181, 0.015);
}
/* Dark: elevation via white rim + deep drop shadow */
[data-theme=dark] article {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 2px 8px  rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---- Nav ----------------------------------------------------------------------- */
nav {
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--pico-primary) !important;
}

/* ---- Nav icon buttons (theme toggle, settings, logout) ------------------------- */
.nav-icon-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--pico-muted-color);
  font-size: 0.875rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.nav-icon-btn:hover {
  background: var(--pico-muted-border-color);
  color: var(--pico-color);
}

/* Sun/moon icon visibility based on active theme */
.theme-icon-dark  { display: none; }
.theme-icon-light { display: inline-flex; }
[data-theme=dark] .theme-icon-light { display: none; }
[data-theme=dark] .theme-icon-dark  { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .theme-icon-light { display: none; }
  :root:not([data-theme=light]) .theme-icon-dark  { display: inline-flex; }
}

/* ---- ENEM area chips ----------------------------------------------------------- */
.tag {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; font-family: var(--pico-font-family-monospace);
  white-space: nowrap;
}
.tag.lc { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.tag.mt { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.tag.cn { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.tag.ch { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }
[data-theme=dark] .tag.lc { background: rgba(217,119,6,0.15);  color: #fbbf24; border-color: rgba(217,119,6,0.35); }
[data-theme=dark] .tag.mt { background: rgba(37,99,235,0.15);  color: #93c5fd; border-color: rgba(37,99,235,0.35); }
[data-theme=dark] .tag.cn { background: rgba(22,163,74,0.15);  color: #86efac; border-color: rgba(22,163,74,0.35); }
[data-theme=dark] .tag.ch { background: rgba(147,51,234,0.15); color: #d8b4fe; border-color: rgba(147,51,234,0.35); }
.tag.criador { background: var(--pico-secondary-background); color: var(--pico-secondary-inverse); border: 1px solid var(--pico-secondary-border); font-family: var(--pico-font-family); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }

/* ---- Progress bar -------------------------------------------------------------- */
.bar { height: 0.5rem; background: var(--pico-muted-border-color); border-radius: 4px; overflow: hidden; margin: 0.5rem 0; }
.bar > div { height: 100%; background: var(--pico-primary); border-radius: 4px; transition: width 0.3s ease-in-out; }

/* ---- Diagnostic section label -------------------------------------------------- */
.diag-label {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.75rem; font-size: 0.875rem;
  color: var(--pico-muted-color);
}
.diag-label strong { color: var(--pico-color); }

/* ---- Button utilities ---------------------------------------------------------- */
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.titulo-simulado { text-transform: capitalize; }
.btn-row [type=submit] { width: auto; margin-bottom: 0; }
.btn-sm  { padding: 0.5rem 0.85rem !important; font-size: 0.875rem !important; }
.picker-filter-grid > .picker-filter-label > button { margin-top: calc(var(--pico-spacing) * .25); }
.picker-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.picker-actions-pag { display: flex; align-items: center; gap: 0.5rem; }
.picker-actions-pag [type=submit] { width: auto; margin-bottom: 0; }
.picker-add-btn { width: 30% !important; margin-bottom: 0; }

/* ---- Correctness cells --------------------------------------------------------- */
.cell {
  display: inline-flex; width: 24px; height: 24px; align-items: center;
  justify-content: center; border-radius: 4px; font-weight: 700; font-size: 14px;
}
.cell.ok { background: rgba(76, 154, 137, 0.12); color: rgb(28, 105, 84); }
.cell.no { background: rgba(183, 105, 106, 0.12); color: rgb(136, 56, 53); }
[data-theme=dark] .cell.ok { background: rgba(76, 154, 137, 0.2); color: #6ee7b7; }
[data-theme=dark] .cell.no { background: rgba(183, 105, 106, 0.2); color: #fca5a5; }

/* ---- Text utilities ------------------------------------------------------------ */
.muted { color: var(--pico-muted-color); }

/* ---- Filter bar --------------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.75rem;
}
.filter-bar input,
.filter-bar select {
  flex: 1 1 160px;
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}
.th-sort { text-decoration: none; color: inherit; white-space: nowrap; }
.th-sort:hover { color: var(--pico-primary); }

/* ---- Lucide inline icons ------------------------------------------------------- */
.lucide { flex-shrink: 0; vertical-align: -0.125em; }
article > header { display: flex; align-items: center; gap: 0.5rem; }

/* ---- Login page --------------------------------------------------------------- */
.login-wrap hgroup { text-align: center; }
.login-wrap { max-width: 420px; margin: 2.5rem auto; }

/* ---- Login page: processos seletivos section ---------------------------------- */
.ps-login-section { margin-top: 1.5rem; }
.ps-login-heading {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--pico-muted-color);
  margin: 0 0 0.75rem;
}
.ps-login-cta { display: block; text-align: center; margin: 0; }

/* ---- Area color tokens -------------------------------------------------------- */
:root:not([data-theme=dark]), [data-theme=light] {
  --area-lc: #d97706; --area-mt: #2563eb; --area-cn: #16a34a; --area-ch: #9333ea;
}
[data-theme=dark] {
  --area-lc: #fbbf24; --area-mt: #60a5fa; --area-cn: #4ade80; --area-ch: #c084fc;
}

/* ---- Dashboard stat tiles ----------------------------------------------------- */
.dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
article.dash-tile {
  padding: 0.85rem 1rem;
  box-shadow: none;
  border: 1px solid var(--pico-muted-border-color);
}
[data-theme=dark] article.dash-tile {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.1);
}
.dash-tile__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--pico-muted-color); font-weight: 600; margin-bottom: 0.5rem;
}
.dash-tile__num {
  font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em;
  color: var(--pico-color); line-height: 1; font-variant-numeric: tabular-nums;
}
.dash-tile__unit { font-size: 1rem; color: var(--pico-primary); font-weight: 600; }
.dash-tile__sub  { font-size: 0.75rem; color: var(--pico-muted-color); margin-top: 0.1rem; }
.dash-tile--highlight { border-color: var(--pico-primary); }
.dp-pct-sub { font-size: 0.7rem; color: var(--pico-muted-color); min-width: 2.5rem; text-align: right; }

/* ---- Dashboard bento grid (stat tiles left, progress right) ------------------- */
.dash-bento {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 0.75rem;
  align-items: stretch;
}
.dash-bento__left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dash-bento__left article.dash-tile { flex: 1; }
@media (max-width: 560px) { .dash-bento { grid-template-columns: 1fr; } }

/* ---- Area progress rows ------------------------------------------------------- */
.dash-progress-rows { display: grid; gap: 0.625rem; margin-top: 0.5rem; }
.dash-progress-row  { display: grid; grid-template-columns: 38px 1fr 46px 32px; gap: 0.5rem; align-items: center; }
.dash-progress-row > .dp-code {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-family: var(--pico-font-family-monospace);
  font-weight: 700; color: var(--pico-muted-color);
}
.dash-progress-row > .dp-pct {
  font-size: 11px; font-family: var(--pico-font-family-monospace);
  color: var(--pico-muted-color); text-align: right; font-variant-numeric: tabular-nums;
}
.dash-bar { height: 8px; background: var(--pico-muted-border-color); border-radius: 999px; overflow: hidden; }
[data-theme=dark] .dash-bar { background: rgba(255, 255, 255, 0.08); }
.dash-bar > span { display: block; height: 100%; border-radius: 999px; transition: width 0.4s ease-in-out; }
.dp-fill-lc { background: var(--area-lc); }
.dp-fill-mt { background: var(--area-mt); }
.dp-fill-cn { background: var(--area-cn); }
.dp-fill-ch { background: var(--area-ch); }

/* ---- Dashboard inline empty state --------------------------------------------- */
.dash-empty { color: var(--pico-muted-color); font-size: 0.875rem; margin: 0.75rem 0 0; }
.dash-empty a { color: var(--pico-primary); font-weight: 600; text-decoration: none; }
.dash-empty a:hover { color: var(--pico-primary-hover); }

/* ---- Next simulado suggestion ------------------------------------------------- */
.dash-suggestion {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem;
}
.dash-suggestion strong { font-size: 0.9375rem; color: var(--pico-color); font-weight: 600; }
.dash-suggestion a {
  font-size: 13px; font-weight: 600; color: var(--pico-primary);
  text-decoration: none; white-space: nowrap;
}
.dash-suggestion a:hover { color: var(--pico-primary-hover); }

/* ---- Dashboard feature cards (mirror landing .feature style) -------------- */
.dc-icon {
  width: 40px; height: 40px; border-radius: 6px;
  background: #fffbeb; color: var(--pico-primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
[data-theme=dark] .dc-icon {
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(217, 119, 6, 0.35);
}
article > header.dc-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  border-bottom: none;
  background: transparent;
  padding-bottom: 0;
  margin-bottom: 0.25rem;
}
article > header.dc-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.dc-list {
  margin: 0.5rem 0 0.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--pico-muted-color);
}
.dc-list li { display: flex; align-items: flex-start; gap: 0.45rem; }
.dc-list li::before {
  content: "✓"; font-weight: 700; flex-shrink: 0;
  color: rgb(28, 105, 84); margin-top: 1px;
}
[data-theme=dark] .dc-list li::before { color: #6ee7b7; }

/* ---- Pagy pagination nav ------------------------------------------------------- */
nav.pagy { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
nav.pagy a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; height: 2rem; padding: 0 0.5rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  text-decoration: none; color: var(--pico-color);
  font-size: 0.875rem; line-height: 1;
}
nav.pagy a:hover:not([aria-disabled]) { border-color: var(--pico-primary); color: var(--pico-primary); }
nav.pagy a[aria-current="page"] {
  background: var(--pico-primary); border-color: var(--pico-primary);
  color: var(--pico-primary-inverse); font-weight: 600;
}
nav.pagy a[aria-disabled] { opacity: 0.4; cursor: default; }

/* ---- Empty state -------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--pico-muted-color);
}
.empty-state-icon {
  display: flex; justify-content: center;
  margin-bottom: 1.25rem;
  opacity: 0.4;
}
.empty-state h2 { font-size: 1.25rem; color: var(--pico-color); margin-bottom: 0.5rem; }
.empty-state p  { max-width: 38ch; margin: 0 auto 0.75rem; font-size: 0.9375rem; }
.empty-state a, .empty-state button { margin-top: 0.5rem; }

/* ---- Carteirinha estudantil ------------------------------------------------ */
.carteirinha-card { max-width: 420px; padding: 0; overflow: hidden; border-radius: 1rem; }
.carteirinha-card > header {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.875rem 2rem;
  margin-bottom: 0; border-bottom: none; border-radius: 0;
}
.carteirinha-platform { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.carteirinha-body { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.carteirinha-identity { display: flex; align-items: center; gap: 0.75rem; }
.carteirinha-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--pico-muted-border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: var(--pico-color); flex-shrink: 0;
}
.carteirinha-name { display: flex; flex-direction: column; gap: 2px; }
.carteirinha-name strong { font-size: 1rem; line-height: 1.2; }
.carteirinha-name small { opacity: 0.6; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.carteirinha-details { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.carteirinha-info { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.carteirinha-info p { margin: 0; }
.carteirinha-qr svg { width: 72px; height: 72px; display: block; }
.carteirinha-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.carteirinha-badge--ativa   { background: rgba(255,255,255,0.25); color: var(--pico-primary-inverse); border: 1px solid rgba(255,255,255,0.4); }
.carteirinha-badge--inativa { background: rgba(0,0,0,0.15);       color: var(--pico-primary-inverse); border: 1px solid rgba(0,0,0,0.2); }
.carteirinha-actions { max-width: 420px; margin-top: 0.75rem; }
.carteirinha-actions button { width: 100%; }
@media print {
  nav, footer, .carteirinha-actions, hgroup > p { display: none !important; }
  .carteirinha-card { max-width: 100%; box-shadow: none !important; border: 1px solid #ccc; border-radius: 0.5rem; }
}

/* ---- Footer --------------------------------------------------------------- */
body > footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--pico-muted-border-color);
  color: var(--pico-muted-color);
}
body > footer a { color: var(--pico-muted-color); }
body > footer a:hover { color: var(--pico-primary); }

/* ---- Area dot (colored circle indicator) --------------------------------------- */
.area-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 0.35rem; vertical-align: -1px; flex-shrink: 0;
}
.area-dot-lc { background: var(--area-lc); }
.area-dot-mt { background: var(--area-mt); }
.area-dot-cn { background: var(--area-cn); }
.area-dot-ch { background: var(--area-ch); }

/* ---- Professor dashboard ------------------------------------------------------ */
.prof-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.75rem; }
.prof-new-questao {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--pico-primary); text-decoration: none;
}
.prof-new-questao:hover { color: var(--pico-primary-hover); }

.prof-questao-list { display: grid; }
a.prof-questao-row { text-decoration: none; }
.prof-questao-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0; border-bottom: 1px dashed var(--pico-muted-border-color);
  gap: 0.75rem; font-size: 0.875rem;
}
.prof-questao-row:last-child { border-bottom: none; }
a.prof-questao-row:hover .prof-questao-title { color: var(--pico-primary); }
.prof-questao-title {
  display: flex; align-items: center; color: var(--pico-color);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.prof-questao-code {
  font-family: var(--pico-font-family-monospace); font-size: 11px;
  color: var(--pico-muted-color); flex-shrink: 0;
}

.prof-ai-hint {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.85rem; margin-top: 0.75rem;
  border: 1px dashed var(--pico-primary); background: #fffbeb;
  border-radius: var(--pico-border-radius); font-size: 0.8125rem; color: #92400e;
}
[data-theme=dark] .prof-ai-hint {
  background: rgba(217, 119, 6, 0.1); color: var(--pico-primary);
  border-color: rgba(217, 119, 6, 0.4);
}

/* ---- Page header (title left + action button right) --------------------------- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.page-header hgroup { margin: 0; }

/* ---- Enrollment status badges ------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-open {
  background: rgba(28, 105, 84, .10); color: rgb(28, 105, 84);
  border: 1px solid rgba(28, 105, 84, .25);
}
.badge-open::before {
  content: ""; display: block; width: 6px; height: 6px;
  border-radius: 50%; background: currentColor; flex-shrink: 0;
}
.badge-closed {
  background: var(--pico-muted-border-color); color: var(--pico-muted-color);
  border: 1px solid var(--pico-muted-border-color);
}
[data-theme=dark] .badge-open {
  background: rgba(110, 231, 183, .12); color: #6ee7b7;
  border-color: rgba(110, 231, 183, .3);
}
.badge-warning {
  background: rgba(217, 119, 6, .10); color: #92400e;
  border: 1px solid rgba(217, 119, 6, .25);
}
[data-theme=dark] .badge-warning {
  background: rgba(251, 191, 36, .12); color: #fbbf24;
  border-color: rgba(251, 191, 36, .30);
}
.badge-danger {
  background: rgba(220, 38, 38, .08); color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, .2);
}
[data-theme=dark] .badge-danger {
  background: rgba(248, 113, 113, .12); color: #f87171;
  border-color: rgba(248, 113, 113, .3);
}

/* ---- Back navigation link ----------------------------------------------------- */
.page-back { font-size: 0.875rem; margin-bottom: 0.25rem; }
.page-back a { color: var(--pico-muted-color); text-decoration: none; }
.page-back a:hover { color: var(--pico-primary); }

/* ---- Filter pills (coordenador processo show) ----------------------------- */
.prof-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.8125rem;
  text-decoration: none; border: 1px solid var(--pico-muted-border-color);
  color: var(--pico-muted-color); background: transparent; transition: all 0.15s;
}
.prof-pill:hover { border-color: var(--pico-primary); color: var(--pico-primary); }
.prof-pill--active { border-color: var(--pico-primary); color: var(--pico-primary); background: color-mix(in srgb, var(--pico-primary) 8%, transparent); font-weight: 600; }
.prof-pill-count { font-size: 0.75rem; opacity: 0.75; }

/* ---- Public inscription link row ----------------------------------------- */
.ps-link-publico {
  display: flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem;
  padding-top: 0.75rem; border-top: 1px solid var(--pico-muted-border-color);
  font-size: 0.8125rem; color: var(--pico-muted-color); flex-wrap: wrap;
}
.ps-link-url { word-break: break-all; color: var(--pico-primary); }

/* ---- Coordenador inscription show ----------------------------------------- */
.insc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.insc-grid__left,
.insc-grid__right { display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 700px) { .insc-grid { grid-template-columns: 1fr; } }

.insc-history { display: flex; flex-direction: column; gap: 0.5rem; }
.insc-history__item { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.insc-history__item p { margin: 0; width: 100%; font-size: 0.8125rem; padding-left: 0.25rem; }

.insc-section-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--pico-muted-color); margin: 0.75rem 0 0.4rem; }

/* ---- Multi-step form nav -------------------------------------------------- */
.step-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 0;
}
.step-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 0.75rem;
  color: var(--pico-muted-color);
  transition: color 0.2s;
}
.step-nav__item::before {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(-50% + 14px);
  right: calc(50% + 14px);
  height: 2px;
  background: var(--pico-muted-border-color);
  transition: background 0.2s;
}
.step-nav__item:first-child::before { display: none; }
.step-nav__dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--pico-muted-border-color);
  color: var(--pico-muted-color);
  z-index: 1; position: relative;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.step-nav__item[data-state="active"] { color: var(--pico-color); font-weight: 600; }
.step-nav__item[data-state="active"] .step-nav__dot {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
}
.step-nav__item[data-state="done"] { color: rgb(28, 105, 84); }
.step-nav__item[data-state="done"] .step-nav__dot {
  background: rgba(28, 105, 84, .12);
  color: transparent;
}
.step-nav__item[data-state="done"] .step-nav__dot::after {
  content: "✓";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(28, 105, 84);
  font-size: 13px; font-weight: 700;
}
.step-nav__item[data-state="done"]::before { background: var(--pico-primary); }
.step-nav__label { line-height: 1.2; max-width: 6rem; }
[data-theme=dark] .step-nav__item[data-state="done"] { color: #6ee7b7; }
[data-theme=dark] .step-nav__item[data-state="done"] .step-nav__dot {
  background: rgba(110, 231, 183, .15); color: transparent;
}
[data-theme=dark] .step-nav__item[data-state="done"] .step-nav__dot::after { color: #6ee7b7; }
@media (max-width: 480px) { .step-nav__label { display: none; } }

/* ---- Process detail info grid ------------------------------------------------- */
.ps-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}
.ps-info-item {
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  background: var(--pico-card-sectioning-background-color);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ps-info-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
  color: var(--pico-muted-color);
}
.ps-info-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pico-color);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.ps-info-value small { font-weight: 400; }

/* ---- Inscription lookup ------------------------------------------------------- */
.inscription-lookup { max-width: 28rem; }
.inscription-lookup input[type="search"] {
  font-family: var(--pico-font-family-monospace);
  text-transform: uppercase;
}

/* ---- Study plan score summary ------------------------------------------------- */
.plano-score {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 0.35rem; padding: 1.25rem 1rem;
}
.plano-score__num {
  font-size: 2.5rem; font-weight: 700; line-height: 1;
  color: var(--pico-primary);
}
.plano-score__unit { font-size: 1.25rem; font-weight: 600; }
.plano-score__label { font-size: 0.875rem; color: var(--pico-muted-color); }
.plano-mini-bar {
  width: 100%; height: 6px; background: var(--pico-muted-border-color);
  border-radius: 3px; overflow: hidden; margin-top: 0.5rem;
}
.plano-mini-fill { height: 100%; background: var(--pico-primary); border-radius: 3px; transition: width 0.3s; }

/* ---- Study plan rendering ----------------------------------------------------- */
.plano-conteudo { line-height: 1.7; }
.plano-conteudo h3.plano-section {
  font-size: 1rem; font-weight: 700; margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.25rem; border-bottom: 1px solid var(--pico-muted-border-color);
}
.plano-conteudo h3.plano-section:first-child { margin-top: 0; }
.plano-conteudo ul { margin: 0.25rem 0 0.75rem 1.25rem; }
.plano-conteudo li { margin-bottom: 0.25rem; }
.plano-conteudo p  { margin: 0 0 0.75rem; }

/* ---- Profile page ------------------------------------------------------------- */
.perfil-dl { display: grid; gap: 0.75rem; margin: 0; }
.perfil-dl div { display: grid; grid-template-columns: 140px 1fr; gap: 0.5rem; align-items: baseline; }
.perfil-dl dt { font-size: 0.875rem; color: var(--pico-muted-color); }
.perfil-dl dd { margin: 0; font-weight: 500; font-size: 0.9375rem; }

.perfil-danger { border-left: 3px solid rgba(220, 38, 38, 0.4); }
.perfil-danger header { color: #dc2626; }
[data-theme=dark] .perfil-danger { border-left-color: rgba(248, 113, 113, 0.4); }
[data-theme=dark] .perfil-danger header { color: #f87171; }

.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

/* ---- Frequency dashboard cards ------------------------------------------------ */
.freq-summary { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; width: 100%; }
.freq-summary-date { flex: 1; }
.freq-count-presentes { font-weight: 600; font-size: 0.875rem; color: #16a34a; }
.freq-count-ausentes  { font-weight: 600; font-size: 0.875rem; color: #dc2626; }
[data-theme=dark] .freq-count-presentes { color: #4ade80; }
[data-theme=dark] .freq-count-ausentes  { color: #f87171; }

/* ---- Cookie consent banner ---------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--pico-background-color);
  border-top: 1px solid var(--pico-muted-border-color);
  padding: 0.875rem 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}
[data-theme=dark] .cookie-banner {
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}
.cookie-banner__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-banner p {
  margin: 0;
  flex: 1 1 240px;
  font-size: 0.875rem;
  color: var(--pico-muted-color);
}

/* ---- Estudante root: full-screen min-height ---------------------------------- */
main.estudante-root { min-height: 100svh; }

/* ---- Edu floating action button group (web) --------------------------------- */
.edu-fab-group {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* Speech bubble card above the FAB */
.edu-fab-bubble {
  background: #92400e;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  max-width: 185px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  position: relative;
  transform-origin: bottom right;
  animation: edu-bubble-life 3.7s forwards;
}
.edu-fab-bubble strong {
  color: #fbbf24;
  font-weight: 700;
}
/* Triangle tail pointing down-right toward the FAB */
.edu-fab-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 22px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 0px solid transparent;
  border-top: 9px solid #92400e;
}

/* appear (0–10%) → hold (10–90%) → fade out (90–100%) */
@keyframes edu-bubble-life {
  0%   {
    opacity: 0;
    transform: translateX(-12px) scale(0.75) translateY(6px);
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  10%  {
    opacity: 1;
    transform: translateX(-12px) scale(1) translateY(0);
    animation-timing-function: linear;
  }
  88%  {
    opacity: 1;
    transform: translateX(-12px) scale(1) translateY(0);
    animation-timing-function: ease-in;
  }
  100% {
    opacity: 0;
    transform: translateX(-12px) scale(0.88) translateY(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .edu-fab-bubble {
    animation: edu-bubble-fade 3.3s linear forwards;
    transform: translateX(-12px);
  }
  @keyframes edu-bubble-fade {
    0%, 90% { opacity: 1; }
    100%     { opacity: 0; }
  }
}

.edu-fab {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--pico-primary);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(255,255,255,0.15);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.edu-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255,255,255,0.2);
}
.edu-fab img {
  width: 50px;
  height: auto;
  object-fit: contain;
  margin-bottom: -4px;
}

/* ---- Edu AI Assistant -------------------------------------------------------- */
.edu-hero {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.edu-hero__img { width: 200px; flex-shrink: 0; }
@media (max-width: 560px) { .edu-hero { flex-direction: column; text-align: center; } .edu-hero__img { width: 140px; } }
.edu-hero__text hgroup { margin-bottom: 1rem; }
.edu-hero__btn { width: auto; display: inline-block; }

.edu-section-title {
  font-size: 0.875rem; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 600; color: var(--pico-muted-color); margin-bottom: 0.75rem;
}

.edu-conv-list { display: flex; flex-direction: column; gap: 0; }
a.edu-conv-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0; text-decoration: none; color: var(--pico-color);
  border-bottom: 1px solid var(--pico-muted-border-color);
  transition: background 0.1s;
}
a.edu-conv-item:last-child { border-bottom: none; }
a.edu-conv-item:hover { color: var(--pico-primary); }
.edu-conv-item__avatar { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: center; }
.edu-conv-item__avatar img { width: 100%; height: auto; object-fit: contain; }
.edu-conv-item__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.edu-conv-item__body strong { font-size: 0.9375rem; line-height: 1.2; }
.edu-conv-item__preview { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edu-conv-item__time { font-size: 11px; flex-shrink: 0; }

/* ---- Chat window ---- */
.edu-chat-wrap {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 68svh;
  min-height: 320px;
}

.edu-empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.75rem; padding: 2rem; text-align: center; color: var(--pico-muted-color);
}
.edu-empty img { opacity: 0.9; }
.edu-empty p { max-width: 36ch; font-size: 0.9375rem; margin: 0; }

.edu-chat {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
}

.edu-message { display: flex; gap: 0.6rem; align-items: flex-end; }
.edu-message--usuario { flex-direction: row-reverse; }

.edu-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: flex-end; justify-content: center;
}
.edu-avatar img { width: 100%; height: auto; object-fit: contain; }

.edu-bubble {
  max-width: 72%; padding: 0.6rem 0.875rem;
  border-radius: 1.1rem; font-size: 0.9375rem; line-height: 1.6;
  word-break: break-word;
}
.edu-bubble p { margin: 0 0 0.4rem; }
.edu-bubble p:last-child { margin-bottom: 0; }
.edu-message--assistente .edu-bubble {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-bottom-left-radius: 0.25rem;
}
.edu-message--usuario .edu-bubble {
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  border-bottom-right-radius: 0.25rem;
}
.edu-time {
  display: block; font-size: 10px; margin-top: 0.3rem;
  color: var(--pico-muted-color); text-align: right;
}
.edu-message--usuario .edu-time { color: rgba(255,255,255,0.65); }

.edu-form {
  display: flex; gap: 0.5rem; align-items: flex-end;
  padding: 1rem 1.25rem; border-top: 1px solid var(--pico-muted-border-color);
  flex-shrink: 0;
}
.edu-form__wrap {
  display: flex; flex-direction: row; align-items: center;
  gap: 0.5rem; flex: 1;
}
.edu-form__input { flex: 7; resize: none; margin: 0; min-height: 44px; min-width: 0; }
.edu-form__btn {
  flex: 0 0 64px; width: 64px !important; align-self: stretch; height: auto;
  background: var(--pico-primary); border: none; padding: 0;
  cursor: pointer; color: white;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: background 0.15s; margin: 0;
}
.edu-form__btn:hover { background: var(--pico-primary-hover); color: white; }

/* ---- Admin: stats grid (4 tiles) ----------------------------------------- */
.usuarios-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) { .usuarios-stats { grid-template-columns: 1fr 1fr; } }

/* ---- Admin: role badges -------------------------------------------------- */
.role-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  font-family: var(--pico-font-family-monospace);
}
.role-estudante   { background: rgba(217,119,6,0.10);  color: #92400e; border: 1px solid rgba(217,119,6,0.25); }
.role-professor   { background: rgba(37,99,235,0.10);  color: #1e40af; border: 1px solid rgba(37,99,235,0.25); }
.role-coordenador { background: rgba(147,51,234,0.10); color: #6b21a8; border: 1px solid rgba(147,51,234,0.25); }
.role-admin       { background: rgba(220,38,38,0.08);  color: #b91c1c; border: 1px solid rgba(220,38,38,0.20); }
[data-theme=dark] .role-estudante   { background: rgba(251,191,36,0.12);  color: #fbbf24; border-color: rgba(251,191,36,0.30); }
[data-theme=dark] .role-professor   { background: rgba(96,165,250,0.12);  color: #93c5fd; border-color: rgba(96,165,250,0.30); }
[data-theme=dark] .role-coordenador { background: rgba(192,132,252,0.12); color: #c084fc; border-color: rgba(192,132,252,0.30); }
[data-theme=dark] .role-admin       { background: rgba(248,113,113,0.12); color: #f87171; border-color: rgba(248,113,113,0.30); }

/* ---- Admin: user avatar initials ---------------------------------------- */
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.user-avatar-estudante   { background: rgba(217,119,6,0.12);  color: #92400e; }
.user-avatar-professor   { background: rgba(37,99,235,0.12);  color: #1e40af; }
.user-avatar-coordenador { background: rgba(147,51,234,0.12); color: #6b21a8; }
.user-avatar-admin       { background: rgba(220,38,38,0.10);  color: #b91c1c; }
[data-theme=dark] .user-avatar-estudante   { background: rgba(251,191,36,0.15);  color: #fbbf24; }
[data-theme=dark] .user-avatar-professor   { background: rgba(96,165,250,0.15);  color: #93c5fd; }
[data-theme=dark] .user-avatar-coordenador { background: rgba(192,132,252,0.15); color: #c084fc; }
[data-theme=dark] .user-avatar-admin       { background: rgba(248,113,113,0.15); color: #f87171; }

/* ---- Admin: name cell with avatar ---------------------------------------- */
.user-name-cell { display: inline-flex; align-items: center; gap: 0.6rem; }

/* ---- Admin: action buttons -------------------------------------------- */
.user-actions { white-space: nowrap; }
.user-actions .btn-sm { display: inline-flex; align-items: center; gap: 4px; }

/* ---- Table overflow on mobile ------------------------------------------ */
.table-wrap { overflow-x: auto; overflow-y: visible; }

/* ---- Inline / block form helpers ---------------------------------------- */
form.form-inline { display: inline; }
form.form-block  { display: block; margin: 0; }

/* ---- User row dropdown (3-dots kebab menu) -------------------------------- */
.user-menu {
  display: inline-block;
  position: relative;
  margin: 0;
  vertical-align: middle;
}

/* Ghost trigger — invisible border, appears on hover/focus */
.user-menu > summary.user-menu__trigger::after { display: none !important; }
.user-menu > summary.user-menu__trigger::-webkit-details-marker { display: none; }
.user-menu > summary.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;
  list-style: none;
  border-radius: var(--pico-border-radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--pico-muted-color);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.user-menu > summary.user-menu__trigger:hover {
  background: var(--pico-muted-border-color);
  border-color: var(--pico-muted-border-color);
  color: var(--pico-color);
}
.user-menu > summary.user-menu__trigger:focus-visible {
  outline: 2px solid var(--pico-primary-focus);
  outline-offset: 2px;
  color: var(--pico-color);
}
/* Active state while dropdown is open */
details[open].user-menu > summary.user-menu__trigger {
  background: var(--pico-muted-border-color);
  border-color: var(--pico-muted-border-color);
  color: var(--pico-color);
}

/* Dropdown panel */
.user-menu > ul[role="listbox"] {
  position: absolute;
  right: 0;
  left: auto !important;
  top: calc(100% + 6px);
  min-width: 190px;
  z-index: 30;
  padding: 0.3rem 0;
  border-radius: calc(var(--pico-border-radius) + 2px);
  background: var(--pico-card-background-color);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 4px 16px rgba(0,0,0,0.10),
    0 1px 4px rgba(0,0,0,0.06);
}
[data-theme=dark] .user-menu > ul[role="listbox"] {
  background: var(--pico-card-background-color);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 4px 20px rgba(0,0,0,0.45),
    0 1px 4px rgba(0,0,0,0.3);
}

/* Entry animation — respects prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  details[open].user-menu > ul[role="listbox"] {
    animation: user-menu-in 0.14s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
@keyframes user-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* List items */
.user-menu > ul[role="listbox"] > li { padding: 0; }
.user-menu > ul[role="listbox"] > li + li {
  border-top: 1px solid var(--pico-muted-border-color);
  margin-top: 0.2rem;
  padding-top: 0.2rem;
}

/* Menu button rows */
.user-menu__btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.875rem;
  background: transparent;
  border: none;
  color: var(--pico-color);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  margin: 0;
  border-radius: 0;
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
}
.user-menu__btn .lucide {
  color: var(--pico-muted-color);
  flex-shrink: 0;
  transition: color 0.12s;
}
.user-menu__btn:hover {
  background: var(--pico-muted-border-color);
  color: var(--pico-color);
}
.user-menu__btn:hover .lucide { color: var(--pico-color); }

/* Destructive variant (Desativar) */
.user-menu__btn--danger              { color: #b91c1c; }
.user-menu__btn--danger .lucide      { color: #b91c1c; }
.user-menu__btn--danger:hover        { background: rgba(220,38,38,0.08); color: #991b1b; }
.user-menu__btn--danger:hover .lucide { color: #991b1b; }
[data-theme=dark] .user-menu__btn--danger              { color: #f87171; }
[data-theme=dark] .user-menu__btn--danger .lucide      { color: #f87171; }
[data-theme=dark] .user-menu__btn--danger:hover        { background: rgba(248,113,113,0.10); color: #fca5a5; }
[data-theme=dark] .user-menu__btn--danger:hover .lucide { color: #fca5a5; }

/* ---- Admin: Estatísticas page -------------------------------------------- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 680px) { .admin-stats-grid { grid-template-columns: 1fr; } }

.stat-bar-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr 2.5rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}
.stat-bar-row:last-child { border-bottom: none; }
.stat-bar-row__label { display: flex; align-items: center; }
.stat-bar-row__count {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.8125rem;
  color: var(--pico-muted-color);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Turmas — 3-col KPI strip inside article */
.stat-turmas-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 540px) { .stat-turmas-kpis { grid-template-columns: 1fr 1fr; } }

/* ---- 4-column responsive grid ------------------------------------------------- */
.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
@media (max-width: 900px) { .grid-4col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .grid-4col { grid-template-columns: 1fr; } }

/* ---- 3-column responsive grid with vertical scroll ---------------------------- */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-height: calc(100vh - 11rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}
@media (max-width: 860px) { .grid-3col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .grid-3col { grid-template-columns: 1fr; } }

/* Processos por status — horizontal chips row */
.stat-proc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.25rem;
}
.stat-proc-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

/* ---- Toast alerts -------------------------------------------------------------- */
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-0.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-0.5rem); }
}
.toast {
  animation: toast-in 0.2s ease;
}
.toast-exiting {
  animation: toast-out 0.3s ease forwards;
}
