/* TOPO DO ARQUIVO: fonte + ajustes de tema */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --border: #e6eaf2;
  --text: #0b1220;
  --text-dim: #5b6475;
  --primary: #6366f1;       /* Indigo 500 */
  --primary-600: #4f46e5;   /* Indigo 600 */
  --primary-700: #4338ca;   /* Indigo 700 */
  --accent: #22d3ee;        /* Cyan 400 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px;
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.10);
  --container: 1200px;
  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 14px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.8rem, 2.5vw, 2.2rem); }
h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); }
h4 { font-size: 1.05rem; color: var(--text-dim); }

.main-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--sp-4);
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--sp-6);
}

.logo-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  scale: 1.8;
  margin-left: -400px;
}
@media(max-width: 2052px){
  .logo-title{
    margin-left: 5vw;
  }
}
@media(max-width: 698px){
  .logo-title{
    scale: 1.2;
  }
}
.logo-title:hover {
  color: var(--primary);
  text-decoration: none;
}

.user-info {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-dim);
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.emergency-btn,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: all .2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}
.btn-primary:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(29, 78, 216, .28);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  background: #f1f5f9;
}

.emergency-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff !important;
  border: none;
  box-shadow: 0 10px 24px rgba(220, 38, 38, .25);
}
.emergency-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Danger button */
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  box-shadow: 0 10px 24px rgba(220, 38, 38, .25);
}
.btn-danger:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-7);
  width: 100%;
  max-width: var(--container);
  margin: var(--sp-7) auto;
  padding-inline: var(--sp-6);
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
  height: fit-content;
  position: sticky;
  top: calc(64px + var(--sp-6));
}

.sidebar .title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  font-weight: 700;
  color: var(--text);
}

.sidebar .section + .section {
  margin-top: var(--sp-6);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.nav-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all .2s ease;
}
.nav-list li a:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .10);
  transform: translateY(-1px);
  text-decoration: none;
}

.sidebar-card {
  padding: var(--sp-4);
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.badge-tip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-700);
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 6px 10px;
  border-radius: 999px;
}

.sidebar-overlay {
  display: none;
}
.sidebar-overlay.show {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 25;
}

.menu-toggle,
.close-sidebar {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s ease;
}
.menu-toggle:hover,
.close-sidebar:hover {
  background: var(--surface-2);
}

.main-content {
  min-width: 0;
}

.dashboard-wrapper {
  display: grid;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(180px 180px at 50% 50%, rgba(37, 99, 235, .12), transparent 70%);
  transform: rotate(20deg);
}
.hero-text p {
  margin: var(--sp-3) 0 var(--sp-6);
  color: var(--text-dim);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.content-header {
  display: grid;
  gap: 6px;
}
.content-header p {
  color: var(--text-dim);
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-7);
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-rows: auto 1fr;
  transition: transform .18s ease, box-shadow .18s ease, border-color .2s ease;
}
.content-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #dbeafe;
}
.content-card-image {
  display: grid;
  place-items: center;
  font-size: 48px;
  padding: var(--sp-7);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.content-card-body {
  padding: var(--sp-5);
  display: grid;
  gap: 10px;
}
.content-card-title {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  font-size: 1.15rem;
}
.content-card-excerpt {
  color: var(--text-dim);
  font-size: 1.05rem;
}
.content-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-3);
  color: var(--text-dim);
}

.pill,
.result-low,
.result-medium,
.result-high {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid transparent;
}

.result-low {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}
.result-medium {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.result-high {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.form-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-7);
}

form {
  display: grid;
  gap: var(--sp-5);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.02);
}
textarea { min-height: 140px; resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.table th, .table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table thead th {
  background: #f8fafc;
  color: var(--text-dim);
  font-weight: 700;
}
.table tr:last-child td {
  border-bottom: none;
}

.note-box {
  background-color: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 16px;
  margin: 12px 0;
  border-radius: 10px;
  color: var(--text);
}

.section h4 {
  margin-bottom: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-6) 0;
}

