:root {
  /* Paleta estrita de 3 cores: Amarelo Claro, Azul e Verde */
  --yellow-bg: #fefce8;       /* Amarelo claro principal (fundo) */
  --yellow-card: #fef9c3;     /* Amarelo claro suave (cartões e destaques) */
  --yellow-border: #fde047;   /* Amarelo claro borda */
  --blue: #1d4ed8;            /* Azul principal */
  --blue-hover: #1e40af;      /* Azul intenso */
  --blue-soft: rgba(29, 78, 216, 0.12);
  --green: #15803d;           /* Verde principal */
  --green-hover: #166534;     /* Verde intenso */
  --green-soft: rgba(21, 128, 61, 0.13);
  color-scheme: light;
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--yellow-border);
}

html { line-height: 1.5; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Montserrat', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  background-color: var(--yellow-bg);
  color: var(--blue);
  -webkit-font-smoothing: antialiased;
}

.font-serif-editorial {
  font-family: 'Montserrat', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h1, h2, h3, .tab-btn, .green-pill, .btn-blue, .btn-green, .btn-outline-blue, .btn-outline-green {
  font-family: 'Montserrat', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.015em;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, p { margin: 0; font-size: inherit; font-weight: inherit; }
button, input, select {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}
button { background-color: transparent; cursor: pointer; }
canvas { display: block; max-width: 100%; }

/* Header */
.chic-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--yellow-card);
  border-bottom: 2px solid var(--blue);
}

.brand-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  background-color: var(--blue);
  color: var(--yellow-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.green-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  background-color: var(--green);
  color: var(--yellow-bg);
}

/* Navigation */
.nav-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--yellow-bg);
  padding: 0.3rem;
  border-radius: 0.9rem;
  border: 1px solid var(--blue);
}

.tab-btn {
  padding: 0.45rem 0.95rem;
  border-radius: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue);
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: var(--blue-soft);
}

.tab-btn.active {
  background-color: var(--blue);
  color: var(--yellow-bg);
}

/* Cards */
.chic-card {
  background-color: var(--yellow-card);
  border: 1.5px solid var(--blue);
  border-radius: 1.2rem;
}

.kpi-card {
  background-color: var(--yellow-card);
  border: 1.5px solid var(--green);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
}

