/* LOA RAID SCHEDULER PREMIUM STYLESHEET */

:root {
  --bg-app: #0a0d14;
  --bg-sidebar: #0f131a;
  --bg-card: rgba(22, 28, 38, 0.65);
  --bg-card-hover: rgba(30, 39, 53, 0.85);
  --bg-modal: #121821;
  --bg-input: #1a222f;
  
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-hover: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(229, 193, 88, 0.3);
  
  --gold: #e5c158;
  --gold-glow: rgba(229, 193, 88, 0.2);
  --text-main: #f0f3f8;
  --text-muted: #8b99a8;
  --text-dark: #4e5a66;
  
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-glow: rgba(59, 130, 246, 0.2);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-hover: #f87171;
  --warning: #f59e0b;
  --info: #06b6d4;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.6);
  --font-family: 'Outfit', 'Noto Sans KR', sans-serif;
}

/* ================= Reset & Base Styles ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(229, 193, 88, 0.05) 0px, transparent 50%);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dark);
}

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

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 32px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.brand-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--gold) 0%, #e67e22 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(229, 193, 88, 0.4));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(to right, #ffffff, #dbeafe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 2px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 12px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.menu-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
  transition: var(--transition-fast);
}

.menu-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
  color: var(--gold);
  background: linear-gradient(90deg, rgba(229, 193, 88, 0.1) 0%, rgba(229, 193, 88, 0.02) 100%);
  border-left: 3px solid var(--gold);
  font-weight: 600;
}

.menu-item.active i {
  color: var(--gold);
  filter: drop-shadow(0 0 4px var(--gold-glow));
}

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

.reset-timer-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.timer-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#reset-countdown {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-hover);
  font-variant-numeric: tabular-nums;
}

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

.main-header {
  height: 80px;
  padding: 0 40px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 13, 20, 0.5);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

#page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.expedition-gold-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 193, 88, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(229, 193, 88, 0.05);
}

.gold-color {
  color: var(--gold);
}

#expected-gold {
  color: var(--gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

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

.tab-panel {
  display: none;
  animation: fadeIn var(--transition-normal);
}

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

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

/* ================= UI Elements & Cards ================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
}

.card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
}

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

.card-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.card-body {
  padding: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
  color: var(--text-main);
}

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

.btn-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.btn-warning:hover {
  background: var(--warning);
  color: #000000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger-hover);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

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

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* ================= 1. Dashboard Styles ================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* Progress Section */
.progress-container {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
}

.circular-progress-box {
  position: relative;
  width: 120px;
  height: 120px;
}

.circular-progress-bar {
  transform: rotate(-90deg);
}

.circular-progress-bar circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.circular-progress-bar circle.bg {
  stroke: rgba(255, 255, 255, 0.03);
}

.circular-progress-bar circle.progress {
  stroke: var(--success);
  stroke-dasharray: 314.15; /* 2 * pi * r (r=50) */
  stroke-dashoffset: 314.15;
  transition: stroke-dashoffset 0.8s ease-in-out;
  filter: drop-shadow(0 0 6px var(--success-glow));
}

.progress-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--success);
}

.progress-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-stat .label {
  font-size: 12px;
  color: var(--text-muted);
}

.progress-stat .value {
  font-size: 18px;
  font-weight: 700;
}

/* Mini Upcoming List */
.schedule-mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 180px;
  overflow-y: auto;
}

.mini-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.mini-schedule-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mini-schedule-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-schedule-time {
  padding: 6px 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-hover);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  min-width: 65px;
}

.mini-schedule-details {
  display: flex;
  flex-direction: column;
}

.mini-schedule-title {
  font-size: 14px;
  font-weight: 600;
}

.mini-schedule-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.mini-schedule-item .btn-done {
  padding: 6px;
  color: var(--text-muted);
}
.mini-schedule-item .btn-done:hover {
  color: var(--success);
}

/* Homework Board Table */
.expedition-homework-overview {
  width: 100%;
}

.table-responsive {
  overflow-x: auto;
}

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

.dashboard-table th {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glass);
}

