/* apps/selfstudy/frontend/style.css */
/* MQnet SelfStudy - High Focus Deep Obsidian & Emerald Neon Theme */

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.4);
  
  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.4);
  --accent: #06b6d4;
  --indigo: #6366f1;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Inter", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

/* ── Top Header ─────────────────────────────────────────── */
.ss-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-icon {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Navigation Tabs ────────────────────────────────────── */
.ss-nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 12px;
  gap: 0.25rem;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* 스터디카페 연동 좌석 배지 */
.sc-seat-connection-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.sc-seat-connection-badge.connected {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.sc-seat-connection-badge.disconnected {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-goto-studycafe {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-goto-studycafe:hover { background: rgba(255, 255, 255, 0.2); }

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: ssPulse 1.8s infinite;
}
@keyframes ssPulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }

/* ── Main Container ─────────────────────────────────────── */
.ss-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── 1. 타이머 섹션 ─────────────────────────────────────── */
.timer-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  padding: 2.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.timer-hero-container::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
}

.timer-mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.mode-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.timer-circle-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, rgba(0, 0, 0, 0.4) 70%);
  border: 6px solid #1e293b;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.15);
  position: relative;
  transition: all 0.3s;
}

.timer-circle-display.running {
  border-color: #10b981;
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.35);
}

.timer-mode-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timer-digits {
  font-size: 3.5rem;
  font-weight: 900;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.timer-subject-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  color: #e2e8f0;
  margin-top: 0.5rem;
}

.timer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-timer-primary {
  padding: 0.9rem 2.5rem;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: transform 0.15s, opacity 0.2s;
}
.btn-timer-primary:hover { transform: translateY(-2px); opacity: 0.95; }
.btn-timer-primary.pause {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-timer-secondary {
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-timer-secondary:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.btn-timer-complete {
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s;
}
.btn-timer-complete:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}
.btn-timer-complete:active { transform: translateY(0); }

.whitenoise-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.whitenoise-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}
.whitenoise-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.btn-back-planner {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}
.btn-back-planner:hover { color: #38bdf8; }

/* 오늘 누적 순공 요약 카드 */
.today-summary-strip {
  width: 100%;
  max-width: 500px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.summary-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.summary-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.summary-val { font-size: 1.2rem; font-weight: 800; color: #fff; }
.summary-goal { font-size: 0.78rem; color: var(--text-dim); }

.summary-progress-bar {
  width: 100%; height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}
.summary-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* ── 2. 과목 플래너 섹션 ─────────────────────────────────── */
.planner-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.planner-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.planner-actions { display: flex; gap: 0.75rem; }

.btn-action-primary {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
}
.btn-action-primary:hover { transform: translateY(-1px); }

.btn-action-ai {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
}
.btn-action-ai:hover { transform: translateY(-1px); }

.btn-action-checkout {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25);
}
.btn-action-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.45);
  filter: brightness(1.1);
}
.btn-action-checkout:active {
  transform: translateY(0);
}

/* D-day 진도 종합 현황 바 */
.curriculum-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: #fff;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.curr-summary-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.curr-summary-badge {
  background: #0284c7;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  letter-spacing: -0.2px;
}

.curr-meta-item {
  color: #e2e8f0;
  font-size: 0.88rem;
}
.curr-meta-item strong {
  font-weight: 800;
}

.curr-divider {
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
}

