/* Ativa Envios — design system */
:root {
  --ativa-primary: #12201b;
  --ativa-primary-soft: #1a2e26;
  --ativa-accent: #0ad596;
  --ativa-accent-hover: #09bf86;
  --ativa-accent-soft: rgba(10, 213, 150, 0.12);
  --ativa-black: #1d1d1f;
  --ativa-muted: #6e6e73;
  --ativa-faint: #86868b;

  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-subtle: #fbfbfd;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 980px;

  --sidebar-w: 260px;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ativa-black);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--ativa-primary);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover { color: var(--ativa-accent-hover); }

h1, h2, h3 {
  margin: 0;
  color: var(--ativa-primary);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.1rem; font-weight: 600; }
h3 { font-size: 0.95rem; font-weight: 600; }

p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

/* ── Shell ─────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--ativa-primary) 0%, #0c1612 100%);
  color: #e8ebe9;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  color: #fff;
  text-decoration: none;
}
.sidebar-brand:hover { color: #fff; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ativa-accent);
  color: var(--ativa-primary);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(10, 213, 150, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.brand-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.nav-group { margin-bottom: 1.25rem; }

.nav-label {
  margin: 0 0 0.4rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-link.is-active {
  background: var(--ativa-accent-soft);
  color: var(--ativa-accent);
}
.nav-ico {
  display: inline-flex;
  opacity: 0.85;
  flex-shrink: 0;
}
.nav-link.is-active .nav-ico { opacity: 1; }

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.25rem;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 213, 150, 0.2);
  color: var(--ativa-accent);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-meta strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-meta small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
}

.nav-link--logout {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}
.nav-link--logout:hover { color: #ff8a8a; background: rgba(255, 80, 80, 0.08); }
.logout-form {
  margin: 0;
}
.logout-form .nav-link--logout {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.menu-toggle {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.35rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ativa-primary);
  display: inline-flex;
}
.menu-toggle:hover { background: var(--bg); }

.content {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.75rem 3.5rem;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 35;
  backdrop-filter: blur(2px);
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .topbar { display: flex; }
  .content { padding: 1.25rem 1rem 2.5rem; }
}

/* ── Auth layout ───────────────────────────────────── */
.is-auth {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(10, 213, 150, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(18, 32, 27, 0.08), transparent 50%),
    var(--bg);
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1.5rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ativa-primary);
}
.auth-brand strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.auth-brand small {
  display: block;
  font-size: 0.8rem;
  color: var(--ativa-muted);
  font-weight: 500;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
}

.auth-panel .page-header { margin-bottom: 1rem; }
.auth-panel .card { margin-bottom: 0; }

.login-wrap { width: 100%; }

/* ── Page structure ────────────────────────────────── */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.page-header__text { min-width: 0; flex: 1; }
.page-header__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ativa-faint);
}
.page-header__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
}
.page-header__desc {
  margin: 0.4rem 0 0;
  color: var(--ativa-muted);
  font-size: 0.9rem;
  max-width: 42rem;
  font-weight: 400;
}
.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.section-header h2 { margin: 0; }
.section-header__hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--ativa-muted);
  font-weight: 400;
}

.period-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.period-filter__item {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ativa-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.period-filter__item:hover {
  color: var(--ativa-primary);
  border-color: var(--ativa-primary);
}
.period-filter__item.is-active {
  background: var(--ativa-primary);
  border-color: var(--ativa-primary);
  color: #fff;
}

.stack { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.35rem 1.5rem;
  margin-bottom: 0;
}

.card--flush { padding: 0; overflow: hidden; }
.card--flush .table-wrap { border-radius: 0; }
.card__body { padding: 1.35rem 1.5rem; }
.card__footer {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.card-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ativa-faint);
  margin: 0 0 1rem;
}

/* ── Stats ─────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}
.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  color: var(--ativa-muted);
  font-weight: 500;
}
.stat .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ativa-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.stat .label {
  color: var(--ativa-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--ativa-accent);
  color: #fff !important;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.2;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  box-shadow: 0 1px 2px rgba(10, 213, 150, 0.25);
}
.btn:hover {
  background: var(--ativa-accent-hover);
  color: #fff !important;
}
.btn:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--ativa-primary);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--ativa-primary-soft); }

.btn-ghost {
  background: transparent;
  color: var(--ativa-primary) !important;
  box-shadow: none;
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--ativa-primary) !important;
}

.btn-danger {
  background: #ff3b30;
  box-shadow: none;
}
.btn-danger:hover { background: #e0342b; }

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--ativa-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.btn-link:hover { color: var(--ativa-accent-hover); }

.actions-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.actions-inline form { display: inline; margin: 0; }

/* ── Flash ─────────────────────────────────────────── */
.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.flash {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.flash-success {
  background: #e8f8ef;
  color: #0d5c32;
  border-color: rgba(13, 92, 50, 0.12);
}
.flash-danger {
  background: #fff0f0;
  color: #9b1c1c;
  border-color: rgba(155, 28, 28, 0.12);
}
.flash-warning {
  background: #fff8e6;
  color: #7a5a00;
  border-color: rgba(122, 90, 0, 0.12);
}
.flash-info {
  background: #eef6ff;
  color: #0b4a7a;
  border-color: rgba(11, 74, 122, 0.12);
}

/* ── Tables / logs ─────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ativa-faint);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--ativa-black);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr {
  transition: background 0.12s var(--ease);
}
tbody tr:hover td { background: rgba(18, 32, 27, 0.02); }

.table-link {
  font-weight: 600;
  color: var(--ativa-primary);
}
.table-link:hover { color: var(--ativa-accent-hover); }

.td-muted { color: var(--ativa-muted); font-size: 0.85rem; }
.td-mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--ativa-muted);
}
.td-error {
  color: #9b1c1c;
  font-size: 0.8rem;
  max-width: 280px;
  word-break: break-word;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--ativa-muted);
}
.empty-state p { margin: 0.35rem 0 0; font-size: 0.9rem; }
.empty-state strong {
  display: block;
  color: var(--ativa-primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: capitalize;
  white-space: nowrap;
  background: #f0f0f2;
  color: #5c5c62;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.badge-pending { background: #fff4d6; color: #8a6d00; }
.badge-running { background: #e5f1ff; color: #0b5cad; }
.badge-completed, .badge-started { background: #e3f8ec; color: #0d6b3a; }
.badge-failed { background: #ffe8e6; color: #b42318; }
.badge-cancelled { background: #f0f0f2; color: #5c5c62; }
.badge-skipped_busy { background: #fff4d6; color: #8a6d00; }
.badge-success, .badge-ok, .badge-enviado { background: #e3f8ec; color: #0d6b3a; }
.badge-error, .badge-erro { background: #ffe8e6; color: #b42318; }

/* ── Meta / detail grids ───────────────────────────── */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.15rem 1.5rem;
}
.meta-item { min-width: 0; }
.meta-item__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ativa-faint);
  margin-bottom: 0.3rem;
}
.meta-item__value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ativa-black);
  word-break: break-word;
}