.dashboard-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 14px;
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.char-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.char-avatar-text {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.char-name-server {
  display: flex;
  flex-direction: column;
}

.char-name-server .name {
  font-weight: 600;
}

.char-name-server .server {
  font-size: 11px;
  color: var(--text-dark);
}

.level-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.raids-checklist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.raid-check-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.raid-check-chip.selectable:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.raid-check-chip.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--success);
  color: var(--success);
}

.raid-check-chip.completed i {
  color: var(--success);
}

.raid-check-chip.gold-active {
  box-shadow: 0 0 8px rgba(229, 193, 88, 0.1);
}

.raid-check-chip.gold-active.completed {
  background: rgba(229, 193, 88, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.raid-check-chip.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.table-progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.table-progress-bg {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
}

.table-progress-fill {
  height: 100%;
  background: var(--success);
  width: 0%;
  border-radius: 3px;
  transition: width var(--transition-normal) ease;
}

.table-progress-text {
  font-size: 12px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ================= 2. Expedition Manage Styles ================= */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.action-bar h2 {
  font-size: 22px;
  font-weight: 700;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.expedition-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* Character Card */
.character-card {
  position: relative;
  overflow: hidden;
  border-top-width: 4px;
}

.char-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.char-card-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.char-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.char-title-container {
  display: flex;
  flex-direction: column;
}

.char-card-name {
  font-size: 16px;
  font-weight: 700;
}

.char-card-class-server {
  font-size: 11px;
  color: var(--text-muted);
}

.char-card-level-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.char-card-level {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(229, 193, 88, 0.15);
}

.char-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.char-card-actions .btn-delete-char {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger-hover);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.char-card-actions .btn-delete-char:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Card Raid Checklist */
.char-card-homework {
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
}

.homework-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weekly-raids-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.homework-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  font-size: 13px;
  transition: var(--transition-fast);
}

.homework-item.selectable {
  cursor: pointer;
}

.homework-item.selectable:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.homework-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.homework-item-left i.checkbox-icon {
  font-size: 16px;
  color: var(--text-dark);
  transition: var(--transition-fast);
}

.homework-item.completed {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.2);
}

.homework-item.completed i.checkbox-icon {
  color: var(--success);
}

.homework-item.completed .homework-name {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.7;
}

.homework-item.gold-active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.homework-item.gold-active.completed {
  background: rgba(229, 193, 88, 0.04);
  border-color: rgba(229, 193, 88, 0.2);
}

.homework-item.gold-active.completed i.checkbox-icon {
  color: var(--gold);
}

.homework-gold-amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.homework-item.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ================= 3. Raid Scheduler Styles ================= */
.scheduler-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 6px;
  border-radius: var(--radius-md);
  align-self: flex-start;
  width: fit-content;
}

.btn-filter {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-filter:hover {
  color: var(--text-main);
}

.btn-filter.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
}

.schedule-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
}

/* Schedule Card */
.schedule-card {
  display: flex;
  flex-direction: column;
}

.schedule-card.completed {
  opacity: 0.65;
  border-color: rgba(16, 185, 129, 0.2);
}

.schedule-card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-card-time {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--primary-hover);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
}

.schedule-card.completed .schedule-card-time {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.schedule-actions {
  display: flex;
  gap: 8px;
}

.schedule-actions button {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-fast);
}

.schedule-actions button:hover {
  color: var(--text-main);
}

.schedule-actions button.btn-delete:hover {
  color: var(--danger);
}

.schedule-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
}

.schedule-raid-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-raid-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.schedule-raid-difficulty {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.schedule-raid-difficulty.hard {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-hover);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.schedule-raid-difficulty.normal {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-hover);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.schedule-memo {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--text-dark);
  line-height: 1.4;
}

.schedule-participants-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.participants-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.participants-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-avatar-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  font-weight: 600;
}

.participant-avatar-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.schedule-card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
}

.btn-complete-schedule {
  width: 100%;
  font-size: 13px;
}

.btn-complete-schedule.completed-state {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
  cursor: default;
  pointer-events: none;
}

/* ================= 4. Settings Styles ================= */
.settings-card {
  margin-bottom: 24px;
}

