:root{
  --bg:#fafafa; --panel:#fff; --border:#e6e6e6; --border2:#ddd;
  --text:#111; --muted:#666; --black:#111; --danger:#c00;
  --pending-bg:#fff3e0; --pending-t:#e65100;
  --conf-bg:#e8f5e9; --conf-t:#1b5e20;
  --cancel-bg:#eeeeee; --cancel-t:#616161;
}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Apple SD Gothic Neo,Noto Sans KR,sans-serif;}
.wrap{max-width:1280px;margin:36px auto;padding:0 18px;}
.hide{display:none!important}
.mt10{margin-top:10px}
.mb12{margin-bottom:12px}

.topbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:12px;}
.title{font-size:22px;font-weight:900}
.sub{color:var(--muted);font-size:13px}
.topbar-right{margin-left:auto}

.panel{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;}
.panel.soft{background:var(--bg)}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.right{margin-left:auto;color:var(--muted)}
.msg{color:var(--muted)}
.err{color:var(--danger);white-space:pre-wrap;margin-top:8px}

.input,.select,.btn{
  height:38px;border-radius:10px;border:1px solid var(--border2);
  padding:0 12px;background:#fff;font-weight:800;font-size:13px;
}
.input.w260{min-width:260px}
.btn{cursor:pointer}
.btn.primary{background:var(--black);border:none;color:#fff}
.btn.ghost{background:#fff;border:1px solid var(--black);color:var(--black)}
.btn:disabled{opacity:.5;cursor:not-allowed}

.tabs{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;}
.tab{padding:10px 14px;border-radius:12px;border:1px solid var(--border2);background:#fff;color:var(--text);cursor:pointer;font-weight:900}
.tab.active{border-color:var(--black);background:var(--black);color:#fff}

.subtabs{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 12px;}
.subtab{padding:8px 12px;border-radius:12px;border:1px solid var(--border2);background:#fff;cursor:pointer;font-weight:900}
.subtab.active{border-color:var(--black);background:var(--black);color:#fff}

.table-wrap{margin-top:12px;overflow:auto}
.table{width:100%;border-collapse:collapse;min-width:980px}
.table th,.table td{padding:5px;text-align:left;vertical-align:top}
.table thead tr{border-bottom:1px solid #eee}
.table tbody tr{border-bottom:1px solid #f0f0f0}
.muted{color:var(--muted)}
.strong{font-weight:900}
.w120{width:120px}
.w50{width:50px}
.w180{width:180px}
.w220{width:220px}
.min720{min-width:720px}
.min860{min-width:860px}
.min900{min-width:900px}
.min1150{min-width:1150px}

.pill{
  display:inline-flex;align-items:center;justify-content:center;
  width:50px;height:22px;border-radius:999px;font-size:12px;font-weight:900;
}
.pill.pending{background:var(--pending-bg);color:var(--pending-t)}
.pill.confirmed{background:var(--conf-bg);color:var(--conf-t)}
.pill.canceled{background:var(--cancel-bg);color:var(--cancel-t)}
.pill.done{background:var(--conf-bg);color:var(--conf-t)}
.pill.cancelled{background:var(--cancel-bg);color:var(--cancel-t)}

.actions,.cell-actions{display:flex;gap:6px;flex-wrap:wrap}
.action-btn{
  height:32px;padding:0 10px;border-radius:10px;border:1px solid var(--border2);
  background:#fff;cursor:pointer;font-weight:900;font-size:12px;
}
.action-btn.ok,.action-btn.confirm{border:none;background:var(--black);color:#fff}
.action-btn.bad,.action-btn.cancel{border:1px solid var(--danger);color:var(--danger);background:#fff}

.grid{display:grid;grid-template-columns:1fr;gap:14px}

/* 설정용 버튼 */
.btn.setting{border:1px solid var(--border2);background:#fff;color:#333;position:relative;padding-left:34px}
.btn.setting::before{content:"⚙";position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.65}
.btn.setting.add{border-color:#cfe2ff;background:#f3f7ff;color:#1e40af}
.btn.setting.refresh{border-color:#eee;background:#f7f7f7;color:#444}

/* checkbox */
.check{display:flex;align-items:center;gap:6px;color:#333;font-weight:800}

/* calendar */
.calendar{background:#fff;border:1px solid var(--border);border-radius:14px;padding:10px}


.imgpeek{ position: relative; }

html, body { overflow-x: hidden; }

.img-tip{
  position: fixed;
  z-index: 999999;
  width: 220px;
  height: 220px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #eee;
  background:#fff;
  box-shadow: 0 5px 5px rgba(0,0,0,.18);
  pointer-events: none; /* 툴팁이 마우스 이벤트 먹지 않게 */
}
.img-tip img{ width:100%; height:100%; object-fit:cover; display:block; }


.table {
  width: 100%;
}

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


/* ===== Genuine table only ===== */
.genuine-table {
  table-layout: fixed;
  width: 100%;
}

.genuine-table th,
.genuine-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genuine-table th:nth-child(2),
.genuine-table td:nth-child(2) {
  width: 95px;
}

.genuine-table th:nth-child(9),
.genuine-table td:nth-child(9) {
  width: 95px;
}

/* === Genuine table column widths === */


.table th:nth-child(1),
.table td:nth-child(1) { width: 50px; }   /* ID */

.genuine-table.table th:nth-child(2),
.genuine-table.table td:nth-child(2) { width: 80px; }  /* 신청일시 */

.genuine-table.table th:nth-child(3),
.genuine-table.table td:nth-child(3) { width: 130px; }  /* 시리얼 */

.genuine-table.table th:nth-child(4),
.genuine-table.table td:nth-child(4) { width: 105px; }  /* 구매일 */

.genuine-table.table th:nth-child(5),
.genuine-table.table td:nth-child(5) { width: 200px;   }  /* 아이디 */

.genuine-table..table th:nth-child(6),
.genuine-table..table td:nth-child(6) { width: 70px; }  /* 이름 */

.genuine-table.table th:nth-child(7),
.genuine-table.table td:nth-child(7) { width: 120px; }  /* 휴대폰 */

.genuine-table.table th:nth-child(8),
.genuine-table.table td:nth-child(8) { width: 80px; }   /* 상태 */

.genuine-table.table th:nth-child(9),
.genuine-table.table td:nth-child(9) { width: 80px; }  /* 승인일시 */

.genuine-table.table th:nth-child(10),
.genuine-table.table td:nth-child(10) { width: 65px; }  /* 이미지 */

.table th:nth-child(11),
.table td:nth-child(11) { width: 180px; } /* 처리 */

.table th:nth-child(8),
.table td:nth-child(8) {
  text-align: center;
}

.genuine-table.table td:nth-child {
  font-size:14px;
}

.genuine-table.table td:nth-child(1) {
  font-size:14px;
}

.genuine-table.table td:nth-child(4) {
  font-size:14px;
}

.genuine-table .date-cell {
  white-space: normal;
  line-height: 1.2;
}

.genuine-table .date-day {
  font-size: 12px;
  color: #555;
}

.genuine-table .date-time {
  font-size: 11px;
  color: #999;
}


