/* ============================================================
   HÁBITOS · MODO FOCO (POMODORO)
   Mesma paleta do app: azul-marinho para foco, dourado como
   destaque, verde para pausas.
   ============================================================ */

.habitos-tab-foco {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.foco-aviso-schema {
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--gold);
  line-height: 1.5;
}

.foco-layout {
  max-width: 900px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* ===== CARTÃO DO CRONÔMETRO ===== */

.foco-timer-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Mesma altura do cartão de configurações: o conteúdo fica centralizado. */
  justify-content: center;
  --foco-cor: var(--primary-color);
  --foco-cor-suave: rgba(21, 44, 71, 0.07);
  transition: box-shadow 0.3s ease;
}

.foco-timer-card.fase-pausaCurta,
.foco-timer-card.fase-pausaLonga {
  --foco-cor: var(--positive);
  --foco-cor-suave: rgba(31, 138, 76, 0.08);
}

.foco-timer-card::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  width: 420px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--foco-cor-suave), transparent);
  pointer-events: none;
  transition: background 0.6s ease;
}

.foco-timer-card > * { position: relative; }

.foco-fase-pill {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--foco-cor);
  background: var(--foco-cor-suave);
  padding: 5px 12px;
  border-radius: 20px;
}

.foco-intencao-wrap {
  width: 100%;
  min-height: 40px;
  margin: 12px 0 4px;
  display: flex;
  justify-content: center;
}

.foco-intencao-input {
  width: 100%;
  max-width: 340px;
  border: none;
  border-bottom: 1.5px dashed var(--border);
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 8px 4px;
  outline: none;
  transition: border-color 0.15s ease;
}

.foco-intencao-input::placeholder {
  color: var(--text-light);
  font-weight: 500;
}

.foco-intencao-input:focus {
  border-bottom-color: var(--primary-color);
}

.foco-intencao-texto {
  max-width: 360px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  padding: 8px 4px;
  line-height: 1.35;
}

.foco-intencao-texto.foco-intencao-dica {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--positive);
}

/* ===== ANEL ===== */

.foco-anel-wrap {
  position: relative;
  width: 236px;
  height: 236px;
  margin: 6px 0 10px;
}

.foco-anel {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.foco-anel-trilho {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}

.foco-anel-progresso {
  fill: none;
  stroke: var(--foco-cor);
  stroke-width: 5.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s linear, stroke 0.5s ease;
}

.foco-rodando .foco-anel-progresso {
  filter: drop-shadow(0 0 5px var(--foco-cor-suave));
}

.foco-anel-centro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.foco-tempo {
  font-size: 54px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.foco-tempo-sub {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

/* Na pausa, o anel "respira" devagar: um convite a desacelerar. */
.fase-pausaCurta.foco-rodando .foco-anel-wrap,
.fase-pausaLonga.foco-rodando .foco-anel-wrap {
  animation: foco-respirar 8s ease-in-out infinite;
}

@keyframes foco-respirar {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* ===== CICLOS ===== */

.foco-ciclos {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.foco-ciclo-ponto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  transition: all 0.3s ease;
}

.foco-ciclo-ponto.cheio {
  background: var(--gold);
  border-color: var(--gold);
}

.foco-ciclo-ponto.atual {
  border-color: var(--primary-color);
}

.foco-rodando .foco-ciclo-ponto.atual {
  animation: foco-ponto-pulsar 1.6s ease-in-out infinite;
}

@keyframes foco-ponto-pulsar {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 44, 71, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(21, 44, 71, 0); }
}

/* ===== CONTROLES ===== */

.foco-controles {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.foco-btn-principal {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: var(--foco-cor);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(21, 44, 71, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.4s ease;
}

.foco-btn-principal:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(21, 44, 71, 0.3);
}

.foco-btn-principal:active {
  transform: scale(0.95);
}

.foco-btn-principal span {
  display: flex;
}

.foco-btn-secundario {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.foco-btn-secundario:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.foco-acoes-extra {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.foco-btn-distracao,
.foco-btn-imersivo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-medium);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.foco-btn-distracao:hover {
  border-color: var(--gold-line);
  color: var(--gold);
  background: var(--gold-bg);
}

.foco-btn-imersivo:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.foco-distracao-contador {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--background);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.foco-bump {
  animation: foco-bump 0.35s ease;
}

@keyframes foco-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.foco-atalhos {
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--text-light);
}

.foco-timer-card.foco-celebrar {
  animation: foco-celebrar 1.5s ease;
}

@keyframes foco-celebrar {
  0% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.45); }
  60% { box-shadow: 0 0 0 14px rgba(184, 134, 11, 0); }
  100% { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
}

/* ===== CARTÃO DE CONFIGURAÇÃO ===== */

.foco-config-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 6px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.foco-config-bloco {
  padding: 16px 0;
}

.foco-config-bloco + .foco-config-bloco {
  border-top: 1px solid var(--border);
}

.foco-config-titulo {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 10px;
}

.foco-select {
  width: 100%;
  padding: 9px 30px 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2398A2B3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}

.foco-select:focus {
  border-color: var(--primary-color);
}

.foco-meta-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.foco-meta-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-medium);
}

.foco-stepper-valor {
  min-width: 58px;
  font-size: 12.5px;
}

.foco-meta-barra {
  height: 6px;
  border-radius: 6px;
  background: var(--background);
  overflow: hidden;
  margin-top: 12px;
}

.foco-meta-barra-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--gold-soft));
  transition: width 0.6s ease;
}

