/* ==========================================================================
   Yonsei Graduation Checker Design System - style.css
   ========================================================================== */

/* Variables */
:root {
  --font-family-outfit: 'Outfit', 'Noto Sans KR', sans-serif;
  
  /* Color Palette (Deep Dark Theme with Yonsei Royal Blue accent) */
  /* Dark theme — soft pastel accents on deep navy */
  --bg-app: #0c1020;
  --bg-sidebar: #111631;
  --bg-card: rgba(24, 31, 55, 0.82);
  --bg-card-hover: rgba(33, 42, 72, 0.92);
  --glass-sheen: rgba(255, 255, 255, 0.05);
  --ambient-1: rgba(143, 180, 247, 0.14);
  --ambient-2: rgba(196, 166, 239, 0.12);
  --ambient-3: rgba(131, 224, 182, 0.08);

  --border-color: rgba(255, 255, 255, 0.09);
  --border-color-focus: rgba(143, 180, 247, 0.5);

  --color-text-primary: #eef2fb;
  --color-text-secondary: #aab7cf;
  --color-text-muted: #74829d;

  /* Accent palette (pastel). --gradient-primary stays deep enough that white
     button/logo text keeps contrast; the flat accents are light so they read
     as bright text/fills on the dark cards. */
  --gradient-primary: linear-gradient(135deg, #5a7ce0, #7d63d6);
  --color-yonsei-blue: #7f9ce0;
  --color-yonsei-blue-glow: rgba(127, 156, 224, 0.35);
  --color-blue: #8fb4f7;
  --color-blue-bg: rgba(143, 180, 247, 0.16);
  --color-purple: #c3a6ef;
  --color-purple-bg: rgba(195, 166, 239, 0.16);
  --color-orange: #f7c393;
  --color-orange-bg: rgba(247, 195, 147, 0.16);

  --color-success: #83e0b6;
  --color-success-bg: rgba(131, 224, 182, 0.15);
  --color-warning: #f2d091;
  --color-warning-bg: rgba(242, 208, 145, 0.15);
  --color-danger: #f2a5a5;
  --color-danger-bg: rgba(242, 165, 165, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 24px rgba(143, 180, 247, 0.18);
  
  --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* 대시보드 카드 본문(스크롤 영역)의 최대 높이. 카드마다 내용 길이가 크게
     달라서(필수과목 25개 vs 인증 3개) 이 상한이 없으면 줄 높이가 들쭉날쭉해진다.
     한 곳만 고치면 대시보드 카드 전부에 반영된다. */
  --card-body-max: 440px;
}

/* Theme: Light — soft pastel wash, medium accents readable on white */
body.theme-light {
  --bg-app: #eef1fb;
  --bg-sidebar: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --glass-sheen: rgba(255, 255, 255, 0.65);
  --ambient-1: rgba(122, 156, 240, 0.16);
  --ambient-2: rgba(196, 166, 239, 0.14);
  --ambient-3: rgba(131, 214, 190, 0.12);
  --border-color: rgba(30, 41, 90, 0.10);
  --border-color-focus: rgba(90, 124, 224, 0.45);
  --color-text-primary: #26324d;
  --color-text-secondary: #566080;
  --color-text-muted: #8b96ad;
  --gradient-primary: linear-gradient(135deg, #6180e6, #8563d8);
  --color-yonsei-blue: #4560b8;
  --color-yonsei-blue-glow: rgba(90, 124, 224, 0.16);
  --color-blue: #4571de;
  --color-blue-bg: rgba(69, 113, 222, 0.11);
  --color-purple: #8258c6;
  --color-purple-bg: rgba(130, 88, 198, 0.11);
  --color-orange: #c67833;
  --color-orange-bg: rgba(198, 120, 51, 0.12);
  --color-success: #1f9070;
  --color-success-bg: rgba(31, 144, 112, 0.12);
  --color-warning: #a97a22;
  --color-warning-bg: rgba(169, 122, 34, 0.13);
  --color-danger: #cf5b5b;
  --color-danger-bg: rgba(207, 91, 91, 0.12);
  --shadow-sm: 0 2px 6px rgba(70, 90, 160, 0.07);
  --shadow-md: 0 6px 18px rgba(70, 90, 160, 0.10);
  --shadow-glow: 0 0 16px rgba(90, 124, 224, 0.12);
}

/* Global Select Options Styling to fix overlapping and white-on-white rendering */
select option {
  background-color: #0f1325 !important;
  color: #ffffff !important;
  padding: 8px !important;
}

body.theme-light select option {
  background-color: #ffffff !important;
  color: #1e293b !important;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family-outfit);
}

body {
  background-color: var(--bg-app);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
}

/* Ambient depth: two soft accent glows fixed behind everything. Cheap (a single
   painted layer, no blur) and kills the flat "칙칙한" look. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -8%, var(--ambient-1, rgba(0, 102, 255, 0.14)), transparent 60%),
    radial-gradient(1000px 720px at 108% 8%, var(--ambient-2, rgba(168, 85, 247, 0.12)), transparent 58%),
    radial-gradient(1100px 800px at 50% 120%, var(--ambient-3, rgba(0, 54, 167, 0.10)), transparent 60%);
}
.app-container { position: relative; z-index: 1; }

body.dark-mode {
  background-color: var(--bg-app);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Layout Framework */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Styling
   화면 폭과 무관하게 항상 접혀 있는 메뉴다. 예전에는 데스크톱에서 260px를
   상시 차지했는데, 본문이 그만큼 좁아지고 사이드바 아래쪽이 크게 비어 보였다.
   상단 햄버거(.menu-toggle-btn)로 열고, 바깥을 누르거나 메뉴를 고르면 닫힌다. */
.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100vh;
  z-index: 999;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}

body.sidebar-open .sidebar { left: 0; }
body.sidebar-open .sidebar-overlay { display: block; opacity: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.logo-circle {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px var(--color-yonsei-blue-glow);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand-text h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-text p {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-normal);
}

.nav-item:hover {
  color: var(--color-text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: white;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.15), rgba(0, 54, 167, 0.15));
  border-left: 3px solid var(--color-blue);
  box-shadow: var(--shadow-sm);
}

.nav-item i {
  width: 18px;
  height: 18px;
  transition: var(--transition-normal);
}

.nav-item.active i {
  color: var(--color-blue);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* Main Content Styling */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
}

/* Top Bar Styling */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  row-gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(10, 13, 24, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-title h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-title p {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.profile-section {
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  align-items: center;
  gap: 16px;
}

.dept-selector-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.dept-selector-quick select {
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: 500;
  outline: none;
  cursor: pointer;
  font-size: 14px;
  min-width: 180px;
}

.dept-selector-quick select option {
  background-color: var(--bg-sidebar);
  color: white;
}

.profile-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: var(--transition-normal);
}

.profile-avatar-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

.profile-avatar-btn i {
  width: 18px;
  height: 18px;
}

.profile-settings-card .dept-selector-quick,
.profile-settings-card .theme-selector-quick {
  flex-wrap: wrap;
}

.profile-settings-card .user-badge {
  flex-wrap: wrap;
}

/* Content Body */
.content-body {
  padding: 32px;
  flex-grow: 1;
  overflow-y: auto;
}

/* Tab panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card utility — a layered translucent panel. Previously every one of ~30
   cards carried backdrop-filter: blur(20px); compositing that many blurred
   layers (plus a full-screen blurred login overlay) is what made rendering
   crawl. We drop the blur and fake the depth with a gradient + inset highlight,
   which looks richer and composites almost for free. */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, var(--glass-sheen, rgba(255, 255, 255, 0.04)) 0%, transparent 42%),
    var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-normal);
}

