/* ==========================================================================
   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);
}

/* 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);
}

/* Theme: Cosmic Space Black — pastels glowing on pure black */
body.theme-black {
  --bg-app: #000000;
  --bg-sidebar: #060608;
  --bg-card: rgba(15, 15, 20, 0.92);
  --bg-card-hover: rgba(26, 26, 34, 0.98);
  --glass-sheen: rgba(255, 255, 255, 0.07);
  --ambient-1: rgba(157, 188, 255, 0.18);
  --ambient-2: rgba(206, 178, 247, 0.15);
  --ambient-3: rgba(146, 237, 197, 0.10);
  --border-color: rgba(255, 255, 255, 0.13);
  --color-text-primary: #ffffff;
  --color-text-secondary: #d0d8e6;
  --color-text-muted: #8a97ad;
  --gradient-primary: linear-gradient(135deg, #6486e8, #8a6ce0);
  --color-yonsei-blue: #93aef0;
  --color-yonsei-blue-glow: rgba(157, 188, 255, 0.5);
  --color-blue: #9dbcff;
  --color-blue-bg: rgba(157, 188, 255, 0.17);
  --color-purple: #ceb2f7;
  --color-purple-bg: rgba(206, 178, 247, 0.17);
  --color-orange: #ffca9e;
  --color-orange-bg: rgba(255, 202, 158, 0.17);
  --color-success: #92edc5;
  --color-success-bg: rgba(146, 237, 197, 0.16);
  --color-warning: #f7d99c;
  --color-warning-bg: rgba(247, 217, 156, 0.16);
  --color-danger: #f6b1b1;
  --color-danger-bg: rgba(246, 177, 177, 0.16);
  --shadow-glow: 0 0 24px rgba(157, 188, 255, 0.28);
}

/* 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;
}

body.theme-black select option {
  background-color: #000000 !important;
  color: #ffffff !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 */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

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

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

.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;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.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 */
.dashboard-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.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;
}

.category-chart-container {
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

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

.category-prog-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.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;
  max-height: 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;
}

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 {
    grid-template-columns: 1fr;
  }
  .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;
}

.login-card {
  width: 100%;
  max-width: 440px;
  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);
}

.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: 900;
  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);
}

body.theme-black .login-overlay-container {
  background-color: rgba(0, 0, 0, 0.95);
}

/* 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);
}



/* ==========================================================================
   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);
    padding: 0.75rem 0.85rem;
    transition: var(--transition-normal);
}

.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.disabled .custom-checkbox {
    border-color: #cbd5e1;
    background: var(--bg-sidebar);
}

.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-label .custom-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition-normal);
}

.course-item-label:hover input:not(:disabled) ~ .custom-checkbox {
    border-color: var(--color-blue);
}

.course-item-label input:checked ~ .custom-checkbox {
    background: var(--color-blue);
    border-color: var(--color-blue);
}

.course-item-label .custom-checkbox::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.course-item-label input:checked ~ .custom-checkbox::after {
    display: block;
}

.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);
}

.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 {
    width: 100px;
}

/* 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 (추천 시간표 조합) */
.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;
}

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

/* 대학교양 영역 필터 태그 스타일 */
.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 */
.mobile-menu-btn {
  display: none;
  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);
}

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

.mobile-menu-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) {
  /* Show Mobile Menu Button */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Off-canvas Sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hide off-screen */
    width: 260px;
    height: 100vh;
    z-index: 999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  /* When sidebar is open */
  body.sidebar-open .sidebar {
    left: 0;
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
  }
  
  body.sidebar-open {
    overflow: hidden; /* Prevent background scrolling */
  }

  /* 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: 12px;
  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;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.ge-area-chip {
  padding: 9px 11px;
  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);
}
.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: 11px;
  color: var(--color-success);
  margin-top: 4px;
  padding-left: 21px;
  line-height: 1.35;
  word-break: keep-all;
}

/* 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 {
  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;
}