.description-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.link-text {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.link-text:hover {
  text-decoration: underline;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.api-key-input-wrapper {
  display: flex;
  gap: 10px;
}

.api-key-input-wrapper input {
  flex-grow: 1;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.alert-warning-box {
  display: flex;
  gap: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--warning);
  line-height: 1.5;
}

.alert-warning-box i {
  font-size: 18px;
  margin-top: 2px;
}

.danger-zone {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.02);
}

.danger-zone .card-header {
  border-bottom-color: rgba(239, 68, 68, 0.15);
}

.danger-zone .card-header h3 {
  color: var(--danger-hover);
}

.danger-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.danger-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

.danger-action-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.action-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.action-info p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 550px;
}

/* ================= Empty States ================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--text-dark);
  gap: 12px;
}

.empty-state i {
  font-size: 28px;
}

.empty-state p {
  font-size: 13px;
}

.empty-state-large {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  gap: 16px;
}

.empty-state-large i {
  font-size: 48px;
  color: var(--text-dark);
}

.empty-state-large h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.empty-state-large p {
  font-size: 14px;
  max-width: 320px;
  margin-bottom: 8px;
}

.empty-state-inline {
  padding: 20px;
  text-align: center;
  color: var(--text-dark);
  font-size: 13px;
}

/* ================= Modal Styling ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-glow);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-large {
  max-width: 800px;
}

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

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Character Search Modal Specifics */
.search-bar-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar-row input {
  flex-grow: 1;
}

.search-status {
  font-size: 13px;
  margin-bottom: 12px;
}
.search-status.error { color: var(--danger-hover); }
.search-status.success { color: var(--success); }
.search-status.loading { color: var(--primary-hover); }

.search-results-container {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  max-height: 380px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.02);
}

.results-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.select-all-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.results-list {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

.result-item-info {
  display: flex;
  flex-direction: column;
}

.result-item-name {
  font-size: 14px;
  font-weight: 600;
}

.result-item-class-server {
  font-size: 11px;
  color: var(--text-muted);
}

.result-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-item-level {
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
}

.result-item-added-badge {
  font-size: 11px;
  color: var(--success);
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Schedule Modal Specifics */
.schedule-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr;
  gap: 24px;
}

.participant-selection-box {
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 280px;
  max-height: 380px;
}

.participant-selection-box h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.subtitle-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.participant-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.participant-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition-fast);
}

.participant-select-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.part-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.part-item-name {
  font-size: 13px;
  font-weight: 600;
}