.glass:hover {
  background:
    linear-gradient(180deg, var(--glass-sheen, rgba(255, 255, 255, 0.04)) 0%, transparent 42%),
    var(--bg-card-hover);
  border-color: var(--border-color-focus);
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.stat-icon.bg-blue {
  background: var(--gradient-primary);
  box-shadow: 0 8px 16px rgba(0, 102, 255, 0.2);
}

.stat-icon.bg-purple {
  background: linear-gradient(135deg, #a855f7, #6b21a8);
  box-shadow: 0 8px 16px rgba(168, 85, 247, 0.2);
}

.stat-icon.bg-orange {
  background: linear-gradient(135deg, #f97316, #c2410c);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.2);
}

.stat-info {
  flex-grow: 1;
}

.stat-info h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-total {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex-grow: 1;
  width: 100%;
  height: 8px;
  background-color: var(--color-blue-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.1, 0.8, 0.25, 1);
  box-shadow: 0 0 8px var(--color-yonsei-blue-glow);
}

.bg-gradient-blue { background: linear-gradient(90deg, var(--color-blue), var(--color-purple)); }
.bg-gradient-purple { background: linear-gradient(90deg, var(--color-purple), var(--color-blue)); }
.bg-gradient-orange { background: linear-gradient(90deg, var(--color-orange), var(--color-warning)); }

.progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 32px;
  text-align: right;
}

/* Dashboard Split Grid */
/* 대시보드 배치
   예전에는 [왼쪽 1열] [오른쪽 1열]이라, 카드가 오른쪽에만 세로로 쌓여 왼쪽 아래가
   통째로 비고 스크롤만 길어졌다. 이제 오른쪽 래퍼를 display:contents로 없애서
   카드 5장이 전부 같은 그리드의 항목이 되고, 폭이 남으면 옆으로 채운다. */
.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  /* stretch(기본값)라야 같은 줄에 선 카드들의 세로 길이가 자동으로 같아진다.
     예전 start는 카드마다 높이가 제각각이라 줄이 들쭉날쭉했다. 늘어난 만큼은
     아래 규칙에서 카드 본문(스크롤 영역)이 채우므로 빈 공간이 남지 않는다. */
  align-items: stretch;
  grid-auto-flow: row dense;
}

/* 카드 = [고정 머리말] + [남는 높이를 전부 먹는 본문]
   본문이 flex:1 + overflow:auto 라서, 줄 높이에 맞춰 늘어나도 내용이 위로 쏠린
   빈 카드가 되지 않고 스크롤 영역이 그만큼 넓어진다. */
.dashboard-split > .panel-card,
.dashboard-split > .split-right > .panel-card,
.dashboard-split > .split-right > .report-box {
  display: flex;
  flex-direction: column;
}

.dashboard-split .checklist-container,
.dashboard-split #ge-area-body,
.dashboard-split .etc-list,
.dashboard-split .report-content,
.split-left .category-progress-list {
  flex: 1 1 auto;
  min-height: 0;          /* 이게 없으면 flex 항목이 내용보다 작아지지 못해 스크롤이 안 생긴다 */
  overflow-y: auto;
  /* 본문 상한을 모든 카드에 똑같이 걸면 줄 높이가 자연스럽게 수렴한다.
     상한이 없으면 필수과목 25개 같은 긴 목록 하나가 줄 전체를 1600px까지 끌어올린다. */
  max-height: var(--card-body-max);
}

/* 래퍼는 사라지고 자식 카드들이 그리드 항목이 된다 (HTML 구조는 그대로) */
.split-right { display: contents; }

/* 카드가 그리드 항목이 되면서 stacking용 위쪽 여백은 gap과 중복된다 */
.split-right > .margin-top { margin-top: 0; }

@media (min-width: 1100px) {
  .dashboard-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 차트가 들어 있어 좁으면 읽기 어렵다 — 항상 전체 폭 */
  .split-left { grid-column: 1 / -1; }
}

@media (min-width: 1450px) {
  .dashboard-split { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-left { grid-column: span 2; }
}

.panel-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 600;
}

.panel-header p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Left Dashboard Panel: Category List */
.split-left {
  display: flex;
  flex-direction: column;
}

/* (막대그래프 제거 — 카테고리 현황은 퍼센트 + 진행바로 대체) */

/* 퍼센트를 주 정보로, 학점은 그 아래 보조 정보로 */
.cat-credits {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}
.cat-pct {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-warning);
  font-variant-numeric: tabular-nums;
}
.cat-pct.is-done { color: var(--color-success); }
.cat-credit-detail {
  font-size: 11.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.category-progress-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-prog-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--color-blue-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
}

.category-prog-item:hover {
  border-color: var(--border-color-focus);
  box-shadow: var(--shadow-sm);
}

.cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.badge-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.cat-credits {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.cat-completed {
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Right Dashboard Panel */
.panel-card {
  padding: 0;
  overflow: hidden;
}

.checklist-container {
  padding: 20px;
  /* 높이는 이제 그리드 줄이 정한다 (위 .dashboard-split 규칙의 flex:1).
     280px 고정 상한을 두면 줄 높이에 맞춰 늘어나지 못해 아래가 비어 보였다. */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.chk-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chk-status {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chk-status.checked {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.chk-status.unchecked {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

.chk-text h4 {
  font-size: 13px;
  font-weight: 500;
}

.chk-text p {
  font-size: 11px;
  color: var(--color-text-muted);
}

.chk-grade {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
}

/* ETC Requirements */
.etc-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.etc-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

.etc-icon {
  margin-top: 2px;
  color: var(--color-blue);
}

.etc-info h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.etc-info p {
  font-size: 11.5px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Report Panel Styling */
.report-box {
  padding: 24px;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px dashed rgba(0, 102, 255, 0.3);
}

.report-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.report-header h3 {
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.report-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.report-section {
  margin-bottom: 12px;
}

.report-section strong {
  color: var(--color-text-primary);
  display: inline-block;
  margin-bottom: 4px;
}

.report-list {
  padding-left: 20px;
}

.report-list li {
  margin-bottom: 4px;
}

/* ==================== COURSE INPUT VIEW ==================== */
.input-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.input-form-card {
  padding: 0;
}

.transcript-import-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(168, 85, 247, 0.08));
  border-bottom: 1px dashed rgba(0, 102, 255, 0.3);
  flex-wrap: wrap;
}

.transcript-import-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 220px;
}

.transcript-import-info i {
  flex-shrink: 0;
  margin-top: 2px;
  width: 20px;
  height: 20px;
}

.transcript-import-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.transcript-import-info p {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.modern-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group.col {
  flex: 1;
}

.form-hint {
  margin: -2px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

input[type="text"],
input[type="number"],
select,
textarea {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-text-primary);
  width: 100%;
  outline: none;
  transition: var(--transition-normal);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-blue);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.1);
}

/* Autocomplete suggestions */
.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  z-index: 15;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  display: none;
}

.suggestion-item {
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.suggestion-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--color-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px var(--color-yonsei-blue-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background-color: var(--color-danger);
  color: white;
}

.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.w-full {
  width: 100%;
}

/* Data backup panel */
.data-actions-panel {
  padding: 24px;
  border-top: 1px solid var(--border-color);
}

.data-actions-panel h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.action-buttons-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Course list panel */
.course-list-card {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.panel-header-row h2 {
  font-size: 16px;
  font-weight: 600;
}

.panel-header-row p {
  font-size: 12px;
  color: var(--color-text-muted);
}

.table-scroll-container {
  overflow-x: auto;
  max-height: 480px;
  overflow-y: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table th,
.modern-table td {
  padding: 16px 24px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-color);
}

.modern-table th {
  background-color: rgba(0, 0, 0, 0.15);
  font-weight: 600;
  color: var(--color-text-secondary);
  position: sticky;
  top: 0;
  z-index: 5;
}

.modern-table tbody tr {
  transition: var(--transition-normal);
}

.modern-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-blue { color: var(--color-blue); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.inline-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.btn-delete-course {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}

.btn-delete-course:hover {
  color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

/* ==================== REQUIREMENTS SETTING TAB ==================== */
.settings-container {
  padding: 0;
}

.section-divider {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-blue);
  padding: 8px 24px;
  background-color: rgba(0, 102, 255, 0.05);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-categories-list,
.settings-etc-list {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.set-cat-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.set-cat-item:last-child {
  border-bottom: none;
}

.form-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Margin utilities */
.margin-top { margin-top: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }

/* Micro-animations */
.animate-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* No data placeholders */
.no-data-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: var(--color-text-muted);
  gap: 12px;
}

.no-data-placeholder i {
  width: 40px;
  height: 40px;
}

.no-data-placeholder p {
  font-size: 13px;
}

/* Custom Checkbox Toggle for ETC requirements */
.etc-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--color-blue);
  border-color: rgba(0, 102, 255, 0.3);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

/* Glass selectors and styling */
.glass-select {
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--color-text-primary);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  outline: none;
  font-size: 13.5px;
  cursor: pointer;
}

.select-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Responsive Overrides */
@media (max-width: 1100px) {
  /* .dashboard-split은 기본이 이미 1열이라 여기서 다시 지정할 필요가 없다 */
  .input-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-item {
    padding: 8px 12px;
  }
}

/* ==================== LOGIN VIEW & MODALS ==================== */
.login-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* was blur(20px) over the ENTIRE viewport — the single most expensive layer
     on the page. A richer opaque gradient reads better and costs nothing. */
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(143, 180, 247, 0.28), transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, rgba(196, 166, 239, 0.22), transparent 55%),
    radial-gradient(900px 700px at 50% 130%, rgba(131, 224, 182, 0.14), transparent 60%),
    rgba(11, 14, 26, 0.94);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 440px;
  max-height: min(85vh, calc(100vh - 48px));
  overflow-y: auto;
  padding: 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.login-logo-circle {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin-bottom: 24px;
  box-shadow: 0 0 20px var(--color-yonsei-blue-glow);
}

.login-card h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 32px;
}

.user-badge {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-right: 16px;
  gap: 8px;
}

.btn-danger.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.animate-drop {
  animation: dropIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Theme overrides for login overlay */
body.theme-light .login-overlay-container {
  background-color: rgba(240, 244, 248, 0.85);
}

/* Fix text and input borders for light theme settings */
body.theme-light input[type="text"],
body.theme-light input[type="number"],
body.theme-light select,
body.theme-light textarea {
  background-color: rgba(0, 0, 0, 0.03);
}

body.theme-light .glass-card,
body.theme-light .glass {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.06);
}

body.theme-light .sidebar {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* 라이트 테마에서 어둡게 남던 3곳 (2026-08-02).
   전부 테마 변수를 안 쓰고 어두운 색을 직접 박아둔 규칙이라 라이트로 바꿔도
   그대로 어두웠습니다. 다크 테마 값은 건드리지 않고 라이트만 덮어씁니다. */
body.theme-light .top-bar {
  background-color: rgba(255, 255, 255, 0.72);   /* was rgba(10, 13, 24, 0.7) — 상단 전체를 가로지르는 남색 띠 */
}

body.theme-light .modern-table th {
  background-color: rgba(30, 41, 90, 0.05);      /* was rgba(0, 0, 0, 0.15) — 표 머리글이 회색으로 눌림 */
}

body.theme-light .form-actions-bar {
  background-color: rgba(30, 41, 90, 0.035);     /* was rgba(0, 0, 0, 0.1) — 폼 하단 버튼 띠 */
}

/* 모달 6개의 뒷배경.
   .login-overlay-container 에는 원래 라이트 대응이 있었는데, 각 모달이 index.html
   인라인 style로 남색을 다시 덮어써서 라이트 테마에서도 계속 어두웠습니다.
   인라인을 걷어내고 이 클래스로 옮겨 테마를 타게 합니다. */
.modal-scrim {
  background: rgba(10, 13, 24, 0.85);
}

body.theme-light .modal-scrim {
  background: rgba(46, 58, 89, 0.42);            /* 흰색이면 모달과 배경이 안 구분돼 옅은 슬레이트 베일 */
}



/* ==========================================================================
   TIMETABLE BUILDER INTEGRATED STYLES
   ========================================================================== */
.timetable-workspace {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .timetable-workspace {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Sidebar Layout */
.timetable-sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .timetable-sidebar {
        width: 320px;
        flex-shrink: 0;
    }
}

.importer-card, .search-card, .course-list-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.importer-card h4, .course-list-container h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.importer-card h4 i, .course-list-container h4 i {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--color-blue);
}

/* Mini Dropzone */
.mini-dropzone {
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    padding: 1.25rem 0.75rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition-normal);
}

.mini-dropzone:hover, .mini-dropzone.dragover {
    border-color: var(--color-blue);
    background: rgba(0, 102, 255, 0.04);
}

.mini-dropzone p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.mini-icon {
    width: 0.9rem;
    height: 0.9rem;
}

/* Search input */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--color-text-muted);
    pointer-events: none;
}

#course-search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    padding: 0.65rem 0.75rem 0.65rem 2.25rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: var(--transition-normal);
}