.foco-meta-barra-fill.completa {
  background: var(--positive);
}

.foco-meta-texto {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.4;
}

.foco-meta-texto strong {
  color: var(--text-dark);
}

.foco-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
}

.foco-preset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.foco-preset:hover {
  border-color: var(--primary-light);
}

.foco-preset.ativo {
  border-color: var(--primary-color);
  background: #F4F7FB;
  box-shadow: inset 0 0 0 1px var(--primary-color);
}

.foco-preset-custom {
  cursor: default;
}

.foco-preset-custom:hover {
  border-color: var(--border);
}

.foco-preset-custom.ativo:hover {
  border-color: var(--primary-color);
}

.foco-preset-nome {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}

.foco-preset-desc {
  font-size: 10.5px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.foco-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.foco-config-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foco-config-item > span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-medium);
}

.foco-config-item .stepper-control {
  width: fit-content;
}

.foco-toggles {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.foco-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-medium);
  cursor: pointer;
  user-select: none;
}

.foco-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.foco-toggle-switch {
  flex-shrink: 0;
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 20px;
  background: var(--border);
  transition: background 0.2s ease;
}

.foco-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.foco-toggle input:checked + .foco-toggle-switch {
  background: var(--primary-color);
}

.foco-toggle input:checked + .foco-toggle-switch::after {
  transform: translateX(14px);
}

.foco-toggle input:focus-visible + .foco-toggle-switch {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ===== ESTATÍSTICAS ===== */

.foco-stats-grid {
  margin-bottom: 16px;
}

.foco-paineis {
  max-width: 900px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.foco-painel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.foco-barras {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 150px;
  margin-top: 12px;
}

.foco-barra-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.foco-barra-valor {
  height: 14px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-medium);
  font-variant-numeric: tabular-nums;
}

.foco-barra-trilho {
  flex: 1;
  width: 100%;
  max-width: 30px;
  display: flex;
  align-items: flex-end;
  background: var(--background);
  border-radius: 6px;
  overflow: hidden;
}

.foco-barra {
  width: 100%;
  border-radius: 6px;
  background: var(--primary-light);
  transition: height 0.6s ease;
}

.foco-barra-col.hoje .foco-barra {
  background: var(--gold-soft);
}

.foco-barra-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
}

.foco-barra-col.hoje .foco-barra-label {
  color: var(--gold);
  font-weight: 800;
}

.foco-mapa-horas {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  margin-top: 14px;
}

.foco-hora {
  height: 34px;
  border-radius: 4px;
  background: rgba(21, 44, 71, calc(0.05 + var(--i) * 0.85));
  transition: background 0.4s ease;
}

.foco-mapa-legenda {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.foco-insight {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-medium);
}

.foco-insight strong {
  color: var(--primary-color);
}

.foco-sessoes-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foco-sessao-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}

.foco-sessao-icone {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pos-bg);
  color: var(--positive);
}

.foco-sessao-icone.parcial {
  background: var(--background);
  color: var(--text-light);
}

.foco-sessao-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.foco-sessao-titulo {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foco-sessao-meta {
  font-size: 11.5px;
  color: var(--text-light);
}

.foco-sessao-min {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ===== PROGRESSO DE FOCO NO CARD "HOJE" ===== */

.habito-foco-linha {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.habito-foco-barra {
  width: 80px;
  height: 5px;
  border-radius: 5px;
  background: var(--background);
  overflow: hidden;
}

.habito-foco-barra > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--gold-soft));
}

.habito-concluido .habito-foco-barra > span {
  background: var(--positive);
}

.habito-foco-texto {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-medium);
  font-variant-numeric: tabular-nums;
}