.text-accent { color: #38bdf8 !important; }
.text-primary { color: #34d399 !important; }
.text-success { color: #10b981 !important; }
.text-warning { color: #fbbf24 !important; }

.curr-summary-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tasks-list-container {
  width: 100%;
}

/* ── 학습 테이블 카드 ─────────────────────────────────────────── */
.study-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.table-responsive-box {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.study-planner-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.88rem;
  min-width: 860px;
}

.study-planner-table th {
  padding: 0.85rem 0.6rem;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.study-planner-table td {
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  white-space: nowrap;
  font-size: 0.88rem;
  transition: background 0.15s ease;
}

.study-task-row:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.study-task-row.row-studying td {
  background: rgba(6, 182, 212, 0.06);
}
.study-task-row.row-finished td {
  background: rgba(16, 185, 129, 0.04);
}

.table-book-title {
  font-weight: 700;
  color: #fff;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.btn-tb-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-tb-start:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.badge-studying, .btn-tb-studying {
  background: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}
.btn-tb-studying:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.badge-done {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-block;
}

.time-start {
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
}

.page-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
}

.input-start-page {
  width: 54px;
  padding: 0.35rem 0.25rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}
.input-start-page:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}

.time-allocated-mins {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

/* 빨간색 종료예정시간 */
.time-expected {
  color: #ef4444;
  font-weight: 900;
  font-size: 0.98rem;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* 파란색 실제 종료시간 */
.time-finished {
  color: #38bdf8;
  font-weight: 900;
  font-size: 0.98rem;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.input-table-achieved {
  width: 58px;
  padding: 0.35rem 0.3rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}
.input-table-achieved:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.page-achieved-val {
  font-size: 1rem;
  font-weight: 900;
}

.btn-tb-end {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-tb-end:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
  box-shadow: none;
}
.btn-tb-end.active:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-tb-edit-start,
.btn-tb-edit-end,
.btn-tb-reset {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-tb-edit-start:hover,
.btn-tb-edit-end:hover,
.btn-tb-reset:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.badge-speed {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: -0.2px;
}

.btn-tb-del {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.25rem;
  transition: color 0.2s;
}
.btn-tb-del:hover {
  color: #ef4444;
}

.time-dash {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.task-subj-badge {
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.55rem; border-radius: 6px;
  background: rgba(99, 102, 241, 0.15); color: #a5b4fc;
  display: inline-flex; align-items: center; gap: 0.25rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.subj-수학 { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.subj-영어 { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.subj-국어 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.subj-탐구 { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.subj-한국사 { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.table-subj-cell, .table-book-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-edit-subj-mini, .btn-edit-book-mini {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.6;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn-edit-subj-mini:hover, .btn-edit-book-mini:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  transform: scale(1.1);
}

.preset-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.preset-chip-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #fff;
}
.preset-chip-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.task-title-text { font-size: 0.92rem; font-weight: 600; color: #fff; }
.task-meta { display: flex; align-items: center; gap: 0.75rem; }
.task-time { font-size: 0.75rem; color: var(--text-dim); }

.btn-del-task {
  background: transparent; border: none; color: #64748b;
  cursor: pointer; font-size: 0.9rem; padding: 0.2rem;
}
.btn-del-task:hover { color: #ef4444; }

/* ── 3. AI 멘토 섹션 ─────────────────────────────────────── */
.ai-mentor-container {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  height: 600px;
}

.ai-mentor-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-status-pill {
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent); background: rgba(6, 182, 212, 0.12);
  padding: 0.2rem 0.6rem; border-radius: 9999px;
}

.ai-chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.chat-bubble-row {
  display: flex;
  gap: 0.85rem;
  max-width: 80%;
}
.chat-bubble-row.ai { align-self: flex-start; }
.chat-bubble-row.user { align-self: flex-end; flex-direction: row-reverse; }

.avatar-box {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
}

.bubble-content { display: flex; flex-direction: column; gap: 0.25rem; }
.sender-name { font-size: 0.72rem; color: var(--text-dim); }
.bubble-text {
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.chat-bubble-row.ai .bubble-text {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.chat-bubble-row.user .bubble-text {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.msg-time { font-size: 0.68rem; color: #64748b; }

.ai-chips-bar {
  padding: 0.5rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}
.quick-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.quick-chip:hover { color: #fff; border-color: var(--accent); }

.ai-chat-input-bar {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  background: rgba(10, 14, 23, 0.6);
}
.ai-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}
.ai-chat-input:focus { border-color: var(--primary); }

.btn-ai-send {
  padding: 0 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

/* ── 4. 리포트 섹션 ─────────────────────────────────────── */
.report-overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.rep-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.15rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.rep-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.rep-val { font-size: 1.45rem; font-weight: 800; color: #fff; }

.weekly-bar-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
}
.chart-title { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 1.5rem; }

.bar-chart-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 220px;
  padding: 0 1rem;
  gap: 1rem;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 0.5rem;
}
.bar-val { font-size: 0.72rem; color: var(--text-muted); }
.bar-track {
  flex: 1; width: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #06b6d4, #10b981);
  border-radius: 8px 8px 0 0;
  transition: height 0.6s ease;
}
.bar-day { font-size: 0.8rem; font-weight: 700; color: var(--text-main); }

/* ── 모달 공통 ─────────────────────────────────────────── */
.ss-modal-backdrop, .ss-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.ss-modal-backdrop.open, .ss-modal-overlay.open { display: flex; animation: ssFadeIn 0.2s ease; }

.ss-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  width: 100%; max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  color: #fff;
}
.ss-modal-header {
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.ss-modal-title { font-size: 1.15rem; font-weight: 700; }
.ss-modal-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 1.25rem; cursor: pointer; border-radius: 6px;
}
.ss-modal-body {
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}

.ss-form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.ss-form-label { font-size: 0.8rem; font-weight: 600; color: #cbd5e1; }
.ss-form-input, .ss-form-select {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff; font-size: 0.95rem; outline: none;
}
.ss-form-input:focus, .ss-form-select:focus { border-color: var(--primary); }

.ss-modal-submit-btn {
  padding: 0.85rem;
  border-radius: 10px;
  border: none;
  font-size: 0.95rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  cursor: pointer; margin-top: 0.5rem;
}

/* ── Toast 알림 ─────────────────────────────────────────── */
.ss-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem;
  transform: translateY(100px); opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ss-toast.show { transform: translateY(0); opacity: 1; }
.ss-toast.success { border-color: rgba(16, 185, 129, 0.5); }
.ss-toast.error { border-color: rgba(239, 68, 68, 0.5); }

@keyframes ssFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 768px) {
  .ss-header { flex-direction: column; align-items: stretch; }
  .timer-circle-display { width: 220px; height: 220px; }
  .timer-digits { font-size: 2.8rem; }
}

/* ── D-day 진도계획표 액션 버튼 및 현황 바 ───────────────── */
.btn-action-curriculum {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-action-curriculum:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.45);
}

.curriculum-summary-bar {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-main);
}
.curr-summary-left { display: flex; align-items: center; gap: 0.5rem; }
.curr-summary-badge {
  background: #0284c7;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}
.curr-summary-right {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── D-day 진도계획표 모달 위저드 ──────────────────────── */
.ss-modal-lg {
  max-width: 660px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.curriculum-modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 90px);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.curriculum-step-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #fff;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}
.step-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.step-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.curr-calc-badge {
  background: rgba(14, 165, 233, 0.1);
  border: 1px dashed rgba(14, 165, 233, 0.3);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* 요일별 시간 그리드 */
.weekly-time-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.day-time-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.day-time-card.weekend { border-color: rgba(99, 102, 241, 0.3); }
.day-time-card.buffer { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.05); }

.day-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.time-input-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  color: var(--text-dim);
}
.time-input {
  width: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
  text-align: center;
  padding: 2px 0;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
}
.time-input:focus { border-color: var(--accent); }

/* 교재 목록 테이블 */
.books-table-container {
  overflow-x: auto;
}
.books-input-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.books-input-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
}
.books-input-table td {
  padding: 0.4rem 0.4rem;
}
.book-subj-tag {
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: inline-block;
}
.book-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  outline: none;
}
.book-input:focus { border-color: var(--primary); }

.btn-curr-add-book {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px dashed rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-curr-add-book:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: #fff;
}

.btn-curr-del-row {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-curr-del-row:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  border-color: #ef4444;
}

/* 미리보기 카드 */
.curr-preview-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.preview-title { font-size: 0.8rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}
.preview-pill {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.preview-pill-subj { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; }
.preview-pill-target { font-size: 0.82rem; font-weight: 800; color: #fff; }
.preview-pill-time { font-size: 0.7rem; color: var(--accent); }

.curr-submit-btn {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  padding: 0.85rem;
  font-size: 0.95rem;
}

/* 진도표 하단 퇴실 액션 바 */
.planner-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bottom-tip-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bottom-tip-icon {
  font-size: 1.1rem;
}

/* 퇴실 정산 모달 스타일 */
.checkout-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.9rem;
}

.co-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.co-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.co-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
}

.checkout-submit-btn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}
.checkout-submit-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* 모바일 반응형 최적화 */
@media (max-width: 768px) {
  .curriculum-summary-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
  }
  .curr-summary-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .curr-divider { display: none; }
  .table-responsive-box {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .planner-bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .checkout-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}