#course-search-input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

#my-dept-select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: var(--transition-normal);
    cursor: pointer;
    outline: none;
}

#my-dept-select:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

/* Checkbox Course List */
.course-list-container {
    flex-grow: 1;
}

.course-checkbox-list {
    list-style: none;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.2rem;
}

.course-checkbox-list::-webkit-scrollbar {
    width: 5px;
}
.course-checkbox-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.course-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

.course-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    /* 오른쪽 여백은 즐겨찾기 별 자리 — 과목명(2줄 클램프)이 별 밑으로 안 깔린다 */
    padding: 0.75rem 2.1rem 0.75rem 0.85rem;
    transition: var(--transition-normal);
    position: relative;
}

/* 별은 label 밖에 있어서(app.js renderCourseList) 눌러도 체크가 안 된다 */
.fav-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.45rem;
    background: none;
    border: none;
    padding: 0.15rem 0.25rem;
    line-height: 1;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.fav-btn.is-fav {
    color: #f59e0b;
}

.course-item:hover:not(.disabled) {
    background: rgba(15, 23, 42, 0.01);
    border-color: var(--border-color);
}

.course-item.disabled {
    background: var(--bg-app);
    border-color: #e2e8f0;
    opacity: 0.65;
    cursor: not-allowed;
}

.course-item.disabled .course-name-text {
    color: #94a3b8;
}

.course-item.disabled .course-meta-text {
    color: #cbd5e1;
}

.course-item-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.course-item.disabled .course-item-label {
    cursor: not-allowed;
}

.course-item-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0; width: 0;
}

.course-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.course-name-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-primary);
    /* 과목명은 띄어쓰기가 없는 게 많아(예: "고전영미아동문학의이해:역사,현실,그리고환상")
       줄바꿈 규칙으로는 못 잡는다. 두 줄까지만 보이고 나머지는 …로 줄인다.
       전체 이름은 title 속성(app.js)으로 마우스를 올리면 보인다. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta-text {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.course-meta-text span {
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Grid Area (Timetable Table) */
.timetable-grid-area {
    flex-grow: 1;
    width: 100%;
}

.grid-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

.legend-item {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-box {
    width: 1rem;
    height: 1rem;
    border-radius: 3px;
    display: inline-block;
}

.selected-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.7), rgba(6, 182, 212, 0.7));
    border: 1px solid rgba(16, 185, 129, 0.8);
}

.blocked-box {
    background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.1) 5px, rgba(239, 68, 68, 0.2) 5px, rgba(239, 68, 68, 0.2) 10px);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-outline-btn {
    background: var(--bg-card);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.02);
    transition: var(--transition-normal);
}

.action-outline-btn:hover {
    color: var(--color-text-primary);
    border-color: rgba(15, 23, 42, 0.2);
    background: rgba(15, 23, 42, 0.01);
}

.action-outline-btn i {
    width: 0.9rem;
    height: 0.9rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.02);
}

.timetable-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 3px;
    table-layout: fixed;
    min-width: 100%;
}

.timetable-table tbody tr {
    height: 52px; /* Lock row heights exactly */
}