/* Footer */
footer {
  margin: 24px 0 0 0;
  padding: 16px 0 0 0;
  border-top: 1px solid #eee;
}
.footer-logos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-logo { width: 22px; height: 22px; }
.footer-text { font-weight: 600; color: #666; }

/* Tips cards */
.tips-section { margin-top: 12px; }
.tips-header p { margin: 0 0 12px 0; color: #666; }
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 18px; }
.tip-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; grid-column-gap: 14px; grid-row-gap: 8px; padding: 24px; border-radius: 16px; background: #fff; border: 1px solid #e9e9ef; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; }
.tip-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-top-left-radius: 16px; border-top-right-radius: 16px; background: linear-gradient(90deg,#6ea8fe,#8a7dff,#ff7aa2,#2ed1bd); }
.tip-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.10); border-color: #e0e0e0; }
.tip-emoji { grid-row: span 2; align-self: start; font-size: 28px; line-height: 1; opacity: .95; }
.tip-title { margin: 0; font-size: 18px; font-weight: 700; }
.tip-text { margin: 2px 0 0 0; color: #444; font-size: 15px; line-height: 1.7; }
@media (max-width: 1024px) { .tips-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 640px) { .tips-grid { grid-template-columns: 1fr; } }
@media (min-width: 860px) {
  .tip-title { font-size: 19px; }
  .tip-text { font-size: 16px; }
}

/* Force: Dicas sempre 1 por linha, mesmo com classe content-grid aplicada */
.content-grid.tips-grid { grid-template-columns: 1fr !important; }
.tips-grid .tip-card { width: 100%; }

/* Destaque do primeiro card de Dicas */
.tips-grid .tip-card:first-child {
  padding: 28px 28px 26px 28px;
  border-width: 1px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.08);
}
.tips-grid .tip-card:first-child .tip-emoji { font-size: 36px; }
.tips-grid .tip-card:first-child .tip-title { font-size: 22px; }
.tips-grid .tip-card:first-child .tip-text { font-size: 17px; line-height: 1.75; }

@media (min-width: 860px) {
  .tips-grid .tip-card:first-child .tip-title { font-size: 23px; }
  .tips-grid .tip-card:first-child .tip-text { font-size: 18px; }
  .tips-grid .tip-card:first-child .tip-emoji { font-size: 40px; }
}
@media (max-width: 1024px) { .tips-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 640px) { .tips-grid { grid-template-columns: 1fr; } }
@media (min-width: 860px) {
  .tip-title { font-size: 19px; }
  .tip-text { font-size: 16px; }
}

/* Responsividade */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  /* Botões de controle visíveis no mobile */
  #openSidebar, .close-sidebar { display: inline-flex; }

  /* Sidebar como off-canvas */
  .sidebar {
    position: fixed;
    left: 0;
    top: 64px; /* será ajustado via JS ao carregar */
    height: calc(100vh - 64px);
    width: min(360px, 88vw);
    transform: translateX(-110%);
    transition: transform .25s ease, box-shadow .25s ease;
    z-index: 50;
    overflow: auto;
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 0 20px 40px rgba(2,6,23,.24);
  }
}

@media (min-width: 1025px) {
  #openSidebar, .close-sidebar { display: none; }
  .sidebar {
    position: sticky;
    top: calc(64px + var(--sp-6));
    transform: none !important;
    height: fit-content;
  }
}

@media (max-width: 768px) {
  .header-content {
    gap: var(--sp-3);
    padding-inline: var(--sp-4);
  }
  .app-shell {
    padding-inline: var(--sp-4);
    margin: var(--sp-6) auto;
    gap: var(--sp-6);
  }
  .hero {
    padding: var(--sp-6);
  }
  .user-info {
    gap: var(--sp-2);
  }
  .hero-actions {
    gap: var(--sp-2);
  }
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .24);
  border-radius: 10px;
}

img[draggable="false"] {
  user-select: none;
  -webkit-user-drag: none;
}
img {
  border-radius: 10px;
}

.shadow-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.muted {
  color: var(--text-dim);
}

.small {
  font-size: 0.9rem;
}
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.45;
}
body::before {
  width: 520px; height: 520px;
  top: -140px; left: -140px;
  background: radial-gradient(closest-side, rgba(99,102,241,.25), transparent 70%);
}
body::after {
  width: 560px; height: 560px;
  right: -180px; bottom: -180px;
  background: radial-gradient(closest-side, rgba(34,211,238,.20), transparent 72%);
}

.main-header {
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(99,102,241,.12);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 6px 20px rgba(2,6,23,.06);
  position: sticky;
  top: 0;
}
.main-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.35), transparent);
}

.sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.94));
  border: 1px solid rgba(99,102,241,.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(2,6,23,.08);
}

