/* =====================================================
   SAATDURUM — STUDY STATISTICS MODULE STYLES
   Pixel-Perfect Heatmaps, Donut Charts, 90-Day & Monthly
===================================================== */

:root {
  /* Artık sabit renkler değil, aktif temanın global değişkenlerinden besleniyor. */
  --st-bg: var(--bg-mid, #09090c);
  --st-card: var(--bg-card, #121217);
  --st-card-inner: var(--bg-card-hv, #181822);
  --st-border: var(--border, rgba(255, 255, 255, 0.08));
  --st-border-hv: var(--border-hv, rgba(255, 255, 255, 0.18));
  --st-orange: var(--accent, #f97316);
  --st-orange-glow: hsla(var(--accent-h, 24), var(--accent-s, 90%), 60%, 0.35);
  /* Isı haritası / grafik kategori renkleri (fonksiyonel veri rengi, temadan bağımsız kalır) */
  --st-pink: #ec4899;
  --st-green: #10b981;
  --st-text-p: var(--text-p, #ffffff);
  --st-text-s: var(--text-s, #94a3b8);
  --st-text-m: var(--text-m, #64748b);
  --st-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;
}

/* Light & Litewhite Themes */
body.theme-light,
body.light-theme,
[data-theme="light"],
body.theme-litewhite,
body.litewhite-theme,
[data-theme="litewhite"] {
  --st-bg: #f8fafc;
  --st-card: #ffffff;
  --st-card-inner: #f1f5f9;
  --st-border: rgba(15, 23, 42, 0.12);
  --st-border-hv: rgba(15, 23, 42, 0.22);
  --st-text-p: #0f172a;
  --st-text-s: #475569;
  --st-text-m: #64748b;
}

/* Pink Theme */
body.theme-pink,
body.pink-theme,
[data-theme="pink"] {
  --st-bg: #fff1f2;
  --st-card: #ffffff;
  --st-card-inner: #fff5f7;
  --st-border: rgba(244, 63, 94, 0.2);
  --st-border-hv: rgba(244, 63, 94, 0.38);
  --st-text-p: #4c2f35;
  --st-text-s: #8a636c;
  --st-text-m: #9f737d;
}

/* Aero Theme */
body.theme-aero,
body.aero-theme,
[data-theme="aero"] {
  --st-bg: #020914;
  --st-card: rgba(4, 20, 48, 0.82);
  --st-card-inner: rgba(0, 168, 255, 0.1);
  --st-border: rgba(0, 168, 255, 0.22);
  --st-border-hv: rgba(0, 168, 255, 0.45);
  --st-text-p: #ffffff;
  --st-text-s: #93c5fd;
  --st-text-m: #60a5fa;
}

body.theme-light .st-heat-cell,
body.light-theme .st-heat-cell,
[data-theme="light"] .st-heat-cell,
body.theme-litewhite .st-heat-cell,
body.litewhite-theme .st-heat-cell,
[data-theme="litewhite"] .st-heat-cell,
body.theme-light .st-heat-tier-0,
body.light-theme .st-heat-tier-0,
[data-theme="light"] .st-heat-tier-0,
body.theme-litewhite .st-heat-tier-0,
body.litewhite-theme .st-heat-tier-0,
[data-theme="litewhite"] .st-heat-tier-0 {
  background: #f1f5f9;
}

body.theme-pink .st-heat-cell,
body.pink-theme .st-heat-cell,
[data-theme="pink"] .st-heat-cell,
body.theme-pink .st-heat-tier-0,
body.pink-theme .st-heat-tier-0,
[data-theme="pink"] .st-heat-tier-0 {
  background: #ffe4e6;
}

body.theme-aero .st-heat-cell,
body.aero-theme .st-heat-cell,
[data-theme="aero"] .st-heat-cell,
body.theme-aero .st-heat-tier-0,
body.aero-theme .st-heat-tier-0,
[data-theme="aero"] .st-heat-tier-0 {
  background: rgba(0, 168, 255, 0.08);
}

body.theme-light .st-week-block-box,
body.light-theme .st-week-block-box,
[data-theme="light"] .st-week-block-box,
body.theme-litewhite .st-week-block-box,
body.litewhite-theme .st-week-block-box,
[data-theme="litewhite"] .st-week-block-box {
  background: #f1f5f9;
}

body.theme-pink .st-week-block-box,
body.pink-theme .st-week-block-box,
[data-theme="pink"] .st-week-block-box {
  background: #ffe4e6;
}

body.theme-aero .st-week-block-box,
body.aero-theme .st-week-block-box,
[data-theme="aero"] .st-week-block-box {
  background: rgba(0, 168, 255, 0.08);
}

body.theme-light .st-period-day-dot,
body.light-theme .st-period-day-dot,
[data-theme="light"] .st-period-day-dot,
body.theme-litewhite .st-period-day-dot,
body.litewhite-theme .st-period-day-dot,
[data-theme="litewhite"] .st-period-day-dot {
  background: #f1f5f9;
}

body.theme-pink .st-period-day-dot,
body.pink-theme .st-period-day-dot,
[data-theme="pink"] .st-period-day-dot {
  background: #ffe4e6;
}

body.theme-light .st-stacked-track,
body.light-theme .st-stacked-track,
[data-theme="light"] .st-stacked-track,
body.theme-litewhite .st-stacked-track,
body.litewhite-theme .st-stacked-track,
[data-theme="litewhite"] .st-stacked-track {
  background: #e2e8f0;
}

body.theme-pink .st-stacked-track,
body.pink-theme .st-stacked-track,
[data-theme="pink"] .st-stacked-track {
  background: #fecdd3;
}

/* ═════════════════════════════════════════
   STATISTICS ROOT CONTAINER
═════════════════════════════════════════ */

.st-stats-module-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  animation: stFadeIn 0.25s ease;
  position: relative;
}

/* ═════════════════════════════════════════
   1. HEADER & PERIOD PILL TABS
═════════════════════════════════════════ */

.st-stats-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 0;
  gap: 8px;
}

.st-stats-back-btn {
  background: transparent;
  border: none;
  color: var(--st-text-s);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.st-stats-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--st-text-p);
}

.st-stats-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--st-text-p);
  letter-spacing: -0.01em;
}

/* Period Filter Pills */
.st-stats-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px 0;
  scrollbar-width: none;
}

.st-stats-pills-row::-webkit-scrollbar {
  display: none;
}

.st-stats-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--st-border);
  color: var(--st-text-s);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 20px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.st-stats-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--st-text-p);
}

