/* ╔══════════════════════════════════════════════════════════════╗
   ║  Schedule 2026 — Design System & Styles                     ║
   ╚══════════════════════════════════════════════════════════════╝ */

@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Syne:wght@700;800&display=swap");

/* ─── Palette ─────────────────────────────────────────────────── */
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --card: #1a1a26;
  --border: #2a2a3d;
  --accent1: #7c6af7; /* purple  */
  --accent2: #f7a26a; /* orange  */
  --accent3: #6af7b8; /* mint    */
  --accent4: #f76a8a; /* pink    */
  --accent5: #6ab8f7; /* blue    */
  --text: #e8e8f0;
  --muted: #6b6b8a;
  --font-mono: "DM Mono", "Fira Code", "Courier New", monospace;
  --font-display: "Syne", sans-serif;
}

/* ─── Reset ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

body {
  background: var(--bg);
  min-height: 100vh;
  font-family: var(--font-mono);
  color: var(--text);
}

/* ─── Header ──────────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--surface), #0e0e1a);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px 24px;
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
}

.header-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.header-label {
  font-size: 11px;
  color: var(--accent1);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent3);
  display: inline-block;
  animation: pulse 2.5s ease infinite;
}

.header-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--text), var(--accent1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.header-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 580px;
  width: 100%;
}

.header-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ─── Tags ────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  margin: 2px;
}

.tag--header {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ─── Tabs ────────────────────────────────────────────────────── */
.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.tabs-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
}

.tab-btn {
  padding: 14px 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  opacity: 0.85;
}

.tab-btn.active {
  color: var(--accent1);
  border-bottom-color: var(--accent1);
}

/* ─── Content ─────────────────────────────────────────────────── */
.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  position: relative;
  overflow: hidden;
}

/* ─── Tab Panel Transitions ───────────────────────────────────── */
.tab-panel {
  display: none;
  opacity: 0;
}

.tab-panel.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.3s ease forwards;
}

/* Direction-aware slide animations */
.tab-panel.slide-in-left {
  display: block;
  animation: slideInLeft 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.tab-panel.slide-in-right {
  display: block;
  animation: slideInRight 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.tab-panel.slide-out-left {
  display: block;
  animation: slideOutLeft 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.tab-panel.slide-out-right {
  display: block;
  animation: slideOutRight 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.panel-hint {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
}

/* ─── Bottom Nav (mobile) ─────────────────────────────────────── */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .tabs {
    display: none;
  }

  .content {
    padding-bottom: 90px;
  }

  .bottom-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(18, 18, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 12px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  /* Sliding indicator bar container */
  .bottom-nav-indicator-bar {
    width: 100%;
    height: 2px;
    position: relative;
    background: transparent;
  }

  .bottom-nav-indicator {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--accent1);
    box-shadow: 0 0 10px var(--accent1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
  }

  .bottom-nav-btns {
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding: 8px 4px 4px;
  }

  .bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .bottom-nav-btn .nav-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease;
  }

  .bottom-nav-btn.active {
    color: var(--accent1);
  }

  /* Subtitle active state indicator (pill background) */
  .bottom-nav-btn.active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--accent1);
    opacity: 0.08;
    border-radius: 50%;
    z-index: -1;
  }

  .bottom-nav-btn.active .nav-icon {
    transform: translateY(-2px);
  }

  .bottom-nav-btn:active {
    transform: scale(0.9);
  }
}

/* ─── Type Legend ──────────────────────────────────────────────── */
.type-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.type-legend-item {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.type-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

/* ─── Type Badge (inside block cards) ─────────────────────────── */
.type-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
}

/* ─── Daily Block Cards ───────────────────────────────────────── */
.daily-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.block-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: filter 0.2s ease;
  cursor: pointer;
}

.block-card:hover {
  filter: brightness(1.1);
}

.block-card.expanded {
  background: var(--card);
}

/* ─── Break Block (dashed, dimmed, non-interactive) ───────────── */
.block-break {
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.6;
}

.block-break .block-card-header {
  padding: 7px 16px;
}

.block-break .block-card-icon {
  font-size: 15px;
}

.block-break .block-card-label {
  font-size: 12px;
  color: var(--muted);
}

/* ─── Block Card Header ──────────────────────────────────────── */
.block-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.block-card-icon {
  font-size: 19px;
  flex-shrink: 0;
}

.block-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.block-card-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

.block-card-time {
  font-size: 11px;
  color: var(--muted);
}