.timetable-table th, .timetable-table td {
    padding: 0.35rem;
    text-align: center;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.timetable-table th {
    background: rgba(15, 23, 42, 0.03);
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.timetable-table th:first-child {
    /* "1교시 / 09:00" 두 줄만 들어가는 칸이라 100px은 낭비였다. 줄인 만큼
       요일 칸으로 간다 — 추천 패널이 옆에 붙으면서 폭이 빠듯해졌기 때문. */
    width: 68px;
}

/* First Column of Cells: Time markers */
.time-cell {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: default !important;
    border: 1px solid rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 52px;
}

.time-cell span {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Day slots cells */
.day-cell {
    background: #fafafb;
    border: 1px solid rgba(15, 23, 42, 0.04);
    height: 52px;
    cursor: pointer;
    vertical-align: middle;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    position: relative;
    user-select: none;
}

.day-cell:hover {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.15);
    color: var(--color-blue);
}

/* State: Blocked slot */
.day-cell.blocked {
    background: repeating-linear-gradient(
        45deg,
        rgba(239, 68, 68, 0.04),
        rgba(239, 68, 68, 0.04) 6px,
        rgba(239, 68, 68, 0.08) 6px,
        rgba(239, 68, 68, 0.08) 12px
    ) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: rgba(220, 38, 38, 0.9) !important;
    font-weight: 700;
}

.day-cell.blocked::after {
    content: "비움";
}

/* State: Occupied by Selected Course */
.day-cell.occupied {
    padding: 0 !important; /* Zero padding to allow full cell height sizing */
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 2px 4px var(--border-color);
    border: 1px solid transparent !important;
    cursor: default;
    overflow: hidden; /* Avoid any content bleed */
}

/* Light Theme preset colors for occupied courses */
.day-cell.c-color-0 { background: linear-gradient(135deg, #6366f1, #38bdf8) !important; } /* Indigo-Sky */
.day-cell.c-color-1 { background: linear-gradient(135deg, var(--color-success), #14b8a6) !important; } /* Emerald-Teal */
.day-cell.c-color-2 { background: linear-gradient(135deg, #fb7185, #f97316) !important; } /* Rose-Orange */
.day-cell.c-color-3 { background: linear-gradient(135deg, #8b5cf6, #ec4899) !important; } /* Violet-Pink */
.day-cell.c-color-4 { background: linear-gradient(135deg, #0ea5e9, #2dd4bf) !important; } /* Sky-Teal */
.day-cell.c-color-5 { background: linear-gradient(135deg, #f59e0b, #ef4444) !important; } /* Amber-Red */
.day-cell.c-color-6 { background: linear-gradient(135deg, #d946ef, #6366f1) !important; } /* Fuchsia-Indigo */

.occupied-cell-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    gap: 2px;
    padding: 4px 6px;
    box-sizing: border-box;
}

.cell-course-name {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines max */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem; /* Tightened font size */
    font-weight: 700;
    line-height: 1.25;
    word-break: break-all;
    white-space: normal;
    text-align: center;
}

.cell-course-prof {
    display: block;
    font-size: 0.62rem; /* Tightened font size */
    font-weight: 500;
    opacity: 0.85;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.grid-instructions {
    margin-top: 1rem;
    text-align: left;
}

.grid-instructions p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.grid-instructions p i {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--color-blue);
}

/* Spinner and Spin keyframe */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Selected Courses (담은 수업) card list */
.selected-courses-card {
    background: rgba(0, 102, 255, 0.04) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.selected-courses-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.selected-courses-list::-webkit-scrollbar {
    width: 4px;
}
.selected-courses-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.2);
    border-radius: 2px;
}

.selected-course-item {
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.02);
}

.selected-course-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.selected-course-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-course-meta {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
}

.deselect-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.deselect-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.deselect-btn i {
    width: 0.95rem;
    height: 0.95rem;
}

/* Recommendations Panel (추천 시간표 조합) */
/* 시간표(왼쪽) + 추천 조합(오른쪽) 2단.
   추천 패널은 조합이 만들어지기 전엔 display:none 이라 자동으로 표가 전체 폭을
   쓴다 — 별도 분기 없이 flex가 알아서 처리한다. */
.timetable-main-split {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.timetable-grid-col {
    flex: 1 1 auto;
    min-width: 0;              /* 이게 없으면 표가 안 줄어들어 오른쪽 열을 밀어낸다 */
}

.timetable-main-split .recommendations-container {
    flex: 0 0 300px;
    margin-top: 0;
    padding: 1.15rem;
    position: sticky;
    top: 88px;                 /* 상단바 아래에 붙어 따라온다 */
    overflow-y: auto;
}

/* 한 번에 한 장만 보여주므로 어느 폭에서든 1열
   (아래 768px 미디어쿼리의 3열보다 선택자가 구체적이라 우선한다) */
.timetable-main-split .recommendations-grid {
    grid-template-columns: 1fr;
}

.rec-card.is-hidden {
    display: none;
}

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

.rec-pager-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.rec-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--color-text-secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.rec-pager-btn:hover:not([disabled]) {
    border-color: var(--border-color-focus);
    color: var(--color-blue);
}

.rec-pager-btn[disabled] {
    opacity: 0.35;
    cursor: default;
}

.rec-pager-btn i {
    width: 16px;
    height: 16px;
}

@media (max-width: 1200px) {
    /* 좁은 화면에선 옆에 못 붙이므로 예전처럼 표 아래로 내린다 */
    .timetable-main-split {
        flex-direction: column;
    }
    .timetable-main-split .recommendations-container {
        flex: 1 1 auto;
        width: 100%;
        position: static;
        max-height: none;
    }
    .timetable-main-split .recommendations-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.recommendations-container {
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.01);
    animation: fadeIn 0.4s ease;
}

.recommendations-container h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.recommendations-container h3 i {
    width: 1.25rem;
    height: 1.25rem;
    color: #eab308; /* yellow sparkles */
}

.rec-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.rec-card {
    background: rgba(15, 23, 42, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.rec-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--color-blue);
    opacity: 0.7;
}

.rec-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.01);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    transform: translateY(-2px);
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rec-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.rec-badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.08);
    color: var(--color-blue);
    padding: 2px 6px;
    border-radius: 4px;
}

.rec-course-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.rec-course-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 폭이 모자라면 이름을 깎지 말고 배지를 아랫줄로 접는다. */
    flex-wrap: wrap;
}

.rec-course-item i {
    width: 0.8rem;
    height: 0.8rem;
    color: var(--color-blue);
    flex-shrink: 0;
}

/* 과목명 우선. flex-basis 0 + min-width 로 "최소 10글자"를 보장하고 남는 폭을 전부
   가져간다. 그래도 모자라면 배지가 flex-wrap 으로 아랫줄에 내려가지, 이름이 한 글자로
   깎이지 않는다. 잘린 전체 문자열은 title 속성으로 본다(app.js renderRecommendations). */
.rec-course-name {
    flex: 1 1 0;
    min-width: 10em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 추천 사유 배지. 색은 기존 변수만 써서 다크/라이트 양쪽에서 성립한다. */
.rec-reason {
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--color-blue-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--border-color);
}

/* 추천 패널 하단 카테고리 진행 바 (app.js renderRecProgress).
   대시보드 '카테고리 현황' 카드와 같은 숫자를 쓰되 여기선 부족한 카테고리만 압축해 보여준다. */
.rec-progress:empty {
    display: none;
}

.rec-progress {
    margin-top: 12px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.rec-progress-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.rec-progress-title i {
    width: 14px;
    height: 14px;
    color: var(--color-blue);
}

.rec-progress-item + .rec-progress-item {
    margin-top: 6px;
}

.rec-progress-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    font-size: 11.5px;
    margin-bottom: 3px;
}

.rec-progress-name {
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rec-progress-num {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--color-text-muted);
}

.rec-progress-done {
    font-size: 11.5px;
    color: var(--color-text-muted);
    margin: 0;
}

/* 요일별 최대 공강 설정 — 추천 패널 안. 색은 전부 기존 변수라 다크/라이트 공용 */
.gap-limits {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin-bottom: 12px;
}

.gap-limits-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

.gap-limits-title i {
    width: 14px;
    height: 14px;
    color: var(--color-blue);
}

.gap-limits-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.gap-limit-day {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 2px;
}

.gap-limit-select {
    width: 100%;
    min-width: 0;   /* grid 칸(1fr)보다 커지지 않게 — 안 주면 select 기본 min-width가 이긴다 */
    height: 28px;
    /* 오른쪽은 네이티브 드롭다운 화살표 자리다. 좁은 칸에서 옵션 글자가 화살표에
       겹치지 않게 비워 둔다. */
    padding: 0 2px 0 4px;
    font-size: 11.5px;
    text-align: center;
}

/* 대학교양 영역 필터 태그 스타일 */
.ge-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-normal);
    user-select: none;
}

.ge-tag:hover {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--color-blue);
}

.ge-tag.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

/* 국가근로 시간표 셀 스타일 */
.day-cell.work {
    background: repeating-linear-gradient(
        45deg,
        rgba(245, 158, 11, 0.08),
        rgba(245, 158, 11, 0.08) 6px,
        rgba(245, 158, 11, 0.16) 6px,
        rgba(245, 158, 11, 0.16) 12px
    ) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: rgba(217, 119, 6, 1.0) !important;
    font-weight: 800;
    vertical-align: middle;
}

.day-cell.work::after {
    content: "근로";
}

/* 국가근로 뱃지 범례 */
.work-box {
    background: repeating-linear-gradient(45deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.15) 5px, rgba(245, 158, 11, 0.3) 5px, rgba(245, 158, 11, 0.3) 10px);
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 3px;
    display: inline-block;
    width: 1rem;
    height: 1rem;
}



/* AUTHENTICATION TAB SWITCHER STYLES */
.auth-tab-btn {
  border-bottom: 2px solid transparent !important;
  transition: var(--transition-normal);
}
.auth-tab-btn.active {
  border-bottom: 2px solid var(--color-blue) !important;
  color: var(--color-text-primary) !important;
  font-weight: 700;
}


/* ==========================================================================
   RESPONSIVE WEB DESIGN (Media Queries)
   ========================================================================== */

/* Hide mobile menu button by default */
.menu-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: 8px;
  margin-right: 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}

.menu-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle-btn i {
  width: 24px;
  height: 24px;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Base Responsive Container for Tables */
.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Apply wrapper to existing tables */
.modern-table-container,
.course-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  /* 오프캔버스는 이제 기본 동작이라 여기서 다시 정의하지 않는다.
     좁은 화면에서는 열렸을 때 배경 스크롤만 막는다. */
  body.sidebar-open { overflow: hidden; }

  /* Top Bar Adjustments */
  .top-bar {
    padding: 16px 20px;
  }
  
  .page-title h1 {
    font-size: 20px;
  }
  
  .profile-section {
    gap: 8px;
  }

  .dept-selector-quick select {
    min-width: 120px;
    font-size: 13px;
  }

  .theme-selector-quick select {
    min-width: 90px;
    font-size: 13px;
  }

  /* Layout Grid Adjustments */
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .content-body {
    padding: 20px;
  }
  
  /* Timetable specific adjustments */
  .timetable-workspace {
    flex-direction: column;
  }
  
  .timetable-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 768px) {
  /* Further stacking for small screens */
  .top-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .profile-section {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .user-badge {
    width: 100%;
    justify-content: center;
  }
  
  .page-title {
    flex-grow: 1;
  }
  
  /* Form elements */
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
  
  /* Timetable Control Buttons */
  .timetable-control-panel {
    flex-direction: column;
    align-items: stretch;
  }
  
  .legend-items {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .control-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .action-outline-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .page-title h1 {
    font-size: 18px;
  }
  
  .content-body {
    padding: 12px;
  }
  
  .stat-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   대학교양 영역별 이수 현황 (GE area coverage)
   ========================================================================== */
.badge-neutral {
  background-color: var(--color-blue-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--border-color);
}

.ge-area-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ge-area-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ge-area-count .ge-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ge-area-count .ge-den {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.ge-area-note {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin: 8px 0 14px;
  line-height: 1.5;
}
.ge-area-note strong { color: var(--color-blue); }

.ge-area-grid {
  display: grid;
  /* 칸이 좁아 "10영역 정보와기술"이 접히던 문제 — 최소폭을 이름이 한 줄로
     들어가는 크기까지 올리고, 안 맞으면 1열로 떨어지게 둔다. */
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
}
.ge-area-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-normal);
}
.ge-area-chip.is-covered {
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--color-success-bg);
}
.ge-area-chip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  /* 한글 이름이 단어 중간에서 끊기지 않게 */
  word-break: keep-all;
  line-height: 1.3;
}
/* 영역 번호를 고정폭 배지로 빼서 두 자리(10·11)도 이름을 밀지 않게 한다 */
.ge-area-no {
  flex-shrink: 0;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--border-color);
  color: var(--color-text-secondary);
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}
.ge-area-chip.is-covered .ge-area-no { background: rgba(255, 255, 255, 0.12); color: var(--color-text-primary); }
.ge-area-chip.is-required-missing .ge-area-no { background: rgba(245, 158, 11, 0.22); color: var(--color-warning); }
.ge-area-name { min-width: 0; }
.ge-area-chip.is-covered .ge-area-chip-head { color: var(--color-text-primary); }
.ge-area-chip-head i { width: 15px; height: 15px; flex-shrink: 0; }
.ge-area-chip.is-covered .ge-area-chip-head i { color: var(--color-success); }
.ge-area-chip-courses {
  font-size: 10.5px;
  color: var(--color-success);
  margin-top: 4px;
  padding-left: 27px;
  line-height: 1.35;
  /* 과목명은 띄어쓰기가 없어("컴퓨팅적사고와SW프로그래밍") keep-all만 두면 칩 밖으로
     삐져나간다. 평소엔 단어 단위로 끊되, 안 들어가면 어디서든 끊게 한다. */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Specific-area (의예과) GE chip states */
.ge-area-chip.is-required-missing {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--color-warning-bg);
}
.ge-area-chip.is-required-missing .ge-area-chip-head { color: var(--color-warning); }
.ge-area-chip.is-required-missing .ge-area-chip-head i { color: var(--color-warning); }
.ge-area-chip.is-excluded { opacity: 0.4; }
.ge-area-chip.is-excluded .ge-area-chip-head { text-decoration: line-through; }
.ge-area-req-tag {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  color: var(--color-warning);
  background: var(--color-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: auto;
}

/* ==========================================================================
   랜딩 (앱 진입점 겸 튜토리얼)
   #login-overlay는 더 이상 가운데 카드가 아니라 스크롤되는 한 페이지다.
   색은 전부 테마 변수를 쓰므로 다크/라이트가 자동으로 따라온다.
   ========================================================================== */
.landing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(900px 620px at 12% -8%, var(--ambient-1), transparent 62%),
    radial-gradient(760px 560px at 96% 8%, var(--ambient-2), transparent 58%),
    var(--bg-app);
}

.landing-scroll {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ── 상단 바 ── */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 0 8px;
}

/* 로그인 전에도 언어를 바꿀 수 있어야 한다 — 첫 화면부터 한국어를 못 읽는
   사람이 이 서비스의 대상이다. */
.landing-lang-select {
  margin-left: auto;
  width: auto;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.landing-brand { display: flex; align-items: center; gap: 10px; }

.landing-brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  display: grid;
  place-items: center;
  overflow: hidden;              /* 안에 들어가는 로고 이미지를 모서리에 맞춰 자른다 */
}

.landing-brand-mark .brand-logo-img {
  border-radius: 9px;            /* 사이드바는 원형이지만 여기는 각진 사각형이다 */
}

/* 랜딩 히어로 로고 — 제목 위 */
.landing-hero-logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .landing-hero-logo { width: 64px; height: 64px; border-radius: 18px; }
}

.landing-brand-text {
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--color-text-primary);
  font-size: 15px;
}

.landing-theme-toggle {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--color-text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition-normal);
}
.landing-theme-toggle:hover { color: var(--color-blue); border-color: var(--border-color-focus); }
.landing-theme-toggle i { width: 17px; height: 17px; }

/* ── 히어로 ── */
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  padding: 56px 0 72px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--color-blue-bg);
  color: var(--color-blue);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 20px;
}
.landing-badge i { width: 14px; height: 14px; }