.st-stats-pill.active {
  background: var(--accent, #f97316);
  border-color: var(--accent, #f97316);
  color: var(--accent-text, #000);
  box-shadow: 0 4px 14px var(--accent-glow, rgba(249, 115, 22, 0.35));
}

/* ═════════════════════════════════════════
   2. GÜNLÜK: TAKVİM ISI HARİTASI
═════════════════════════════════════════ */

.st-cal-heatmap-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 18px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-cal-heatmap-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.st-cal-month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.st-cal-month-arrow {
  background: transparent;
  border: none;
  color: var(--st-text-s);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.st-cal-month-arrow:hover {
  color: var(--st-text-p);
}

.st-cal-month-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--st-text-p);
}

.st-cal-days-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.st-cal-day-head-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--st-text-m);
  padding: 4px 0;
}

.st-cal-grid-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.st-heat-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
  background: #14141b;
  border: 1.5px solid transparent;
}

.st-heat-cell:hover {
  transform: scale(1.06);
  z-index: 2;
}

.st-heat-cell.is-selected {
  border-color: var(--st-text-p) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  z-index: 3;
}

.st-heat-cell.is-other-month {
  opacity: 0.28;
}

.st-heat-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--st-text-s);
}

.st-heat-hours-lbl {
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--st-font-mono);
  color: rgba(255, 255, 255, 0.95);
}

