/* Checkout, order/receipt and admin pages */
.co-page { background: var(--panel); min-height: 100vh; }
.co-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.co-head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li + li::before { content: ""; width: 18px; height: 1.5px; background: var(--line); }
.steps li.on { color: var(--ink); }
.steps li.done { color: var(--emerald-2); }
.co-main { padding-block: 28px 64px; }
.back { display: inline-block; margin-bottom: 16px; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--ink); }
.co-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 24px; align-items: start; }
.co-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.co-card.center { text-align: center; max-width: 560px; margin: 24px auto; }
.co-card.center .btn { margin-top: 10px; }
.co-card h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 900; text-transform: uppercase; line-height: 1.05; }
.co-card h2 { font-size: 18px; font-weight: 900; text-transform: uppercase; margin-bottom: 14px; }
.co-sub { color: var(--muted); margin: 8px 0 22px; }
.co-fine { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.co-loading { text-align: center; color: var(--muted); padding: 80px 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 14px; }
.field label { font-weight: 700; font-size: 13.5px; }
.opt { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.co-err { background: #FBE5E3; color: #A52720; padding: 10px 14px; border-radius: var(--r-sm); font-size: 14px; margin: 0 0 14px; }
.co-go { padding-block: 16px; font-size: 15px; }

.co-sum { position: sticky; top: 20px; }
.sum-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sum-img { position: relative; width: 56px; height: 56px; border-radius: 10px; background: var(--stone); }
.sum-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.sum-img i { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: var(--pill); background: var(--ink); color: var(--paper); font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sum-name { display: flex; flex-direction: column; }
.sum-name small { color: var(--muted); }
.sum-name em { color: #A52720; font-style: normal; font-weight: 700; }
.co-empty { color: var(--muted); }
.totals { margin: 14px 0 0; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; font-size: 18px; }
.totals .grand dt { color: var(--ink); font-weight: 800; }
.totals .grand dd { font-weight: 900; }
.co-ship { font-size: 13px; color: var(--emerald-2); font-weight: 600; margin: 10px 0 0; }

/* bank transfer box */
.bank { border: 2px solid var(--pitch); border-radius: var(--r-md); overflow: hidden; margin-bottom: 22px; }
.bank-amt { background: var(--pitch); color: var(--onpitch); padding: 18px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bank-amt span { width: 100%; font-size: 12px; letter-spacing: .02em; opacity: .75; }
.bank-amt b { font-size: 32px; font-weight: 900; color: var(--emerald); line-height: 1; }
.bank-amt .copy { background: rgba(255, 255, 255, .12); color: var(--onpitch); border-color: rgba(255, 255, 255, .3); }
.bank-rows { margin: 0; padding: 6px 20px; }
.bank-rows div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bank-rows div:last-child { border-bottom: 0; }
.bank-rows dt { color: var(--muted); font-size: 14px; }
.bank-rows dd { margin: 0; font-weight: 700; text-align: right; display: flex; align-items: center; gap: 10px; }
.bank-rows dd.big { font-size: 20px; letter-spacing: .04em; }
.copy { font: inherit; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; letter-spacing: 0; }
.copy:hover { border-color: var(--ink); }
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: 14px; }
.alert.warn { background: #FFF4DA; color: #7A5200; }

/* waiting */
.wait p { color: var(--muted); }
.wait p b { color: var(--ink); }
.spinner { width: 54px; height: 54px; margin: 6px auto 18px; border-radius: 50%; border: 5px solid var(--stone); border-top-color: var(--emerald); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* receipt */
.receipt { max-width: 760px; margin: 0 auto; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px dashed var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.rc-head .word { font-size: 28px; }
.rc-head small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; }
.paid-stamp { border: 2.5px solid var(--emerald-2); color: var(--emerald-2); font-weight: 900; letter-spacing: .04em; padding: 6px 14px; border-radius: 8px; rotate: -6deg; }
.rc-ok { display: flex; gap: 14px; align-items: center; background: #E7F7EE; border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 20px; }
.rc-ok > span { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--emerald); color: #08130B; font-weight: 900; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.rc-ok h1 { font-size: 20px; }
.rc-ok p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.rc-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin: 0 0 20px; }
.rc-meta dt { color: var(--muted); font-size: 12px; letter-spacing: .01em; font-weight: 700; }
.rc-meta dd { margin: 2px 0 0; }
.rc-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.rc-items th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 6px; }
.rc-items td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
.rc-items th:last-child, .rc-items td:last-child { text-align: right; }
.rc-to { margin-top: 20px; }
.rc-to h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.rc-to p { margin: 6px 0 0; }
.rc-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
@media print {
  .co-head, .rc-acts, .back { display: none !important; }
  .co-page { background: #fff; }
  .co-card { border: 0; padding: 0; }
}

/* admin */
.adm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.adm-tabs { justify-content: flex-start; margin: 0 0 20px; }
.adm-tabs i { font-style: normal; background: var(--emerald); color: #08130B; border-radius: var(--pill); padding: 0 7px; margin-left: 4px; font-size: 11px; }
.adm-tabs i:empty { display: none; }
.adm-live { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.adm-live.on { color: var(--emerald-2); }
.adm-live.on .dot { background: var(--emerald); animation: pulse 2s infinite; }
.adm-list { display: grid; gap: 16px; }
.adm-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.adm-order { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.adm-order.s-payment_submitted { border-left-color: #F2B51B; }
.adm-order.s-confirmed { border-left-color: var(--emerald); }
.adm-order.s-rejected { border-left-color: #D6342C; }
.adm-order.s-delivered { border-left-color: var(--pitch); }
.adm-order header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-id { font-size: 18px; font-weight: 900; }
.adm-status { font-size: 11px; font-weight: 800; letter-spacing: .02em; background: var(--stone); padding: 4px 10px; border-radius: var(--pill); }
.s-payment_submitted .adm-status { background: #FFF4DA; color: #7A5200; }
.s-confirmed .adm-status { background: #E7F7EE; color: var(--emerald-2); }
.s-rejected .adm-status { background: #FBE5E3; color: #A52720; }
.adm-order time { margin-left: auto; color: var(--muted); font-size: 13px; }
.adm-body { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 18px; font-size: 14px; }
.adm-body h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.adm-body p { margin: 0; }
.adm-body ul { margin: 0; padding-left: 18px; }
.adm-note { margin-top: 6px !important; color: #7A5200; }
.adm-total { font-size: 22px !important; font-weight: 900; margin-bottom: 4px !important; }
.adm-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .co-grid { grid-template-columns: 1fr; }
  .co-sum { position: static; order: -1; }
  .adm-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps li + li::before { width: 8px; }
  .steps { font-size: 11px; }
  .field-row { flex-direction: column; gap: 0; }
  .co-card { padding: 20px; }
  .bank-rows dd.big { font-size: 17px; }
  .rc-meta { grid-template-columns: 1fr; }
}