.nav-list li a {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: #e7ecf5;
  box-shadow: 0 3px 10px rgba(2,6,23,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nav-list li a:hover {
  transform: translateY(-2px);
  border-color: #cfd8ff;
  box-shadow: 0 12px 24px rgba(2,6,23,.10);
  text-decoration: none;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7ff 55%, #ffffff 100%);
  border: 1px solid rgba(99,102,241,.12);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  filter: blur(35px);
  pointer-events: none;
}
.hero::before {
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(500px 200px at 0% 0%, rgba(99,102,241,.14), transparent 55%);
}
.hero::after {
  inset: auto -10% -30% auto;
  height: 60%;
  background: radial-gradient(500px 200px at 100% 100%, rgba(34,211,238,.12), transparent 55%);
}
.hero-text p {
  color: #606a7d;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: 1px solid rgba(79,70,229,.30);
  box-shadow: 0 10px 20px rgba(79,70,229,.24), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(79,70,229,.28), 0 0 0 4px rgba(99,102,241,.15);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff, #f7f9ff);
  color: #0f172a;
  border: 1px solid #e7ecf5;
  box-shadow: 0 4px 12px rgba(2,6,23,.06);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #ffffff, #f3f6ff);
  border-color: #d9e2ff;
}

.emergency-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid rgba(220,38,38,.4);
  color: #fff !important;
  animation: pulse-glow 2.8s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(220, 38, 38, .25);
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); }
  50% { box-shadow: 0 0 0 14px rgba(239,68,68,0); }
}
.content-card {
  border: 1px solid #e8ecf6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(2,6,23,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .2s ease;
}
.content-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
}
.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2,6,23,.10);
  border-color: #dbe4ff;
}
.content-card-image {
  background: linear-gradient(180deg, #f5f7ff, #f7fbff);
}
.content-card-title {
  letter-spacing: -0.015em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select, textarea {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-color: #e7ecf5;
  box-shadow: inset 0 1px 0 rgba(16,24,40,.03), 0 1px 0 rgba(255,255,255,.6);
  border-radius: 12px;
}
input:focus, select:focus, textarea:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 5px rgba(99,102,241,.15), inset 0 1px 0 rgba(16,24,40,.03);
}

.note-box {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-left: 5px solid #6366f1;
  border-radius: 12px;
}

html { scrollbar-gutter: stable both-edges; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c7d2fe, #bae6fd);
  border-radius: 999px;
  border: 2px solid #f6f8fc;
}
::-webkit-scrollbar-track { background: transparent; }
img { border-radius: 12px; }
img[draggable="false"] { opacity: .98; }
.option-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.option-card {
  display: block;
  position: relative;
  user-select: none;
}

.option-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.option-card .option-box {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  color: var(--text, #0f172a);
  border: 2px solid #e7ecf5;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(2,6,23,.04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .06s ease, background .18s ease;
  cursor: pointer;
}

.option-card:hover .option-box {
  border-color: #cfd8ff;
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
}

.option-input:focus + .option-box {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 5px rgba(99,102,241,.15);
}

.option-input:active + .option-box {
  transform: scale(0.997);
}

.option-input:checked + .option-box {
  border-color: #16a34a; /* verde */
  box-shadow: 0 0 0 5px rgba(22,163,74,.12), 0 6px 16px rgba(2,6,23,.06);
  background: linear-gradient(180deg, #ffffff, #fbfffd);
}
.nav-list li a:hover {
  transform: translateY(-2px);
  border-color: #cfd8ff;
  box-shadow: 0 12px 24px rgba(2,6,23,.10);
  text-decoration: none;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7ff 55%, #ffffff 100%);
  border: 1px solid rgba(99,102,241,.12);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  filter: blur(35px);
  pointer-events: none;
}
.hero::before {
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(500px 200px at 0% 0%, rgba(99,102,241,.14), transparent 55%);
}
.hero::after {
  inset: auto -10% -30% auto;
  height: 60%;
  background: radial-gradient(500px 200px at 100% 100%, rgba(34,211,238,.12), transparent 55%);
}
.hero-text p {
  color: #606a7d;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: 1px solid rgba(79,70,229,.30);
  box-shadow: 0 10px 20px rgba(79,70,229,.24), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(79,70,229,.28), 0 0 0 4px rgba(99,102,241,.15);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff, #f7f9ff);
  color: #0f172a;
  border: 1px solid #e7ecf5;
  box-shadow: 0 4px 12px rgba(2,6,23,.06);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #ffffff, #f3f6ff);
  border-color: #d9e2ff;
}

.emergency-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid rgba(220,38,38,.4);
  color: #fff !important;
  animation: pulse-glow 2.8s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(220, 38, 38, .25);
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); }
  50% { box-shadow: 0 0 0 14px rgba(239,68,68,0); }
}