.landing-title {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.24;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--color-text-primary);
  margin: 0 0 18px;
}
.landing-title em {
  font-style: normal;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-lede {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin: 0 0 30px;
  max-width: 30em;
}

/* 상태별 액션 슬롯 — app.js가 display를 직접 토글하므로 기본은 none */
.landing-action-panel { display: none; flex-direction: column; gap: 12px; }
.landing-action-panel#landing-loading {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--color-text-secondary);
}
.landing-action-panel .spin { width: 18px; height: 18px; color: var(--color-blue); }

.landing-action-row { display: flex; gap: 10px; flex-wrap: wrap; }

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: none;
  border-radius: 12px;
  background: var(--gradient-primary);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}
.landing-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.landing-cta i { width: 17px; height: 17px; }
.landing-cta-lg { padding: 15px 30px; font-size: 15.5px; }

.landing-cta-ghost {
  background: var(--bg-card);
  color: var(--color-text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: none;
}
.landing-cta-ghost:hover { color: var(--color-text-primary); box-shadow: var(--shadow-sm); }

.landing-action-note {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 32em;
}

.landing-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  align-self: flex-start;
}
.landing-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.landing-user-avatar i { width: 17px; height: 17px; }
.landing-user-text { display: flex; flex-direction: column; min-width: 0; }
.landing-user-text strong { font-size: 14.5px; color: var(--color-text-primary); }
.landing-user-text small { font-size: 12.5px; color: var(--color-text-secondary); }

