/* ── 전체 공통 ── */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

:root {
  --primary: #1e3a5f;
  --primary-light: #2d5485;
  --primary-dark: #142844;
  --accent: #e8a820;
  --accent-light: #fef8e7;
  --sidebar-bg: #0f2035;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --gray: #5a6a7e;
  --gray-light: #f0f4f8;
  --gray-mid: #dde5ef;
  --dark: #1a2332;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', '맑은 고딕', sans-serif;
  background: var(--gray-light);
  color: var(--dark);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ── 네비게이션 ── */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  position: sticky; top: 0; z-index: 100;
}
.navbar .brand {
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.navbar .brand .logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.navbar .brand .logo-icon i { color: var(--primary-dark); font-size: 16px; }
.navbar .brand span { font-size: 22px; }
.navbar nav { display: flex; align-items: center; gap: 4px; }
.navbar nav a {
  color: rgba(255,255,255,.8);
  padding: 8px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  transition: var(--transition);
}
.navbar nav a:hover, .navbar nav a.active {
  background: rgba(255,255,255,.15);
  color: white;
}
.navbar .user-info { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.btn-logout {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.9);
  padding: 6px 14px; border-radius: 8px;
  font-size: 13px; transition: var(--transition);
}
.btn-logout:hover { background: rgba(255,255,255,.25); color: white; }

/* ── 레이아웃 ── */
.container { max-width: 1280px; margin: 0 auto; padding: 28px 20px; }

.page-header {
  background: white;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--accent);
  display: flex; align-items: center; gap: 14px;
}
.page-header .ph-icon {
  width: 44px; height: 44px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.page-header .ph-icon i { color: var(--accent); font-size: 20px; }
.page-header h1 { font-size: 21px; color: var(--primary); }
.page-header p  { color: var(--gray); font-size: 13.5px; margin-top: 3px; }

/* ── 카드 ── */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 14px 22px;
  font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.card-body { padding: 20px; }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  border: none; transition: var(--transition);
}
.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,58,95,.3); }
.btn-secondary { background: var(--accent); color: var(--primary-dark); }
.btn-secondary:hover { background: var(--accent-light); color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,168,32,.3); }
.btn-success   { background: var(--success); color: white; }
.btn-success:hover { background: #0e9e6e; transform: translateY(-1px); }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-outline   { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 30px; font-size: 15.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── 폼 ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--gray); margin-bottom: 6px; }
.form-group label span { color: var(--danger); }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--gray-mid);
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit;
  transition: var(--transition); background: white; color: var(--dark);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,.12);
}
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* ── 알림 ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin-bottom: 16px; display: none;
}
.alert.show { display: flex; align-items: center; gap: 10px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

/* ── 뱃지 ── */
.badge {
  display: inline-block; padding: 3px 9px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-success   { background: #d1fae5; color: #065f46; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: var(--gray-mid); color: var(--gray); }

/* ── 테이블 ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; padding: 12px 14px;
  text-align: left; font-weight: 600;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-mid); transition: background .15s; }
tbody tr:hover { background: var(--gray-light); }
tbody td { padding: 11px 14px; vertical-align: middle; }

/* ── 페이지네이션 ── */
.pagination {
  display: flex; gap: 6px; align-items: center;
  justify-content: center; margin-top: 20px; flex-wrap: wrap;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-mid);
  background: white; font-size: 13px; color: var(--dark);
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--primary); border-color: var(--primary); color: white;
}

/* ── 모달 ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal {
  background: white; border-radius: 14px;
  width: 90%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 14px 14px 0 0;
}
.modal-header h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.modal-close {
  background: rgba(255,255,255,.15); border: none;
  color: white; font-size: 18px; cursor: pointer;
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,.3); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--gray-mid);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ── 히어로 섹션 ── */
.hero {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary-dark) 40%, var(--primary) 100%);
  color: white; padding: 70px 20px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero > * { position: relative; z-index: 1; }
.hero .hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,168,32,.2); border: 1px solid rgba(232,168,32,.4);
  color: var(--accent); padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.hero h1 span { color: var(--accent); }