body.light-theme .st-heat-hours-lbl,
body.theme-light .st-heat-hours-lbl,
[data-theme="light"] .st-heat-hours-lbl,
body.litewhite-theme .st-heat-hours-lbl,
body.theme-litewhite .st-heat-hours-lbl,
[data-theme="litewhite"] .st-heat-hours-lbl {
  color: var(--st-text-s, #475569);
}

body.light-theme .st-heat-tier-0 .st-heat-hours-lbl,
body.theme-light .st-heat-tier-0 .st-heat-hours-lbl,
[data-theme="light"] .st-heat-tier-0 .st-heat-hours-lbl,
body.litewhite-theme .st-heat-tier-0 .st-heat-hours-lbl,
body.theme-litewhite .st-heat-tier-0 .st-heat-hours-lbl,
[data-theme="litewhite"] .st-heat-tier-0 .st-heat-hours-lbl {
  color: #94a3b8;
}

body.light-theme .st-heat-tier-3 .st-heat-hours-lbl,
body.theme-light .st-heat-tier-3 .st-heat-hours-lbl,
[data-theme="light"] .st-heat-tier-3 .st-heat-hours-lbl,
body.litewhite-theme .st-heat-tier-3 .st-heat-hours-lbl,
body.theme-litewhite .st-heat-tier-3 .st-heat-hours-lbl,
[data-theme="litewhite"] .st-heat-tier-3 .st-heat-hours-lbl,
body.light-theme .st-heat-tier-4 .st-heat-hours-lbl,
body.theme-light .st-heat-tier-4 .st-heat-hours-lbl,
[data-theme="light"] .st-heat-tier-4 .st-heat-hours-lbl,
body.litewhite-theme .st-heat-tier-4 .st-heat-hours-lbl,
body.theme-litewhite .st-heat-tier-4 .st-heat-hours-lbl,
[data-theme="litewhite"] .st-heat-tier-4 .st-heat-hours-lbl {
  color: #ffffff;
}

/* Heatmap Color Tiers */
.st-heat-tier-0 { background: #14141b; }
.st-heat-tier-1 { background: #4a2a18; }
.st-heat-tier-2 { background: #6e3518; }
.st-heat-tier-3 { background: #9a3d16; }
.st-heat-tier-4 { background: #ea580c; box-shadow: inset 0 0 8px rgba(249, 115, 22, 0.5); }

.st-heat-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.st-heat-scale-boxes {
  display: flex;
  align-items: center;
  gap: 4px;
}

.st-heat-scale-badge {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ═════════════════════════════════════════
   3. SEÇİLİ GÜN ÖZET KARTI
═════════════════════════════════════════ */

.st-day-summary-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.st-day-summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--st-text-p);
  text-align: center;
}

.st-day-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.st-day-metric-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.st-day-metric-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #ea580c);
  line-height: 1.3;
}

.st-day-metric-val {
  font-family: var(--st-font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--st-text-p);
  letter-spacing: -0.03em;
}

.st-day-metric-val.time-sub {
  font-size: 18px;
  font-weight: 700;
}

/* ═════════════════════════════════════════
   4. HALKA GRAFİKLER (DONUT CARDS)
═════════════════════════════════════════ */

.st-donut-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.st-donut-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-donut-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.st-donut-center-text {
  position: absolute;
  font-family: var(--st-font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--st-text-p);
  text-align: center;
}

.st-donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.st-donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--st-text-p);
  font-weight: 600;
}

.st-donut-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ═════════════════════════════════════════
   5. 24 SAATLİK ZAMAN MATRİSİ
═════════════════════════════════════════ */

.st-day-study-mat-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.st-day-study-mat-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--st-text-p);
}

.st-day-study-mat-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 480px) {
  .st-day-study-mat-body {
    grid-template-columns: 1fr;
  }
}

.st-mat-student-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.st-student-graphic-svg {
  width: 90px;
  height: 90px;
  stroke: var(--st-orange);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-student-live-digits {
  font-family: var(--st-font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--st-orange);
  letter-spacing: -0.02em;
}

.st-hour-blocks-matrix {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.st-hour-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.st-hour-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--st-text-m);
  width: 18px;
  text-align: right;
}

.st-hour-segments {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  flex: 1;
}

.st-hour-seg {
  height: 12px;
  background: #191924;
  border-radius: 2px;
}

