/* 회원·주문·식단표 화면 — site.css 위에 덧붙임 */

/* 머리글 계정 영역 */
.acct { display: flex; align-items: center; gap: 16px; font-size: 14.5px; font-weight: 600; }
.acct a, .acct button { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 4px 0; font: inherit; cursor: pointer; }
.acct a:hover, .acct button:hover { color: var(--ink); }
.acct .cart-link { color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.acct .cart-link b { min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }
.site-head .head-tel { margin-left: 4px; }

/* 데모 안내 띠 */
.demo-bar { background: var(--ink); color: #E8DCCD; font-size: 13.5px; text-align: center; padding: 8px 16px; }
.demo-bar b { color: #F3B48F; font-weight: 600; }

/* 화면 틀 */
.app { padding: 52px 0 120px; }
.app h1 { margin: 14px 0 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 800; }
.app .lead { margin: 12px 0 0; color: var(--muted); max-width: 620px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; margin-top: 36px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.panel + .panel { margin-top: 16px; }
.grid-2 > div, .grid-2 > div > div { display: grid; gap: 16px; align-content: start; }
.grid-2 .panel + .panel { margin-top: 0; }
[hidden] { display: none !important; }
.panel h2 { margin: 0 0 18px; font-size: 20px; letter-spacing: -0.02em; }
.panel h2 small { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 8px; }
.narrow { max-width: 520px; margin: 36px auto 0; }

/* 입력 */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label, .field > .lb { font-weight: 700; font-size: 15px; }
.field .hint { color: var(--muted); font-size: 13.5px; }
.field .err { color: #A3341A; font-size: 13.5px; font-weight: 600; }
.input, .select { width: 100%; height: 50px; border: 1px solid #D6C8B6; border-radius: 12px; background: #fff; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus, .select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184, 83, 42, .16); }
.input[readonly] { background: #F7F2EB; }
.row { display: flex; gap: 8px; }
.row > .input { flex: 1; }

/* 고르기 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: grid; place-items: center; min-width: 54px; height: 46px; padding: 0 16px; border: 1px solid #D6C8B6; border-radius: 12px; background: #fff; font-weight: 600; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(184, 83, 42, .3); }
.chip input:disabled + span { opacity: .4; }
.chip.wide span { min-width: 0; height: auto; padding: 14px 16px; text-align: left; place-items: start; }
.chip.wide small { display: block; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.chip.wide input:checked + span small { color: #CDBFAF; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 2px 0 0; flex: none; }
.check a { color: var(--accent-deep); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .18s ease, transform .12s ease; }
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: scale(.97); }
.btn:disabled { background: #CDBFAF; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #CDBFAF; }
.btn.ghost:hover { background: #EBE1D3; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #3A2E25; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-deep); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.foot-links { text-align: center; margin-top: 18px; color: var(--muted); font-size: 15px; }
.foot-links a { color: var(--accent-deep); font-weight: 600; }

/* 주문 요약 */
.summary { position: sticky; top: 100px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15.5px; }
.sum-row span:first-child { color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; font-weight: 800; }
.sum-total b { font-size: 28px; letter-spacing: -0.02em; color: var(--accent-deep); }
.notice { background: #F4E7DA; border-radius: 14px; padding: 14px 16px; font-size: 14.5px; color: var(--accent-deep); margin: 14px 0; }
.notice.gray { background: #EFE8DE; color: var(--muted); }

/* 배송 일정 */
.dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dates li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.dates li b { display: block; font-size: 15px; }
.dates li span { color: var(--muted); }
.dates li.done { opacity: .55; }
.dates li.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* 달력 */
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.cal-top h2 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.cal-top .nav { display: flex; gap: 8px; }
.cal { display: grid; grid-template-columns: .55fr repeat(5, 1fr) .55fr; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper); }
.cal .wd { background: #EBE1D3; font-weight: 700; font-size: 14px; padding: 10px 12px; }
.cal .wd.sun { color: #A3341A; }
.cal .day { min-height: 150px; padding: 10px 12px 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; }
.cal .day:nth-child(7n + 1) { border-left: 0; }
.cal .day .dn { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.cal .day.off { background: #F3ECE2; color: #A8998A; }
.cal .day.blank { background: #F3ECE2; }
.cal .day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .day.mine { background: #FFF7EF; }
.cal .tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--badge); color: var(--accent-deep); }
.cal .soup { display: block; margin: 6px 0 4px; font-weight: 700; color: var(--accent-deep); }
.cal .soup::before { content: "국 "; font-weight: 600; color: var(--muted); font-size: 12px; }
.cal .m { display: block; color: var(--ink); }
.cal .m.hot { font-weight: 700; }
.cal .hol { color: #A3341A; font-weight: 600; font-size: 12.5px; }
.cal-list { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13.5px; margin-top: 12px; }

/* 장바구니 */
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-item h3 { margin: 0; font-size: 17.5px; }
.cart-item p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.cart-item .price { font-weight: 800; font-size: 18px; text-align: right; }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty .btn { margin-top: 18px; }

/* 결제창(데모) */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(30, 23, 18, .55); display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .sheet { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 22px; padding: 26px; transform: translateY(12px) scale(.98); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.modal.open .sheet { transform: none; }
.modal .pg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal .pg-head b { font-size: 18px; }
.modal .pg-amt { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 16px; }
.modal .pg-demo { background: #FCE9E3; color: #A3341A; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }
.modal .close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.postcode-layer { width: 100%; height: 470px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

/* 주문 내역 */
.order { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 20px 22px; margin-bottom: 12px; }
.order-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: center; }
.order-top b { font-size: 16.5px; }
.order-top small { color: var(--muted); }
.status { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #EFE8DE; color: var(--muted); }
.status.pay { background: #FCE9E3; color: #A3341A; }
.status.ok { background: #E3EEDD; color: #3C6A2E; }
.status.run { background: var(--ink); color: var(--bg); }
.order details { margin-top: 12px; }
.order summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); font-size: 15px; }
.order .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* 관리자 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.kpi span { color: var(--muted); font-size: 14px; }
.kpi b { display: block; font-size: 30px; letter-spacing: -0.02em; margin-top: 2px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #fff; }
.adm-table th, .adm-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { background: #EBE1D3; font-size: 13.5px; white-space: nowrap; }
.adm-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.adm-tools .input, .adm-tools .select { width: auto; height: 42px; }

@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .acct { gap: 12px; font-size: 13.5px; order: 2; margin-left: auto; }
  .site-head .head-tel { display: none; }
  .app { padding: 32px 0 90px; }
  .panel { padding: 22px 18px; border-radius: 16px; }
  .cal { display: none; }
  .cal-list { display: grid; gap: 8px; }
  .cal-list .day { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; }
  .cal-list .day.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .cal-list .dn { font-weight: 700; display: flex; justify-content: space-between; }
  .cal-list .soup { display: block; margin: 4px 0 2px; font-weight: 700; color: var(--accent-deep); }
  .cal-list .soup::before { content: "국 "; font-weight: 600; color: var(--muted); font-size: 12px; }
  .cal-list .m { color: var(--ink); }
  .cal-list .m.hot { font-weight: 700; }
  .cal-list .m + .m::before { content: " · "; color: #C9BBA9; }
  .cal-list .tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--badge); color: var(--accent-deep); }
  .cal-top h2 { font-size: 22px; white-space: nowrap; }
  .cal-top .nav { gap: 6px; }
  .cal-top .nav .btn { padding: 0 12px; font-size: 14px; }
  .cart-item { grid-template-columns: 1fr; }
  .cart-item .price { text-align: left; }
  .adm-wrap { overflow-x: auto; }
}

/* 관리자: 식단 등록·추가 반찬 */
.menu-form { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #FBF7F1; }
.menu-form h3 { margin: 0 0 14px; font-size: 17px; }
.menu-form .field > label small { font-weight: 500; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adm-table tr.on td { background: #FBF1E4; }
.adm-table .input.sm { height: 38px; font-size: 14.5px; padding: 0 10px; min-width: 120px; }
.bulk { margin-top: 18px; }
.bulk summary { cursor: pointer; font-weight: 700; }
.bulk textarea { height: auto; padding: 12px 14px; margin: 10px 0; font-size: 14.5px; line-height: 1.5; resize: vertical; }

/* 추가 반찬 주문 */
.side-list { display: grid; gap: 10px; }
.side-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid #D6C8B6; border-radius: 12px; background: #fff; transition: border-color .15s ease; }
.side-row.picked { border-color: var(--ink); }
.side-row b { display: block; }
.side-row small { color: var(--muted); font-size: 13.5px; }
.qty { display: flex; align-items: center; gap: 4px; flex: none; }
.qty button { width: 40px; height: 40px; border: 1px solid #D6C8B6; border-radius: 10px; background: #fff; font: inherit; font-size: 18px; color: var(--ink); cursor: pointer; transition: transform .1s ease; }
.qty button:active { transform: scale(.96); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; }
.adm-table td:first-child { white-space: nowrap; }

/* 식단표: 내 배송일·추가 반찬 */
.cal-view { margin: 0 0 14px; }
.legend .tag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--badge); color: var(--accent-deep); }
.cal .tag.side, .cal-list .tag.side, .legend .tag.side { background: #E3EBD9; color: #3F5A2E; }
.cal .add, .cal-list .add, .legend .add { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #3F5A2E; }
.cal .add::before, .cal-list .add::before, .legend .add::before { content: "+ 추가 "; font-weight: 600; color: #7C8F6B; }
.legend .add { display: inline; margin: 0; }
.cal .day.quiet { color: #B5A897; }
@media (max-width: 760px) { .cal-list .add { display: block; } }
