/* 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);
  flex-shrink: 0; /* 가로 배치(모바일)에서 로고 영역이 눌려 제목이 줄바꿈되는 것 방지 */
}

/* LS 레터마크 로고 (흰색 L + 골드 S, 30도 기울임) */
.brand-icon {
  width: 64px;
  height: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(229, 193, 88, 0.25));
}

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

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
  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.92);
  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);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  contain: layout style;
}

.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);
  white-space: nowrap; /* 좁은 화면에서 버튼 글자가 세로로 찌그러지는 것 방지 */
}

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

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

.btn: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-dasharray: 314.15; /* 2 * pi * r (r=50) */
  stroke-dashoffset: 314.15;
  transition: stroke-dashoffset 0.8s ease-in-out, stroke 0.4s ease;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

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

.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;
  table-layout: fixed; /* 가로 비중 조절을 위해 고정 레이아웃 사용 */
}

.dashboard-table th, .dashboard-table td {
  box-sizing: border-box;
}

/* 각 열의 가로 비중 설정 */
.dashboard-table th:nth-child(1), .dashboard-table td:nth-child(1) { width: 14%; } /* 캐릭터 */
.dashboard-table th:nth-child(2), .dashboard-table td:nth-child(2) { width: 10%; } /* 아이템 레벨 */
.dashboard-table th:nth-child(3), .dashboard-table td:nth-child(3) { width: 10%; } /* 클래스 */
.dashboard-table th:nth-child(4), .dashboard-table td:nth-child(4) { width: 54%; } /* 추천 레이드 및 클리어 현황 (가로 비중 극대화) */
.dashboard-table th:nth-child(5), .dashboard-table td:nth-child(5) { width: 12%; } /* 숙제 완료율 */

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

.dashboard-table td {
  padding: 18px 12px;
  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;
  /* 캐릭터 이름이 길어 칸이 모자라면 이 아이콘이 대신 눌려 타원이 되므로 줄어들지 않게 고정한다 */
  flex-shrink: 0;
  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: grid;
  grid-template-columns: repeat(3, 165px); /* 가로 3개씩 고정 출력 */
  gap: 8px;
  width: 100%;
}

.raid-check-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 6px;
  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;
  width: 165px; /* 모든 블록 크기 통일 */
  box-sizing: border-box;
}

.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.paradise-chip {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.01) !important;
  color: var(--text-dark) !important;
}

.raid-check-chip.paradise-chip i {
  color: var(--text-dark) !important;
}

.raid-check-chip.paradise-chip.selectable:hover {
  border-color: rgba(131, 197, 190, 0.5) !important;
  color: #83c5be !important;
}

.raid-check-chip.paradise-chip.selectable:hover i {
  color: #83c5be !important;
}

.raid-check-chip.paradise-chip.completed {
  background: rgba(131, 197, 190, 0.18) !important;
  border-color: #83c5be !important;
  color: #a4f5ed !important;
  font-weight: 700 !important;
}

.raid-check-chip.paradise-chip.completed i {
  color: #83c5be !important;
}

/* 할의 모래시계 칩 스타일 정의 */
.raid-check-chip.hal-chip {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.01) !important;
  color: var(--text-dark) !important;
}

.raid-check-chip.hal-chip i {
  color: var(--text-dark) !important;
}

.raid-check-chip.hal-chip.selectable:hover {
  border-color: rgba(233, 216, 166, 0.5) !important;
  color: #e9d8a6 !important;
}

.raid-check-chip.hal-chip.selectable:hover i {
  color: #e9d8a6 !important;
}

.raid-check-chip.hal-chip.completed {
  background: rgba(233, 216, 166, 0.18) !important;
  border-color: #e9d8a6 !important;
  color: #ffefa8 !important;
  font-weight: 700 !important;
}

.raid-check-chip.hal-chip.completed i {
  color: #e9d8a6 !important;
}

.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;
  /* 이름이 길 때 아이콘이 눌리지 않도록 (char-avatar-text 와 같은 이유) */
  flex-shrink: 0;
  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);
}

.char-card-actions .btn-refresh-char {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 4px 11px;
  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-refresh-char:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-glass-hover);
}

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

