
:root {
  --bg: #0b1020;
  --panel: #141b34;
  --panel-2: #1c2546;
  --panel-3: #222d58;
  --border: rgba(255,255,255,0.08);
  --text: #eef2ff;
  --muted: #9aa6c6;
  --primary: #5b8cff;
  --primary-2: #76a1ff;
  --success: #23c16b;
  --warning: #f7b731;
  --danger: #ff5d73;
  --shadow: 0 18px 48px rgba(0,0,0,0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(91,140,255,0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(118,161,255,0.18), transparent 24%),
    linear-gradient(180deg, #090e1c 0%, #0b1020 100%);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
input, select, textarea { width: 100%; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.container { width: min(100% - 32px, var(--container)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px);
  background: rgba(9, 14, 28, 0.72); border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .02em; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: var(--shadow); color: white; font-weight: 900;
}
.nav-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-links a { padding: 10px 14px; border-radius: 999px; color: var(--muted); transition: .18s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn {
  border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 700; cursor: pointer;
  transition: transform .16s ease, opacity .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn-secondary { color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--border); }
.btn-danger { color: white; background: linear-gradient(135deg, #ff5d73, #ff7f63); }
.btn-success { color: white; background: linear-gradient(135deg, #22b66e, #23c16b); }
.card, .panel, .metric, .table-card, .step-card {
  background: linear-gradient(180deg, rgba(24,32,60,0.94), rgba(16,21,40,0.98));
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card, .panel, .table-card { padding: 24px; }
.metric { padding: 20px; }
.step-card { padding: 20px; }
.hero { padding: 56px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 24px; }
.hero h1, .page-title h1 { margin: 0 0 14px; font-size: clamp(30px, 6vw, 48px); line-height: 1.08; }
.hero p, .page-title p, .muted, .helper, .small { color: var(--muted); line-height: 1.7; }
.hero-actions, .inline-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-stats, .metrics, .quick-grid, .info-grid, .form-grid, .list-grid, .status-grid, .detail-grid, .feature-grid, .tile-grid, .summary-grid {
  display: grid; gap: 16px;
}
.hero-stats, .metrics, .quick-grid, .feature-grid, .tile-grid, .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info-grid, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-value { font-size: 28px; font-weight: 800; margin-top: 10px; }
.section { padding: 18px 0 36px; }
.section-header { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:16px; }
.page-shell { padding: 24px 0 48px; }
.page-title {
  display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin: 0 0 24px;
}
.footer { padding: 28px 0 42px; color: var(--muted); text-align:center; }
.field { display:flex; flex-direction:column; gap:8px; }
.field label { font-weight: 700; }
.input, .select, .textarea {
  border:1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text);
  border-radius: 14px; padding: 14px 16px; outline:none;
}
.textarea { min-height: 120px; resize: vertical; }
.notice {
  padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.05); border:1px solid var(--border);
}
.notice.success { border-color: rgba(35,193,107,.35); background: rgba(35,193,107,.08); }
.notice.warning { border-color: rgba(247,183,49,.35); background: rgba(247,183,49,.08); }
.notice.danger { border-color: rgba(255,93,115,.35); background: rgba(255,93,115,.08); }
.table-wrap { overflow:auto; }
.table { width:100%; border-collapse: collapse; min-width: 760px; }
.table th, .table td { text-align:left; padding: 14px 12px; border-bottom:1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 700; }
.filters { display:flex; flex-wrap:wrap; gap:10px; margin: 0 0 18px; }
.filter-pill {
  display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px; cursor:pointer;
  background: rgba(255,255,255,.05); color: var(--muted); border:1px solid var(--border);
}
.filter-pill.active { color:var(--text); background: rgba(91,140,255,.18); border-color: rgba(91,140,255,.36); }
.status-badge {
  display:inline-flex; align-items:center; justify-content:center; padding:8px 12px; border-radius:999px;
  font-size:13px; font-weight:800; white-space: nowrap; border:1px solid transparent;
}
.status-pending, .status-submitted { background: rgba(255,255,255,.08); color: var(--text); border-color: var(--border); }
.status-quoted, .status-deposit_pending, .status-approved { background: rgba(91,140,255,.14); color: #b6cbff; border-color: rgba(91,140,255,.35); }
.status-deposit_detected, .status-confirming, .status-settlement_pending { background: rgba(247,183,49,.14); color: #ffd273; border-color: rgba(247,183,49,.35); }
.status-funded, .status-completed, .status-confirmed { background: rgba(35,193,107,.14); color: #84f0b2; border-color: rgba(35,193,107,.35); }
.status-rejected, .status-cancelled, .status-failed, .status-flagged, .status-underpaid, .status-overpaid, .status-expired { background: rgba(255,93,115,.14); color: #ff9aaa; border-color: rgba(255,93,115,.35); }
.kv { display:grid; gap:12px; }
.kv-item { display:flex; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.kv-key { color:var(--muted); }
.kv-value { font-weight:700; text-align:right; word-break:break-all; }
.copy-row { display:flex; gap:12px; align-items:center; }
.copy-row .input { flex:1; }
.auth-shell { width:min(100% - 32px, 640px); margin: 40px auto 48px; }
.auth-links { display:flex; gap:16px; justify-content:center; margin-top:18px; }
.loading { display:inline-flex; align-items:center; gap:10px; color: var(--muted); }
.loading::before { content:''; width:16px; height:16px; border-radius:50%; border:2px solid rgba(255,255,255,.18); border-top-color: var(--primary); animation: spin 1s linear infinite; }
.error-text { color: #ff9aaa; }
.success-text { color: #84f0b2; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.empty-state { text-align:center; padding: 36px 20px; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 980px) {
  .hero-grid, .info-grid, .detail-grid, .hero-stats, .metrics, .quick-grid, .feature-grid, .tile-grid, .summary-grid, .form-grid, .status-grid { grid-template-columns: 1fr; }
  .page-title, .section-header, .nav-wrap { flex-direction:column; align-items:flex-start; }
  .nav-links, .nav-actions { width:100%; }
  .copy-row { flex-direction:column; }
  .copy-row .btn { width:100%; }
}