.st-hour-seg.is-active-pink {
  background: var(--st-pink);
  box-shadow: 0 0 6px var(--st-pink);
}

.st-hour-seg.is-active-orange {
  background: var(--st-orange);
  box-shadow: 0 0 6px var(--st-orange);
}

/* ═════════════════════════════════════════
   6. HAFTALIK & AYLIK ÇEYREK/AY MATRİSLERİ
═════════════════════════════════════════ */

.st-weekly-quarter-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.st-quarter-nav-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.st-quarter-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--st-text-p);
}

.st-quarter-weeks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.st-week-block-box {
  background: #14141c;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 52px;
  text-align: center;
}

.st-week-block-box:hover {
  background: #1c1c28;
}

.st-week-block-box.is-active-heat {
  background: #4a2a18;
}

.st-week-block-box.is-selected {
  border-color: var(--st-text-p) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.st-week-block-dates {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--st-text-s);
}

.st-week-block-time {
  font-family: var(--st-font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--st-text-p);
}

/* Cumulative Step Chart Card */
.st-step-chart-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.st-step-chart-header {
  font-size: 14px;
  font-weight: 800;
  color: var(--st-text-p);
  text-align: center;
}

.st-step-summary-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.st-step-metric-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #ea580c;
}

.st-step-metric-val {
  font-family: var(--st-font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--st-text-p);
}

.st-step-diff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.st-step-diff-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--st-text-p);
}

.st-step-legend-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--st-text-s);
}

.st-step-canvas-container {
  width: 100%;
  height: 180px;
  position: relative;
}

.st-timeline-chart-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-timeline-chart-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--st-text-s);
  display: flex;
  align-items: center;
  gap: 16px;
}

.st-timeline-canvas-container {
  width: 100%;
  height: 150px;
  position: relative;
}

/* ═════════════════════════════════════════
   7. DÖNEM (90 GÜNLÜK MATRİS - Image 1)
═════════════════════════════════════════ */

.st-period-range-select-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.st-period-range-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.st-period-range-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--st-text-p);
}

.st-period-range-dates {
  font-size: 11.5px;
  color: var(--st-text-s);
}

.st-period-stream-card {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-period-stream-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 28px;
}

.st-period-weekday-col {
  flex: 1;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--st-text-m);
}

.st-period-month-stream-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.st-period-month-label {
  width: 24px;
  font-size: 13px;
  font-weight: 800;
  color: var(--st-text-s);
  text-align: right;
  padding-right: 4px;
}

.st-period-month-days-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 3px;
  flex: 1;
}

.st-period-day-dot {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #14141b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--st-text-m);
}

.st-period-day-dot.is-active-heat {
  background: #4a2a18;
  color: var(--st-text-p);
}

.st-period-day-dot.is-active-bright {
  background: #ea580c;
  color: var(--st-text-p);
}

/* ═════════════════════════════════════════
   8. ENHANCED STATS CARDS & SECTIONS
═════════════════════════════════════════ */

.st-card-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--st-text-p);
  letter-spacing: -0.01em;
}

.st-card-header-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--st-text-s);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid var(--st-border);
}

.st-card-header-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--st-text-s);
}

.st-empty-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  color: var(--st-text-s);
}

/* ── 8.1 Weekly Hero KPI Card ── */
.st-weekly-hero-card {
  gap: 14px;
}

.st-hero-metric-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 2px 0;
  text-align: center;
}

.st-hero-metric-main-val {
  font-family: var(--st-font-mono);
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 900;
  color: var(--st-text-p);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.st-hero-metric-main-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--st-text-s);
  margin-top: 4px;
}

.st-mini-kpi-box {
  background: var(--st-card-inner);
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── 8.2 Stacked Subject Column Chart (Haftanın Günleri Sütun Grafiği) ── */
.st-stacked-bar-card {
  gap: 14px;
}

.st-stacked-bars-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  align-items: flex-end;
  min-height: 170px;
  padding: 12px 4px 6px 4px;
  background: var(--st-card-inner);
  border: 1px solid var(--st-border);
  border-radius: 12px;
}