.dl-table { width: 100%; }
.dl-table th {
  width: 160px;
  text-align: left;
  padding: 0.65rem 1rem 0.65rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ativa-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.dl-table td {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.dl-table tr:last-child th,
.dl-table tr:last-child td { border-bottom: none; }

/* ── Forms ─────────────────────────────────────────── */
.form-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.form-section:first-child { padding-top: 0; }
.form-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.form-section__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ativa-primary);
}
.form-section__hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--ativa-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1.15rem;
}
.form-grid .span-2 { grid-column: span 2; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
}

label {
  display: block;
  margin-top: 0;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ativa-primary);
}
label + label,
.form-check + label,
label + .form-check { margin-top: 0.85rem; }

.form-grid label { margin-top: 0; }

input[type=text],
input[type=password],
input[type=email],
input[type=number],
input[type=time],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  margin-top: 0.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--ativa-black);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ativa-accent);
  box-shadow: 0 0 0 3px var(--ativa-accent-soft);
}
textarea {
  min-height: 280px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  resize: vertical;
}

/* ── Template HTML editor + preview ─────────────────── */
.editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: stretch;
  margin-top: 0.75rem;
}
.editor-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  overflow: hidden;
}
.editor-pane__label {
  padding: 0.45rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ativa-faint);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.editor-pane textarea.editor-code,
textarea.editor-code {
  flex: 1;
  min-height: 560px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  resize: vertical;
  background: #fff;
}
.editor-pane textarea.editor-code:focus {
  box-shadow: none;
  border: 0;
}
.editor-preview iframe {
  width: 100%;
  min-height: 560px;
  flex: 1;
  border: 0;
  background: #fff;
}
@media (max-width: 960px) {
  .editor-split {
    grid-template-columns: 1fr;
  }
  .editor-pane textarea.editor-code,
  textarea.editor-code,
  .editor-preview iframe {
    min-height: 360px;
  }
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.form-check {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
}
.form-check input { width: auto; margin: 0; }
.form-check label { margin: 0; font-weight: 500; }

.hint {
  color: var(--ativa-muted);
  font-size: 0.8rem;
  font-weight: 400;
  margin: 0.3rem 0 0;
}
.field-error {
  color: #b42318;
  font-size: 0.8rem;
  margin: 0.3rem 0 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.dias-semana {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem 1rem;
  background: var(--bg-subtle);
}
.dias-semana legend {
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0 0.35rem;
  color: var(--ativa-primary);
}
.dias-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.5rem;
}
.dia-check,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.85rem;
  margin-top: 0;
  color: var(--ativa-black);
}
.dia-check input,
.inline-check input { width: auto; margin: 0; }

/* ── Progress bar ──────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.75rem;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ativa-accent), #06b885);
  border-radius: inherit;
  transition: width 0.4s var(--ease);
}

/* ── Breadcrumb / back ─────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--ativa-muted);
}
.breadcrumb a { color: var(--ativa-muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--ativa-accent-hover); }
.breadcrumb__sep { opacity: 0.4; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ativa-muted);
  margin-bottom: 0.75rem;
}
.back-link:hover { color: var(--ativa-primary); }

/* ── TOTP / misc ───────────────────────────────────── */
.totp-setup { text-align: center; }
.totp-setup__hint {
  color: var(--ativa-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}
.totp-qr {
  display: flex;
  justify-content: center;
  margin: 0 auto 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
  max-width: 100%;
}
.totp-qr img {
  display: block;
  width: 200px;
  height: 200px;
  max-width: 100%;
  object-fit: contain;
}
.totp-setup__secret-label {
  font-size: 0.8rem;
  color: var(--ativa-muted);
  margin: 0 0 0.35rem;
}
.totp-secret {
  display: block;
  word-break: break-all;
  font-size: 0.8rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.totp-setup__form { text-align: left; }
.totp-setup__form .btn { margin-top: 0.5rem; }

.hero-card {
  text-align: center;
  padding: 2.5rem 1.75rem;
}
.hero-card h1 { margin-bottom: 0.5rem; }
.hero-card p {
  color: var(--ativa-muted);
  margin-bottom: 1.5rem;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