.landing-error-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  background: var(--color-danger-bg);
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-primary);
  max-width: 34em;
}
.landing-error-box i { width: 17px; height: 17px; color: var(--color-danger); flex-shrink: 0; margin-top: 2px; }

/* ── 대시보드 미리보기 ── */
.landing-preview {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.landing-preview-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-color);
}
.landing-preview-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-text-muted);
  opacity: 0.4;
}

.landing-preview-body { padding: 20px; }

.landing-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.landing-preview-head strong { display: block; font-size: 14px; color: var(--color-text-primary); }
.landing-preview-head small { font-size: 12px; color: var(--color-text-muted); }
.landing-preview-pct {
  font-size: 30px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-preview-pct i { font-style: normal; font-size: 16px; }

.landing-preview-rows { display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.lp-row {
  display: grid;
  grid-template-columns: 62px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-secondary);
}
.lp-row i {
  height: 7px;
  border-radius: 4px;
  background: var(--border-color);
  position: relative;
  overflow: hidden;
}
.lp-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 4px;
  background: var(--gradient-primary);
}
.lp-row-warn i::after { background: var(--color-warning); }
.lp-row b { text-align: right; font-weight: 700; color: var(--color-text-primary); font-size: 11.5px; }

.landing-preview-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
}
.lp-ok { background: var(--color-success-bg); color: var(--color-success); }
.lp-miss { background: var(--bg-app); color: var(--color-text-muted); border: 1px dashed var(--border-color); }

/* ── 섹션 공통 ── */
.landing-section { padding: 60px 0; }
.landing-section-alt {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.landing-h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--color-text-primary);
  margin: 0 0 8px;
  text-align: center;
}
.landing-sub {
  font-size: 14.5px;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0 0 40px;
}

/* ── 기능 카드 ── */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 18px;
}
.landing-card {
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: var(--transition-normal);
}
.landing-card:hover {
  border-color: var(--border-color-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.landing-card-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--color-blue-bg);
  color: var(--color-blue);
  display: grid;
  place-items: center;
  margin-bottom: 15px;
}
.landing-card-icon i { width: 19px; height: 19px; }
.landing-card h3 { font-size: 15px; font-weight: 700; color: var(--color-text-primary); margin: 0 0 8px; }
.landing-card p { font-size: 13.5px; line-height: 1.7; color: var(--color-text-secondary); margin: 0; }

/* ── 사용법 ── */
.landing-steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.landing-steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.landing-step-no {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.landing-steps h3 { font-size: 14.5px; font-weight: 700; color: var(--color-text-primary); margin: 3px 0 6px; }
.landing-steps p { font-size: 13.5px; line-height: 1.7; color: var(--color-text-secondary); margin: 0; }

/* ── 하단 CTA ── */
.landing-final { padding: 72px 0 40px; text-align: center; }
.landing-final h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0 0 10px;
}
.landing-final p { font-size: 14.5px; color: var(--color-text-secondary); margin: 0 0 26px; }

.landing-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; gap: 36px; padding: 36px 0 52px; }
  .landing-preview { order: -1; }
}

@media (max-width: 600px) {
  .landing-scroll { padding: 0 16px 48px; }
  .landing-section { padding: 44px 0; }
  .landing-final { padding: 52px 0 32px; }
  .landing-cta { width: 100%; }
  .landing-action-row { flex-direction: column; }
}

/* 강의 목록 항목 — 예전에는 렌더 코드가 항목마다 인라인 스타일을 찍었다.
   여기로 옮겨서 1300개짜리 innerHTML 문자열을 그만큼 짧게 만든다. */
.course-item {
    list-style: none;
    text-align: left;
    /* 화면 밖 항목의 레이아웃·페인트를 건너뛴다. 1300개를 전부 그리던 비용이
       보이는 몇 개로 줄어든다. contain-intrinsic-size가 있어야 스크롤바 길이가
       튀지 않는다.
       ponytail: 진짜 가상 스크롤이 아니라 노드는 그대로 만든다. 목록이 수천 개로
       늘면 그때 windowing으로 교체. */
    content-visibility: auto;
    contain-intrinsic-size: auto 62px;
}

.badge-xs {
    margin-left: 4px;
    font-size: 10px;
    padding: 2px 4px;
}

.badge-warning.badge-xs { color: #fff; }

.badge-campus {
    margin-left: 6px;
    font-size: 10px;
    padding: 2px 5px;
    background: var(--color-lavender, var(--color-blue));
    color: #fff;
    vertical-align: middle;
}

.course-remarks {
    margin-top: 2px;
    color: var(--color-blue);
    font-size: 11px;
    font-weight: 600;
}
.course-remarks-danger { color: var(--color-danger); }

/* 3000단위 판정 불가 과목 목록 */
.unknown-level-box {
  margin-top: 10px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--color-warning-bg);
  padding: 8px 11px;
}
.unknown-level-box summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-warning);
  list-style: none;
}
.unknown-level-box summary::-webkit-details-marker { display: none; }
.unknown-level-box summary::before { content: "▸ "; }
.unknown-level-box[open] summary::before { content: "▾ "; }
.unknown-level-box p {
  margin: 8px 0 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.unknown-level-box ul {
  margin: 0;
  padding-left: 16px;
  max-height: 190px;
  overflow-y: auto;
}
.unknown-level-box li {
  font-size: 11.5px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.unknown-level-box li span { color: var(--color-text-muted); font-size: 10.5px; }

/* 프로필 모달 - 내 데이터(파괴적 동작) 구역 */
.danger-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  background: var(--color-danger-bg);
}
.danger-zone-note {
  margin: 0 0 2px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.danger-zone .btn small {
  font-weight: 500;
  opacity: 0.75;
  font-size: 11px;
}

/* 로컬 모드 */
.landing-alt-start {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.local-mode-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--color-blue);
  border-radius: var(--radius-md);
  background: var(--color-blue-bg);
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.local-mode-banner i { width: 15px; height: 15px; color: var(--color-blue); flex-shrink: 0; margin-top: 2px; }

.landing-footer-link {
  margin-top: 4px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-blue);
  text-decoration: underline;
  cursor: pointer;
}
.landing-footer-link:hover { opacity: 0.8; }

/* 개인정보 처리방침 본문 */
.policy-body { font-size: 13px; line-height: 1.65; color: var(--color-text-secondary); }
.policy-updated { font-size: 11.5px; color: var(--color-text-muted); margin: 0 0 14px; }
.policy-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}
.policy-section-highlight { border-color: var(--color-blue); background: var(--color-blue-bg); }
.policy-section h3 { font-size: 14px; color: var(--color-text-primary); margin: 0 0 8px; }
.policy-section p { margin: 0 0 5px; }
.policy-section p:last-child { margin-bottom: 0; }
.policy-list { margin: 6px 0 0; padding-left: 18px; }
.policy-list li { margin-bottom: 5px; }
.policy-url { color: var(--color-blue); word-break: break-all; }
.policy-agencies { font-size: 11.5px; color: var(--color-text-muted); line-height: 1.7; }
.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 10px;
  font-size: 11.5px;
}
.policy-table th, .policy-table td {
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
}
.policy-table th { background: rgba(255, 255, 255, 0.05); color: var(--color-text-primary); font-weight: 700; }