/* Timer Stage */
.timer-stage {
  background-color: var(--blue);
  border: 2px solid var(--green);
  border-radius: 1.25rem;
  padding: 1.4rem 1rem;
  color: var(--yellow-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-ring-wrap {
  position: relative;
  width: 204px;
  height: 204px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-track {
  fill: none;
  stroke: rgba(254, 252, 232, 0.22);
  stroke-width: 7;
}

.timer-ring-progress {
  fill: none;
  stroke: #fef08a;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

/* Inputs & Selects */
input[type="text"], input[type="number"], select {
  background-color: var(--yellow-bg);
  border: 1.5px solid var(--blue);
  color: var(--blue);
  border-radius: 0.75rem;
  font-weight: 600;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

/* Buttons (Strictly Blue & Green) */
.btn-blue {
  background-color: var(--blue);
  color: var(--yellow-bg);
  font-weight: 700;
  border-radius: 0.75rem;
  border: 1.5px solid var(--blue);
  transition: all 0.18s ease;
}
.btn-blue:hover { background-color: var(--blue-hover); }

.btn-green {
  background-color: var(--green);
  color: var(--yellow-bg);
  font-weight: 700;
  border-radius: 0.75rem;
  border: 1.5px solid var(--green);
  transition: all 0.18s ease;
}
.btn-green:hover { background-color: var(--green-hover); }

.btn-outline-blue {
  background-color: var(--yellow-bg);
  color: var(--blue);
  font-weight: 700;
  border-radius: 0.75rem;
  border: 1.5px solid var(--blue);
  transition: all 0.18s ease;
}
.btn-outline-blue:hover { background-color: var(--blue-soft); }

.btn-outline-green {
  background-color: var(--yellow-bg);
  color: var(--green);
  font-weight: 700;
  border-radius: 0.75rem;
  border: 1.5px solid var(--green);
  transition: all 0.18s ease;
}
.btn-outline-green:hover { background-color: var(--green-soft); }

/* Links bar */
.links-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.chic-link-blue {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.chic-link-blue:hover { color: var(--blue-hover); }

.chic-link-green {
  color: var(--green);
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.chic-link-green:hover { color: var(--green-hover); }

input[type="checkbox"] {
  accent-color: var(--green);
  cursor: pointer;
}

/* Utility classes used by app.js */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.625rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-3\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.875rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0px; }
.max-w-7xl { max-width: 80rem; }

.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-full { height: 100%; }
.max-h-56 { max-height: 15.5rem; }
.min-h-screen { min-height: 100vh; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }

.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.65rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1.1rem; }
.p-5 { padding: 1.35rem; }
.px-2 { padding-left: 0.55rem; padding-right: 0.55rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.8rem; padding-right: 0.8rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.15rem; padding-bottom: 0.15rem; }
.py-1\.5 { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.pt-1 { padding-top: 0.25rem; }
.pb-2 { padding-bottom: 0.6rem; }

.text-\[10px\] { font-size: 10px; line-height: 1.35; }
.text-\[11px\] { font-size: 11px; line-height: 1.4; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-xl { font-size: 1.35rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-snug { line-height: 1.4; }
.tracking-wider { letter-spacing: 0.04em; }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.line-through { text-decoration-line: line-through; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mapped strictly to the 3 colors: Light Yellow, Blue, Green */
.bg-white { background-color: var(--yellow-card); }
.bg-slate-50 { background-color: var(--yellow-bg); }
.bg-slate-100 { background-color: var(--yellow-bg); }
.bg-indigo-100 { background-color: var(--blue-soft); }
.bg-emerald-50\/60, .bg-emerald-50\/70 { background-color: var(--green-soft); }

.text-white { color: var(--yellow-bg); }
.text-slate-400 { color: var(--green); }
.text-slate-500 { color: var(--green); }
.text-slate-600 { color: var(--blue); }
.text-slate-700 { color: var(--blue); }
.text-slate-800 { color: var(--blue); }
.text-slate-900 { color: var(--blue); }
.text-indigo-600 { color: var(--blue); }
.text-indigo-700 { color: var(--blue); }
.text-indigo-800 { color: var(--blue); }
.text-emerald-600, .text-emerald-700 { color: var(--green); }
.text-rose-600, .text-rose-700 { color: var(--blue); }

.border { border-width: 1.5px; }
.border-b { border-bottom-width: 1.5px; }
.border-slate-100, .border-slate-200, .border-slate-300 { border-color: var(--blue); }
.border-emerald-200 { border-color: var(--green); }

.rounded { border-radius: 0.3rem; }
.rounded-lg { border-radius: 0.55rem; }
.rounded-xl { border-radius: 0.85rem; }
.rounded-2xl { border-radius: 1.15rem; }
.rounded-full { border-radius: 9999px; }

.shadow-xs { box-shadow: none; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.2s ease; }
.transition-all { transition: all 0.25s ease; }
.hover\:text-rose-600:hover { color: var(--green); }

.chart-box {
  position: relative;
  height: 296px;
  width: 100%;
}

.toast-chic {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  background-color: var(--green);
  border: 2px solid var(--yellow-card);
  color: var(--yellow-bg);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.8rem 1.15rem;
  border-radius: 0.9rem;
}

@media (min-width: 640px) {
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:col-span-4 { grid-column: span 4 / span 4; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:p-5 { padding: 1.35rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-lg { font-size: 1.15rem; line-height: 1.75rem; }
  .sm\:text-3xl { font-size: 2rem; line-height: 2.35rem; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Tipografia estilo Gran Cursos Online */
.kpi-card .font-mono {
  font-family: 'Montserrat', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

#timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tab-btn {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Despertador Pomodoro */
@keyframes alarmPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.55); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 14px rgba(21, 128, 61, 0); }
}

.alarm-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: rgba(30, 64, 175, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.alarm-box {
  background-color: var(--yellow-card);
  border: 3px solid var(--green);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  color: var(--blue);
  animation: alarmPulse 1.1s infinite ease-in-out;
}

.alarm-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.w-16 { width: 4.25rem; }

/* Resumo de Horas (Dia / Semana / Mês / Total) */
.time-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .time-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.time-pill-card {
  background-color: var(--yellow-bg);
  border: 1.5px solid var(--blue);
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
}
.time-pill-card.accent-green {
  border-color: var(--green);
}
.lg-span-2 {
  grid-column: span 1;
}
@media (min-width: 1024px) {
  .lg-span-2 {
    grid-column: span 2;
  }
}
