/* vott 브랜드 토큰(원본: PAY/brand/tokens.css) */
:root {
  --vott-blue: #1D4ED8; --vott-blue-deep: #1E40AF; --vott-blue-soft: #3B6EF0; --vott-blue-100: #DBE4FF; --vott-blue-50: #EEF2FF;
  --ink-900: #0B1220; --ink-700: #3B4252; --ink-500: #6B7280; --ink-400: #9AA3B2; --ink-200: #D5D9E0; --ink-100: #ECEEF2;
  --paper-50: #F7F8FA; --paper-0: #FFFFFF;
  --status-handled: #1D4ED8; --status-handled-bg: #EEF2FF;
  --status-pending: #D97706; --status-pending-bg: #FFF7E6;
  --status-mismatch: #DC2626; --status-mismatch-bg: #FDECEC;
  --font-display: "Manrope", system-ui, -apple-system, sans-serif;
  --font-body: "Noto Sans KR", "Pretendard", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --shadow-card: 0 8px 24px -16px rgba(11,18,32,.25);
}

/* 화면에서 쓰는 이름 → 브랜드 토큰 */
:root {
  --blue: var(--vott-blue); --blue-hover: var(--vott-blue-deep); --blue-soft: var(--vott-blue-50);
  --ink: var(--ink-900); --ink-2: var(--ink-700); --sub: var(--ink-500); --hint: var(--ink-400); --faint: #B7BEC9;
  --line: var(--ink-200); --line-soft: var(--ink-100); --bg: var(--paper-50); --bg-2: #FBFBFC; --ws-bg: var(--paper-50);
  --ok: var(--status-handled); --ok-soft: var(--status-handled-bg);
  --warn: var(--status-pending); --warn-soft: var(--status-pending-bg);
  --err: var(--status-mismatch); --err-soft: var(--status-mismatch-bg);
  --radius: var(--radius-md);
}
* { box-sizing: border-box; }
/* 줄바꿈: 한글은 단어(어절) 단위로 내려가고, 끊을 데가 없는 긴 값만 강제로 끊음 */
body { margin: 0; font-family: var(--font-body); -webkit-font-smoothing: antialiased; color: var(--ink);
       word-break: keep-all; overflow-wrap: break-word; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
button { font: inherit; }
[hidden] { display: none !important; }
/* 금액·번호·주문번호도 본문과 같은 글꼴. 자릿수만 폭을 맞춰 숫자가 흔들리지 않게 함 */
.num { font-variant-numeric: tabular-nums; }
code { font-family: var(--font-mono); }
.muted { color: var(--sub); }
.hint { color: var(--hint); font-size: 12px; line-height: 1.5; }
.blue { color: var(--blue); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 10px;
       border: 1px solid transparent; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; opacity: .9; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-danger { background: #fff; color: var(--err); border: 1.5px solid #fecaca; }
.btn-text { background: none; border: none; color: var(--sub); font-weight: 600; height: auto; padding: 8px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 56px; font-size: 16px; border-radius: var(--radius); }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 폼 */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { height: 54px; width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 16px; font-size: 16px; color: var(--ink); background: #fff; outline: none; }
.input:focus { border-color: var(--blue); }
.input.sm { height: 44px; font-size: 14px; border-radius: 10px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
select.input.sm { padding-right: 34px; background-position: right 12px center; }
select.input:disabled { cursor: default; color: var(--hint); }
select.input::-ms-expand { display: none; }
.input.is-error { border-color: var(--err); }
.field-error { color: var(--err); font-size: 12px; }
.checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* 배지 */
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-blue { background: var(--vott-blue-100); color: var(--vott-blue-deep); }
.badge-gray { background: var(--line-soft); color: var(--sub); }

/* 알림 박스 */
.notice { padding: 14px 16px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.notice-ok { background: var(--ok-soft); color: var(--vott-blue-deep); }
.notice-warn { background: var(--warn-soft); color: #92400E; }
.notice-err { background: var(--err-soft); color: #991B1B; }
.notice-info { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }

/* 은행 아이콘 */
.bank-icon { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex: none; }
.bank-icon.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.bank-icon.has-img { background: #fff; overflow: hidden; box-shadow: 0 0 0 1px var(--line-soft); }
.bank-icon.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bank-icon-wrap { position: relative; display: block; }
/* 결제창 "앱 열어서 송금하기": 아이콘 조금 크게, 앱 이름은 한 줄로 */
[data-app-panel] .bank-icon { width: 64px; height: 64px; border-radius: 19px; }
[data-app-panel] .bank-item { font-size: 11px; letter-spacing: -.03em; white-space: nowrap; }
/* 은행 / 간편결제 전환: 흰 알약이 탭 사이를 움직이고, 앱 목록은 페이지처럼 넘어감 */
.app-tabs { position: relative; }
.app-tabs a { position: relative; z-index: 1; transition: color .2s ease; }
/* 뒤에 오는 `.tabs a.on`(흰 배경·그림자)을 이기도록 한 단계 더 좁게 — 배경과 그림자는 움직이는 알약이 담당 */
.tabs.app-tabs a.on { background: none; box-shadow: none; }
.app-pill { position: absolute; left: 0; top: 0; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .32s cubic-bezier(.34,1.1,.36,1), width .32s cubic-bezier(.34,1.1,.36,1); }
.app-panels { overflow: clip visible; transition: height .32s cubic-bezier(.2,.8,.3,1); }
.app-track { display: flex; align-items: flex-start; transition: transform .32s cubic-bezier(.2,.8,.3,1); }
/* min-width: 0 — 앱 이름을 한 줄로 두면 min-content가 커져서 페이지가 컨테이너보다 넓어짐 */
.app-page { flex: 0 0 100%; min-width: 0; }
/* 아주 좁은 화면(320px 등)에서는 64px 아이콘과 한 줄 이름이 4열에 안 들어가므로 3열로 */
@media (max-width: 349px) {
  .app-panels .app-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
[data-app-sec].app-static .app-pill,
[data-app-sec].app-static .app-panels,
[data-app-sec].app-static .app-track { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .app-pill, .app-panels, .app-track, .app-tabs a { transition: none; }
}
/* 토스 빠른 이체: 아이콘을 파란 선으로 감싸고(흰 틈 2px + 선 2px) 선 위로 태그가 튀어나옴 */
.bank-item.is-quick .bank-icon { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.quick-badge { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 800; line-height: 1;
  padding: 4px 7px; border-radius: 999px; background: var(--blue); color: #fff; box-shadow: 0 0 0 2px #fff; letter-spacing: -.02em;
  animation: quick-pop .5s .3s cubic-bezier(.2,.9,.3,1.5) both; }
@keyframes quick-pop { from { transform: translate(-50%, 8px) scale(.4); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .quick-badge { animation: none; } }
.bank-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }
.bank-grid .bank-item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer;
                        background: none; border: 2px solid transparent; border-radius: 16px; padding: 8px 2px; }
.bank-grid input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.bank-grid input[type=radio]:checked + .bank-item { border-color: var(--blue); background: var(--blue-soft); }
.bank-grid input[type=radio]:focus-visible + .bank-item { outline: 2px solid var(--blue); }
/* PC 결제창: 은행 앱을 열 수 없으니 앱 목록 대신 QR로 폰에 넘김(pay.js 가 PC에서만 보여 줌) */
.pay-qr { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.pay-qr .q { flex: none; width: 112px; height: 112px; padding: 8px; box-sizing: border-box; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-soft); }
.pay-qr .q svg { display: block; width: 100%; height: 100%; }
@media (max-width: 379px) { .pay-qr { flex-direction: column; align-items: flex-start; } }

/* ───────────── 인증(로그인·가입) ───────────── */
.auth-wrap { min-height: 100vh; background: var(--ws-bg); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
a.brand:hover { color: var(--ink); }
.brand-mark, .brand-lockup { display: block; flex: none; }
.brand-lockup { color: var(--ink-900); }
/* 마크의 V 획 색(어두운 배경을 쓰는 곳에서 --brand-v: #fff 로 바꿔 줌) */
.brand-v { stroke: var(--brand-v, #1D4ED8); }
.brand-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-stack small { font-size: 11px; color: var(--hint); font-weight: 500; letter-spacing: 0; padding-left: 1px; }

/* ───────────── 워크스페이스 ───────────── */
.ws { min-height: 100vh; background: var(--ws-bg); display: flex; }
.ws-side { width: 232px; flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.ws-side .brand { padding: 4px 8px 22px; }
.ws-side .brand small { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-nav { display: flex; flex-direction: column; gap: 4px; }
.ws-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.ws-nav a:hover { background: var(--bg-2); color: var(--ink); }
.ws-nav a.on { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.ws-nav a svg { flex: none; }
.ws-nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: #ef4444; color: #fff; padding: 2px 7px; border-radius: 999px; }
.ws-nav .sep { height: 1px; background: var(--line-soft); margin: 8px 4px; }
.ws-conn { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--status-handled); } .dot.warn { background: var(--status-pending); } .dot.err { background: var(--status-mismatch); } .dot.blue { background: var(--blue); }
.ws-conn b { display: block; font-size: 12px; }
.ws-conn span { font-size: 11px; color: var(--hint); }
.ws-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ws-top { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); background: #fff; gap: 16px; }
.ws-top h1 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ws-top-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; background: #fff; cursor: pointer; }
.icon-btn .pip { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ws-body { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title h2 { margin: 0; font-size: 15px; font-weight: 800; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 10px; }
.stat .k { font-size: 13px; color: var(--sub); }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat .s { font-size: 12px; color: var(--hint); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--hint); padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:first-child td { border-top: none; }
.table .right { text-align: right; }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.empty { padding: 36px 16px; text-align: center; color: var(--hint); font-size: 14px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 13px; gap: 12px; }
.kv:first-child { border-top: none; }
.kv .k { color: var(--hint); }
.kv .v { font-weight: 600; text-align: right; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 999px; }
.tabs a { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; color: var(--sub); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.usage { display: flex; align-items: center; gap: 14px; }
.usage-bar { width: 160px; height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.steps { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--hint); font-weight: 600; }
.steps .on { color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row .input { font-size: 14px; height: 44px; }
.secret { font-family: var(--font-mono); font-size: 13px; word-break: break-all; background: var(--bg-2); border: 1px dashed var(--line); padding: 12px 14px; border-radius: 10px; }
.notif-panel { position: absolute; right: 0; top: 46px; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px rgba(20,30,60,.12); z-index: 20; max-height: 420px; overflow: auto; }
.notif-panel .item { padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.notif-panel .item b { display: block; margin-bottom: 2px; }
.notif-panel .item.unread { background: #f8faff; }

/* 공유(링크 + QR) */
.share { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.share-qr { width: 168px; height: 168px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; flex: none; display: flex; align-items: center; justify-content: center; }
.share-qr img, .share-qr svg { width: 100%; height: 100%; image-rendering: pixelated; }
.share-body { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }
/* 요청 처리 → 환불 송금 화면: PC는 QR+링크, 휴대폰은 바로 여는 버튼 */
.refund-send { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); }
.refund-send-mobile { display: none; }
@media (max-width: 640px) {
  .refund-send { padding: 0; border: 0; background: none; }
  .refund-send-desk { display: none; }
  .refund-send-mobile { display: flex; }
}

/* ───────────── 고객 결제(모바일) ───────────── */
.pay-bg { background: var(--bg); }
.pay { width: 100%; max-width: 430px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: #fff; display: flex; flex-direction: column; position: relative; }
.pay-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 0; }
.pay-head .store { font-size: 14px; font-weight: 500; color: var(--hint); }
.pay-hero { padding: 36px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.pay-hero h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.45; letter-spacing: -.02em; }
/* 보낼 금액을 말하는 줄만 크게(앞줄 "○○은행 계좌로"는 원래 크기) */
.pay-hero h1 .big { font-size: 28px; letter-spacing: -.025em; }
@media (max-width: 359px) { .pay-hero h1 .big { font-size: 25px; } }
.pay-hero p { margin: 0; font-size: 14px; color: var(--sub); line-height: 1.6; }
.pay-sec { margin: 24px 24px 0; }
.pay-foot { margin-top: auto; padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.acct-card { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); gap: 12px; }
.acct-card .meta { font-size: 12px; color: var(--hint); }
.acct-card .no { font-size: 20px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
@media (max-width: 359px) { .acct-card .no { font-size: 17px; } }
.status-line { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--bg-2); border-radius: var(--radius-lg); }
.status-line .live { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--blue); }
.status-line .live .dot { background: var(--blue); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.summary { background: var(--bg-2); border-radius: var(--radius-lg); padding: 6px 18px; }
/* 요약 목록(상자 없이) · 구역 구분선 · 도움말 */
.plain-list .kv { padding: 10px 0; font-size: 14px; }
.plain-list .kv .k { color: var(--sub); }
.pay-divider { height: 8px; background: var(--bg); margin-top: 32px; flex: none; }
.pay-tip { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line-soft); font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.pay-tip svg { flex: none; margin-top: 2px; }
.pay-tip b { color: var(--ink); }
.row-link { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: var(--radius); background: var(--bg-2); font-size: 14px; font-weight: 600; color: var(--ink); border: none; width: 100%; cursor: pointer; text-align: left; }
.row-link:hover { background: var(--line-soft); color: var(--ink); }
.radio-list { display: flex; flex-direction: column; gap: 10px; }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.sheet-dim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 430px; background: #fff; border-radius: 22px 22px 0 0; padding: 12px 24px 24px; z-index: 41; display: flex; flex-direction: column; gap: 14px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 0 auto 6px; }
.sheet h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.4; letter-spacing: -.02em; }
.big-check { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; }
/* 완료 화면: 로고 마크의 V(체크)를 그리며 등장 */
/* 그림자는 SVG가 아닌 둥근 HTML 요소에: 브라우저에 따라 SVG의 둥근 모서리가 그림자에 적용되지 않아 네모나게 보이는 문제 방지 */
.success-mark { display: block; width: 84px; height: 84px; border-radius: 19.7px; box-shadow: 0 12px 30px rgba(29,78,216,.28); animation: success-pop .38s cubic-bezier(.2,.9,.3,1.3) both; }
.success-mark svg { display: block; }
.success-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: success-draw .45s .22s ease-out forwards; }
@keyframes success-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes success-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .success-mark, .success-mark path { animation: none; stroke-dashoffset: 0; } }
.legal-foot { padding: 0 24px 18px; font-size: 11px; color: var(--faint); text-align: center; }
.legal-foot a { color: var(--hint); text-decoration: underline; }

/* 워크스페이스·상점 전환, 팀원 권한 */
.ws-switch { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 14px; }
.ws-switch form { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-switch .input.sm { height: 36px; font-size: 13px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.perm-grid .checkbox { align-items: flex-start; }
.perm-grid .checkbox small { display: block; color: var(--hint); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .bar { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; position: relative; }
.meter .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 999px; }
.meter .bar i.warn { background: #f59e0b; }
.meter .bar i.err { background: #ef4444; }
.meter .bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.plan-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.on { border-color: var(--blue); background: var(--blue-soft); }

/* 모바일 메뉴(워크스페이스): 체크박스로 여닫아 JS 없이도 동작 */
.ws-nav-toggle, .ws-backdrop, .ws-menu-btn, .ws-side-account { display: none; }
.ws-side-account { align-items: center; gap: 10px; padding: 12px 8px 0; margin-top: 12px; border-top: 1px solid var(--line-soft); font-size: 12px; }
.ws-side-account b { display: block; font-size: 13px; }
.ws-side-account span:not(.avatar) { display: block; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .ws { flex-direction: column; }
  /* 운영자 콘솔: 가로로 접힌 메뉴 */
  .ws-side.ops { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
  .ws-side.ops .brand { padding: 0 8px 0 0; }
  .ws-side.ops .ws-nav { flex-direction: row; flex-wrap: wrap; }
  /* 워크스페이스: 왼쪽에서 열리는 서랍 */
  .ws-nav-toggle ~ .ws-side { position: fixed; left: 0; top: 0; bottom: 0; height: 100%; height: 100dvh; width: 280px; max-width: 86vw; z-index: 60;
    transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 0 40px rgba(20,30,60,.18); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .ws-nav-toggle:checked ~ .ws-side { transform: none; }
  .ws-nav-toggle:checked ~ .ws-backdrop { display: block; position: fixed; inset: 0; background: rgba(11,18,32,.42); z-index: 55; }
  html:has(.ws-nav-toggle:checked) { overflow: hidden; }
  .ws-nav-toggle ~ .ws-side .ws-conn { margin-top: 16px; }
  .ws-side-account { display: flex; }
  .ws-menu-btn { display: flex; flex: none; }
  .ws-top-desk, .ws-top-store { display: none !important; }

  .ws-top { position: sticky; top: 0; z-index: 30; height: 56px; padding-left: 12px; padding-right: 12px; gap: 10px; justify-content: flex-start; }
  .ws-top h1 { flex: 1; min-width: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ws-top-right { gap: 8px; }
  .ws-body { padding: 16px 12px 40px; gap: 12px; }
  .card { padding: 16px; border-radius: 16px; }
  .card-title { flex-wrap: wrap; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .notif-panel { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; max-height: 70vh; }

  /* 목록 위 필터: 탭은 가로 스크롤, 입력칸은 꽉 채움 */
  .toolbar { align-items: stretch; }
  .toolbar .tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .toolbar .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
  .toolbar > div:not(.tabs) { width: 100%; }
  .toolbar .input.sm { flex: 1 1 140px; width: auto !important; min-width: 0; }
  .usage { flex-wrap: wrap; gap: 8px 12px; }
  .usage > div:first-child { flex: 1 1 100%; }
  .usage-bar { flex: 1; width: auto; }
  .link-row { flex-direction: column; align-items: stretch !important; gap: 14px !important; }
  .link-row > form { align-self: flex-start; }
}

@media (max-width: 640px) {
  .grid-4 .stat .v { font-size: 22px; }
  .stat { gap: 6px; }
  .ws-app .ws-body [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .ws-app .ws-body [style*="min-width"] { min-width: 0 !important; }
  .ws-app .ws-body .input[style*="width"] { max-width: 100%; }
  .copy-row { flex-wrap: wrap; }
  .copy-row .input { flex: 1 1 100%; }
  .share-qr { width: 132px; height: 132px; }

  /* 표 → 카드: workspace.js가 머리글을 각 칸의 data-label로 붙임 */
  .ws-app .ws-body .table thead { display: none; }
  .ws-app .ws-body .table, .ws-app .ws-body .table tbody, .ws-app .ws-body .table tr { display: block; width: 100%; }
  .ws-app .ws-body .table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; background: #fff; }
  .ws-app .ws-body .table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 0; border: none; text-align: right; max-width: none !important; width: auto !important; white-space: normal !important; }
  .ws-app .ws-body .table tr td:first-child { border-top: none; }
  .ws-app .ws-body .card > .table-wrap .table tr:last-child { margin-bottom: 0; }
  .kv .k { flex: none; }

  /* 대시보드 실시간 피드: 한 건을 두 줄로 */
  .ws-app .ws-body .table.feed-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name amt" "meta badge"; column-gap: 12px; row-gap: 2px; padding: 10px 12px; }
  .ws-app .ws-body .table.feed-table td { display: block; padding: 0; text-align: left; }
  .ws-app .ws-body .table.feed-table td::before { content: none; }
  .ws-app .ws-body .table.feed-table td:nth-child(1) { grid-area: meta; font-size: 12px; }
  .ws-app .ws-body .table.feed-table td:nth-child(2) { grid-area: amt; text-align: right; }
  .ws-app .ws-body .table.feed-table td:nth-child(3) { grid-area: name; font-weight: 700; }
  .ws-app .ws-body .table.feed-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--hint); }
  .ws-app .ws-body .table.feed-table td:nth-child(5) { grid-area: badge; text-align: right; }
  .ws-app .ws-body .table.feed-table td.no-order { display: none; }
  .ws-app .ws-body .table.feed-table td[colspan] { grid-column: 1 / -1; grid-row: auto; }
  .ws-app .ws-body .table td::before { content: attr(data-label); flex: none; max-width: 40%; color: var(--hint); font-size: 12px; font-weight: 400; font-family: var(--font-body); text-align: left; padding-top: 1px; }
  .ws-app .ws-body .table td[data-label=""]::before, .ws-app .ws-body .table td:not([data-label])::before { content: none; }
  .ws-app .ws-body .table td > .cell-v { min-width: 0; overflow-wrap: anywhere; }
  .ws-app .ws-body .table td > .cell-v form { justify-content: flex-end; flex-wrap: wrap; }
  .ws-app .ws-body .table td:empty, .ws-app .ws-body .table td[data-empty] { display: none; }
  .ws-app .ws-body .table td[colspan] { display: block; text-align: center; }
  .ws-app .ws-body .table .row-actions { justify-content: flex-end; }
  .ws-app .ws-body .table-wrap { overflow: visible; }
}