/* ==========================================================================
   업데이트 소식 및 공지
   ========================================================================== */
.profile-avatar-btn.has-badge {
    position: relative;
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-danger);
    border: 2px solid var(--bg-app);
    box-sizing: content-box;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-list li {
    position: relative;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    word-break: keep-all;
}

.notice-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-blue);
}

.notice-list li.notice-empty::before { background: var(--color-success); }

.update-entry {
    margin-bottom: 18px;
}

.update-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.update-latest {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--color-blue);
    background: var(--color-blue-bg);
    padding: 2px 7px;
    border-radius: 999px;
}

/* 안내 전용 기타요건 (예: 전공 미정) — 토글 없이 읽기만 하는 항목 */
.etc-item-notice {
    background: var(--color-blue-bg);
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   줄바꿈 정리

   한글은 기본 줄바꿈 규칙상 글자 사이 아무 데서나 잘린다. 그래서 폭이 몇 px만
   모자라도 "요건 미달"이 "요건 미 / 달"로 쪼개졌다. 짧은 상태 라벨은 애초에
   접힐 이유가 없으므로 nowrap으로 못 박고, 문장은 keep-all로 단어 단위로만
   끊기게 한다.
   ========================================================================== */
.progress-pct,
.cat-status-badge,
.chk-grade,
.badge,
.update-latest,
.tutorial-step-count,
.rec-pager-label,
.legend-item,
.selected-summary-badge,
.stat-total,
.cat-credits,
.course-meta-text > span,
.course-meta-text > strong,
.grid-instructions p strong {
  white-space: nowrap;
}

/* 문장은 접히되 단어 중간에서 끊기지 않게 */
.sidebar-disclaimer-links button,
.panel-header p,
.no-data-placeholder p,
.report-content,
.etc-info p {
  word-break: keep-all;
}

/* 처리방침이 한국어만 제공된다는 안내 */
.policy-lang-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-muted);
  background: var(--color-blue-bg);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  margin-bottom: 10px;
}

/* 성적으로 자동 판정한 결과 줄 (외국어인증 ①번 경로) */
.etc-auto {
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: var(--color-warning-bg);
    color: var(--color-warning);
    font-size: 12.5px;
    line-height: 1.5;
    word-break: keep-all;
}

.etc-auto.is-pass {
    background: var(--color-success-bg);
    color: var(--color-success);
}

/* ==========================================================================
   사용 안내 (튜토리얼)

   화면 전체를 덮는 대신 설명 대상만 남기고 어둡게 합니다. 어둡게 하는 건
   별도 레이어가 아니라 스포트라이트의 초대형 box-shadow 한 줄입니다 —
   구멍 뚫은 레이어 4장을 배치하는 것보다 훨씬 싸고 리사이즈에도 안 깨집니다.
   ========================================================================== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 11500;               /* 로그인 오버레이(11000)보다 위 */
}

/* 특정 요소를 가리키지 않는 단계(첫 화면·마지막 화면)는 그냥 전체를 덮는다 */
.tutorial-overlay.is-centered {
  background: rgba(10, 13, 24, 0.72);
}
.tutorial-overlay.is-centered .tutorial-spotlight { display: none; }

body.theme-light .tutorial-overlay.is-centered {
  background: rgba(46, 58, 89, 0.5);
}

.tutorial-spotlight {
  position: fixed;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-blue);
  box-shadow: 0 0 0 9999px rgba(10, 13, 24, 0.72), 0 0 0 4px var(--color-yonsei-blue-glow);
  transition: top 0.28s ease, left 0.28s ease, width 0.28s ease, height 0.28s ease;
  pointer-events: none;         /* 강조된 요소를 실제로 클릭할 수 있게 */
}

body.theme-light .tutorial-spotlight {
  box-shadow: 0 0 0 9999px rgba(46, 58, 89, 0.5), 0 0 0 4px var(--color-yonsei-blue-glow);
}

.tutorial-tip {
  position: fixed;
  width: min(360px, calc(100vw - 32px));
  padding: 18px 20px 16px;
  z-index: 1;
  transition: top 0.28s ease, left 0.28s ease;
}

.tutorial-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tutorial-step-count {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-blue);
  background: var(--color-blue-bg);
  padding: 3px 9px;
  border-radius: 999px;
}

.tutorial-tip h3 {
  font-size: 16px;
  margin-bottom: 7px;
  color: var(--color-text-primary);
}

.tutorial-tip p {
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--color-text-secondary);
  word-break: keep-all;
}

.tutorial-dots {
  display: flex;
  gap: 5px;
  margin: 14px 0 12px;
}

.tutorial-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
}
.tutorial-dot.is-done { background: var(--color-text-muted); }
.tutorial-dot.is-active { background: var(--color-blue); width: 18px; border-radius: 999px; }

.tutorial-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.tutorial-never,
.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}

.tutorial-never input,
.settings-toggle-row input {
  width: 14px;
  height: 14px;
  accent-color: var(--color-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.settings-toggle-row {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.tutorial-btns {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 600px) {
  /* 좁은 화면에선 말풍선을 대상 옆에 붙이지 않고 항상 아래쪽 고정 */
  .tutorial-tip {
    left: 16px !important;
    right: 16px;
    width: auto;
    top: auto !important;
    bottom: 16px;
  }
}

/* Feedback & Support Button in Top Bar */
.profile-avatar-btn.btn-feedback-heart {
  background: linear-gradient(135deg, #ff416c, #8a2be2);
  border-color: rgba(255, 65, 108, 0.4);
}

.profile-avatar-btn.btn-feedback-heart:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(255, 65, 108, 0.5);
}

/* Feedback & Support Modal Styling */
.feedback-tab-btn.active {
  background: var(--color-blue) !important;
  color: #fff !important;
  border-color: var(--color-blue) !important;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.feedback-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--color-text-primary) !important;
}