.habito-foco-btn {
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.habito-foco-btn:hover,
.habito-foco-btn.ativo {
  background: var(--primary-color);
  color: white;
}

/* ===== MODO IMERSIVO ===== */

body.foco-sem-scroll {
  overflow: hidden;
}

.foco-imersivo {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #1B3657 0%, var(--primary-dark) 70%);
  color: white;
  --foco-cor: #D9B45A;
  --foco-cor-suave: rgba(217, 180, 90, 0.35);
  animation: fade-in-suave 0.35s ease-out forwards;
  transition: background 0.8s ease;
}

.foco-imersivo.fase-pausaCurta,
.foco-imersivo.fase-pausaLonga {
  background: radial-gradient(ellipse at 50% 40%, #173D33 0%, #0A1F1A 70%);
  --foco-cor: #5FD394;
  --foco-cor-suave: rgba(95, 211, 148, 0.35);
}

.foco-imersivo-sair {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.foco-imersivo-sair:hover {
  background: rgba(255,255,255,0.14);
  color: white;
}

.foco-imersivo-conteudo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  text-align: center;
}

.foco-imersivo-fase {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--foco-cor);
}

.foco-imersivo-intencao {
  min-height: 28px;
  max-width: 560px;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.35;
}

.foco-anel-wrap-grande {
  width: min(360px, 76vw);
  height: min(360px, 76vw);
  margin: 26px 0 18px;
}

.foco-imersivo .foco-anel-trilho {
  stroke: rgba(255,255,255,0.08);
  stroke-width: 3.5;
}

.foco-imersivo .foco-anel-progresso {
  stroke-width: 4;
}

.foco-imersivo .foco-tempo {
  font-size: clamp(56px, 13vw, 92px);
  color: white;
  font-weight: 700;
}

.foco-imersivo-dica {
  min-height: 22px;
  max-width: 440px;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.foco-imersivo-controles {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.foco-imersivo-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.foco-imersivo-btn:hover {
  background: rgba(255,255,255,0.14);
  color: white;
}

.foco-imersivo-btn span[data-foco-distracoes] {
  font-weight: 800;
  color: var(--foco-cor);
}

.foco-imersivo-btn-principal {
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  border: none;
  background: var(--foco-cor);
  color: var(--primary-dark);
}

.foco-imersivo-btn-principal:hover {
  background: var(--foco-cor);
  color: var(--primary-dark);
  transform: scale(1.05);
}

.foco-imersivo-btn-principal span {
  display: flex;
}

/* ===== MINI CRONÔMETRO FLUTUANTE ===== */

.foco-pill {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 13px;
  border: none;
  border-radius: 24px;
  background: var(--primary-color);
  color: white;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(11, 27, 46, 0.3);
  animation: fade-in-suave 0.3s ease-out forwards;
  transition: transform 0.15s ease;
}

.foco-pill:hover {
  transform: translateY(-2px);
}

.foco-pill-ponto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-soft);
}

.foco-pill.fase-pausaCurta .foco-pill-ponto,
.foco-pill.fase-pausaLonga .foco-pill-ponto {
  background: #5FD394;
}

.foco-pill.foco-rodando .foco-pill-ponto {
  animation: foco-pill-pulsar 1.4s ease-in-out infinite;
}

@keyframes foco-pill-pulsar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.foco-pill-tempo {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ===== RESPONSIVO ===== */

@media (max-width: 760px) {
  .foco-layout,
  .foco-paineis {
    grid-template-columns: 1fr;
  }

  .foco-anel-wrap {
    width: 210px;
    height: 210px;
  }

  .foco-tempo {
    font-size: 46px;
  }

  .foco-atalhos {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .foco-anel-wrap,
  .foco-ciclo-ponto,
  .foco-pill-ponto {
    animation: none !important;
  }
}

/* ===== META DE FOCO NA CRIAÇÃO DO HÁBITO ===== */

.meta-foco-form {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #FAFBFC;
}

.meta-foco-toggle {
  align-items: flex-start;
}

.meta-foco-toggle .foco-toggle-switch {
  margin-top: 1px;
}

.meta-foco-toggle-texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.meta-foco-toggle-texto small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-light);
}

.meta-foco-config {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.meta-foco-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-foco-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-medium);
}

.meta-foco-valor {
  min-width: 62px;
  font-size: 13px;
}

.meta-foco-atalhos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 2px;
}

.meta-foco-atalho {
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-medium);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.meta-foco-atalho:hover {
  border-color: var(--primary-light);
  color: var(--primary-color);
}