.content-card {
  border: 1px solid #e8ecf6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(2,6,23,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .2s ease;
}
.content-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
}
.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2,6,23,.10);
  border-color: #dbe4ff;
}
.content-card-image {
  background: linear-gradient(180deg, #f5f7ff, #f7fbff);
}
.content-card-title {
  letter-spacing: -0.015em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select, textarea {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-color: #e7ecf5;
  box-shadow: inset 0 1px 0 rgba(16,24,40,.03), 0 1px 0 rgba(255,255,255,.6);
  border-radius: 12px;
}
input:focus, select:focus, textarea:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 5px rgba(99,102,241,.15), inset 0 1px 0 rgba(16,24,40,.03);
}

.note-box {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-left: 5px solid #6366f1;
  border-radius: 12px;
}

html { scrollbar-gutter: stable both-edges; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c7d2fe, #bae6fd);
  border-radius: 999px;
  border: 2px solid #f6f8fc;
}
::-webkit-scrollbar-track { background: transparent; }
img { border-radius: 12px; }
img[draggable="false"] { opacity: .98; }
.option-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.option-card {
  display: block;
  position: relative;
  user-select: none;
}

.option-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.option-card .option-box {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  color: var(--text, #0f172a);
  border: 2px solid #e7ecf5;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(2,6,23,.04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .06s ease, background .18s ease;
  cursor: pointer;
}

.option-card:hover .option-box {
  border-color: #cfd8ff;
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
}

.option-input:focus + .option-box {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 5px rgba(99,102,241,.15);
}

.option-input:active + .option-box {
  transform: scale(0.997);
}

.option-input:checked + .option-box {
  border-color: #16a34a; /* verde */
  box-shadow: 0 0 0 5px rgba(22,163,74,.12), 0 6px 16px rgba(2,6,23,.06);
  background: linear-gradient(180deg, #ffffff, #fbfffd);
}
.nav-list li a:hover {
  transform: translateY(-2px);
  border-color: #cfd8ff;
  box-shadow: 0 12px 24px rgba(2,6,23,.10);
  text-decoration: none;
}

.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f6f7ff 55%, #ffffff 100%);
  border: 1px solid rgba(99,102,241,.12);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  filter: blur(35px);
  pointer-events: none;
}
.hero::before {
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(500px 200px at 0% 0%, rgba(99,102,241,.14), transparent 55%);
}
.hero::after {
  inset: auto -10% -30% auto;
  height: 60%;
  background: radial-gradient(500px 200px at 100% 100%, rgba(34,211,238,.12), transparent 55%);
}
.hero-text p {
  color: #606a7d;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: 1px solid rgba(79,70,229,.30);
  box-shadow: 0 10px 20px rgba(79,70,229,.24), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(79,70,229,.28), 0 0 0 4px rgba(99,102,241,.15);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff, #f7f9ff);
  color: #0f172a;
  border: 1px solid #e7ecf5;
  box-shadow: 0 4px 12px rgba(2,6,23,.06);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #ffffff, #f3f6ff);
  border-color: #d9e2ff;
}

.emergency-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid rgba(220,38,38,.4);
  color: #fff !important;
  animation: pulse-glow 2.8s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(220, 38, 38, .25);
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); }
  50% { box-shadow: 0 0 0 14px rgba(239,68,68,0); }
}

.content-card {
  border: 1px solid #e8ecf6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(2,6,23,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .2s ease;
}
.content-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
}
.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2,6,23,.10);
  border-color: #dbe4ff;
}
.content-card-image {
  background: linear-gradient(180deg, #f5f7ff, #f7fbff);
}
.content-card-title {
  letter-spacing: -0.015em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select, textarea {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-color: #e7ecf5;
  box-shadow: inset 0 1px 0 rgba(16,24,40,.03), 0 1px 0 rgba(255,255,255,.6);
  border-radius: 12px;
}
input:focus, select:focus, textarea:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 5px rgba(99,102,241,.15), inset 0 1px 0 rgba(16,24,40,.03);
}

.note-box {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border-left: 5px solid #6366f1;
  border-radius: 12px;
}

html { scrollbar-gutter: stable both-edges; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c7d2fe, #bae6fd);
  border-radius: 999px;
  border: 2px solid #f6f8fc;
}
::-webkit-scrollbar-track { background: transparent; }
img { border-radius: 12px; }
img[draggable="false"] { opacity: .98; }

/* Estado desabilitado para os botões */
.btn-primary:disabled,
.btn-primary[disabled],
.btn-secondary:disabled,
.btn-secondary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none !important;
  filter: grayscale(0.05) brightness(0.97);
  transform: none !important;
}

/* === Sidebar off-canvas (mobile) e ajustes responsivos === */
.body-lock { overflow: hidden; }

@media (min-width: 1025px) {
  #openSidebar, .close-sidebar { display: none; }
  .sidebar {
    position: sticky;
    top: calc(64px + var(--sp-6));
    transform: none !important;
    height: auto;
  }
  .sidebar-overlay { display: none !important; }
}

@media (max-width: 1024px) {
  /* Sidebar vira painel deslizante */
  .sidebar {
    position: fixed;
    top: 64px;            /* altura do header */
    left: 0;
    height: calc(100vh - 64px);
    width: min(360px, 88vw);
    transform: translateX(-110%);
    transition: transform .25s ease, box-shadow .25s ease;
    z-index: 50;
    overflow: auto;
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  /* Overlay do painel */
  .sidebar-overlay { display: none; }
  .sidebar-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 45;
  }

  /* Botões do painel aparecem no mobile */
  #openSidebar, .close-sidebar { display: inline-flex; }
}

/* Ícone Hambúrguer (3 traços) com animação para X */
.menu-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}
.menu-toggle:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.menu-toggle .burger,
.menu-toggle .burger::before,
.menu-toggle .burger::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease, background .22s ease;
}
.menu-toggle .burger::before { transform: translateY(-6px); }
.menu-toggle .burger::after { transform: translateY(6px); }

/* Estado ativo (fecha em X) */
.menu-toggle.is-active .burger { background: transparent; }
.menu-toggle.is-active .burger::before { transform: rotate(45deg); }
.menu-toggle.is-active .burger::after { transform: rotate(-45deg); }

/* ==== Cards com sombras para a seção de destaques ==== */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-6);
}

.highlight-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}

.highlight-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.highlight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--sp-3);
}

.highlight-header h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text);
}

.highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: 0 4px 12px rgba(2,6,23,.06);
  font-size: 16px;
}

