:root {
  --bg-main: #0c1017;
  --bg-card: #151b26;
  --bg-sub: #1b2332;
  --bg-input: #232d40;
  --border-card: #334155;
  --border-focus: #38bdf8;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-gold: #fbbf24;
  --accent-cyan: #38bdf8;
  --accent-red: #f87171;
  --accent-green: #34d399;
  --accent-purple: #c084fc;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.45;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 8px calc(100px + env(safe-area-inset-bottom, 0px)) 8px;
}

.app-layout {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* ========================================== */
/* 1. 상단 네비게이션 헤더 바 */
/* ========================================== */
.top-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-date-btn {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.nav-date-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent-cyan);
}

.nav-date-btn:active {
  transform: scale(0.97);
}

.nav-cust-name {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  width: 120px;
  outline: none;
}

.nav-cust-name:focus {
  border-color: var(--border-focus);
}

.room-nav-arrows {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-arrow {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-arrow:active {
  background: var(--border-focus);
}

.room-page-indicator {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  min-width: 36px;
  text-align: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* 룸 선택 버튼 */
.btn-room-select {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-room-select:hover, .btn-room-select:active {
  border-color: var(--accent-gold);
  background: var(--bg-input);
}

.room-badge {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-gold);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 900;
}

.btn-save-record {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-save-record:hover, .btn-save-record:active {
  background: rgba(16, 185, 129, 0.35);
  border-color: #34d399;
  transform: scale(0.97);
}

.btn-delete-page {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-delete-page:hover, .btn-delete-page:active {
  background: rgba(239, 68, 68, 0.28);
  border-color: #f87171;
  transform: scale(0.97);
}

.btn-sync {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-sync:active {
  background: #2563eb;
}

.sync-dot {
  font-size: 10px;
}

.sync-dot.online {
  color: var(--accent-green);
}

/* ========================================== */
/* 2. 메인 정산내역창 */
/* ========================================== */
.main-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.receipt-window {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.receipt-header-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.title-text {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}

.btn-clear-room {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-clear-room:active {
  background: rgba(248, 113, 113, 0.2);
  color: var(--accent-red);
}

/* 3대 단락 및 아이템 행 */
.receipt-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.receipt-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 5px 6px;
  gap: 8px;
  transition: background 0.15s;
}

.receipt-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.item-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-main-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

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

.item-price {
  color: var(--accent-gold);
  font-weight: 800;
  margin-left: auto;
  padding-right: 8px;
}

.item-sub-desc {
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 14px;
  margin-top: 1px;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-edit-item {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-change-liquor {
  background: rgba(192, 132, 252, 0.15);
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-change-liquor:hover {
  background: var(--accent-purple);
  color: #0c1017;
}

.btn-change-liquor:active {
  transform: scale(0.96);
}

.btn-edit-item:active {
  background: var(--border-focus);
  color: #fff;
}

.btn-del-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-del-item:hover, .btn-del-item:active {
  background: rgba(248, 113, 113, 0.15);
  color: var(--accent-red);
}

/* 스페셜 서비스 지원 내역 단락 */
.service-block {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: 4px;
}

.service-block-header {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-red);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-title-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.service-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle-service-print,
.btn-toggle-discount-print {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-toggle-service-print.on {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}

.btn-toggle-service-print.off {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid #475569;
  color: #94a3b8;
  opacity: 0.75;
}

.btn-toggle-discount-print.on {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.btn-toggle-discount-print.off {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid #475569;
  color: #94a3b8;
  opacity: 0.75;
}

.btn-toggle-service-print:hover,
.btn-toggle-discount-print:hover {
  transform: scale(0.97);
}

/* 현금 추가 할인 (딜 에누리) 컨트롤 바 */
.cash-discount-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.cash-discount-label-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.discount-icon {
  font-size: 13px;
}

.discount-label {
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
}

.cash-discount-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-step-discount {
  background: #1e293b;
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-step-discount:hover {
  background: #334155;
  color: #fff;
  border-color: #94a3b8;
}

.input-cash-discount {
  width: 65px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  background: #0f172a;
  border: 1px solid #334155;
  color: #38bdf8;
  border-radius: 4px;
  padding: 3px 4px;
  outline: none;
}

.input-cash-discount:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.discount-unit {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.discount-summary-tag {
  font-size: 11.5px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}

.service-item-text {
  color: #fca5a5;
}

.service-zero-tag {
  color: var(--accent-green);
  font-weight: 800;
}

/* 구분선 */
.receipt-divider {
  border-top: 1.5px dashed #475569;
  margin: 6px 0;
}

/* 하단 종합 요약 랩 (좌: 실제 나갈돈 요약 / 우: 손님청구&순수익) */
.receipt-footer-summary-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 4px 6px;
  flex-wrap: wrap;
}

/* 좌측 오빠 실무용 지출 상세 요약 박스 */
.expense-breakdown-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 250px;
  flex: 1;
  max-width: 330px;
}

.expense-box-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 5px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 3px;
}

.expense-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.exp-label {
  font-weight: 700;
  color: var(--text-muted);
}

.exp-val {
  font-weight: 800;
  color: #fff;
}

.total-exp-row {
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin-top: 4px;
  padding-top: 4px;
  color: #fff;
}

.total-exp-row .exp-label {
  color: #fff;
  font-weight: 800;
}

.exp-val.total {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--accent-gold);
}

/* 하단 종합 요약 (우측 정렬) */
.receipt-footer-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 4px 0;
  min-width: 220px;
}

.summary-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.summary-line .label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.gross-line .label {
  color: #94a3b8;
  font-size: 13.5px;
}

.val-gross {
  font-size: 17px;
  font-weight: 800;
  color: #94a3b8;
  text-decoration: line-through rgba(148, 163, 184, 0.7);
}

.discount-line .label {
  color: #34d399;
  font-size: 13.5px;
  font-weight: 800;
}

.val-discount {
  font-size: 18px;
  font-weight: 900;
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.val-cash {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-red);
  letter-spacing: -0.5px;
}

.val-card {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.val-profit {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent-gold);
}

.val-profit.negative {
  color: #ef4444 !important;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.profit-line {
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 4px;
}

/* 복사 버튼군 */
.receipt-action-bar {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-copy {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-copy.copy-cust {
  background: #2563eb;
  color: #fff;
}

.btn-copy.copy-staff {
  background: #059669;
  color: #fff;
}

.btn-copy:active {
  opacity: 0.8;
  transform: scale(0.98);
}

/* ========================================== */
/* 3. 품목 수정 팝업 모달 (타임테이블과 동일한 중앙 팝업 모달) */
/* ========================================== */
.edit-modal-card {
  background: #0f172a;
  border: 1.5px solid var(--accent-gold);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(251, 191, 36, 0.2);
  width: 92%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header-icon {
  font-size: 16px;
}

.modal-badge {
  font-size: 13px;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-close-modal:hover,
.btn-close-modal:active {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.modal-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-label-sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.modal-name-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-card);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s;
}

.modal-name-input:focus {
  border-color: var(--accent-gold);
  background: #1e283c;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

.item-qty-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-left: 3px;
}

.modal-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.counter-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-mini-step {
  width: 36px;
  height: 36px;
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-mini-step:active {
  background: var(--border-focus);
}

.modal-qty-val {
  min-width: 28px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.modal-qty-unit-label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-right: 4px;
}

.badge-qty {
  color: var(--accent-cyan);
  font-weight: 800;
  margin-left: 4px;
}

.modal-input {
  width: 105px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: right;
  outline: none;
  transition: all 0.15s;
}

.modal-input:focus {
  border-color: var(--border-focus);
  background: #1e283c;
}

.modal-divider {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.modal-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  padding: 4px 0;
}

.modal-total-val {
  font-size: 20px;
  color: var(--accent-red);
}

.edit-modal-footer {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 8px;
  margin-top: 6px;
}

.btn-cancel-modal {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cancel-modal:active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-apply-modal {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.15s;
}

.btn-apply-modal:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* ========================================== */
/* 4. 하단 버튼 바 & 드롭다운 패널 (스케치 2) */
/* ========================================== */
.bottom-action-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 12px;
}

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

.action-btn-row:nth-child(2) {
  grid-template-columns: repeat(4, 1fr);
}

.btn-cat {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 800;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cat:hover, .btn-cat.active {
  background: var(--bg-input);
  border-color: var(--border-focus);
  color: var(--accent-cyan);
}

.btn-cat:active {
  transform: scale(0.95);
}

.btn-cat.service-btn {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.btn-cat.staff-cat {
  border-color: rgba(192, 132, 252, 0.3);
  color: #e9d5ff;
}

/* 드로어 패널 */
.sub-drawer-panel {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  animation: fadeIn 0.2s ease-out;
}

.sub-drawer-panel.open {
  display: flex;
}

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

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.drawer-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.btn-close-drawer {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* 드로어 내부 공통 레이아웃 (스케치 2) */
.drawer-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-bar {
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid var(--border-focus);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-title {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

.preview-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-price-inputs-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-price-field {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.drawer-mini-input {
  width: 65px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: 4px;
  padding: 4px 6px;
  text-align: right;
  outline: none;
}

.drawer-mini-input:focus {
  border-color: var(--border-focus);
}

.preview-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 6px;
}

.preview-total-text {
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-red);
}

.btn-add-to-receipt {
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 18px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-add-to-receipt:active {
  background: #1d4ed8;
}

/* 프리셋 버튼 그리드 (스케치 2) */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.btn-preset-item {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 4px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-preset-item:hover, .btn-preset-item.selected {
  border-color: var(--border-focus);
  background: #1e293b;
  color: var(--accent-cyan);
}

.btn-preset-item:active {
  transform: scale(0.96);
}

/* 수동 입력 폼 (기타, 입금액) */
.custom-form-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-input-row {
  display: flex;
  gap: 6px;
}

.custom-input-row input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 13px;
  border-radius: 4px;
  padding: 8px;
  outline: none;
}

.custom-input-row input:focus {
  border-color: var(--border-focus);
}

/* ========================================== */
/* 5. 14층/13층/12층 룸 선택 모달 팝업 */
/* ========================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 14px;
}

.modal-backdrop.open {
  display: flex;
}

.room-selector-modal {
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85);
  width: 100%;
  max-width: 480px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.15s ease-out;
}

.room-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.room-modal-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.btn-close-room-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

/* 층 탭 바 */
.floor-tab-bar {
  display: flex;
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.floor-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.floor-tab.active {
  background: var(--bg-card);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

/* 룸 컨테이너 & 층별 섹션 */
.room-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.floor-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.floor-section-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 2px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.room-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .room-btn-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.room-btn-card {
  background: var(--bg-sub);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
  min-height: 54px;
  user-select: none;
}

.room-btn-card:hover {
  border-color: var(--border-focus);
  background: #1e283b;
}

.room-btn-card.current {
  border-color: var(--accent-gold);
  background: #232c3f;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.room-btn-no {
  font-size: 14.5px;
  font-weight: 900;
  color: #fff;
}

.room-btn-card.current .room-btn-no {
  color: var(--accent-gold);
}

.room-btn-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.room-btn-tag.side {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.15);
}

.room-btn-tag.vip {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.15);
}

.room-btn-tag.special {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

/* 토스트 팝업 */
.toast-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border-focus);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3000;
}

.toast-popup.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================== */
/* 6. 자체 다크모드 달력 모달 (06시 영업일 완벽 연동) */
/* ========================================== */
.calendar-modal-card {
  background: var(--bg-card);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 18px;
  width: 92%;
  max-width: 360px;
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.25);
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-month-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  min-width: 95px;
  text-align: center;
}

.btn-cal-arrow {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 13px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-cal-arrow:hover {
  background: var(--border-focus);
  color: #fff;
}

.cal-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cal-today {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cal-today:hover {
  background: var(--accent-gold);
  color: #000;
}

.btn-close-cal-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}

.btn-close-cal-modal:hover {
  color: #fff;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 4px 0;
}

.cal-weekdays .sun {
  color: #ef4444;
}

.cal-weekdays .sat {
  color: #3b82f6;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-cell {
  aspect-ratio: 1;
  background: var(--bg-sub);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.12s ease;
}

.cal-day-cell:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.15);
  color: #fff;
}

.cal-day-cell.other-month {
  opacity: 0.25;
  color: var(--text-muted);
}

.cal-day-cell.today-marker {
  border: 1.5px solid var(--accent-gold) !important;
  color: var(--accent-gold);
}

.cal-day-cell.selected {
  background: var(--accent-cyan) !important;
  color: #050b14 !important;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.cal-day-cell.is-sun {
  color: #f87171;
}

.cal-day-cell.is-sat {
  color: #60a5fa;
}

.cal-day-cell.selected.is-sun,
.cal-day-cell.selected.is-sat {
  color: #050b14 !important;
}

/* 💾 DB 저장된 정산 내역이 있는 날짜 (골드 보더 + 옐로우 도트 마커) */
.cal-day-cell.has-record {
  border: 1.5px solid var(--accent-gold) !important;
  color: #fef08a;
  position: relative;
  font-weight: 800;
}

.cal-day-cell.has-record::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.8);
}

.cal-day-cell.selected.has-record::after {
  background: #050b14;
  box-shadow: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================== */
/* 7. 첫술(메인 주류) 변경 모달 */
/* ========================================== */
.liquor-selector-modal {
  background: var(--bg-card);
  border: 2px solid var(--accent-purple);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(192, 132, 252, 0.3);
  width: 100%;
  max-width: 520px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquor-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.liquor-modal-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-close-liquor-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.btn-close-liquor-modal:hover {
  color: #fff;
}

.liquor-modal-tip {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.liquor-list-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.liquor-btn-card {
  background: var(--bg-sub);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  text-align: center;
}

.liquor-btn-card:hover {
  border-color: var(--accent-purple);
  background: rgba(192, 132, 252, 0.15);
  transform: translateY(-1px);
}

.liquor-btn-card.current {
  border-color: var(--accent-purple);
  background: rgba(192, 132, 252, 0.25);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.35);
}

.liquor-btn-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.liquor-btn-cat {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.liquor-btn-prices {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-top: 2px;
}

.liquor-btn-prices span.orig {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
}

/* =============================================================================
   인력 타임테이블 (Timetable) 전용 다크 스타일 (디제이 90분 / 아가씨 80분 / 선수 60분)
   ============================================================================= */

/* 1. 상단 네비게이션 타임테이블 버튼 */
.btn-timetable {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-timetable:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.badge-timetable-total {
  background: #0284c7;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

/* 2. 타임테이블 모달 창 */
.timetable-modal {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  width: 95%;
  max-width: 660px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s ease-out;
}

.timetable-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.timetable-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timetable-title-icon {
  font-size: 18px;
}

.timetable-modal-title {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.badge-modal-total-t {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.btn-close-timetable {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-close-timetable:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* 3. 툴바 (기준 시간 & 실시간 시계) */
.timetable-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 8px;
}

.rule-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rule-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.rule-chip.dj {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.rule-chip.lady {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.rule-chip.host {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.timetable-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-auto-extend {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-toggle-auto-extend.on {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.btn-toggle-auto-extend.on:hover {
  background: #10b981;
  color: #000;
}

.btn-toggle-auto-extend.off {
  background: rgba(100, 116, 139, 0.2);
  border-color: #64748b;
  color: #94a3b8;
}

.btn-toggle-auto-extend.off:hover {
  background: #64748b;
  color: #fff;
}

.live-clock-badge {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-clock-badge strong {
  color: #fbbf24;
  font-family: monospace;
  font-size: 13px;
}

/* 4. 바디 스크롤 영역 */
.timetable-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 5. 카테고리 섹션 */
.timetable-cat-section {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.timetable-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-icon {
  font-size: 16px;
}

.cat-name {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.cat-unit-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.cat-badge-t {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
}

.btn-add-staff {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-staff.lady {
  background: rgba(244, 114, 182, 0.15);
  border-color: rgba(244, 114, 182, 0.4);
  color: #f472b6;
}

.btn-add-staff.host {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.4);
  color: #a78bfa;
}

.btn-add-staff:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.timetable-empty-notice {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

/* 6. 스태프 카드 */
.staff-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.staff-card:last-child {
  margin-bottom: 0;
}

.staff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.staff-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-avatar-dot {
  font-size: 10px;
}

.staff-avatar-dot.active {
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.staff-avatar-dot.done {
  color: #64748b;
}

.staff-name-display {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.staff-name-display:hover {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.staff-total-t-badge {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
}

.staff-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.staff-status-tag.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.staff-status-tag.done {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.btn-staff-rename {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-staff-rename:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* 7. 타임 레코드 행 */
.staff-records-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.timetable-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.timetable-record-row.is-latest {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.25);
}

.rec-info-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rec-t-badge {
  background: #334155;
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.rec-time-span {
  font-family: monospace;
  font-weight: 600;
  color: #cbd5e1;
}

.rec-unit-calc {
  font-size: 11px;
  color: var(--text-muted);
}

.rec-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-rec-action {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-rec-action.edit {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
}

.btn-rec-action.edit:hover {
  background: rgba(148, 163, 184, 0.25);
  color: #fff;
}

/* 이전 차수 연장 뱃지 */
.badge-rec-status.extend {
  background: rgba(71, 85, 105, 0.4);
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(71, 85, 105, 0.6);
}

/* 최신 차수 상태 토글 버튼: [미완료] vs [완료] */
.btn-rec-action.status-toggle.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
}

.btn-rec-action.status-toggle.pending:hover {
  background: #f59e0b;
  color: #000;
}

.btn-rec-action.status-toggle.done {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
}

.btn-rec-action.status-toggle.done:hover {
  background: #10b981;
  color: #000;
}

/* 수동 연장 버튼 (+연장) */
.btn-rec-action.manual-extend {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
}

.btn-rec-action.manual-extend:hover {
  background: #0284c7;
  color: #fff;
}

/* 취소 버튼 (✕) */
.btn-rec-action.cancel {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
  padding: 3px 6px;
}

.btn-rec-action.cancel:hover {
  background: #ef4444;
  color: #fff;
}

/* 8. 모달 푸터 (복사 버튼들) */
.timetable-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-copy-timetable-print {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 12.5px;
  font-weight: 800;
  padding: 9px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-copy-timetable-print:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

.btn-copy-timetable-text {
  background: rgba(30, 41, 59, 0.85);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-timetable-text:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-timetable-done {
  background: #334155;
  color: #f1f5f9;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timetable-done:hover {
  background: #475569;
}

/* ========================================== */
/* 9. 모바일 스마트폰 전용 풀스크린 & 가로 여백 극대화 반응형 */
/* ========================================== */
@media (max-width: 600px) {
  /* 모달 백드롭 외곽 패딩을 최소화하여 모바일 화면 너비 100% 활용 */
  .modal-backdrop {
    padding: 6px 4px;
    align-items: center;
  }

  /* 타임테이블 모달 가로폭 100% 꽉 채우기 & 상하 여백 최적화 */
  .timetable-modal {
    width: 100%;
    max-width: 100%;
    max-height: 96vh;
    border-radius: 12px;
  }

  .timetable-modal-header {
    padding: 10px 12px;
  }

  .timetable-modal-title {
    font-size: 14.5px;
  }

  .timetable-info-bar {
    padding: 8px 10px;
    gap: 6px;
  }

  .rule-chips {
    gap: 4px;
  }

  .rule-chip {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  .btn-toggle-auto-extend {
    font-size: 11px;
    padding: 3px 8px;
  }

  .live-clock-badge {
    font-size: 11.5px;
  }

  /* 바디 내부 패딩 슬림화 -> 행 가로 작업공간 350px+ 극대화 */
  .timetable-modal-body {
    padding: 8px 6px;
    gap: 10px;
  }

  .timetable-cat-section {
    padding: 8px 6px;
    border-radius: 8px;
  }

  .timetable-cat-header {
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .cat-name {
    font-size: 13px;
  }

  .btn-add-staff {
    font-size: 11px;
    padding: 4px 8px;
  }

  .staff-card {
    padding: 8px 6px;
    border-radius: 8px;
  }

  .staff-card-header {
    margin-bottom: 6px;
  }

  .staff-name-display {
    font-size: 13px;
  }

  /* 타임 레코드 행: 좌우 여백과 간격 최적화로 한 줄에 넓고 시원하게 배치 */
  .timetable-record-row {
    padding: 6px 6px;
    gap: 4px;
  }

  .rec-info-left {
    gap: 4px;
    flex-shrink: 0;
  }

  .rec-t-badge {
    font-size: 9.5px;
    padding: 2px 4px;
  }

  .rec-time-span {
    font-size: 12px;
    letter-spacing: -0.3px;
  }

  .rec-unit-calc {
    font-size: 10.5px;
  }

  .rec-actions-right {
    gap: 3px;
    flex-shrink: 0;
  }

  .btn-rec-action {
    font-size: 11px;
    padding: 4px 6px;
    min-height: 28px;
  }

  /* 모달 푸터: 2행 단정한 레이아웃 (복사버튼 5:5 그리드 + 닫기 100% 풀버튼) */
  .timetable-modal-footer {
    padding: 8px;
    gap: 6px;
    flex-direction: column;
  }

  .footer-btn-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .btn-copy-timetable-print,
  .btn-copy-timetable-text {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 9px 4px;
    font-size: 11.5px;
  }

  .btn-timetable-done {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: 800;
  }

  /* 품목 수정, 룸 선택, 달력, 첫술 모달도 모바일 가로 꽉 차게 피팅 */
  .edit-modal-card,
  .room-selector-modal,
  .calendar-modal-card,
  .first-liquor-modal {
    width: 100%;
    max-width: 100%;
    max-height: 96vh;
    border-radius: 12px;
    padding: 14px 10px;
  }
}

/* 375px 이하 초소형 화면 안전망 */
@media (max-width: 375px) {
  .rec-unit-calc {
    display: none;
  }
  .rec-time-span {
    font-size: 11.5px;
  }
  .btn-rec-action {
    font-size: 10px;
    padding: 3px 5px;
  }
}
