﻿:root { 
  --bg: #f3f6f9; 
  --card: #ffffff; 
  --line: #e2e8f0; 
  --txt: #1e293b; 
  --mut: #64748b; 
  --btn: #2563eb; 
  --btn-hover: #1d4ed8;
  --err: #ef4444; 
}
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", sans-serif; background:var(--bg); color:var(--txt); }
.header { padding:20px 24px 16px; background:var(--card); border-bottom:1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.title { font-size:20px; font-weight:800; color:#0f172a; }
.sub { font-size:13px; color:var(--mut); margin-top:6px; }

.wrap { padding:20px; display:grid; gap:20px; max-width:1200px; margin:0 auto; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.card-h { font-weight:800; font-size:16px; margin-bottom:14px; color:#0f172a; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; }
.hint { color:var(--mut); font-size:12px; margin:8px 0 0; }
.error { margin-top:10px; padding:12px; border:1px solid #fecaca; background:#fef2f2; border-radius:8px; color:#b91c1c; font-size:13px; font-weight: 500;}

.grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:12px; align-items: end;}
.grid2 { display:grid; grid-template-columns: 1fr auto; gap:12px; align-items:end; }
.field .lbl { font-size:12px; font-weight:600; color:var(--mut); margin-bottom:6px; }
.inp { width:100%; padding:10px 12px; border-radius:8px; border:1px solid var(--line); background:#f8fafc; color:var(--txt); outline:none; font-size: 14px; transition: border 0.2s; }
.inp:focus { border-color: var(--btn); background: #fff; box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }

.actions { display:flex; gap:8px; justify-content:flex-end; }
.btn { padding:10px 16px; border-radius:8px; border:none; background:var(--btn); color:white; cursor:pointer; font-weight:600; font-size:14px; transition: background 0.2s; }
.btn:hover { background: var(--btn-hover); }
.btn.ghost { background:transparent; border:1px solid var(--line); color:var(--txt); }
.btn.ghost:hover { background: #f1f5f9; }
.btn:disabled { opacity:0.5; cursor:not-allowed; }

.table-wrap { overflow:auto; border-radius:8px; border:1px solid var(--line); margin-top:14px; }
.tbl { width:100%; border-collapse: collapse; min-width:760px; background: #fff; }
.tbl th, .tbl td { border-bottom:1px solid var(--line); padding:12px 14px; font-size:13px; }
.tbl th { text-align:left; color:#475569; font-weight:700; background:#f8fafc; position:sticky; top:0; }
.tbl tr:hover td { background:#f1f5f9; cursor:pointer; }
.tbl .empty { text-align:center; color:var(--mut); padding:30px; font-size: 14px;}

.sum { display:flex; gap:20px; justify-content:flex-end; margin-top:14px; color:var(--mut); font-size: 14px; padding: 14px; background: #f8fafc; border-radius: 8px;}
.sum b { color:var(--btn); font-size: 16px; font-weight: 800;}

/* 🌟 로딩 오버레이 CSS */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(2px); z-index: 9999; display: none; flex-direction: column; justify-content: center; align-items: center; }
.loading-overlay.active { display: flex; }
.spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top: 4px solid var(--btn); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px; }
.loading-text { font-weight: 700; color: var(--txt); font-size: 16px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@media (max-width: 980px){
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .actions { justify-content:stretch; }
  .btn { width:100%; }
}
/* 🌟 옵션 선택 모달 CSS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(2px); z-index: 1000; display: none; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 90%; max-width: 420px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); overflow: hidden; animation: slideUp 0.2s ease-out; }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 16px; display: flex; justify-content: space-between; align-items: center; color: #0f172a; }
.modal-close { cursor: pointer; color: var(--mut); font-size: 24px; font-weight: 300; border: none; background: none; line-height: 1; padding: 0; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--line); background: #f8fafc; display: flex; justify-content: flex-end; gap: 8px; }
.modal-product-info { margin-bottom: 16px; font-size: 14px; background: #f1f5f9; padding: 12px; border-radius: 8px;}
.modal-product-name { font-weight: 700; color: var(--txt); margin-bottom: 6px; }
.modal-product-price { color: var(--btn); font-weight: 600; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }