/* ShopMaster platform console — small additions on top of the shared admin kit (/_kit/admin.css). */

/* ---------- page helpers ---------- */
.pf-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 0 10px; }
.pf-section-title h2 { font-size: 15px; }
.pf-muted-box { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text-2); }
.pf-help { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.pf-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-actions form { display: inline-flex; }
.pf-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); white-space: nowrap; max-width: 100%; }
.pf-chip .host { overflow: hidden; text-overflow: ellipsis; }
.pf-chip.primary { border-color: var(--accent); }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.pf-dot.ok { background: var(--success); }
.pf-dot.warn { background: #F59E0B; }
.pf-dot.bad { background: var(--danger); }
.pf-dot.info { background: var(--accent); }
.pf-break { overflow-wrap: break-word; }
/* stores list: names break only between words (P10 — the kit's overflow-wrap:anywhere let the table squeeze the 테마 column to
   'Shop/Mast/er'). On desktop the buttons sit in a fixed 2×2 grid (설정 always bottom right): wrapping freely, the auto table
   layout squeezed them onto three or four lines and every row grew to ~123px (review R6). The stacked phone layout wraps. */
@media (min-width: 721px) {
  .table.pf-stores .row-actions { display: grid; grid-template-columns: repeat(2, max-content); justify-content: end; }
  .table.pf-stores .row-actions > :last-child { grid-column: 2; }
}
.pf-url { display: block; max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kit-platform .check input { flex: none; }
.kit-platform .table th.num, .kit-platform .table td.num { text-align: right; }
.field textarea.pf-mono, .field input.pf-mono, .input.pf-mono { font-family: var(--mono); font-size: 13px; }
.field textarea.pf-mono { min-height: 76px; }
.pf-warn-text, .kit-platform .table .title-cell .meta.pf-warn-text { color: var(--danger); }
.pf-nowrap { white-space: nowrap; }
.pf-stat-link { color: inherit; display: block; }
.pf-stat-link:hover { text-decoration: none; }
.pf-stat-link:hover .stat { border-color: var(--accent); }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.grid-main-side > aside .dl { grid-template-columns: 104px minmax(0, 1fr); }
.pf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .pf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- code / commands ---------- */
pre.pf-code { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; overflow: auto; max-height: 460px; white-space: pre; color: var(--text); }
pre.pf-code.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
pre.pf-code.tall { max-height: 72vh; }
.pf-cmd { display: flex; gap: 8px; align-items: stretch; }
.pf-cmd code { flex: 1; min-width: 0; display: block; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; white-space: nowrap; }
.pf-cmd .btn { flex: none; }

/* ---------- warnings / steps ---------- */
.pf-warnings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pf-warnings li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.pf-warnings li:last-child { border-bottom: 0; }
.pf-warnings .msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pf-warnings .pf-dot { margin-top: 7px; }
.pf-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.pf-steps li { padding-left: 4px; }
.pf-steps li strong { display: block; margin-bottom: 2px; }
.pf-callout { border: 1px solid rgba(37, 99, 235, .35); background: var(--accent-soft); border-radius: var(--radius); padding: 16px; }
.pf-callout h2 { margin-bottom: 10px; }

/* ---------- stacked tables on phones: each row becomes a compact key/value card ---------- */
@media (max-width: 720px) {
  .table.pf-stack thead { display: none; }
  .table.pf-stack, .table.pf-stack tbody, .table.pf-stack tr, .table.pf-stack td { display: block; width: 100%; }
  .table.pf-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table.pf-stack tbody tr:last-child { border-bottom: 0; }
  .table.pf-stack td { border: 0; padding: 3px 0; text-align: left; }
  .table.pf-stack td[data-label] { position: relative; padding-left: 92px; min-height: 26px; }
  .table.pf-stack td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 84px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.4; }
  .kit-platform .table.pf-stack td.num { text-align: left; }
  .table.pf-stack td.title-cell { padding-bottom: 6px; }
  .table.pf-stack .row-actions { justify-content: flex-start; flex-wrap: wrap; white-space: normal; padding-top: 6px; }
  .table.pf-stack td.pf-hide-sm { display: none; }
  .table.pf-stack .ellipsis, .table.pf-stack .pf-url { max-width: 100%; }
}

/* ---------- forms ---------- */
.pf-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-inline .input { width: auto; flex: 1 1 160px; min-width: 0; }
.pf-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.pf-store-pick { display: flex; flex-direction: column; gap: 8px; }
.pf-store-pick .pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name est" "cat cat"; gap: 6px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pf-store-pick .pick .check { grid-area: name; min-width: 0; }
.pf-store-pick .pick select { grid-area: cat; }
.pf-store-pick .pick .est { grid-area: est; color: var(--muted); font-size: 12.5px; white-space: nowrap; text-align: right; }
details.pf-details > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
details.pf-details[open] > summary { margin-bottom: 8px; }
.pf-danger-zone { border-color: rgba(220, 38, 38, .35); }
.pf-danger-zone .card-head { color: var(--danger); }

/* ---------- themes ---------- */
.pf-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pf-theme-grid .theme-card .preview { display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.pf-theme-grid .theme-card .preview img { width: 100%; height: 100%; object-fit: cover; }
.pf-theme-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, #1F2937, #374151 55%, #2563EB); color: #fff; text-align: center; padding: 16px; }
.pf-theme-placeholder strong { font-size: 18px; letter-spacing: -.01em; }
.pf-theme-placeholder span { font-size: 12px; opacity: .75; }
.pf-theme-errors { margin: 8px 0 0; padding-left: 18px; color: var(--danger); font-size: 12.5px; }
.pf-upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-upload input[type="file"] { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 13px; padding: 7px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.pf-upload-result { margin-top: 10px; }

/* ---------- catalog ---------- */
.pf-thumb-ph { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--neutral-soft); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.pf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pf-gallery a { display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--neutral-soft); }
.pf-gallery img { width: 100%; height: 100%; object-fit: cover; }
.pf-desc-frame { width: 100%; min-height: 360px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }

/* ---------- login ---------- */
.pf-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pf-login-brand .mark { width: 36px; height: 36px; border-radius: 9px; background: #1F2937; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.pf-login-brand strong { display: block; font-size: 16px; }
.pf-login-brand span { display: block; color: var(--muted); font-size: 12.5px; }
.kit-bare .stack > .btn-block { margin-top: 4px; }
.pf-foot-note { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- go-live checklist (store page), the one error summary of a form, screen-reader text ---------- */
.pf-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pf-checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; }
.pf-checklist .detail { grid-column: 2 / -1; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.pf-attention { border-color: rgba(220, 38, 38, .35); }
.pf-error-summary b { display: block; }
.pf-error-summary ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.pf-error-summary a { color: inherit; text-decoration: underline; }
.pf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pf-alert-list { margin: 6px 0 0; padding-left: 18px; }
.pf-alert-list li { overflow-wrap: anywhere; }