.block-card-chevron {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

/* ─── Daily Block Expanded Body ───────────────────────────────── */
.block-card-body {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
}

.block-card.expanded .block-card-body {
  display: block;
}

.block-activities {
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-activities li {
  font-size: 13px;
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.block-activities li .arrow {
  margin-top: 2px;
  flex-shrink: 0;
}

.block-activities li span:last-child {
  line-height: 1.55;
}

.block-note {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Daily Total ─────────────────────────────────────────────── */
.daily-total {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.daily-total .label {
  font-size: 12px;
  color: var(--muted);
}

.daily-total .value {
  font-size: 13px;
  color: var(--accent3);
}

/* ─── Weekly Grid ─────────────────────────────────────────────── */
.weekly-legend {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.weekly-legend-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.weekly-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.weekly-card-day {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

.weekly-card-focus {
  font-size: 12px;
  color: var(--text);
  line-height: 1.8;
}

/* ─── Weekly Non-Negotiables box ──────────────────────────────── */
.weekly-extras {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.weekly-extras-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent2);
  margin-bottom: 10px;
}

.weekly-extras-item {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
  display: flex;
  gap: 8px;
}

.weekly-extras-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.weekly-extras-item .check {
  color: var(--accent3);
}

/* ─── Phase Cards ─────────────────────────────────────────────── */
.phases-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease;
}

.phase-card:hover {
  transform: translateY(-2px);
}

.phase-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.phase-theme {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin: 4px 0 10px;
}

.phase-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.phase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ─── Progression box ─────────────────────────────────────────── */
.progression-box {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.progression-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent3);
  margin-bottom: 10px;
}

.progression-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 2.1;
}

/* ─── Warning Cards ───────────────────────────────────────────── */
.warnings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.warn-card {
  background: var(--card);
  border-left: 3px solid var(--accent2);
  border-radius: 0 10px 10px 0;
  padding: 16px 18px;
}

.warn-card-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.warn-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.warn-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent2);
  margin-bottom: 5px;
}

.warn-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── The One Rule box ────────────────────────────────────────── */
.one-rule {
  margin-top: 20px;
  padding: 16px 18px;
  background: #f76a8a15;
  border-radius: 10px;
  border: 1px solid #f76a8a44;
}

.one-rule-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent4);
  margin-bottom: 8px;
}

.one-rule-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── Day View (Timeline) ─────────────────────────────────────── */
.day-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-picker-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  background: var(--card);
  color: var(--muted);
  transition: all 0.15s;
}

.day-picker-btn.active {
  background: var(--accent1);
  color: #fff;
}

.day-picker-btn.today:not(.active) {
  background: rgba(124, 106, 247, 0.14);
  color: var(--accent1);
  outline: 1px solid rgba(124, 106, 247, 0.27);
}

.day-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.day-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}

.day-today-badge {
  margin-left: 10px;
  font-size: 11px;
  color: var(--accent3);
  font-weight: 400;
  font-family: var(--font-mono);
}

.fundamentals-badge {
  font-size: 11px;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.timeline-container {
  position: relative;
  overflow-y: auto;
  max-height: 65vh;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.timeline-inner {
  position: relative;
  padding-left: 44px;
}

.timeline-hour {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  height: 1px;
}

.timeline-hour-label {
  width: 44px;
  text-align: right;
  padding-right: 8px;
  font-size: 9px;
  color: var(--muted);
  flex-shrink: 0;
  user-select: none;
}

.timeline-hour-line {
  flex: 1;
  height: 1px;
  background: rgba(42, 42, 61, 0.33);
}

.timeline-hour-line.major {
  background: var(--border);
}

.timeline-block {
  position: absolute;
  left: 48px;
  right: 6px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  transition: box-shadow 0.3s;
}

.timeline-block.now {
  border-width: 1.5px !important;
}

.timeline-block.timeline-break {
  background-color: transparent !important;
  border: 1px dashed var(--border) !important;
  opacity: 0.5;
}

.now-indicator {
  position: absolute;
  left: 44px;
  right: 0;
  display: flex;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent4);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent4);
}

.now-line {
  flex: 1;
  height: 1.5px;
  background: var(--accent4);
  box-shadow: 0 0 6px rgba(247, 106, 138, 0.5);
}

.now-time {
  font-size: 8px;
  color: var(--accent4);
  background: var(--bg);
  padding: 0 4px;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.swipe-hint {
  display: none;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  padding: 4px 0 0;
  letter-spacing: 0.5px;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .swipe-hint {
    display: block;
    margin-bottom: 10px;
  }
}

/* ─── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* Directional slide transitions */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(44px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(-44px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.slide-right {
  animation: slideRight 0.27s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.slide-left {
  animation: slideLeft 0.27s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