/* Homework section action buttons alignment */
.btn-toggle-role,
.btn-check-all-raids,
.btn-visible-raids-config {
  width: 68px !important;
  max-width: 68px !important;
  height: 28px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  line-height: 28px !important;
  vertical-align: middle !important;
}

/* 전체완료 버튼 전용 테마 (설정 버튼과 톤앤매너 통일) */
.btn-check-all-raids {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-glass) !important;
  color: var(--text-muted) !important;
}

.btn-check-all-raids:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--border-glass-hover) !important;
  color: var(--text-main) !important;
}

/* 설정 버튼 전용 테마 */
.btn-visible-raids-config {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-glass) !important;
  color: var(--text-muted) !important;
}

.btn-visible-raids-config:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--border-glass-hover) !important;
  color: var(--text-main) !important;
}



.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(3, 1fr); /* 무조건 한 줄에 3개씩 배치 */
  gap: 20px;
  width: 100%;
}

/* 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: grid;
  grid-template-columns: repeat(3, 1fr); /* 한 줄에 3개씩 배치 */
  gap: 8px;
  width: 100%;
}

.participant-avatar-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px; /* 모서리 일치 */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  font-weight: 600;
  box-sizing: border-box;
  width: 100%; /* 부모 그리드에 맞춰 가로폭 자동 통일 */
  min-width: 0; /* flex/grid 찌그러짐 방지 */
}

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

.participant-name-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.part-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.part-class {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.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: pointer;
  transition: all 0.2s;
}

.btn-complete-schedule.completed-state:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger, #ef4444);
  color: var(--danger, #ef4444);
}


/* ================= 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: 94vh;
  overflow: hidden;
}

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

.modal-large {
  max-width: 860px;
  max-height: 94vh;
}

.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;
  flex: 1;
  min-height: 0;
}

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

/* Add Party Member Modal Styling */
.add-member-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  transform: translateX(2px);
}

.add-member-item .btn-add-specific-char:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}

.expedition-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.expedition-select-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(96, 165, 250, 0.3);
}

.expedition-select-card.active {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.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;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.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;
  flex: 1;
  min-height: 0;
}

.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: 20px;
}

/* select의 긴 옵션 텍스트가 그리드 최소 폭을 강제로 늘리는 것 방지 */
.schedule-form-grid > .form-left,
.schedule-form-grid > .form-right {
  min-width: 0;
}

.form-left select,
.form-left input,
.form-left textarea {
  max-width: 100%;
  min-width: 0;
}

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

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

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

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

.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;
    overflow-x: auto; /* 메뉴가 넘치면 가로 스크롤 (글자 세로 찌그러짐 방지) */
  }

  .menu-item {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .menu-item.active {
    border-left: none;
    border-bottom: 3px solid var(--gold);
    background: transparent;
  }
  
  .sidebar-footer {
    display: none; /* 모바일에서는 주간 초기화 카운트다운을 사이드바에 표시 안 함 */
  }
  
  .main-content {
    height: auto; /* 사이드바 높이가 가변이므로 flex로 남은 공간을 채움 */
    flex: 1;
    min-height: 0;
  }
  
  .content-body {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 12px 12px 8px 12px;
  }

  .sidebar-menu {
    justify-content: space-around;
    width: 100%;
    gap: 4px;
  }

  .menu-item span {
    display: none; /* 모바일 모드에서는 아이콘만 표시 */
  }

  .menu-item {
    padding: 12px;
  }

  /* 상단 헤더: 제목 줄바꿈/골드 요약 찌그러짐 방지 */
  .main-header {
    height: auto;
    min-height: 56px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  #page-title {
    font-size: 18px;
    white-space: nowrap;
  }

  .header-right {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .expedition-gold-summary {
    font-size: 12.5px;
    padding: 6px 12px;
    white-space: nowrap;
  }

  .content-body {
    padding: 16px;
  }

  /* 카드 내부 여백 축소 및 헤더 버튼 래핑 허용 */
  .card-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .card-header h3 {
    font-size: 16px;
  }

  .card-body {
    padding: 16px;
  }

  /* 탭 상단 액션 바: 제목 아래로 버튼들을 내려 가로 찌그러짐 방지 */
  .action-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .action-bar h2 {
    font-size: 19px;
  }

  .action-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .action-buttons .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .action-bar > .btn {
    width: 100%;
  }

  .scheduler-filter-bar {
    flex-wrap: wrap;
  }

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

  /* 모달: 좁은 화면에서 화면을 거의 채우고 내부 여백 축소 */
  .modal-content {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .modal-header,
  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
  }

  /* iOS 사파리에서 입력 포커스 시 자동 확대 방지 */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* 모바일 브라우저 주소창 높이 변화 대응 (dvh 지원 브라우저) */
@supports (height: 100dvh) {
  body,
  .app-container {
    height: 100dvh;
  }
}

/* ================= 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[data-draggable="true"] {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

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

/* 제작도구 스타일 추가 */
#production-tab input[type="number"] {
  padding: 8px 12px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-main) !important;
  font-family: var(--font-family) !important;
  width: 100% !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: var(--transition-fast) !important;
}

#production-tab input[type="number"]:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.production-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* 제작 효율 계산기: 행 클릭 시 인라인 확장(아코디언) 패널 */
.production-expand-row {
  animation: fadeIn var(--transition-normal);
}

.production-expand-content {
  padding: 18px 20px 22px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-glass);
}

.prod-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.prod-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
}

.prod-chip .chip-label {
  color: var(--text-muted);
  font-weight: 500;
}

.prod-chip .chip-value {
  font-weight: 700;
  font-size: 14px;
}

.prod-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 10px;
}

.prod-section-title i {
  color: var(--primary);
}

.mat-icon-box {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mat-icon-box.tier-normal { background: linear-gradient(135deg, #707780, #4b525d); }
.mat-icon-box.tier-medium { background: linear-gradient(135deg, #2f9e6e, #1f7350); }
.mat-icon-box.tier-rare { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.mat-icon-box.tier-powder { background: linear-gradient(135deg, #7c3aed, #5b21b6); }

/* 거래소 API 아이템 이미지 (아이콘 박스 안에 실제 이미지 표시 시) */
.mat-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

/* 제작 아이템(완제품) 이미지 아이콘 */
.prod-target-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 4px;
}

.prod-materials-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prod-mat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.prod-mat-name {
  font-weight: 600;
  font-size: 13.5px;
  min-width: 140px;
}

.prod-mat-stat {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-left: auto;
  text-align: right;
  min-width: 110px;
}

.prod-mat-stat .stat-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.prod-mat-stat.prod-mat-total {
  color: #fbbf24;
}

.prod-flow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prod-flow-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  flex-wrap: wrap;
}

.prod-flow-arrow {
  color: var(--text-muted);
  font-size: 12px;
}

.prod-flow-count {
  color: var(--primary);
  font-weight: 700;
}

.prod-flow-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.prod-flow-empty i {
  color: var(--success);
}

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

/* ================= 쌀산기 (경매 분배 계산기) 스타일 ================= */

.rice-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14.5px;
}

.rice-calc-label {
  color: var(--text-muted);
  font-weight: 500;
}

.rice-calc-value {
  font-size: 16px;
  font-weight: 700;
}

.copyable-price {
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  transition: var(--transition-fast);
}

.copyable-price:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
  color: var(--gold) !important;
}

.copyable-price::after {
  content: '\f0c5';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 11px;
  opacity: 0.3;
  margin-left: 4px;
  transition: var(--transition-fast);
}

.copyable-price:hover::after {
  opacity: 1;
}

.btn-gold {
  background: var(--gold);
  color: #000;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-gold:hover {
  background: #f59e0b;
  box-shadow: 0 0 12px var(--gold-glow);
}

/* 복사 성공 인라인 툴팁 피드백 */
@keyframes copyGlow {
  0% { box-shadow: 0 0 0px var(--gold); }
  50% { box-shadow: 0 0 10px var(--gold); }
  100% { box-shadow: 0 0 0px var(--gold); }
}

.copied-active {
  animation: copyGlow 0.4s ease;
  background: rgba(229, 193, 88, 0.2) !important;
  color: var(--gold) !important;
}

