/* ── Calculadora de Sono ────────────────────────────────────── */

.sc-main { padding-bottom: var(--space-20); }

/* Hero */
.sc-hero { padding: var(--space-12) 0 var(--space-8); }
.sc-hero__inner { max-width: 640px; }

.sc-intro { margin-bottom: var(--space-8); }
.sc-intro h1 { margin-bottom: var(--space-3); }
.sc-intro p { color: var(--color-text-secondary); line-height: 1.7; font-size: 1.05rem; }

/* Abas */
.sc-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  background: var(--color-surface-raised);
  border-radius: var(--radius-xl);
  padding: var(--space-1);
}
.sc-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.sc-tab [data-lucide] { width: 16px; height: 16px; }
.sc-tab.active {
  background: var(--color-surface);
  color: var(--violet-600);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Painel de entrada */
.sc-panel { margin-bottom: var(--space-6); }
.sc-hidden { display: none; }

.sc-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.sc-input-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}
.sc-time-input {
  flex: 1;
  min-width: 140px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: var(--color-surface);
  text-align: center;
  transition: border-color var(--transition-fast);
}
.sc-time-input:focus {
  outline: none;
  border-color: var(--violet-500);
}
.sc-btn-calc {
  background: var(--violet-600);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.sc-btn-calc [data-lucide] { width: 16px; height: 16px; }
.sc-btn-calc:hover { background: var(--violet-500); }
.sc-btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.sc-btn-secondary [data-lucide] { width: 16px; height: 16px; }
.sc-btn-secondary:hover { background: var(--violet-50); color: var(--violet-600); }

.sc-hint {
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Resultados */
.sc-results { margin-bottom: var(--space-4); }
.sc-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  margin-bottom: var(--space-3);
  transition: box-shadow var(--transition-fast);
}
.sc-result-card:hover { box-shadow: var(--shadow-md); }
.sc-result-time {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  line-height: 1;
}
.sc-result-detail {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Badges */
.sc-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.sc-badge--green  { background: #d1fae5; color: #065f46; }
.sc-badge--yellow { background: #fef3c7; color: #92400e; }
.sc-badge--gray   { background: var(--color-surface-raised); color: var(--color-text-muted); }

/* Salvar */
.sc-save-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.sc-btn-save-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: none;
}
.sc-btn-save-link [data-lucide] { width: 15px; height: 15px; }
.sc-btn-save-link:hover { color: var(--violet-600); }

/* Histórico */
.sc-log-section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
}
.sc-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}
.sc-section-title [data-lucide] { width: 18px; height: 18px; color: var(--violet-500); }

.sc-log-avg {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}
.sc-log-list { display: flex; flex-direction: column; gap: var(--space-2); }
.sc-log-entry {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-surface-raised);
  font-size: var(--font-size-sm);
}
.sc-log-date { color: var(--color-text-muted); width: 100px; flex-shrink: 0; }
.sc-log-cycles { margin-left: auto; color: var(--violet-600); font-weight: 600; }
.sc-log-empty { color: var(--color-text-muted); font-size: var(--font-size-sm); }

/* Sobre */
.sc-about { padding: var(--space-12) 0; }
.sc-about__inner { max-width: 720px; }
.sc-about h2 { margin-bottom: var(--space-4); }
.sc-about p { color: var(--color-text-secondary); line-height: 1.75; margin-bottom: var(--space-6); }
.sc-about a { color: var(--violet-600); text-decoration: underline; }

.sc-cycles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.sc-cycle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  text-align: center;
}
.sc-cycle-card--highlight { border-color: var(--violet-300); background: var(--violet-50); }
.sc-cycle-num { font-size: 1.1rem; font-weight: 700; }
.sc-cycle-h   { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.sc-cycle-badge { font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: var(--radius-full); }

@media (max-width: 640px) {
  .sc-cycles-grid { grid-template-columns: repeat(3, 1fr); }
  .sc-time-input { font-size: 1.25rem; }
  .sc-input-row { flex-direction: column; align-items: stretch; }
  .sc-btn-calc, .sc-btn-secondary { justify-content: center; }
}