.icon-blue { background: #eef2ff; }
.icon-green { background: #ecfeff; }
.icon-yellow { background: #fff7ed; }

:root {
  --brand-from: #6366f1;
  --brand-to:   #8b5cf6;
  --brand-ink:  #0f172a;
  --brand-cyan: #22d3ee;
}

/* 1) Botões premium (gradiente + glow suave) */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  border: none;
  color: #fff !important;
  box-shadow:
    0 10px 24px rgba(99,102,241,.25),
    inset 0 0 0 1px rgba(255,255,255,.14);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.03);
  box-shadow:
    0 18px 36px rgba(99,102,241,.30),
    inset 0 0 0 1px rgba(255,255,255,.18);
}

/* 2) Cards com faixa de destaque no topo e hover com lift */
.content-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.content-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-from), var(--brand-cyan), var(--brand-to));
  opacity: .85;
}
.content-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99,102,241,.22);
  box-shadow: var(--shadow-md);
}

/* 3) Títulos com gradiente e sublinhado moderno */
.content-header h2 {
  background: linear-gradient(90deg, var(--brand-ink), #334155);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.content-header h2::after {
  content: "";
  display: block;
  margin-top: 10px;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-from), var(--brand-to));
  box-shadow: 0 4px 12px rgba(99,102,241,.25);
}

/* 4) Sidebar: hover/active mais “rico” */
.nav-list li a {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color: #e7ecf5;
  box-shadow: 0 3px 10px rgba(2,6,23,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.nav-list li a:hover {
  transform: translateY(-1px);
  border-color: #cfd8ff;
  box-shadow: 0 12px 24px rgba(2,6,23,.10);
  background: linear-gradient(180deg, #ffffff, #f3f7ff);
}
.nav-list li a.is-active,
.nav-list li a[aria-current="page"] {
  border-color: rgba(99,102,241,.35);
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
}
.nav-list li a.is-active::before,
.nav-list li a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand-from), var(--brand-to));
}

/* 5) Hero com glow de borda */
.hero {
  border: 1px solid rgba(99,102,241,.14);
  box-shadow:
    0 10px 26px rgba(2,6,23,.06),
    inset 0 0 0 1px rgba(255,255,255,.6);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(99,102,241,.10), rgba(34,211,238,.08));
  filter: blur(18px);
  z-index: -1;
}

/* 6) Destaques (highlights) já convertidos em cards com sombra — reforço visual */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: var(--sp-6);
}
.highlight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 7) Microanimações seguras */
@media (prefers-reduced-motion: no-preference) {
  .btn-primary, .content-card, .highlight-card, .nav-list li a {
    will-change: transform, box-shadow, filter;
  }
}