.meta-foco-atalho.ativo {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Aba Foco: hábito vinculado sem meta */
.foco-sem-meta {
  margin-top: 10px;
}

.foco-sem-meta p {
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.45;
}

.foco-btn-add-meta {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px dashed var(--primary-light);
  background: white;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.foco-btn-add-meta:hover {
  background: #F4F7FB;
}
.meta-foco-toggle { white-space: normal; margin-bottom: 0; }

/* ===== RELATÓRIO DE FOCO ===== */

.foco-rel-cabecalho {
  max-width: 900px;
  margin: 8px auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.foco-rel-titulo-secao {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
}

.foco-rel-periodos {
  margin: 0;
  min-width: 300px;
}

.foco-rel-nav {
  max-width: 900px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foco-rel-nav-centro {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.foco-rel-nav-centro span::first-letter { text-transform: uppercase; }

.foco-rel-nav .agenda-semana-seta:disabled { opacity: 0.35; cursor: default; }

.foco-valor-de {
  font-size: 0.55em;
  font-weight: 700;
  color: var(--text-light);
}

.foco-delta {
  display: block;
  margin-top: 2px;
  font-weight: 700;
  font-size: 11px;
}

.foco-delta.bom { color: var(--positive); }
.foco-delta.ruim { color: var(--error-color); }
.foco-delta.neutro { color: var(--text-light); font-weight: 600; }

.foco-insights-rel {
  max-width: 900px;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foco-insight-item {
  padding: 11px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-medium);
}

.foco-insight-item strong { color: var(--text-dark); }

.foco-barras.denso { gap: 3px; }
.foco-barras.denso .foco-barra-trilho { border-radius: 3px; }
.foco-barras.denso .foco-barra { border-radius: 3px 3px 0 0; }
.foco-barras-baixa { height: 110px; }

.foco-barra-col { cursor: default; }
.foco-barra-col.futuro .foco-barra-trilho { opacity: 0.45; }
.foco-barra-col.hoje .foco-barra { background: var(--primary-color); }
.foco-barra.distr { background: var(--gold-soft); }
.foco-barra-col.hoje .foco-barra.distr { background: var(--gold); }
.foco-barra-col.hoje .foco-barra-label { color: var(--primary-color); }
.foco-barra-col:hover .foco-barra-trilho { background: #E9EDF1; }

.foco-hbars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.foco-hbar {
  display: grid;
  grid-template-columns: minmax(90px, 38%) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.foco-hbar-nome {
  color: var(--text-dark);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foco-hbar.mudo .foco-hbar-nome { color: var(--text-light); font-weight: 500; }

.foco-hbar-trilho {
  height: 8px;
  border-radius: 4px;
  background: var(--background);
  overflow: hidden;
}

.foco-hbar-trilho span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--gold-soft);
}

.foco-hbar-trilho span.foco-hbar-navy { background: var(--primary-light); }
.foco-hbar.mudo .foco-hbar-trilho span { background: #CDD4DC; }

.foco-hbar-valor {
  min-width: 64px;
  text-align: right;
  font-weight: 700;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
}

.foco-hbar-valor small {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
}

.foco-painel-vazio {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-light);
}

.foco-dica-hover {
  position: absolute;
  z-index: 4000;
  display: none;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--primary-dark);
  color: white;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

/* ===== ESCOLHA DO TIPO DE DISTRAÇÃO ===== */

.foco-tipo-distracao {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 5;
  padding: 12px 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.foco-tipo-distracao.aberto { opacity: 1; transform: translateY(0); }

.foco-tipo-titulo {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-medium);
  text-align: center;
}

.foco-tipo-opcoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.foco-tipo-opcao {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.foco-tipo-opcao:hover { border-color: var(--primary-color); background: var(--background); }

.foco-tipo-opcao kbd {
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
}

/* Barrinha que esvazia: em 6s a caixa fecha sozinha. */
.foco-tipo-barra {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--gold-soft);
  transform-origin: left;
  animation: focoTipoTempo 6s linear forwards;
}

@keyframes focoTipoTempo { to { transform: scaleX(0); } }

.foco-tipo-distracao.no-imersivo {
  position: relative;
  left: auto; right: auto; top: auto;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.foco-tipo-distracao.no-imersivo .foco-tipo-titulo { color: rgba(255, 255, 255, 0.75); }
.foco-tipo-distracao.no-imersivo .foco-tipo-opcao { background: transparent; color: white; border-color: rgba(255, 255, 255, 0.2); }
.foco-tipo-distracao.no-imersivo .foco-tipo-opcao:hover { border-color: var(--gold-soft); }
.foco-tipo-distracao.no-imersivo kbd { color: rgba(255, 255, 255, 0.6); border-color: rgba(255, 255, 255, 0.2); }

@media (max-width: 760px) {
  .foco-rel-cabecalho, .foco-rel-nav, .foco-insights-rel { margin-left: 16px; margin-right: 16px; }
  .foco-rel-periodos { min-width: 0; width: 100%; }
  .foco-hbar { grid-template-columns: minmax(80px, 34%) 1fr auto; }
}

.foco-barra-label { min-height: 14px; }

@media (max-width: 760px) {
  .foco-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .foco-stats-grid .habito-score-card { padding: 14px; }
  .foco-stats-grid .habito-score-valor { font-size: 24px; }
}