.part-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.part-item-level {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

/* ================= Responsive Layout (Mobile / Tablet) ================= */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .sidebar-brand {
    padding: 0;
    border-bottom: none;
  }
  
  .sidebar-menu {
    flex-direction: row;
    padding: 0;
    gap: 8px;
  }
  
  .menu-item {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .menu-item.active {
    border-left: none;
    border-bottom: 3px solid var(--gold);
    background: transparent;
  }
  
  .sidebar-footer {
    display: none; /* 모바일에서는 주간 초기화 카운트다운을 사이드바에 표시 안 함 */
  }
  
  .main-content {
    height: calc(100vh - 80px); /* 사이드바 크기 제외 */
  }
  
  .content-body {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .sidebar-menu {
    justify-content: space-around;
    width: 100%;
  }
  
  .menu-item span {
    display: none; /* 모바일 모드에서는 아이콘만 표시 */
  }
  
  .menu-item {
    padding: 12px;
  }
  
  .main-header {
    padding: 0 24px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr; /* 세로 배열 */
  }
  
  .schedule-form-grid {
    grid-template-columns: 1fr;
  }
  
  .expedition-grid-container {
    grid-template-columns: 1fr;
  }
  
  .schedule-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= 2차 기능 고도화 추가 스타일 ================= */

/* 직업 로고 이미지 및 Fallback 아바타 */
.class-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2px;
}

/* 캐릭터 카드 및 표 내 프로필 클릭 트리거 */
.char-card-main-info, 
.char-cell {
  cursor: pointer;
}

.char-card-main-info:hover .char-card-name,
.char-cell:hover .name {
  color: var(--gold);
  text-decoration: underline;
}

/* 레이드 목록 더보기 / 접기 아코디언 */
.hidden-raids {
  display: none !important;
}

.btn-toggle-raids {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 0 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
  border-top: 1px dashed rgba(255, 255, 255, 0.04);
  margin-top: 8px;
}

.btn-toggle-raids:hover {
  color: var(--gold);
}

/* 대시보드 표 모바일 반응형 가독성 최적화 */
.dashboard-table {
  min-width: 800px; /* 창이 극도로 작아져도 글자가 두 줄로 찌그러지지 않고 가로 스크롤을 활성화 */
}

.dashboard-table td, 
.dashboard-table th {
  white-space: nowrap;
}

/* 칩들이 표 내에서 잘 래핑되도록 재설정 */
.raids-checklist-row {
  max-width: 450px;
  white-space: normal; /* 칩 컨테이너는 래핑 허용 */
}

/* 캐릭터 상세 프로필 모달 */
.profile-modal-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-main-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.profile-summary-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.profile-char-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-server-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.profile-class-level {
  font-size: 14px;
  color: var(--text-muted);
}

.profile-class-level .level-highlight {
  color: var(--gold);
  font-weight: 800;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.profile-meta-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-meta-item .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.profile-meta-item .value {
  font-size: 14px;
  font-weight: 700;
}

/* 프로필 상세 스펙 구역 */
.profile-specs-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .profile-specs-layout {
    grid-template-columns: 1fr;
  }
}

.spec-section {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.spec-section h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  color: var(--text-main);
}

/* 각인 스타일 */
.engravings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.engraving-item-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(229, 193, 88, 0.03);
  border: 1px solid rgba(229, 193, 88, 0.1);
  font-size: 13px;
}

.engraving-item-badge.level-3 {
  background: rgba(229, 193, 88, 0.06);
  border-color: rgba(229, 193, 88, 0.25);
}

.engraving-name {
  font-weight: 600;
}

.engraving-level {
  font-size: 11px;
  font-weight: 800;
  background: var(--gold);
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
}

.engraving-level.level-1 {
  background: #a8a8a8;
}
.engraving-level.level-2 {
  background: #d4a373;
}

/* 장비 정보 */
.gear-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.gear-name-grade {
  font-size: 13px;
  font-weight: 600;
}

.gear-grade-relic { color: #e67e22; }
.gear-grade-ancient { color: #f1c40f; }
.gear-grade-esther { color: #9b59b6; }

/* 6차 기능 고도화: 딜러/서포터 시각적 그룹화 및 개별 참가 스타일 */
.participants-role-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.role-group {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color var(--transition-fast);
}

.role-group.dealers-group {
  border-left: 3px solid var(--primary);
}

.role-group.supporters-group {
  border-left: 3px solid var(--success);
}

.role-group-title {
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.no-participants {
  font-size: 12px;
  color: var(--text-dark);
  font-style: italic;
  padding: 4px 0;
}

.participant-avatar-tag {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.participant-avatar-tag.dealer {
  border-color: rgba(59, 130, 246, 0.15);
}

.participant-avatar-tag.support {
  border-color: rgba(16, 185, 129, 0.15);
}

.participant-avatar-tag.my-character {
  background: rgba(229, 193, 88, 0.05);
  border-color: rgba(229, 193, 88, 0.3);
}

.participant-name-wrapper {
  display: flex;
  flex-direction: column;
}

.participant-name-wrapper .part-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.participant-name-wrapper .part-class {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-cancel-part {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-left: 4px;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  transition: all var(--transition-fast);
}

.btn-cancel-part:hover {
  background: var(--danger);
  color: #ffffff;
}

/* 실시간 참여 신청 컨트롤러 */
.schedule-join-control {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-glass);
}

.schedule-join-control select {
  flex-grow: 1;
  padding: 8px 12px;
  font-size: 12px;
}

.schedule-join-control .btn-join-schedule {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.no-joinable-msg {
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-glass);
  text-align: center;
}