/* Botão flutuante (FAB) do WhatsApp */
.chat-fab {
  position: fixed;
  right: clamp(14px, 2.2vw, 24px);
  bottom: calc(clamp(14px, 2.2vw, 24px) + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366; /* verde WhatsApp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(2,6,23,.18), 0 2px 8px rgba(2,6,23,.06);
  border: none;
  z-index: 1000;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2,6,23,.22), 0 4px 12px rgba(2,6,23,.08);
  filter: brightness(1.03);
}
.chat-fab:active {
  transform: translateY(0);
}

/* Ícone dentro do FAB */
.chat-fab img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* Variante específica do WhatsApp (caso queira outras no futuro) */
.chat-fab--whatsapp {
  background: #25D366;
}

/* Tamanhos menores em telas pequenas */
@media (max-width: 480px) {
  .chat-fab { width: 52px; height: 52px; }
}

/* ===== Responsividade extra (mobile-first polish) ===== */
@media (max-width: 640px) {
  .header-content {
    gap: var(--sp-2);
    padding-inline: var(--sp-3);
  }
  .logo-title { 
    font-size: 1rem; 
    line-height: 1.1; 
  }
  /* Evita quebrar a linha do header: esconde apenas o nome no mobile */
  .user-info .user-name {
    display: none;
  }
  .user-info .btn-primary,
  .user-info .emergency-btn {
    padding: 8px 10px;
    font-size: .88rem;
  }

  .app-shell {
    padding-inline: var(--sp-3);
    gap: var(--sp-5);
    margin: var(--sp-5) auto;
  }

  .hero {
    padding: var(--sp-6);
  }
  .hero h1 {
    font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
  }
  .hero-actions .btn-primary, 
  .hero-actions .btn-secondary {
    width: 100%;
  }

  /* Grids viram 1 coluna */
  .content-grid,
  .highlights {
    grid-template-columns: 1fr;
  }
  .content-card {
    padding: var(--sp-5);
  }
  .content-card .content-card-meta {
    gap: var(--sp-3);
  }
  .content-card .content-card-meta .btn-primary {
    margin-left: auto;
  }

  /* Navegação amigável ao toque */
  .nav-list li a {
    padding: 12px 12px;
  }

  /* FAB menor e com safe-area */
  .chat-fab {
    width: 52px;
    height: 52px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 380px) {
  .hero {
    padding: var(--sp-5);
  }
  .menu-toggle {
    width: 36px;
    height: 36px;
  }
  .chat-fab {
    width: 48px;
    height: 48px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* Esconde o FAB quando a sidebar (off-canvas) estiver aberta para evitar sobreposição de cliques */
.sidebar-overlay.show ~ .chat-fab {
  display: none;
}

/* Dicas: forçar 1 por linha desligando a grid e padronizando altura */
.content-grid.tips-grid { display: block !important; }
.content-grid.tips-grid > * { width: 100% !important; margin-bottom: 18px; }
.tips-grid { display: block !important; }
.tips-grid .tip-card { width: 100% !important; min-height: 320px; }

/* Garantir nenhum destaque do primeiro card */
.tips-grid .tip-card:first-child {
  padding: 24px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
  border-width: 1px !important;
}
.tips-grid .tip-card:first-child .tip-emoji { font-size: 28px !important; }
.tips-grid .tip-card:first-child .tip-title { font-size: 18px !important; }
.tips-grid .tip-card:first-child .tip-text { font-size: 15px !important; line-height: 1.7 !important; }

/* Podcasts */
.podcasts-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.podcast-card .content-card-image { height: 180px; display:flex; align-items:center; justify-content:center; font-size:42px; }
.podcast-player-card .player-aspect { position: relative; width: 100%; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background:#000; }
.podcast-player-card .player-aspect iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Podcasts: overlay modal */
.podcast-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.podcast-modal {
  background: #0f172a;
  color: #fff;
  width: min(100%, 1080px);
  height: min(92vh, 720px);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.podcast-modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 8px 8px 0 8px;
}
.podcast-modal-close {
  background: #b91c1c;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}
.podcast-modal-close:hover {
  background: #e5e7eb;
}
.podcast-modal-body {
  padding: 8px 12px 16px 12px;
  flex: 1;
  display: grid;
}
.podcast-modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .podcast-modal { height: 290px; width: 100%; border-radius: 10px; }
  .podcast-modal-overlay { padding: 8px; }
}

/* Scroll Reveal simples */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* === Auth/Login Redesigned === */
:root{
  --auth-bg: linear-gradient(135deg, #ecfeff 0%, #eef2ff 45%, #f0fdf4 100%);
  --auth-card-bg: #ffffff;
  --auth-brand: #111827; /* slate-900 */
  --auth-muted: #6b7280; /* gray-500 */
  --auth-primary: #10b981; /* emerald-500 */
  --auth-primary-600: #059669; /* emerald-600 */
  --auth-accent: #3b82f6; /* blue-500 */
  --ring: 0 0 0 4px rgba(16,185,129,0.15);
}

html, body { height: 100%; }

.auth-layout{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--auth-bg);
}
/* Centraliza quando usado sem hero (ex.: admin_login) */
.auth-layout--center{
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
}

/* Hero visual com mensagens e ilustração */
.auth-hero{
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible; /* evitar corte das bolhas/frases nas bordas */
  padding: 56px 28px;
  background: transparent;
}
:root[data-theme="dark"] .auth-hero{ background: var(--bg); }
:root[data-theme="dark"] .login-art{ display: none; }
.hero-inner{
  max-width: 680px;
  width: 100%;
  text-align: center;
  padding-inline: 16px; /* margem de segurança lateral */
}
.login-brand{
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--auth-brand);
}
.hero-lead{
  margin: 0 0 18px;
  color: var(--auth-muted);
  font-size: 18px;
}
/* Hero phrases como texto com degradê (sem balão) */
.hero-phrases{
  display: inline-block;
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  max-width: min(92vw, 620px);
  white-space: normal;
  /* texto em degradê nas cores da página */
  background-image: linear-gradient(90deg, var(--auth-primary), var(--auth-accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .2px;
}
/* Os spans originais ficam apenas como fonte de dados */
.hero-phrases .phrase{ display: none !important; }

/* Saída do efeito de digitação herda o degradê do container */
/* Removed empty ruleset .typewriter-output */
.typewriter-cursor{
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--auth-accent);
  margin-left: 4px;
  vertical-align: -0.1em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Ajuste responsivo */
@media (max-width: 520px){
  .hero-phrases{ font-size: 16px; }
}
.login-art{
  margin-top: 24px;
  overflow: visible; /* garante que o SVG não seja cortado */
}
.login-art svg{
  display: block;
  width: clamp(240px, 52vw, 520px);
  max-width: 100%;
  height: auto;
}

/* Card de login */
.auth-card{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.login-info{
  background: var(--auth-card-bg);
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
}
.card-title{
  margin: 0 0 6px;
  font-size: 28px;
  color: var(--auth-brand);
}
.welcome-text{ color: #374151; margin: 0 0 10px; }
.access-info{ color: var(--auth-muted); margin: 0 0 16px; font-size: 14px; }

.alert{ padding: 10px 12px; border-radius: 10px; margin: 8px 0; font-size: 14px; }
.alert-error{ background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success{ background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

.login-form{ display: grid; gap: 12px; margin-top: 8px; }
.form-group input{
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: .2s ease;
}
.form-group input:focus{
  background: #fff;
  border-color: var(--auth-primary);
  box-shadow: var(--ring);
}
/* Dark overrides para inputs e alertas */
:root[data-theme="dark"] .form-group input{
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="dark"] .form-group input::placeholder{ color: rgba(229,231,235,0.75); }
:root[data-theme="dark"] .form-group input:focus{
  background: var(--surface-2);
  border-color: var(--auth-primary-600);
  box-shadow: 0 0 0 4px rgba(5,150,105,0.25);
}
:root[data-theme="dark"] .alert-error{ background: #2b0b0b; color: #fecaca; border-color: #7f1d1d; }
:root[data-theme="dark"] .alert-success{ background: #0b2b17; color: #bbf7d0; border-color: #064e3b; }
.form-actions{ margin-top: 6px; }
.btn-login{
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease;
}
.btn-login:hover{ filter: brightness(1.03); }
.btn-login:active{ transform: translateY(1px); }
.register-link{ margin-top: 12px; font-size: 14px; color: #374151; }
.register-link a{ color: var(--auth-accent); font-weight: 600; }

/* Acessibilidade (screen-reader only) */
.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; }

/* Responsivo */
@media (max-width: 980px){
  .auth-layout{ grid-template-columns: 1fr; }
  .auth-card{ padding-top: 0; }
  .hero-inner{ max-width: 540px; }
}
@media (max-width: 520px){
  .login-brand{ font-size: 34px; }
  .hero-phrases{ font-size: 21px; max-width: 88vw; }
  .login-info{ padding: 22px; border-radius: 16px; }
  .login-art svg{ width: min(80vw, 460px); }
}

@media (max-width: 413px){
  .main-header .user-info > a.btn-primary,
  .main-header .user-info > a.emergency-btn { display: none !important; }
  .main-header .user-info { gap: 6px; }
  .main-header .user-info .theme-toggle { display: inline-flex !important; padding: 8px; min-width: 40px; width: 40px; justify-content: center; }
  .main-header .user-info .user-trigger { padding: 8px; min-width: 40px; width: 40px; justify-content: center; }
  .main-header .user-info .user-trigger .user-name { display: none !important; }
}

/* === User menu (dropdown) === */
.user-menu-wrapper { position: relative; }
.user-trigger { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 10px; }
.user-trigger:hover { border-color: var(--primary); }
.user-icon { font-size: 1rem; }
.user-name { font-weight: 600; color: var(--text); }

.user-menu-card { position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, 90vw); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; }
.user-menu-card[hidden] { display: none !important; }
.user-menu-form { display: grid; gap: 10px; }
.user-menu-form label { font-size: .85rem; color: var(--text-dim); }
.user-menu-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); }
.user-menu-actions { display:flex; justify-content:flex-end; margin-top: 6px; }

/* Theme toggle */
.theme-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 10px; border-radius: 10px; }
.theme-toggle:hover { border-color: var(--primary); }

/* === Dark theme === */
:root[data-theme="dark"]{
  --bg: #0b1220;
  --surface: #0f172a;
  --surface-2: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --primary: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --shadow-md: 0 4px 14px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.45);
}

:root[data-theme="dark"] body { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] .main-header { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .sidebar { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .content-card { background: var(--surface); border-color: var(--border); color: var(--text); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] .btn-primary { box-shadow: 0 8px 20px rgba(139, 92, 246, .35); }

/* Alertas */
.alert { padding: 10px 12px; border-radius: 10px; border: 1px solid; margin: 10px 0; }
.alert.success { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.alert.error { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
:root[data-theme="dark"] .alert.success { background: rgba(16,185,129,.12); color: #a7f3d0; border-color: #10b981; }
:root[data-theme="dark"] .alert.error { background: rgba(239,68,68,.12); color: #fecaca; border-color: #ef4444; }

/* Dark theme visual refinements */
:root[data-theme="dark"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at -10% -10%, rgba(124,58,237,.08), transparent 40%),
    radial-gradient(1000px 600px at 110% -20%, rgba(34,211,238,.06), transparent 40%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
:root[data-theme="dark"] .btn-ghost:hover { background: #1b2437; }
:root[data-theme="dark"] .btn-secondary { background: #111827; color: var(--text); border-color: #1f2937; }
:root[data-theme="dark"] .menu-toggle,
:root[data-theme="dark"] .close-sidebar { border-color: #1f2937; color: var(--text); }
:root[data-theme="dark"] .menu-toggle { background: #0f172a; }
:root[data-theme="dark"] .menu-toggle .burger,
:root[data-theme="dark"] .menu-toggle .burger::before,
:root[data-theme="dark"] .menu-toggle .burger::after { background: #ffffff; }
:root[data-theme="dark"] .nav-list li a { background: #0f172a; color: var(--text); border-color: #1f2937; }
:root[data-theme="dark"] .nav-list li a:hover { border-color: var(--primary); box-shadow: 0 6px 16px rgba(139, 92, 246, .18); }
:root[data-theme="dark"] .hero { background: linear-gradient(180deg, #101827 0%, #0b1220 100%); border-color: #1f2937; }
:root[data-theme="dark"] .hero::after { background: radial-gradient(180px 180px at 50% 50%, rgba(139, 92, 246, .20), transparent 70%); }
:root[data-theme="dark"] .content-card-image { background: #0c1220; border-bottom-color: #1f2937; }
:root[data-theme="dark"] .form-container,
:root[data-theme="dark"] .card { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .tip-card { background: var(--surface); border-color: var(--border); box-shadow: 0 2px 14px rgba(0,0,0,.35); }
:root[data-theme="dark"] .user-trigger,
:root[data-theme="dark"] .theme-toggle { background: #0f172a; border-color: #1f2937; color: var(--text); }
:root[data-theme="dark"] .user-menu-card { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .badge-tip { color: #c4b5fd; background: rgba(124, 58, 237, .12); border-color: #7c3aed; }

/* Cards de destaque no modo escuro */
:root[data-theme="dark"] .highlight-card { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .highlight-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.50); }
:root[data-theme="dark"] .highlight-header h3 { color: var(--text); }
:root[data-theme="dark"] .icon-blue { background: rgba(99, 102, 241, .18); }
:root[data-theme="dark"] .icon-green { background: rgba(34, 211, 238, .16); }
:root[data-theme="dark"] .icon-yellow { background: rgba(251, 191, 36, .16); }

/* Overrides adicionais para Modo Escuro */
:root[data-theme="dark"]{ --text-dim: #ffffff; }
:root[data-theme="dark"] .hero-text p { color: #ffffff; }
:root[data-theme="dark"] .option-card .option-box { background: var(--surface); color: #ffffff; border-color: var(--border); box-shadow: 0 3px 12px rgba(0,0,0,.35); }
:root[data-theme="dark"] .option-card:hover .option-box { border-color: var(--primary); box-shadow: 0 10px 24px rgba(0,0,0,.55); }
:root[data-theme="dark"] .option-input:focus + .option-box { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(139, 92, 246, .25); }

/* Forçar textos cinza para branco no modo escuro */
:root[data-theme="dark"] .hero-text p { color: #ffffff !important; }
:root[data-theme="dark"] .register-link,
:root[data-theme="dark"] .welcome-text,
:root[data-theme="dark"] .sidebar .section p,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] .user-menu-form label,
:root[data-theme="dark"] [style*="color:var(--text-dim)"] { color: #ffffff !important; }
/* Título de seção em branco no dark (mantém sublinhado roxo) */
:root[data-theme="dark"] .content-header h2 { color: #ffffff; background: none; -webkit-text-fill-color: #ffffff; }
:root[data-theme="dark"] .content-header h2::after { background: linear-gradient(90deg, var(--brand-from), var(--brand-to)); box-shadow: 0 4px 12px rgba(99,102,241,.35); }
/* Textos dos tip-cards e subtítulo no dark */
 :root[data-theme="dark"] .tip-title,
 :root[data-theme="dark"] .tip-text,
 :root[data-theme="dark"] .content-header p,
 :root[data-theme="dark"] .tips-header p { color: #ffffff !important; }
 :root[data-theme="dark"] .option-input:checked + .option-box { background: linear-gradient(180deg, #0f172a, #0b1220); border-color: #16a34a; box-shadow: 0 0 0 5px rgba(22,163,74,.20), 0 6px 18px rgba(0,0,0,.5); color: #ffffff; }

/* Auth pages dark: tudo preto e textos brancos */
:root[data-theme="dark"]{
  --auth-bg: var(--bg); /* fundo seguindo paleta dark */
  --auth-card-bg: var(--surface); /* cartão seguindo paleta */
  --auth-brand: var(--text); /* textos seguindo paleta */
  --auth-muted: var(--text); /* subtext seguindo paleta */
}
:root[data-theme="dark"] .auth-layout{ background: var(--auth-bg); }
:root[data-theme="dark"] .login-info{ background: var(--auth-card-bg); border-color: var(--border); box-shadow: 0 22px 60px rgba(0,0,0,.45); }
:root[data-theme="dark"] .login-brand,
:root[data-theme="dark"] .card-title,
:root[data-theme="dark"] .hero-lead,
:root[data-theme="dark"] .access-info { color: var(--text) !important; }
/* frase animada sem degradê no dark, usar texto normal para consistência */
:root[data-theme="dark"] .hero-phrases{
  background-image: linear-gradient(90deg, var(--auth-primary), var(--auth-accent), #a78bfa) !important;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
/* links coerentes com texto */
:root[data-theme="dark"] .register-link, :root[data-theme="dark"] .register-link a { color: var(--text) !important; }
:root[data-theme="dark"] .welcome-text{ color: var(--text) !important; }
:root[data-theme="dark"] .login-info .alert{ border-color: rgba(255,255,255,0.14); }
:root[data-theme="dark"] .btn-login{ filter: none; }
