:root {
  --bg: var(--tg-theme-bg-color, #1a1a2e);
  --text: var(--tg-theme-text-color, #eee);
  --accent: var(--tg-theme-button-color, #6c5ce7);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #2d2d44);
  --hint: var(--tg-theme-hint-color, #888);
}

body { background: var(--bg); color: var(--text); font-family: -apple-system, sans-serif; margin: 0; padding-bottom: 70px; }
.card { background: var(--secondary-bg); border-radius: 12px; padding: 16px; margin: 8px 16px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn { background: var(--accent); color: var(--tg-theme-button-text-color, #fff); border: none; border-radius: 8px; padding: 10px 16px; cursor: pointer; font-weight: bold;}
.btn:disabled { opacity: 0.5; background: var(--hint); }
.btn-ghost { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.progress-bar { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; margin-top: 8px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.2) }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.3s; }

/* Тепловая карта */
.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; max-width: 100%; }
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; }
.heatmap-cell.done { background: #2ecc71; }
.heatmap-cell.skip { background: #e74c3c; }
.heatmap-cell.empty { background: #3a3a5c; }

/* Bottom nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; 
              display: flex; background: var(--secondary-bg); 
              border-top: 1px solid #444; padding-bottom: env(safe-area-inset-bottom); z-index: 1000; }
.nav-item { flex: 1; padding: 12px 0; text-align: center; font-size: 24px; cursor: pointer; transition: 0.2s; }
.nav-item.active { opacity: 0.5; }
.nav-item:active { transform: scale(0.9); }

h1, h2, h3 { margin: 0 0 10px 0; }
p { margin: 0 0 10px 0; }
.flex { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }
.text-hint { color: var(--hint); font-size: 0.9em; }

.habit-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.habit-actions { display: flex; gap: 8px; }