.st-stacked-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  height: 100%;
  justify-content: flex-end;
  padding: 4px 2px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.st-stacked-col:hover {
  background: rgba(255, 255, 255, 0.05);
}

.st-stacked-col.is-today {
  outline: 1.5px dashed var(--accent, #f97316);
  outline-offset: -1px;
}

.st-stacked-time-top {
  font-family: var(--st-font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--st-text-s);
  white-space: nowrap;
  min-height: 14px;
  line-height: 14px;
}

.st-stacked-track {
  width: 100%;
  max-width: 32px;
  min-width: 14px;
  height: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--st-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  position: relative;
}

.st-stacked-segment {
  width: 100%;
  transition: height 0.3s ease;
  min-height: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.st-stacked-day-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--st-text-p);
  margin-top: 2px;
}

.st-stacked-date-num {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--st-text-m);
}

.st-stacked-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--st-border);
}

.st-stacked-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--st-card-inner);
  border: 1px solid var(--st-border);
  font-size: 11.5px;
  font-weight: 600;
}

.st-legend-name {
  color: var(--st-text-p);
}

.st-legend-time {
  font-family: var(--st-font-mono);
  font-size: 10.5px;
  color: var(--st-text-s);
}

/* ── 8.3 Donut & Subject Breakdown Progress Bars ── */
.st-donut-card-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
  width: 100%;
}

.st-donut-center-sub {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--st-text-s);
  margin-top: 2px;
}

.st-subject-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.st-subject-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.st-subject-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.st-subject-name-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.st-subject-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--st-text-p);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-subject-time-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.st-subject-duration {
  font-family: var(--st-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--st-text-s);
}

.st-subject-pct-badge {
  font-family: var(--st-font-mono);
  font-size: 10.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 4px;
}

.st-subject-progress-track {
  width: 100%;
  height: 6px;
  background: var(--st-card-inner);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--st-border);
}

.st-subject-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 8.4 Çalışma / Mola Oranı Card ── */
.st-ratio-card {
  gap: 14px;
}

.st-quality-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid;
}

.st-ratio-split-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--st-card-inner);
  border: 1px solid var(--st-border);
  border-radius: 12px;
}

.st-ratio-split-bar {
  width: 100%;
  height: 14px;
  border-radius: 7px;
  display: flex;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.st-ratio-bar-work {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #f97316), #ea580c);
  transition: width 0.4s ease;
}

.st-ratio-bar-rest {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #0891b2);
  transition: width 0.4s ease;
}

.st-ratio-bar-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--st-text-s);
}

.st-ratio-lbl-work,
.st-ratio-lbl-rest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.st-ratio-lbl-work strong {
  color: var(--st-text-p);
}

.st-ratio-lbl-rest strong {
  color: var(--st-text-p);
}

.st-ratio-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.st-ratio-metric-box {
  background: var(--st-card-inner);
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-ratio-metric-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--st-text-s);
}

.st-ratio-metric-val {
  font-family: var(--st-font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--st-text-p);
}

.st-ratio-metric-val.work-val {
  color: var(--accent, #f97316);
}

.st-ratio-metric-val.rest-val {
  color: #06b6d4;
}

.st-ratio-metric-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--st-text-m);
}

/* ═════════════════════════════════════════
   9. RESPONSIVE MOBILE ADAPTATIONS
═════════════════════════════════════════ */

@media (max-width: 640px) {
  .st-donut-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .st-donut-card-body {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
  }

  .st-donut-wrapper {
    margin: 0 auto;
  }

  .st-ratio-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .st-ratio-metrics-grid .st-ratio-metric-box:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .st-weekly-hero-card .st-step-summary-metrics {
    grid-template-columns: 1fr !important;
  }

  .st-stacked-bars-grid {
    gap: 4px;
    padding: 10px 2px 4px 2px;
  }

  .st-stacked-track {
    max-width: 24px;
    min-width: 10px;
    height: 85px;
  }

  .st-stacked-time-top {
    font-size: 8px;
  }

  .st-stacked-day-label {
    font-size: 10px;
  }

  .st-stacked-date-num {
    font-size: 8.5px;
  }

  .st-ratio-bar-labels {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

