:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --bg-card: #111827;
  --line: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --green: #166534;
  --green-2: #22c55e;
  --danger: #dc2626;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top right, rgba(34,197,94,.15), transparent 28%), var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(17,24,39,.96);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.brand-eyebrow {
  color: var(--green-2);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.auth-card h1 { margin: 0 0 8px; font-size: 30px; }
.auth-card p { margin: 0 0 20px; color: var(--muted); }

.field { margin-top: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; }
.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #0b1220;
  color: var(--text);
}

.password-wrap { position: relative; }
.password-wrap button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary { background: var(--green); color: #fff; width: 100%; margin-top: 18px; }
.btn-secondary { background: #1e293b; color: var(--text); }

.feedback { margin-top: 14px; font-size: 14px; color: var(--muted); min-height: 20px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #0b1220;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 10px 12px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.sidebar-brand h2 { margin: 0; font-size: 22px; }
.sidebar-brand p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.menu-section { margin-bottom: 18px; }
.menu-section h4 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-list a {
  display: block;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
}
.menu-list a:hover, .menu-list a.active { background: rgba(22,101,52,.22); color: #dcfce7; }

.content-wrap { display: grid; grid-template-rows: auto 1fr; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { margin: 0; font-size: 24px; }
.topbar .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.badge {
  background: rgba(22,101,52,.22);
  color: #dcfce7;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.page-main { padding: 22px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.mt-16 { margin-top: 16px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}


.metric {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  margin: 4px 0 8px;
  color: #dcfce7;
}

.muted { color: var(--muted); }
.empty-state { color: var(--muted); }

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(34,197,94,.15), transparent 30%),
    linear-gradient(180deg, rgba(17,24,39,.98), rgba(15,23,42,.98));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 6px 0 10px;
  font-size: 30px;
}

.eyebrow {
  color: var(--green-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(22,101,52,.28);
  color: #dcfce7;
  font-weight: 800;
  letter-spacing: .06em;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(22,101,52,.18);
  border: 1px solid rgba(34,197,94,.22);
  color: #dcfce7;
  font-size: 13px;
  font-weight: 700;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mini-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: #0b1220;
  border: 1px solid var(--line);
}

.mini-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =========================
   MÓDULOS GESTOR / PROGRAMAÇÃO
   ========================= */

.prog-context-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prog-filter-actions {
  align-self: end;
}

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

.stepbtn {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
}

.stepbtn.active {
  background: rgba(22,101,52,.25);
  border-color: rgba(22,101,52,.55);
  color: #dcfce7;
}

.prog-list {
  display: grid;
  gap: 14px;
}

.prog-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: #0b1220;
}

.prog-row-content {
  display: grid;
  gap: 14px;
}

.prog-colab-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prog-colab-name {
  font-weight: 800;
  font-size: 17px;
}

.prog-colab-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.prog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prog-check {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 12px 14px;
  min-height: 48px;
}

.prog-check input {
  width: 18px;
  height: 18px;
}

.prog-block-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(239,68,68,.08);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,.18);
  font-size: 13px;
}

.mt-16 {
  margin-top: 16px;
}

@media (max-width: 980px) {
  .prog-context-grid,
  .prog-fields {
    grid-template-columns: 1fr;
  }

  .prog-colab-main {
    flex-direction: column;
    align-items: flex-start;
  }
}
