/* PLIBEE POS — 밝고 따뜻한 미니멀 (플리비 공통 색) */
:root {
  --orange: #f59a19;
  --orange-dark: #d9840c;
  --orange-soft: rgba(245, 154, 25, 0.08);
  --orange-soft2: rgba(245, 154, 25, 0.16);
  --ink: #252724;
  --muted: #82847e;
  --line: #e9eae5;
  --paper: #fafbf8;
  --white: #ffffff;
  --danger: #c4473a;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.accent { color: var(--orange-dark); }

/* ----- 버튼 ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  background: none; cursor: pointer; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:not(:disabled):hover { background: var(--orange-dark); }
.btn-secondary { background: var(--ink); color: var(--white); }
.btn-secondary:not(:disabled):hover { background: #3a3d38; }
.btn-outline { border-color: var(--line); background: var(--white); }
.btn-outline:not(:disabled):hover { background: var(--orange-soft); border-color: var(--orange-soft2); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: var(--orange-soft); color: var(--ink); }
.btn-danger-text { color: var(--danger); padding: 0 8px; }
.btn-danger-text:hover { background: rgba(196, 71, 58, .08); }
:focus-visible { outline: 3px solid var(--orange-soft2); outline-offset: 2px; }

/* ----- 입력 ----- */
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.field input {
  height: 48px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  font-size: 16px; /* 16px 미만이면 아이폰에서 확대됨 */
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft2); }
.field-row { display: flex; gap: 12px; }
.field-narrow { flex: 0 0 120px; }
.form-error { color: var(--danger); font-size: 14px; }

/* ----- 브랜드 ----- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-center { justify-content: center; }
.brand-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--orange); color: var(--white);
}
.brand-title { font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.brand-sub { font-size: 13px; color: var(--muted); }

/* ----- 로그인 ----- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px; padding: 36px 28px 28px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.pin-input { letter-spacing: .6em; text-align: center; font-size: 22px !important; }
.login-help { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }

/* ----- POS 레이아웃 ----- */
.pos { max-width: 1120px; margin: 0 auto; padding: 20px 16px 32px; }
.pos-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.header-right { display: flex; align-items: center; gap: 12px; }
.today {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 14px; border-radius: 999px; background: var(--orange-soft);
}
.today-label { font-size: 13px; color: var(--muted); }
.today strong { color: var(--orange-dark); }
.today-detail { font-size: 12px; color: var(--muted); }

.pos-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 22px; align-items: start; }
@media (max-width: 860px) { .pos-body { grid-template-columns: 1fr; } }
.panel { min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; min-height: 36px; }
.panel-head h2 { font-size: 18px; font-weight: 700; }

/* ----- 시술 목록 ----- */
.cat-title { font-size: 14px; color: var(--muted); margin: 14px 0 8px; }
.cat-title:first-child { margin-top: 0; }
.svc {
  display: flex; align-items: stretch; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  transition: background .15s, border-color .15s;
}
.svc:hover { background: var(--orange-soft); border-color: var(--orange-soft2); }
.svc.in-cart { border-color: var(--orange); }
.svc-main {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 6px 12px 14px; border: 0; background: none; cursor: pointer; text-align: left;
}
.svc-name { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.svc-list { display: block; font-size: 12px; color: var(--muted); }
.svc-right { display: flex; align-items: center; gap: 8px; flex: none; }
.svc-price { font-size: 17px; font-weight: 700; color: var(--orange-dark); }
.svc-rate { font-size: 11px; font-weight: 700; color: var(--orange-dark); background: var(--orange-soft2); border-radius: 999px; padding: 1px 7px; }
.svc-plus { font-size: 20px; color: var(--muted); line-height: 1; }
.svc-edit {
  flex: none; width: 40px; border: 0; border-left: 1px solid var(--line); background: none;
  color: var(--muted); cursor: pointer; border-radius: 0 var(--radius) var(--radius) 0;
}
.svc-edit:hover { color: var(--ink); background: var(--orange-soft2); }

.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--white); }
.empty-title { font-weight: 700; font-size: 16px; }
.empty-text { color: var(--muted); font-size: 14px; margin: 8px 0 18px; }

/* ----- 장바구니 ----- */
.cart { list-style: none; margin: 0; padding: 0; min-height: 40px; }
.cart li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.cart-name { font-weight: 500; overflow-wrap: anywhere; }
.cart-sub { font-size: 12px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 6px; flex: none; }
.qty button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 18px; line-height: 1;
}
.qty button:hover { background: var(--orange-soft); }
.qty span { min-width: 22px; text-align: center; font-weight: 600; }
.cart-empty { font-size: 14px; padding: 8px 0 4px; }

.totals { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.row-strong span { font-size: 17px; font-weight: 700; }
.row-strong strong { font-size: 24px; }

.cash-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cash-box .field input { font-size: 18px; text-align: right; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); cursor: pointer; font-size: 13px;
}
.chip:hover { background: var(--orange-soft); border-color: var(--orange-soft2); }
.short { color: var(--danger) !important; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 10px; }
.actions .btn { min-height: 52px; font-size: 16px; }
.note { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }

/* ----- 팝업 ----- */
.dialog {
  width: min(460px, calc(100vw - 32px)); padding: 24px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--white); color: var(--ink);
}
.dialog-sm { width: min(380px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(37, 39, 36, .35); }
.dialog h3 { font-size: 18px; margin-bottom: 18px; }
.dialog form { display: flex; flex-direction: column; gap: 14px; }
.dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.spacer { flex: 1; }
.preview { font-size: 14px; color: var(--muted); }
.preview strong { color: var(--orange-dark); font-size: 16px; }
.confirm-body { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.confirm-body .big { font-size: 26px; font-weight: 800; color: var(--orange-dark); }

/* ----- 알림 ----- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--white); font-size: 15px; z-index: 10;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}