.hero p  { font-size: 16.5px; opacity: .8; margin-bottom: 36px; }
.hero .stats {
  display: flex; gap: 20px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 40px;
}
.hero .stat-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px; padding: 18px 28px;
  min-width: 140px; backdrop-filter: blur(8px);
}
.hero .stat-box .num { font-size: 34px; font-weight: 700; color: var(--accent); }
.hero .stat-box .lbl { font-size: 13px; opacity: .75; margin-top: 2px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 홈 안내 카드 ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin-top: 28px;
}
.info-card {
  background: white; border-radius: var(--radius);
  padding: 26px 22px 22px; box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
  text-align: left; transition: var(--transition);
  display: flex; flex-direction: column; gap: 0;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* 아이콘 - 각 카드별 색상 */
.info-card .icon {
  width: 48px; height: 48px; margin-bottom: 14px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-card .icon i { font-size: 22px; }

.icon-performance { background: #fef3c7; }
.icon-performance i { color: #d97706; }
.icon-ticket       { background: #dbeafe; }
.icon-ticket i     { color: #2563eb; }
.icon-entry        { background: #d1fae5; }
.icon-entry i      { color: #059669; }
.icon-refund       { background: #fee2e2; }
.icon-refund i     { color: #dc2626; }

.info-card-performance { border-top-color: #f59e0b; }
.info-card-ticket      { border-top-color: #3b82f6; }
.info-card-entry       { border-top-color: #10b981; }
.info-card-refund      { border-top-color: #ef4444; }

.info-card h3 {
  font-size: 15px; font-weight: 700;
  color: var(--primary); margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-mid);
}
/* card-title-row 안의 h3는 구분선 없이, 아래 여백은 row 전체가 담당 */
.card-title-row h3 {
  margin-bottom: 0; padding-bottom: 0;
  border-bottom: none;
}
.card-title-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-mid);
  margin-bottom: 16px;
}
.info-card p  { font-size: 13.5px; color: var(--gray); line-height: 1.7; }

/* 공연 안내 카드 — 주차 안내 블록 */
.performance-notice {
  margin-top: 14px;
  padding: 11px 13px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.performance-notice p {
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.6;
  margin: 0;
}
.performance-notice p:first-child {
  font-size: 13px;
  color: #92400e;
  margin-bottom: 2px;
}
.performance-notice p i {
  margin-right: 5px;
  color: #d97706;
}
.performance-notice .notice-warn {
  color: #b45309;
  font-weight: 500;
  background: #fef3c7;
  border-radius: 5px;
  padding: 4px 7px;
}

/* 카드 내 리스트 */
.info-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.info-list li {
  font-size: 13px; color: #374151; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 7px;
}
.info-list li i {
  font-size: 12px; color: var(--gray); margin-top: 2px;
  width: 14px; flex-shrink: 0;
}
.info-list strong { color: var(--primary-dark); }

/* 소형 뱃지 */
.badge-sm {
  display: inline-block; font-size: 10.5px;
  background: #eff6ff; color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 99px; padding: 1px 7px;
  vertical-align: middle; margin-left: 2px;
}

/* 환불 테이블 */
.refund-table {
  margin-top: 12px; border-radius: 8px; overflow: hidden;
  border: 1px solid #fecaca;
  font-size: 12.5px;
}
.refund-row {
  display: flex; justify-content: space-between;
  padding: 6px 10px; background: white;
  border-bottom: 1px solid #fef2f2;
}
.refund-row:last-child { border-bottom: none; }
.refund-header {
  background: #fef2f2; font-weight: 700;
  font-size: 11.5px; color: #9b1c1c;
  letter-spacing: .3px;
}
.refund-full  { color: #059669; font-weight: 700; }
.refund-half  { color: #d97706; font-weight: 700; }
.refund-danger { background: #fff1f2; }
.refund-danger span:last-child { color: #dc2626; font-weight: 700; }

/* ── 상세보기 버튼 ── */

.btn-detail {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 99px; border: none;
  cursor: pointer; transition: var(--transition);
  background: #eff6ff; color: #2563eb;
  white-space: nowrap; flex-shrink: 0;
}
.btn-detail:hover { background: #dbeafe; transform: scale(1.04); }
.btn-detail i { font-size: 10px; }
.btn-detail-green { background: #ecfdf5; color: #059669; }
.btn-detail-green:hover { background: #d1fae5; }
.btn-detail-red { background: #fff1f2; color: #dc2626; }
.btn-detail-red:hover { background: #fee2e2; }

/* ── 모달 공통 ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 9000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.modal-open { display: flex; }

.modal-box {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: modalIn .25s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
@keyframes modalIn {
  from { opacity:0; transform:scale(.92) translateY(12px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

.modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 17px; font-weight: 700; color: #1e293b; flex: 1; }
.modal-header-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.modal-header-ticket  { border-bottom-color: #dbeafe; background: #f8faff; }
.modal-header-ticket .modal-header-icon { background: #dbeafe; color: #2563eb; }
.modal-header-entry   { border-bottom-color: #d1fae5; background: #f6fffe; }
.modal-header-entry .modal-header-icon  { background: #d1fae5; color: #059669; }
.modal-header-refund  { border-bottom-color: #fee2e2; background: #fffafa; }
.modal-header-refund .modal-header-icon { background: #fee2e2; color: #dc2626; }

.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: #f3f4f6; color: #6b7280; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.modal-close:hover { background: #e5e7eb; color: #1f2937; }

.modal-body {
  padding: 18px 22px 24px;
  overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 14px;
}

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

.modal-section-title {
  font-size: 13px; font-weight: 700; color: #374151;
  display: flex; align-items: center; gap: 6px;
}
.modal-section-title i { font-size: 12px; color: #9ca3af; }

.modal-text { font-size: 13.5px; color: #374151; line-height: 1.7; }

/* 파란 공지 박스 */
.modal-notice-box {
  background: #eff6ff; border-radius: 10px;
  padding: 12px 14px; border-left: 3px solid #3b82f6;
  gap: 6px;
}
.modal-notice-green {
  background: #ecfdf5; border-left-color: #10b981;
}
.modal-notice {
  font-size: 13px; color: #1e3a5f; line-height: 1.8;
  display: block;
}
.modal-notice i { color: #3b82f6; margin-right: 6px; }
.modal-notice-green .modal-notice i { color: #059669; }

/* 경고 박스 */
.modal-warn-box {
  background: #fffbeb; border-radius: 10px;
  padding: 12px 14px; border-left: 3px solid #f59e0b;
  font-size: 13px; color: #374151; line-height: 1.65;
}
.modal-warn-box i { color: #d97706; }

/* 계좌 박스 */
.modal-account-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f8faff; border: 1px solid #dbeafe;
  border-radius: 10px; padding: 12px 14px;
}
.modal-bank {
  background: #1e6bb8; color: white;
  font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px;
}
.modal-account-num { font-size: 16px; font-weight: 700; color: #1e3a5f; letter-spacing: .5px; }
.modal-account-name { font-size: 12.5px; color: #6b7280; }

/* 휠체어 박스 */
.modal-wheelchair-box {
  background: #f5f3ff; border-radius: 10px;
  padding: 12px 14px; border-left: 3px solid #8b5cf6;
  font-size: 13px; color: #374151; line-height: 1.65;
}
.modal-wheelchair-box .modal-section-title i { color: #7c3aed; }

/* 모달 리스트 */
.modal-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.modal-list li {
  font-size: 13px; color: #374151; line-height: 1.6;
  padding-left: 14px; position: relative;
}
.modal-list li::before {
  content: '•'; position: absolute; left: 0;
  color: #9ca3af; font-weight: 700;
}

/* 전화 링크 */
.modal-tel {
  color: #2563eb; text-decoration: none; font-weight: 600;
}
.modal-tel:hover { text-decoration: underline; }

/* 환불 테이블 (모달 전용) */
.modal-refund-table {
  border-radius: 10px; overflow: hidden;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}
.mrt-head {
  display: flex; justify-content: space-between;
  padding: 9px 14px; background: #f9fafb;
  font-weight: 700; font-size: 12px; color: #374151;
  border-bottom: 1px solid #e5e7eb;
}
.mrt-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: white;
  border-bottom: 1px solid #f3f4f6;
}
.mrt-row:last-child { border-bottom: none; }
.mrt-danger { background: #fff5f5; }
.mrt-full  { color: #059669; font-weight: 700; }
.mrt-half  { color: #d97706; font-weight: 700; }
.mrt-none  { color: #dc2626; font-weight: 700; }
.mrt-row span:first-child { color: #374151; }

/* ── 인증 ── */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 28px 16px;
  background: var(--gray-light);
}
.auth-box {
  background: white; border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px; padding: 40px;
}
.auth-box .logo { text-align: center; margin-bottom: 30px; }
.auth-box .logo .logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.auth-box .logo .logo-icon i { color: white; font-size: 26px; }
.auth-box .logo h2 { color: var(--primary); font-size: 22px; }
.auth-box .logo p  { color: var(--gray); font-size: 13px; margin-top: 4px; }
.divider { text-align: center; position: relative; margin: 22px 0; }
.divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--gray-mid);
}
.divider span {
  background: white; padding: 0 14px;
  position: relative; font-size: 12.5px; color: var(--gray);
}
.check-wrap { display: flex; align-items: flex-start; gap: 10px; }
.check-wrap input { width: auto; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); }

/* ── 좌석 예매 레이아웃 ── */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px; align-items: start;
}
/* 그리드 항목의 기본 min-width 는 auto(=콘텐츠 최소폭)라, 안에 든 좌석도 SVG(약 1,066px)가
   열 자체를 그만큼 넓혀버린다. 그러면 좌석도를 감싼 overflow-x:auto 가 무력해지고
   같은 열의 타이머 바·범례까지 화면 밖으로 늘어난다(모바일에서 특히 두드러짐).
   min-width:0 을 주어야 열이 화면 폭을 지키고, 좌석도만 자기 영역 안에서 가로 스크롤된다. */
.booking-layout > * { min-width: 0; }
@media (max-width: 900px) { .booking-layout { grid-template-columns: 1fr; } }

.floor-tabs {
  display: flex; gap: 0; margin-bottom: 0;
  background: white;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 6px 6px 0; box-shadow: var(--shadow);
}
.floor-tab {
  flex: 1; padding: 11px; text-align: center;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  background: transparent; color: var(--gray);
  transition: var(--transition); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.floor-num { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }
.floor-sub { font-size: 13px; font-weight: 500; opacity: .85; }
.floor-tab.active {
  background: var(--primary); color: white;
  box-shadow: 0 3px 10px rgba(30,58,95,.3);
}

.seat-map-container {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; overflow-x: auto;
}
.stage-label {
  text-align: center; padding: 14px;
  background: linear-gradient(135deg, var(--sidebar-bg), var(--primary-dark));
  color: white; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; letter-spacing: 5px;
  margin-bottom: 16px;
}

.legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 16px;
  background: var(--gray-light); border-radius: var(--radius-sm);
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.legend-dot { width: 13px; height: 13px; border-radius: 3px; }
.legend-available  { background: #3B82F6; }
.legend-selected   { background: var(--accent); }
.legend-reserved   { background: #94a3b8; }
.legend-mine       { background: var(--success); }
.legend-blocked    { background: #ef4444; border: 2px solid #b91c1c; }

#seatMapSvg { display: block; min-width: 100%; cursor: default; }
.seat-rect { transition: fill .15s; }
.seat-rect.available { fill: #3B82F6; cursor: pointer; }
.seat-rect.available:hover { fill: #2563EB; }
.seat-rect.selected  { fill: #e8a820; cursor: pointer; }
.seat-rect.reserved  { fill: #94a3b8; cursor: default; }
.seat-rect.mine      { fill: #10B981; cursor: default; }
.seat-rect.blocked   { fill: #ef4444; cursor: default; }            /* 예매 불가 - 빨강 */
.seat-rect.locked    { fill: #fb923c; cursor: not-allowed; opacity: .85; }  /* 타인 선점 - 주황 */
.seat-rect.my_lock   { fill: #e8a820; cursor: pointer; }                   /* 내 선점 - 앰버(선택과 동일) */

/* ── 관리자 모드 좌석 스타일 ── */
.seat-rect.admin-blocked          { fill: #fca5a5; cursor: pointer; }       /* 관리자 뷰 차단 좌석 - 연빨강 */
.seat-rect.admin-blocked:hover    { fill: #f87171; }
.seat-rect.available.admin-cursor { cursor: pointer; }                       /* 관리자 뷰 가능 좌석 - 포인터 */
.seat-disability     { fill: #e8edf2; stroke: #b0bec5; stroke-width: 1; cursor: default; pointer-events: none; }

.booking-sidebar { position: sticky; top: 80px; }
.selected-info {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.selected-info .si-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; padding: 15px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 700; font-size: 14px;
}
.selected-info .si-body { padding: 16px; }
.selected-list { list-style: none; min-height: 60px; }
.selected-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--gray-mid); font-size: 13.5px;
}
.selected-list li:last-child { border-bottom: none; }
.remove-seat {
  background: none; border: none; color: var(--danger);
  font-size: 18px; line-height: 1;
}
.si-footer { padding: 14px 16px; border-top: 1px solid var(--gray-mid); }
.seat-tooltip {
  position: fixed; z-index: 999;
  background: rgba(15,32,53,.9); color: white;
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; pointer-events: none; display: none;
  border: 1px solid rgba(255,255,255,.1);
}

/* ── 마이페이지 예매 테이블 ── */
.res-table {
  width: 100%; border-collapse: collapse;
  font-family: inherit;
}
.res-table thead tr {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-bottom: 2px solid var(--primary-dark);
}
.res-table th {
  padding: 13px 14px; font-size: 12.5px; font-weight: 700;
  color: #ffffff; text-align: left; white-space: nowrap;
  letter-spacing: .3px;
}
.res-table th input[type="checkbox"] { accent-color: #e8a820; }
.res-table td {
  padding: 13px 14px; font-size: 13.5px;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
}
.res-table tbody tr:last-child td { border-bottom: none; }
.res-table tbody tr:hover td { background: #f9fbfd; }
.res-row-cancelled td { opacity: .65; }

/* 예매번호 뱃지 */
.res-code-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  color: var(--primary); font-size: 12.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  white-space: nowrap;
}
.res-code-badge i { font-size: 11px; opacity: .7; }

/* 상태 뱃지 */
.res-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700;
  padding: 4px 11px; border-radius: 99px;
  white-space: nowrap;
}
.res-status-ok     { background: #d1fae5; color: #065f46; }
.res-status-cancel { background: #fee2e2; color: #991b1b; }

/* 테이블 내 버튼 */
.res-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 6px; border: none; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
  text-decoration: none;
}
.res-btn-print {
  background: linear-gradient(135deg, #1e3a5f, #2c5282);
  color: white;
}
.res-btn-print:hover { opacity: .88; }
.res-btn-cancel {
  background: #fee2e2; color: #dc2626;
  border: 1px solid #fecaca;
}
.res-btn-cancel:hover { background: #fecaca; }

/* ── 관리자 레이아웃 ── */
.admin-nav {
  background: var(--sidebar-bg);
  width: 230px; min-height: calc(100vh - 64px);
  position: fixed; top: 64px; left: 0;
  padding: 20px 0; z-index: 50;
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
}
.admin-nav .nav-section {
  padding: 8px 18px 4px;
  font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,255,.35);
  text-transform: uppercase; letter-spacing: 1.5px;
}
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  color: rgba(255,255,255,.7);
  font-size: 13.5px; transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav a i { width: 18px; text-align: center; font-size: 14px; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.95); }
.admin-nav a.active {
  background: rgba(30,58,95,.6);
  color: white;
  border-left-color: var(--accent);
}
.admin-content { margin-left: 230px; padding: 28px; }

/* ── 관리자 통계 카드 ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px,1fr));
  gap: 18px; margin-bottom: 24px;
}
.stat-card {
  background: white; border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
  border-top: 4px solid; display: flex;
  align-items: center; gap: 18px;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.blue   { border-color: var(--primary); }
.stat-card.orange { border-color: var(--accent); }
.stat-card.green  { border-color: var(--success); }
.stat-card.red    { border-color: var(--danger); }
.stat-card .stat-icon {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-card.blue .stat-icon   { background: #eff6ff; color: var(--primary); }
.stat-card.orange .stat-icon { background: var(--accent-light); color: var(--accent); }
.stat-card.green .stat-icon  { background: #d1fae5; color: var(--success); }
.stat-card.red .stat-icon    { background: #fee2e2; color: var(--danger); }
.stat-card .stat-num { font-size: 30px; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-card .stat-lbl { font-size: 12.5px; color: var(--gray); margin-top: 4px; }

/* ── 필터 바 ── */
.filter-bar {
  background: white; border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow);
  margin-bottom: 18px;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
}
.filter-bar .form-group { margin: 0; flex: 1; min-width: 140px; }
.filter-bar label { font-size: 11.5px; }
.filter-bar .form-control { padding: 8px 12px; font-size: 13px; }

/* ── 로딩 ── */
.loading { text-align: center; padding: 48px; color: var(--gray); font-size: 14.5px; }
.spinner {
  display: inline-block; width: 34px; height: 34px;
  border: 3px solid var(--gray-mid);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite; margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 반응형 ── */
@media (max-width: 768px) {
  .admin-nav { display: none; }
  .admin-content { margin-left: 0; padding: 16px; }
  .hero h1 { font-size: 26px; }
  .auth-box { padding: 28px 20px; }
  .hero { padding: 48px 16px; }

  /* ── 모바일 상단 네비게이션 ──────────────────────────────
     기존에는 높이 64px 한 줄에 로고+메뉴4개+사용자정보를 모두 넣으려다
     폭이 모자라 메뉴 글자가 세로로 쪼개져 잘렸다("좌 석 예 매").
     로고·사용자정보를 윗줄에, 메뉴를 아랫줄에 두고
     메뉴는 한 줄을 유지한 채 넘치면 가로로 밀어 보게 한다. */
  .navbar {
    height: auto;
    padding: 8px 12px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .navbar .brand { font-size: 14px; gap: 7px; }
  .navbar .brand .logo-icon { width: 30px; height: 30px; }
  .navbar .brand .logo-icon i { font-size: 14px; }
  .navbar .brand span { font-size: 16px; }

  .navbar nav {
    order: 3;                 /* 로고·사용자정보 아래 줄로 내린다 */
    width: 100%;
    gap: 2px;
    overflow-x: auto;         /* 메뉴가 많아도 가로로 밀어 볼 수 있게 */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;    /* 스크롤바는 숨기고 스와이프로만 */
  }
  .navbar nav::-webkit-scrollbar { display: none; }
  .navbar nav a {
    white-space: nowrap;      /* ← 글자가 세로로 쪼개지는 것을 막는 핵심 */
    padding: 7px 10px;
    font-size: 13px;
  }

  .navbar .user-info { font-size: 12px; gap: 6px; }
  .navbar .user-info span { white-space: nowrap; }
  .btn-logout { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
}

/* 터치 기기에서는 마우스오버용 좌석 툴팁을 띄우지 않는다.
   탭할 때마다 툴팁이 남아 화면을 가린다. */
@media (hover: none) {
  .seat-tooltip { display: none !important; }
}

/* ════════════════════════════════════════════════════
   대기열(Queue) 시스템 스타일
════════════════════════════════════════════════════ */

/* 범례 - 타인 선점 좌석 */
.legend-dot.legend-locked { background: #fb923c; }

/* ── 대기실 페이지 레이아웃 ── */
.queue-wrap {
  min-height: calc(100vh - 62px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f4fd 100%);
}

.queue-box {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 48px rgba(30,58,95,.14);
  padding: 52px 44px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

/* ── 각 상태 컨테이너 ── */
.queue-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── 아이콘 원형 ── */
.queue-icon {
  width: 86px; height: 86px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.queue-icon.waiting {
  background: #fef3c7; color: #d97706;
  animation: q-pulse 2s ease-in-out infinite;
}
.queue-icon.active {
  background: #d1fae5; color: #059669;
}
@keyframes q-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217,119,6,.25); }
  50%       { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(217,119,6,0); }
}

/* ── 제목 ── */
.queue-title {
  font-size: 22px; font-weight: 800;
  color: #1e3a5f; margin: 0; line-height: 1.3;
}
.queue-title.active-title { color: #059669; }

/* ── 통계 카드 3개 ── */
.queue-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
.queue-stat-card {
  background: #f8faff;
  border: 1.5px solid #dbeafe;
  border-radius: 14px;
  padding: 18px 10px 14px;
}
.queue-stat-card.primary { border-color: #3b82f6; background: #eff6ff; }
.qsc-label {
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  color: #6b7280; text-transform: uppercase; margin-bottom: 8px;
}
.qsc-value {
  font-size: 30px; font-weight: 900;
  color: #1d4ed8; line-height: 1; margin-bottom: 4px;
}
.qsc-value.green  { color: #059669; }
.qsc-value.orange { color: #d97706; }
.qsc-unit {
  font-size: 12px; font-weight: 600; color: #4b5563;
}

/* ── 프로그레스바 ── */
.queue-progress-wrap {
  width: 100%; height: 10px;
  background: #e5e7eb; border-radius: 99px;
  overflow: hidden;
}
.queue-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 99px;
  transition: width 1s ease;
}

/* ── 안내 문구 ── */
.queue-desc {
  color: #6b7280; font-size: 14px; margin: 0; line-height: 1.8;
}
.queue-spinner { font-size: 46px; color: #3b82f6; }

/* ── 카운트다운 ── */
.queue-countdown-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.queue-countdown {
  font-size: 80px; font-weight: 900;
  color: #059669; line-height: 1;
  animation: q-blink 1s ease-in-out infinite;
}
@keyframes q-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}

/* ════════════════════════════════════════════════════
   예매 페이지 - 5분 타이머 바
════════════════════════════════════════════════════ */
.queue-timer-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5c9e 100%);
  border-radius: 10px;
  margin-top: 12px;
  box-shadow: 0 3px 14px rgba(30,58,95,.35);
}
.qtb-label {
  color: #bfdbfe; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; letter-spacing: .3px;
}
.qtb-time {
  color: #ffffff; font-size: 21px; font-weight: 900;
  font-variant-numeric: tabular-nums;
  min-width: 54px; letter-spacing: 1px;
  transition: color .3s;
}
.qtb-time.warning { color: #fbbf24; }
.qtb-time.danger  { color: #f87171; animation: qtb-blink .6s infinite; }
@keyframes qtb-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}
.qtb-progress {
  flex: 1; background: rgba(255,255,255,.2);
  border-radius: 99px; height: 7px; overflow: hidden;
}
.qtb-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #93c5fd);
  border-radius: 99px;
  transition: width 1s linear;
}

/* ── 반응형 (큐 페이지) ── */
@media (max-width: 500px) {
  .queue-box { padding: 36px 20px; }
  .queue-stats { grid-template-columns: 1fr; gap: 8px; }
  .qsc-value { font-size: 24px; }
  .queue-countdown { font-size: 60px; }
  .queue-timer-bar { flex-wrap: wrap; gap: 8px; }
}
