/* ==========================================================================
   OTPSMART — User Dashboard
   Self-contained stylesheet (no Tailwind rebuild needed). Prefix: up-
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --up-accent: #2563eb;
    --up-accent-hover: #1d4ed8;
    --up-accent-soft: #eff4ff;

    --up-ink: #0f172a;
    --up-text: #334155;
    --up-muted: #64748b;
    --up-faint: #94a3b8;
    --up-line: #e5e9f0;
    --up-line-soft: #f0f2f6;
    --up-surface: #ffffff;
    --up-subtle: #f8fafc;

    --up-green: #16a34a;
    --up-green-soft: #f0fdf4;
    --up-amber: #d97706;
    --up-amber-soft: #fffbeb;
    --up-red: #dc2626;
    --up-red-soft: #fef2f2;

    --up-radius: 14px;
    --up-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
    --up-ease: cubic-bezier(.2, .8, .2, 1);
    --up-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Page ---------- */
.up-page {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 56px;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--up-text);
    -webkit-font-smoothing: antialiased;
}
.up-page *, .up-page *::before, .up-page *::after { box-sizing: border-box; }
.up-page a { text-decoration: none; color: inherit; }
.up-page h1, .up-page h2, .up-page h3, .up-page p { margin: 0; }
.up-page button { font-family: inherit; }
.up-ico { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.up-num { font-variant-numeric: tabular-nums; }
.up-mono { font-family: var(--up-mono); }
.up-il { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Motion (subtle) ---------- */
.up-in { animation: upIn .5s var(--up-ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes upIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes upSpin { to { transform: rotate(360deg); } }
@keyframes upPing { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes upGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes upDraw { from { stroke-dashoffset: var(--len, 400); } to { stroke-dashoffset: 0; } }
.up-spin { animation: upSpin 1s linear infinite; }

.up-dot { position: relative; display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.up-dot::after { content: ""; position: absolute; inset: 0; border-radius: 999px; background: currentColor; animation: upPing 1.8s cubic-bezier(0, 0, .2, 1) infinite; }

/* ---------- Header ---------- */
.up-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.up-eyebrow { font-size: 13px; font-weight: 500; color: var(--up-muted); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.up-header h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--up-ink); line-height: 1.25; }
.up-header p { font-size: 14px; color: var(--up-muted); margin-top: 4px; }
.up-header.is-simple { align-items: center; }
.up-header.is-simple h1 { font-size: 22px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.up-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.up-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 14px;
    border-radius: 9px; border: 1px solid transparent;
    font-size: 13.5px; font-weight: 500; line-height: 1;
    white-space: nowrap; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.up-btn:focus-visible { outline: 2px solid var(--up-accent); outline-offset: 2px; }
.up-btn-primary { background: var(--up-accent); color: #fff !important; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.up-btn-primary:hover { background: var(--up-accent-hover); }
.up-btn-secondary { background: #fff; color: var(--up-text); border-color: var(--up-line); box-shadow: var(--up-shadow); }
.up-btn-secondary:hover { background: var(--up-subtle); border-color: #d5dae3; }
.up-btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }

/* ---------- Card ---------- */
.up-card {
    background: var(--up-surface);
    border: 1px solid var(--up-line);
    border-radius: var(--up-radius);
    box-shadow: var(--up-shadow);
    min-width: 0;
}
.up-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--up-line-soft);
}
.up-card-head h2 { font-size: 15px; font-weight: 600; color: var(--up-ink); letter-spacing: -.01em; }
.up-card-head p { font-size: 13px; color: var(--up-muted); margin-top: 2px; }
.up-card-body { padding: 20px; }
.up-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--up-accent) !important; }
.up-link:hover { color: var(--up-accent-hover) !important; }
.up-link .up-ico { transition: transform .2s var(--up-ease); }
.up-link:hover .up-ico { transform: translateX(2px); }

/* Neutral icon box */
.up-ibox {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--up-subtle); border: 1px solid var(--up-line); color: var(--up-muted);
}

/* ---------- Balance header (light blue) ---------- */
.up-wallet {
    position: relative; overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(520px 220px at 100% 0%, rgba(255, 255, 255, .75), transparent 60%),
        linear-gradient(135deg, #e3f0ff 0%, #d4e7ff 55%, #cfe3ff 100%);
    border: 1px solid #c3dafb;
    box-shadow: 0 1px 2px rgba(30, 64, 175, .06), 0 12px 32px -18px rgba(37, 99, 235, .35);
}
.up-wallet::after {
    content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 999px;
    background: radial-gradient(circle, rgba(59, 130, 246, .18), transparent 70%); pointer-events: none;
}
.up-wallet-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.up-wallet-art { width: 96px; height: 92px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 10px 14px rgba(91, 70, 220, .28)); animation: upBob 5s ease-in-out infinite; }
@keyframes upBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-2deg); } }
.up-wallet-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: #3b5a8a; }
.up-wallet .up-eye { color: #5b7bb0; }
.up-wallet .up-eye:hover { background: rgba(255, 255, 255, .6); color: #1e3a8a; }
.up-wallet-value { margin-top: 2px; font-size: 32px; font-weight: 700; letter-spacing: -.025em; color: #0b2a5b; line-height: 1.15; }
.up-wallet-sub { margin-top: 6px; font-size: 12.5px; color: #4a6a9a; }
.up-wallet-sub .up-ico { color: #16a34a; }
.up-wallet-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.up-wallet-actions .up-btn-secondary { background: rgba(255, 255, 255, .85); border-color: #c3dafb; }
.up-wallet-actions .up-btn-secondary:hover { background: #fff; }
.up-wallet-foot {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 24px; border-top: 1px solid rgba(147, 189, 247, .55); background: rgba(255, 255, 255, .45);
    font-size: 12.5px; color: #4a6a9a;
}
.up-wallet-logos { display: flex; align-items: center; gap: 8px; }
.up-wallet-logos img { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 2px 6px -2px rgba(15, 23, 42, .25); transition: transform .25s var(--up-ease); }
.up-wallet-logos img:hover { transform: translateY(-3px) scale(1.06); }
.up-wallet-more { font-size: 12px; font-weight: 500; color: #4a6a9a; padding-left: 2px; }

/* ---------- KPI ---------- */
.up-kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.up-kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; color: var(--up-muted); }
.up-kpi-label > span { display: inline-flex; align-items: center; gap: 7px; }
.up-kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--up-ink); line-height: 1.15; }
.up-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 32px; }
.up-kpi-note { font-size: 12.5px; color: var(--up-muted); }
.up-kpi-note b { font-weight: 600; color: var(--up-text); }
.up-spark { display: block; width: 96px; height: 32px; overflow: visible; }
.up-spark path.l { fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 400); animation: upDraw 1.2s var(--up-ease) .2s both; }
.up-eye { border: 0; background: transparent; color: var(--up-faint); cursor: pointer; padding: 2px; display: inline-flex; border-radius: 6px; }
.up-eye:hover { color: var(--up-text); background: var(--up-subtle); }
.up-kpi-dark { background: #0f172a; border-color: #0f172a; }
.up-kpi-dark .up-kpi-label, .up-kpi-dark .up-kpi-note { color: #94a3b8; }
.up-kpi-dark .up-kpi-value { color: #fff; }
.up-kpi-dark .up-eye:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- Grid ---------- */
.up-grid { display: grid; gap: 16px; }
.up-g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.up-g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.up-g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.up-g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------- Segmented control ---------- */
.up-seg { display: inline-flex; padding: 3px; background: var(--up-subtle); border: 1px solid var(--up-line); border-radius: 9px; }
.up-seg button {
    border: 0; background: transparent; cursor: pointer;
    padding: 6px 12px; border-radius: 7px;
    font-size: 12.5px; font-weight: 500; color: var(--up-muted);
    transition: background .15s, color .15s, box-shadow .15s;
}
.up-seg button:hover { color: var(--up-ink); }
.up-seg button.is-on { background: #fff; color: var(--up-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* Inline stats row (under chart) */
.up-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--up-line-soft); }
.up-stats > div { padding: 14px 20px; border-left: 1px solid var(--up-line-soft); min-width: 0; }
.up-stats > div:first-child { border-left: 0; }
.up-stats dt { font-size: 12.5px; color: var(--up-muted); }
.up-stats dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--up-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Status / badges ---------- */
.up-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 6px;
    font-size: 12px; font-weight: 500; white-space: nowrap; text-transform: capitalize;
    border: 1px solid transparent;
}
.up-badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.up-badge.success { background: var(--up-green-soft); color: #15803d; border-color: #dcfce7; }
.up-badge.warn { background: var(--up-amber-soft); color: #b45309; border-color: #fef3c7; }
.up-badge.danger { background: var(--up-red-soft); color: #b91c1c; border-color: #fee2e2; }
.up-badge.neutral { background: var(--up-subtle); color: var(--up-muted); border-color: var(--up-line); }
.up-badge.plain::before { display: none; }

/* ---------- Legend / progress ---------- */
.up-legend { display: flex; flex-direction: column; gap: 12px; }
.up-legend-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.up-legend-row span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--up-text); }
.up-legend-row i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.up-legend-row b { font-weight: 600; color: var(--up-ink); }
.up-legend-row small { color: var(--up-faint); font-size: 12px; margin-left: 4px; font-weight: 400; }
.up-bar { height: 6px; border-radius: 999px; background: var(--up-line-soft); overflow: hidden; }
.up-bar > span { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: upGrowX .9s var(--up-ease) .2s both; }

/* ---------- Lists ---------- */
.up-list { display: flex; flex-direction: column; }
.up-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--up-line-soft); transition: background .15s; }
.up-row:last-child { border-bottom: 0; }
a.up-row:hover, .up-row.is-hover:hover { background: var(--up-subtle); }
.up-row-main { flex: 1; min-width: 0; }
.up-row-title { font-size: 14px; font-weight: 500; color: var(--up-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row-sub { font-size: 12.5px; color: var(--up-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Brand logo ---------- */
.up-logo {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    border-radius: 9px; background: #fff; border: 1px solid var(--up-line); overflow: hidden;
}
.up-logo img { width: 68%; height: 68%; object-fit: contain; display: block; }
.up-logo-fallback {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: var(--up-subtle); color: var(--up-muted); font-weight: 600; font-size: 13px;
}

/* ---------- Table ---------- */
.up-table-wrap { overflow-x: auto; }
.up-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.up-table th {
    padding: 10px 20px; text-align: left;
    font-size: 12px; font-weight: 500; color: var(--up-muted);
    background: var(--up-subtle); border-bottom: 1px solid var(--up-line-soft); white-space: nowrap;
}
.up-table td { padding: 12px 20px; border-bottom: 1px solid var(--up-line-soft); vertical-align: middle; color: var(--up-text); white-space: nowrap; }
.up-table tbody tr:last-child td { border-bottom: 0; }
.up-table tbody tr { transition: background .15s; }
.up-table tbody tr:hover td { background: #fbfcfe; }
.up-table .ta-r { text-align: right; }
.up-svc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.up-svc-name { font-weight: 500; color: var(--up-ink); }
.up-svc-sub { font-size: 12.5px; color: var(--up-muted); margin-top: 1px; }
.up-code { font-family: var(--up-mono); font-size: 13px; font-weight: 600; color: var(--up-ink); background: var(--up-subtle); border: 1px solid var(--up-line); padding: 2px 7px; border-radius: 6px; letter-spacing: .04em; }
.up-copy {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 7px; border: 1px solid transparent;
    background: transparent; color: var(--up-faint); cursor: pointer; transition: all .15s;
}
.up-copy:hover { color: var(--up-text); background: var(--up-subtle); border-color: var(--up-line); }
.up-copy.is-done { color: var(--up-green); }

/* ---------- Empty ---------- */
.up-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 20px; }
.up-empty .up-ibox { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 6px; }
.up-empty h3 { font-size: 14px; font-weight: 600; color: var(--up-ink); }
.up-empty p { font-size: 13px; color: var(--up-muted); max-width: 300px; }

/* ---------- Shortcut tiles ---------- */
.up-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.up-tile:hover { border-color: #cdd5e1; box-shadow: 0 4px 12px -4px rgba(16, 24, 40, .1); }
.up-tile-art { width: 48px; height: 48px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(15, 23, 42, .14)); transition: transform .35s var(--up-ease); }
.up-tile:hover .up-tile-art { transform: translateY(-3px) scale(1.06) rotate(-3deg); }
.up-tile-name { font-size: 14px; font-weight: 500; color: var(--up-ink); }
.up-tile-desc { font-size: 12.5px; color: var(--up-muted); margin-top: 1px; }
.up-tile .up-go { margin-left: auto; color: var(--up-faint); transition: transform .2s var(--up-ease), color .15s; }
.up-tile:hover .up-go { transform: translateX(2px); color: var(--up-text); }

.up-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.up-section-title h2 { font-size: 15px; font-weight: 600; color: var(--up-ink); }

/* ---------- Referral ---------- */
.up-ref-code {
    display: flex; align-items: center; gap: 8px; flex: 1 1 180px; min-width: 0;
    height: 38px; padding: 0 12px; border-radius: 9px;
    background: var(--up-subtle); border: 1px dashed #cfd6e2;
    font-family: var(--up-mono); font-weight: 600; font-size: 14px; letter-spacing: .06em; color: var(--up-ink);
}
.up-mini-stat { padding: 12px 14px; border-radius: 10px; background: var(--up-subtle); border: 1px solid var(--up-line-soft); }
.up-mini-stat dt { font-size: 12.5px; color: var(--up-muted); }
.up-mini-stat dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; color: var(--up-ink); }

/* ==========================================================================
   Polished sections: chart, status, live orders, recent orders, referral, help
   ========================================================================== */
.up-btn-soft { background: var(--up-accent-soft); color: var(--up-accent) !important; border-color: #dbe6fe; }
.up-btn-soft:hover { background: #e0eaff; }

/* Tinted icon circles */
.up-tint { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; }
.up-tint.blue { background: #eff4ff; color: #2563eb; }
.up-tint.green { background: #ecfdf3; color: #059669; }
.up-tint.amber { background: #fff7e6; color: #d97706; }
.up-tint.red { background: #fff1f2; color: #e11d48; }
.up-tint.violet { background: #f4f0ff; color: #7c3aed; }

/* Chart card */
.up-chart-summary { display: flex; gap: 12px; padding: 16px 20px 4px; flex-wrap: wrap; }
.up-series {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
    background: var(--up-subtle); border: 1px solid var(--up-line-soft); min-width: 150px;
    transition: opacity .25s, transform .25s var(--up-ease);
}
.up-series.is-off { opacity: .4; }
.up-series-dot { width: 10px; height: 28px; border-radius: 4px; flex-shrink: 0; }
.up-series-label { font-size: 12px; color: var(--up-muted); }
.up-series-value { font-size: 18px; font-weight: 600; color: var(--up-ink); letter-spacing: -.01em; }
.up-chart-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 20px 18px; }
.up-chart-stat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--up-line-soft); transition: border-color .2s, box-shadow .2s; }
.up-chart-stat:hover { border-color: var(--up-line); box-shadow: 0 4px 12px -6px rgba(16, 24, 40, .12); }
.up-chart-stat-l { font-size: 12px; color: var(--up-muted); }
.up-chart-stat-v { font-size: 14px; font-weight: 600; color: var(--up-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Apex custom tooltip */
.up-tip { padding: 10px 12px; min-width: 170px; font-family: 'Inter', sans-serif; font-size: 12.5px; }
.up-tip-h { font-weight: 600; color: #0f172a; margin-bottom: 6px; }
.up-tip-r { display: flex; align-items: center; gap: 8px; color: #64748b; padding: 2px 0; }
.up-tip-r i { width: 8px; height: 8px; border-radius: 3px; }
.up-tip-r b { margin-left: auto; color: #0f172a; font-weight: 600; }
.up-page .apexcharts-tooltip { border: 1px solid var(--up-line) !important; border-radius: 12px !important; box-shadow: 0 12px 28px -12px rgba(16, 24, 40, .25) !important; background: #fff !important; }

/* Status list */
.up-status-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.up-status-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--up-line-soft); transition: background .2s; }
.up-status-item:hover { background: var(--up-subtle); }
.up-status-item .up-tint { width: 26px; height: 26px; border-radius: 8px; }
.up-status-name { flex: 1; font-size: 13px; color: var(--up-text); }
.up-status-item b { font-size: 14px; font-weight: 600; color: var(--up-ink); }
.up-pct { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; min-width: 42px; text-align: center; }
.up-pct.green { background: #ecfdf3; color: #047857; }
.up-pct.amber { background: #fff7e6; color: #b45309; }
.up-pct.red { background: #fff1f2; color: #be123c; }

/* Live orders */
.up-live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: #fff7e6; color: #b45309; font-size: 11.5px; font-weight: 600; }
.up-live .up-dot { width: 6px; height: 6px; }
.up-live-row { align-items: center; }
.up-wait { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #b45309; margin-top: 3px; }
.up-typing { display: inline-flex; gap: 3px; }
.up-typing i { width: 4px; height: 4px; border-radius: 999px; background: currentColor; animation: upBlink 1.2s ease-in-out infinite; }
.up-typing i:nth-child(2) { animation-delay: .2s; }
.up-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes upBlink { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* Empty state with 3D art */
.up-art-stage { position: relative; width: 120px; height: 110px; display: grid; place-items: center; margin-bottom: 6px; }
.up-art-stage img { position: relative; width: 84px; height: 84px; filter: drop-shadow(0 10px 14px rgba(37, 99, 235, .22)); animation: upBob 4.5s ease-in-out infinite; }
.up-ring-pulse { position: absolute; width: 84px; height: 84px; border-radius: 999px; border: 2px solid #bfdbfe; animation: upRipple 2.4s ease-out infinite; }
@keyframes upRipple { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

/* Recent orders */
.up-orders tbody tr { position: relative; }
.up-orders tbody td:first-child { box-shadow: inset 3px 0 0 transparent; transition: box-shadow .2s; }
.up-orders tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--up-accent); }
.up-orders tbody tr.tone-warn td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.up-logo-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.up-logo-badge {
    position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 999px;
    display: grid; place-items: center; color: #fff; border: 2px solid #fff;
}
.up-logo-badge.success { background: #10b981; }
.up-logo-badge.warn { background: #f59e0b; }
.up-logo-badge.danger { background: #f43f5e; }
.up-svc-sub { display: flex; align-items: center; gap: 5px; }
.up-sep { color: #cbd5e1; }
.up-phone-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--up-subtle); border: 1px solid var(--up-line-soft); color: var(--up-ink); font-size: 13px; }
.up-otp {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 4px 10px; border-radius: 8px; border: 1px solid #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4, #dcfce7); color: #047857;
    font-family: var(--up-mono); font-size: 13.5px; font-weight: 700; letter-spacing: .08em;
    transition: transform .15s, box-shadow .15s;
}
.up-otp:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(4, 120, 87, .35); }
.up-otp.is-done { background: #047857; color: #fff; border-color: #047857; }
.up-otp-wait { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: #fff7e6; color: #b45309; font-size: 12.5px; font-weight: 500; }
.up-price { color: var(--up-ink) !important; font-weight: 600; }
.up-arrow-btn {
    display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 12px; border-radius: 8px;
    font-size: 12.5px; font-weight: 500; color: var(--up-text) !important; border: 1px solid var(--up-line); background: #fff;
    transition: all .2s var(--up-ease);
}
.up-arrow-btn:hover { border-color: #c7d6f5; color: var(--up-accent) !important; background: var(--up-accent-soft); }
.up-arrow-btn .up-ico { transition: transform .2s var(--up-ease); }
.up-arrow-btn:hover .up-ico { transform: translateX(2px); }
.up-arrow-btn.is-live { background: var(--up-accent); border-color: var(--up-accent); color: #fff !important; }
.up-arrow-btn.is-live:hover { background: var(--up-accent-hover); }

/* Referral (blue) */
.up-ref {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 120px minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center;
    padding: 24px 26px;
    background:
        radial-gradient(520px 260px at 0% 0%, rgba(191, 219, 254, .55), transparent 65%),
        radial-gradient(420px 240px at 100% 100%, rgba(186, 230, 253, .45), transparent 65%),
        #fff;
    border-color: #d6e4fb;
}
.up-ref-art { width: 120px; height: 120px; filter: drop-shadow(0 14px 18px rgba(37, 99, 235, .22)); animation: upBob 5s ease-in-out infinite; }
.up-ref-intro { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.up-ref-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.up-ref-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #eff4ff; color: #1d4ed8; font-size: 12px; font-weight: 600; border: 1px solid #dbe6fe; }
.up-ref-intro h2 { font-size: 19px; font-weight: 600; color: var(--up-ink); letter-spacing: -.015em; }
.up-ref-intro p { font-size: 13.5px; color: var(--up-muted); line-height: 1.55; }
.up-ref-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.up-ref-stats > div { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .85); border: 1px solid #e3ecfb; }
.up-ref-stats dt { font-size: 12px; color: var(--up-muted); }
.up-ref-stats dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; color: var(--up-ink); }
.up-ref-share { display: flex; gap: 8px; flex-wrap: wrap; }
.up-ref-code {
    display: flex; align-items: center; gap: 10px; flex: 1 1 200px; min-width: 0;
    height: 40px; padding: 0 6px 0 12px; border-radius: 10px;
    background: #fff; border: 1.5px dashed #93c5fd;
    font-family: inherit; letter-spacing: 0; font-size: 14px; font-weight: 500;
}
.up-ref-code .up-mono { font-weight: 700; letter-spacing: .08em; color: #1e3a8a; flex: 1; }
.up-ref-code-l { font-size: 11.5px; color: var(--up-muted); padding-right: 10px; border-right: 1px solid var(--up-line); }
.up-ref-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.up-ref-steps li { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--up-text); padding: 5px 10px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid #e3ecfb; }
.up-ref-steps li span { width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; background: var(--up-accent); color: #fff; font-size: 11px; font-weight: 600; }

/* ==========================================================================
   API documentation (document-style)
   ========================================================================== */
.dx { max-width: 1280px; padding-bottom: 40px; }
.dx-sheet { display: grid; grid-template-columns: 230px minmax(0, 1fr); background: #fff; border: 1px solid var(--up-line); border-radius: 12px; }

/* Sidebar */
.dx-nav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding: 24px 12px 24px 20px; scrollbar-width: thin; }
.dx-nav-title { font-size: 14px; font-weight: 600; color: var(--up-ink); padding: 0 10px 16px; }
.dx-nav-group { display: flex; flex-direction: column; margin-bottom: 18px; }
.dx-nav-group > span { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--up-faint); padding: 0 10px 6px; }
.dx-nav a { display: block; padding: 5px 10px; font-size: 13.5px; color: var(--up-muted) !important; border-left: 2px solid transparent; transition: color .15s, border-color .15s; }
.dx-nav a:hover { color: var(--up-ink) !important; }
.dx-nav a.is-on { color: var(--up-accent) !important; border-left-color: var(--up-accent); font-weight: 500; }

/* Content */
.dx-main { min-width: 0; border-left: 1px solid var(--up-line); }
.dx-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 32px 36px; border-bottom: 1px solid var(--up-line-soft); scroll-margin-top: 92px; }
.dx-sec:last-child { border-bottom: 0; }
.dx-intro { grid-template-columns: minmax(0, 1fr); }
.dx-intro .dx-text { max-width: 720px; }
.dx-text { min-width: 0; }
.dx-text h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--up-ink); }
.dx-text h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; color: var(--up-ink); }
.dx-text h4 { margin: 20px 0 6px; font-size: 13px; font-weight: 600; color: var(--up-ink); }
.dx-text p { margin-top: 10px !important; font-size: 14.5px; line-height: 1.7; color: var(--up-text); }
.dx-text code, .dx-small code { font-family: var(--up-mono); font-size: 12.5px; padding: 1px 5px; border-radius: 4px; background: #f3f5f9; color: #0f172a; }
.dx-text a { color: var(--up-accent) !important; font-weight: 500; }
.dx-small { font-size: 13.5px !important; color: var(--up-muted) !important; }
.dx-note { padding-left: 12px; border-left: 3px solid #f59e0b; color: #92400e !important; font-size: 13.5px !important; }

.dx-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 32px; margin: 20px 0 0; }
.dx-meta dt { font-size: 12px; color: var(--up-muted); }
.dx-meta dd { margin: 2px 0 0; font-size: 14px; color: var(--up-ink); }
.dx-meta dd code { font-size: 13px; }

.dx-route { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--up-mono); font-size: 13px; }
.dx-route code { background: transparent !important; padding: 0 !important; color: var(--up-text) !important; word-break: break-all; }
.dx-route em { font-style: normal; color: #b45309; }
.dx-method { font-family: var(--up-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.dx-method.get { color: #047857; }
.dx-method.post { color: #1d4ed8; }

.dx-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.dx-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--up-muted); padding: 8px 0; border-bottom: 1px solid var(--up-line); }
.dx-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--up-line-soft); vertical-align: top; color: var(--up-text); line-height: 1.55; }
.dx-table tr:last-child td { border-bottom: 0; }
.dx-table td:first-child { white-space: nowrap; }
.dx-params { border-top: 1px solid var(--up-line); }
.dx-params td:first-child { width: 38%; white-space: nowrap; }
.dx-params td:first-child code { font-weight: 600; }
.dx-params td:first-child span { display: block; margin-top: 3px; font-size: 12px; color: var(--up-faint); }

.dx-group-title { padding: 28px 36px 0; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--up-accent); }
.dx-group-title + .dx-sec { padding-top: 12px; }

/* Code */
.dx-code-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 104px; align-self: start; }
.dx-code { border-radius: 8px; overflow: hidden; background: #0f172a; min-width: 0; }
.dx-code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; height: 38px; background: #1e293b; font-size: 12px; color: #94a3b8; }
.dx-code-head button { border: 0; background: transparent; color: #94a3b8; font-size: 12px; cursor: pointer; padding: 4px 6px; border-radius: 4px; font-family: inherit; }
.dx-code-head button:hover { color: #f1f5f9; }
.dx-code-tabs { display: flex; align-items: center; gap: 4px; }
.dx-code-tabs > span { margin-right: 6px; }
.dx-code-tabs button { font-family: var(--up-mono); }
.dx-code-tabs button.is-on { color: #f1f5f9; background: #334155; }
.dx-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--up-mono); font-size: 12.5px; font-weight: 400; line-height: 1.65; color: #e2e8f0; white-space: pre; }
.dx-code pre .k { color: #93c5fd; }
.dx-code pre .s { color: #86efac; }
.dx-code pre .n { color: #fcd34d; }
.dx-code pre .b { color: #c4b5fd; }
.dx-code pre .c { color: #64748b; }

@media (max-width: 1100px) {
    .dx-sec { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .dx-code-col { position: static; }
}
@media (max-width: 860px) {
    .dx-sheet { grid-template-columns: minmax(0, 1fr); border-radius: 10px; }
    .dx-main { border-left: 0; }
    .dx-nav {
        position: sticky; top: 76px; z-index: 20; max-height: none; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden;
        padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--up-line); background: #fff; border-radius: 10px 10px 0 0; scrollbar-width: none;
    }
    .dx-nav::-webkit-scrollbar { display: none; }
    .dx-nav-title, .dx-nav-group > span { display: none; }
    .dx-nav-group { flex-direction: row; gap: 4px; margin: 0; }
    .dx-nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: 6px 8px; font-size: 13px; }
    .dx-nav a.is-on { border-bottom-color: var(--up-accent); }
    .dx-sec { padding: 22px 16px; scroll-margin-top: 130px; }
    .dx-group-title { padding: 22px 16px 0; }
    .dx-text h1 { font-size: 22px; }
    .dx-text h2 { font-size: 18px; }
    .dx-meta { grid-template-columns: minmax(0, 1fr); }
    .dx-params td:first-child { width: auto; }
}

/* ==========================================================================
   Blog list
   ========================================================================== */
.bl { max-width: 1160px; gap: 24px; padding-top: 8px; }
.bl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.bl-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: var(--up-ink); }
.bl-head p { margin-top: 6px !important; font-size: 15px; color: var(--up-muted); max-width: 520px; line-height: 1.6; }
.bl-search { position: relative; width: 320px; max-width: 100%; display: flex; align-items: center; }
.bl-search > .up-ico { position: absolute; left: 12px; color: var(--up-faint); pointer-events: none; }
.bl-search input {
    width: 100%; height: 42px; padding: 0 36px 0 38px; border-radius: 10px; border: 1px solid var(--up-line); background: #fff;
    font-family: inherit; font-size: 14px; color: var(--up-ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.bl-search input:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.bl-search input::-webkit-search-cancel-button { cursor: pointer; }
.bl-busy { position: absolute; right: 12px; color: var(--up-faint); }
.bl-result { font-size: 13.5px; color: var(--up-muted); }
.bl-result b { color: var(--up-ink); font-weight: 600; }

.bl-meta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--up-muted); }
.bl-new { padding: 2px 8px; border-radius: 999px; background: var(--up-accent-soft); color: var(--up-accent); font-weight: 600; font-size: 11.5px; }
.bl-ph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 40px; font-weight: 700; color: #a5b8e8; background: linear-gradient(135deg, #eef3fd, #e3ebfb); }

.bl-feature {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden;
    background: #fff; border: 1px solid var(--up-line); border-radius: 16px; box-shadow: var(--up-shadow);
    color: inherit; transition: box-shadow .25s, border-color .25s;
}
.bl-feature:hover { border-color: #d5deeb; box-shadow: 0 16px 36px -20px rgba(16, 24, 40, .3); }
.bl-feature-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--up-subtle); }
.bl-feature-img img, .bl-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--up-ease); }
.bl-feature:hover .bl-feature-img img, .bl-card:hover .bl-card-img img { transform: scale(1.03); }
.bl-feature-body { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px; }
.bl-feature-body h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; color: var(--up-ink); }
.bl-feature-body p { font-size: 14.5px; line-height: 1.65; color: var(--up-muted); }
.bl-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--up-accent); }
.bl-more .up-ico { transition: transform .2s var(--up-ease); }
.bl-feature:hover .bl-more .up-ico { transform: translateX(3px); }

.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bl-card {
    display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--up-line);
    border-radius: 14px; box-shadow: var(--up-shadow); color: inherit; transition: box-shadow .25s, border-color .25s, transform .25s var(--up-ease);
}
.bl-card:hover { transform: translateY(-2px); border-color: #d5deeb; box-shadow: 0 14px 30px -18px rgba(16, 24, 40, .3); }
.bl-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--up-subtle); }
.bl-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; }
.bl-card-body h3 { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--up-ink); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card:hover h3 { color: var(--up-accent); }
.bl-card-body p { font-size: 13.5px; line-height: 1.6; color: var(--up-muted); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-pager { padding-top: 4px; }
.bl-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 52px 20px; text-align: center; background: #fff; border: 1px solid var(--up-line); border-radius: 14px; color: var(--up-muted); font-size: 14px; }
.bl-empty .up-ico { color: var(--up-faint); margin-bottom: 4px; }
.bl-empty b { font-size: 15px; font-weight: 600; color: var(--up-ink); }
.bl-empty .up-btn { margin-top: 10px; }

/* ==========================================================================
   Blog detail
   ========================================================================== */
.bd { max-width: 1160px; gap: 40px; padding-top: 4px; }
.bd-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--up-accent); z-index: 200; transition: width .1s linear; }
.bd-article { width: 100%; max-width: 760px; margin: 0 auto; }
.bd-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--up-muted); }
.bd-crumb a { color: var(--up-accent) !important; font-weight: 500; }
.bd-crumb .up-ico { color: var(--up-faint); }
.bd-head h1 { margin-top: 14px !important; font-size: 38px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; color: var(--up-ink); }
.bd-lead { margin-top: 14px !important; font-size: 18px; line-height: 1.6; color: var(--up-muted); }
.bd-meta { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--up-line); }
.bd-meta b { display: block; font-size: 14px; font-weight: 600; color: var(--up-ink); }
.bd-meta span { font-size: 13px; color: var(--up-muted); }
.bd-avatar { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0; background: var(--up-accent-soft); color: var(--up-accent); font-weight: 600; font-size: 15px; }
.bd-cover { margin: 28px 0 0; border-radius: 14px; overflow: hidden; background: var(--up-subtle); }
.bd-cover img { display: block; width: 100%; max-height: 440px; object-fit: cover; }

.bd-prose { margin-top: 32px; font-size: 17px; line-height: 1.8; color: #334155; word-wrap: break-word; }
.bd-prose > *:first-child { margin-top: 0 !important; }
.bd-prose p { margin: 0 0 1.3em !important; font-size: 17px; line-height: 1.8; color: #334155; }
.bd-prose h1, .bd-prose h2, .bd-prose h3, .bd-prose h4 { color: var(--up-ink); letter-spacing: -.015em; line-height: 1.3; }
.bd-prose h1 { font-size: 28px; font-weight: 700; margin: 1.8em 0 .6em !important; }
.bd-prose h2 { font-size: 24px; font-weight: 700; margin: 1.8em 0 .6em !important; }
.bd-prose h3 { font-size: 20px; font-weight: 600; margin: 1.6em 0 .5em !important; }
.bd-prose h4 { font-size: 17px; font-weight: 600; margin: 1.4em 0 .4em; }
.bd-prose a { color: var(--up-accent) !important; text-decoration: underline; text-decoration-color: #bfd0f7; text-underline-offset: 3px; }
.bd-prose a:hover { text-decoration-color: currentColor; }
.bd-prose strong, .bd-prose b { font-weight: 600; color: var(--up-ink); }
.bd-prose ul, .bd-prose ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.bd-prose ul { list-style: disc; }
.bd-prose ol { list-style: decimal; }
.bd-prose li { margin: .35em 0; padding-left: .2em; }
.bd-prose li::marker { color: #94a3b8; }
.bd-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--up-accent); color: var(--up-text); font-style: italic; }
.bd-prose blockquote p:last-child { margin-bottom: 0 !important; }
.bd-prose code { font-family: var(--up-mono); font-size: .88em; padding: 2px 6px; border-radius: 5px; background: #f1f4f9; color: var(--up-ink); }
.bd-prose pre { margin: 1.6em 0; padding: 16px 18px; border-radius: 10px; background: #0f172a; color: #e2e8f0; overflow-x: auto; font-size: 14px; line-height: 1.65; }
.bd-prose pre code { background: none; padding: 0; color: inherit; }
.bd-prose img { display: block; max-width: 100%; height: auto; margin: 1.8em auto; border-radius: 10px; }
.bd-prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 1.8em 0; border: 0; border-radius: 10px; background: #000; }
.bd-prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--up-line); }
.bd-prose table { width: 100%; margin: 1.6em 0; border-collapse: collapse; font-size: 15px; }
.bd-prose th, .bd-prose td { padding: 10px 12px; border: 1px solid var(--up-line); text-align: left; }
.bd-prose th { background: var(--up-subtle); font-weight: 600; }
.bd-prose .ql-align-center { text-align: center; }
.bd-prose .ql-align-right { text-align: right; }
.bd-prose .ql-align-justify { text-align: justify; }
.bd-prose .ql-indent-1 { padding-left: 2em; }
.bd-prose .ql-indent-2 { padding-left: 4em; }
.bd-muted { color: var(--up-faint) !important; font-style: italic; }

.bd-share { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding: 16px 0; border-top: 1px solid var(--up-line); border-bottom: 1px solid var(--up-line); }
.bd-share > span { font-size: 14px; font-weight: 500; color: var(--up-ink); }
.bd-share > div { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-comments { margin-top: 36px; }

.bd-related { padding-top: 36px; border-top: 1px solid var(--up-line); }
.bd-related-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bd-related-head h2 { font-size: 20px; font-weight: 700; color: var(--up-ink); letter-spacing: -.015em; }

/* ---------- Comments ---------- */
.cm { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.cm-card { background: #fff; border: 1px solid var(--up-line); border-radius: 16px; overflow: hidden; }
.cm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--up-line-soft); }
.cm-top h2 { font-size: 18px; font-weight: 700; color: var(--up-ink); letter-spacing: -.015em; line-height: 1.3; }
.cm-top > div > span { font-size: 13px; color: var(--up-muted); }
.cm-like {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--up-line); background: #fff; color: var(--up-text); font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.cm-like > span:first-of-type { font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-like-l { padding-left: 7px; border-left: 1px solid currentColor; border-color: rgba(100, 116, 139, .3); }
.cm-like:hover { border-color: #f5b5c0; color: #e11d48; }
.cm-like.is-on { border-color: #fecdd3; background: #fff1f2; color: #e11d48; }
.cm-like:active svg, .cm-acts button:active svg { transform: scale(.85); }
.cm-like svg, .cm-acts svg { transition: transform .15s; }

.cm-av {
    width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; flex-shrink: 0;
    color: #fff; font-weight: 600; font-size: 15px; line-height: 1; user-select: none;
}
.cm-av.sm { width: 30px; height: 30px; font-size: 12.5px; }

.cm-compose { display: flex; gap: 12px; padding: 18px 22px; background: #fafbfc; border-bottom: 1px solid var(--up-line-soft); }
.cm-compose-body { flex: 1; min-width: 0; }
.cm-input {
    display: block; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--up-line); background: #fff; resize: vertical;
    font-family: inherit; font-size: 14px; line-height: 1.6; color: var(--up-ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.cm-input::placeholder { color: var(--up-faint); }
.cm-input:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.cm-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--up-faint); font-variant-numeric: tabular-nums; }
.cm-reply-btns { display: flex; gap: 8px; }
.cm-error { display: block; margin-top: 6px; font-size: 12.5px; color: #b91c1c; }
.cm-guest { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 22px; background: #fafbfc; border-bottom: 1px solid var(--up-line-soft); font-size: 14px; color: var(--up-text); }
.cm-guest > div { display: flex; gap: 8px; }

.cm-threads { list-style: none; margin: 0; padding: 0; }
.cm-thread { padding: 18px 22px; border-bottom: 1px solid var(--up-line-soft); }
.cm-thread:last-child { border-bottom: 0; }
.cm-row { display: flex; gap: 12px; }
.cm-main { flex: 1; min-width: 0; }
.cm-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; line-height: 1.4; }
.cm-meta b { font-size: 14px; font-weight: 600; color: var(--up-ink); }
.cm-meta time { font-size: 12.5px; color: var(--up-faint); }
.cm-badge { align-self: center; padding: 1px 7px; border-radius: 6px; background: var(--up-accent-soft); color: var(--up-accent); font-size: 11px; font-weight: 600; }
.cm-text { margin-top: 3px; font-size: 14.5px; line-height: 1.65; color: var(--up-text); white-space: pre-line; overflow-wrap: anywhere; }
.cm-mention { color: var(--up-accent); font-weight: 500; }
.cm-acts { display: flex; align-items: center; gap: 4px; margin: 6px 0 0 -8px; }
.cm-acts button {
    display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border: 0; border-radius: 7px; background: none; cursor: pointer;
    font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--up-muted); font-variant-numeric: tabular-nums; transition: color .15s, background .15s;
}
.cm-acts button:hover { background: #f1f4f8; color: var(--up-ink); }
.cm-acts button.is-on { color: #e11d48; }
.cm-acts button.is-on:hover { background: #fff1f2; }
.cm-acts button.is-danger:hover { background: #fef2f2; color: #b91c1c; }

.cm-replies { display: flex; flex-direction: column; gap: 14px; margin: 12px 0 0 50px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--up-line-soft); }
.cm-row.is-reply .cm-text { font-size: 14px; }
.cm-more-replies {
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer;
    font-family: inherit; font-size: 13px; font-weight: 500; color: var(--up-accent);
}
.cm-more-replies:hover { text-decoration: underline; }
.cm-reply-box { padding-top: 2px; }
.cm-note { font-size: 13px; color: var(--up-muted); }
.cm-note a { color: var(--up-accent) !important; font-weight: 500; }
.cm-load { display: flex; justify-content: center; padding: 16px 22px 20px; border-top: 1px solid var(--up-line-soft); }
.cm-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 22px; text-align: center; font-size: 13.5px; color: var(--up-muted); }
.cm-empty .up-ico { color: var(--up-faint); margin-bottom: 4px; }
.cm-empty b { font-size: 14.5px; font-weight: 600; color: var(--up-ink); }

@media (max-width: 960px) {
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bl-feature { grid-template-columns: minmax(0, 1fr); }
    .bl-feature-body { padding: 22px; }
}
@media (max-width: 640px) {
    .bl-head h1 { font-size: 24px; }
    .bl-search { width: 100%; }
    .bl-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .bl-feature-body h2 { font-size: 20px; }
    .bd { gap: 28px; }
    .bd-head h1 { font-size: 27px; }
    .bd-lead { font-size: 16px; }
    .bd-prose, .bd-prose p { font-size: 16px; }
    .bd-prose h2 { font-size: 21px; }
    .bd-prose h3 { font-size: 18px; }
    .bd-share > div { width: 100%; }
    .bd-share .up-btn { flex: 1; }
    .cm-top, .cm-compose, .cm-guest, .cm-thread { padding-left: 16px; padding-right: 16px; }
    .cm-like-l { display: none; }
    .cm-av { width: 34px; height: 34px; font-size: 14px; }
    .cm-av.sm { width: 28px; height: 28px; }
    .cm-replies { margin-left: 0; padding: 12px; }
    .cm-guest { flex-direction: column; align-items: stretch; }
    .cm-guest .up-btn { flex: 1; }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.fq { max-width: 1040px; gap: 24px; padding-top: 8px; }
.fq-head { max-width: 680px; }
.fq-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--up-ink); }
.fq-head p { margin-top: 8px !important; font-size: 15px; line-height: 1.6; color: var(--up-muted); }
.fq-search { position: relative; display: flex; align-items: center; margin-top: 20px; }
.fq-search > .up-ico { position: absolute; left: 14px; color: var(--up-faint); pointer-events: none; }
.fq-search input {
    width: 100%; height: 48px; padding: 0 44px; border-radius: 12px; border: 1px solid var(--up-line);
    background: #fff; font-family: inherit; font-size: 15px; color: var(--up-ink); outline: none; box-shadow: var(--up-shadow);
    transition: border-color .15s, box-shadow .15s;
}
.fq-search input::placeholder { color: #a7b0bf; }
.fq-search input:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.fq-search input::-webkit-search-cancel-button { display: none; }
.fq-search-busy, .fq-clear { position: absolute; right: 12px; color: var(--up-faint); }
.fq-clear { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.fq-clear:hover { background: var(--up-subtle); color: var(--up-ink); }
.fq-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; font-size: 13px; color: var(--up-muted); }
.fq-tags button { border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--up-accent); }
.fq-tags button:hover { text-decoration: underline; text-underline-offset: 3px; }

.fq-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.fq-cats { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 2px; }
.fq-cats button {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
    padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left;
    font-family: inherit; font-size: 14px; color: var(--up-muted); transition: background .15s, color .15s;
}
.fq-cats button:hover { color: var(--up-ink); background: rgba(255, 255, 255, .7); }
.fq-cats button.is-on { background: #fff; color: var(--up-ink); font-weight: 500; box-shadow: var(--up-shadow); }
.fq-cats em { font-style: normal; font-size: 12px; color: var(--up-faint); font-variant-numeric: tabular-nums; }

.fq-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.fq-result { font-size: 13.5px; color: var(--up-muted); }
.fq-result b { color: var(--up-ink); font-weight: 600; }
.fq-group h2 { margin-bottom: 10px !important; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--up-faint); }
.fq-list { background: #fff; border: 1px solid var(--up-line); border-radius: 12px; box-shadow: var(--up-shadow); overflow: hidden; }
.fq-item { border-bottom: 1px solid var(--up-line-soft); }
.fq-item:last-child { border-bottom: 0; }
.fq-q {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; border: 0; background: #fff; cursor: pointer; text-align: left; font-family: inherit;
    font-size: 15px; font-weight: 500; color: var(--up-ink); transition: background .15s, color .15s;
}
.fq-q:hover { background: #fafbfd; }
.fq-q:focus { outline: none; }
.fq-q:focus-visible { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35); }
.fq-item.is-open .fq-q { color: var(--up-accent); }
.fq-chev { color: var(--up-faint); transition: transform .25s var(--up-ease), color .15s; }
.fq-item.is-open .fq-chev { transform: rotate(180deg); color: var(--up-accent); }
.fq-a-in { padding: 0 20px 18px; font-size: 14.5px; line-height: 1.75; color: var(--up-text); max-width: 680px; }
.fq mark { background: #fef3c7; color: inherit; border-radius: 3px; padding: 0 2px; }

.fq-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; text-align: center; background: #fff; border: 1px solid var(--up-line); border-radius: 12px; color: var(--up-muted); font-size: 14px; }
.fq-empty .up-ico { color: var(--up-faint); margin-bottom: 4px; }
.fq-empty b { font-size: 15px; font-weight: 600; color: var(--up-ink); }
.fq-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.fq-help { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; background: #fff; border: 1px solid var(--up-line); border-radius: 12px; }
.fq-help b { display: block; font-size: 15px; font-weight: 600; color: var(--up-ink); }
.fq-help span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--up-muted); }
.fq-help-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 760px) {
    .fq-head h1 { font-size: 23px; }
    .fq-head p { font-size: 14px; }
    .fq-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .fq-cats { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; }
    .fq-cats::-webkit-scrollbar { display: none; }
    .fq-cats button { width: auto; white-space: nowrap; padding: 7px 12px; background: #fff; border: 1px solid var(--up-line); }
    .fq-cats button.is-on { border-color: #bcd0f5; color: var(--up-accent); box-shadow: none; }
    .fq-q { padding: 14px 16px; font-size: 14.5px; }
    .fq-a-in { padding: 0 16px 16px; font-size: 14px; }
    .fq-help { padding: 18px 16px; }
    .fq-help-actions { width: 100%; }
    .fq-help-actions .up-btn { flex: 1; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.ct { max-width: 680px; gap: 18px; padding-top: 8px; }
.ct-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--up-ink); }
.ct-head p { margin-top: 8px !important; font-size: 15px; line-height: 1.6; color: var(--up-muted); }
.ct-card { background: #fff; border: 1px solid var(--up-line); border-radius: 14px; box-shadow: var(--up-shadow); }
.ct-form { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ct-field { min-width: 0; }
.ct-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--up-text); }
.ct-opt { font-weight: 400; color: var(--up-faint); }
.ct-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.ct-label-row label { margin-bottom: 6px; }
.ct-count { font-size: 12px; color: var(--up-faint); font-variant-numeric: tabular-nums; }
.ct-count.is-near { color: #b45309; }
.ct-input {
    width: 100%; height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--up-line);
    background: #fff; font-family: inherit; font-size: 14px; color: var(--up-ink); outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.ct-input::placeholder { color: #a7b0bf; }
.ct-input:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.ct-input.is-invalid { border-color: #fca5a5; }
.ct-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.ct-textarea { height: auto; min-height: 140px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.ct-error { display: block; margin-top: 6px; font-size: 12.5px; color: #b91c1c; }
.ct-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.ct-privacy { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--up-muted); }
.ct-privacy .up-ico { color: var(--up-faint); }
.ct-submit { height: 42px; padding: 0 18px; }
.ct-form .cf-turnstile, .ct-form [x-ref="turnstile"] { max-width: 100%; }

.ct-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px; }
.ct-done-icon { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: #ecfdf3; color: #059669; margin-bottom: 14px; }
.ct-done h2 { font-size: 18px; font-weight: 600; color: var(--up-ink); }
.ct-done p { margin-top: 6px !important; max-width: 420px; font-size: 14px; line-height: 1.6; color: var(--up-muted); }
.ct-done-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }

.ct-links { font-size: 13.5px; color: var(--up-muted); line-height: 1.6; }
.ct-links a { color: var(--up-accent) !important; font-weight: 500; }

@media (max-width: 640px) {
    .ct-head h1 { font-size: 23px; }
    .ct-head p { font-size: 14px; }
    .ct-form { padding: 18px 16px; gap: 16px; }
    .ct-row { grid-template-columns: minmax(0, 1fr); }
    .ct-foot { flex-direction: column-reverse; align-items: stretch; }
    .ct-submit { width: 100%; }
    .ct-privacy { justify-content: center; }
}

/* ==========================================================================
   API key settings
   ========================================================================== */
.ak { max-width: 980px; }
.ak .up-phead { align-items: flex-end; }
.ak-sub { margin-top: 4px !important; font-size: 14px; color: var(--up-muted); }

.ak-new { padding: 18px 20px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; }
.ak-new-head { display: flex; gap: 10px; color: #92400e; }
.ak-new-head .up-ico { margin-top: 1px; color: #d97706; }
.ak-new-head b { display: block; font-size: 14px; font-weight: 600; color: #78350f; }
.ak-new-head span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; }
.ak-new-token { display: flex; gap: 8px; margin-top: 14px; }
.ak-new-token input {
    flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 9px;
    border: 1px solid #fcd34d; background: #fff; color: var(--up-ink); font-size: 13px; outline: none;
}
.ak-new-token input:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.ak-new-token .up-btn { height: 40px; }

.ak-card { overflow: hidden; }
.ak-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 0; }
.ak-card-head h2 { font-size: 16px; font-weight: 600; color: var(--up-ink); }
.ak-card-head p { margin-top: 2px !important; font-size: 13px; color: var(--up-muted); }
.ak-meter { width: 120px; height: 6px; border-radius: 999px; background: var(--up-line-soft); overflow: hidden; flex-shrink: 0; }
.ak-meter span { display: block; height: 100%; border-radius: inherit; background: var(--up-accent); transition: width .4s var(--up-ease); }

.ak-form { display: flex; align-items: flex-start; gap: 10px; padding: 16px 20px 20px; border-bottom: 1px solid var(--up-line-soft); }
.ak-field { flex: 1; min-width: 0; }
.ak-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--up-text); }
.ak-input {
    width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--up-line);
    background: #fff; font-size: 14px; color: var(--up-ink); outline: none; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.ak-input:focus { border-color: #93b4f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.ak-input.is-invalid { border-color: #fca5a5; }
.ak-hint, .ak-error { display: block; margin-top: 6px; font-size: 12.5px; color: var(--up-muted); }
.ak-error { color: #b91c1c; }
.ak-submit { height: 40px; margin-top: 25px; }

.ak-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ak-table th { text-align: left; padding: 10px 20px; font-size: 12px; font-weight: 500; color: var(--up-muted); background: var(--up-subtle); border-bottom: 1px solid var(--up-line-soft); }
.ak-table td { padding: 13px 20px; border-bottom: 1px solid var(--up-line-soft); color: var(--up-text); vertical-align: middle; }
.ak-table tr:last-child td { border-bottom: 0; }
.ak-table tbody tr { transition: background .15s; }
.ak-table tbody tr:hover td { background: #fafbfd; }
.ak-name { font-weight: 500; color: var(--up-ink) !important; }
.ak-name-in { display: inline-flex; align-items: center; gap: 10px; }
.ak-name .up-ico { color: var(--up-faint); }
.ak-muted { color: var(--up-faint); }
.ak-act { text-align: right; width: 1%; white-space: nowrap; }
.ak-revoke {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px;
    border: 1px solid transparent; background: transparent; color: #b91c1c; font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; transition: background .15s, border-color .15s;
}
.ak-revoke:hover { background: #fef2f2; border-color: #fecaca; }
.ak-revoke:disabled { opacity: .5; cursor: default; }
.ak-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 20px; text-align: center; color: var(--up-muted); font-size: 13px; }
.ak-empty .up-ico { color: var(--up-faint); margin-bottom: 4px; }
.ak-empty b { font-size: 14px; font-weight: 600; color: var(--up-ink); }

.ak-usage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 4px; }
.ak-usage h2 { font-size: 16px; font-weight: 600; color: var(--up-ink); }
.ak-usage p { margin-top: 6px !important; font-size: 14px; color: var(--up-text); line-height: 1.6; }
.ak-usage ul { list-style: disc; margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; color: var(--up-muted); }

@media (max-width: 760px) {
    .ak .up-phead { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ak-new-token { flex-direction: column; }
    .ak-new-token input { flex: none; width: 100%; }
    .ak-form { flex-direction: column; align-items: stretch; padding: 14px 16px 16px; }
    .ak-submit { margin-top: 0; width: 100%; }
    .ak-card-head { padding: 16px 16px 0; }
    .ak-meter { width: 80px; }
    .ak-usage { grid-template-columns: minmax(0, 1fr); gap: 14px; }

    .ak-table thead { display: none; }
    .ak-table, .ak-table tbody, .ak-table tr, .ak-table td { display: block; width: 100%; }
    .ak-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--up-line-soft); }
    .ak-table tr:last-child { border-bottom: 0; }
    .ak-table td { padding: 0; border: 0; font-size: 12.5px; color: var(--up-muted); }
    .ak-table td.ak-name { grid-column: 1; grid-row: 1; font-size: 14px; }
    .ak-table td.ak-act { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: auto; }
    .ak-table td[data-label] { grid-column: 1; }
    .ak-table td[data-label]::before { content: attr(data-label) ": "; color: var(--up-faint); }
    .ak-table tbody tr:hover td { background: transparent; }
}

/* ---------- History: plain header + summary ---------- */
.up-phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.up-phead h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--up-ink); }
.up-stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.up-stats3 > div { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-left: 1px solid var(--up-line-soft); min-width: 0; }
.up-stats3 > div:first-child { border-left: 0; }
.up-stats3 span { font-size: 13px; color: var(--up-muted); }
.up-stats3 strong { font-size: 20px; font-weight: 600; letter-spacing: -.015em; color: var(--up-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- History: summary (light blue) ---------- */
.up-hsum {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 20px; padding: 20px 24px;
    border-radius: 16px; border: 1px solid #c3dafb;
    background:
        radial-gradient(480px 200px at 100% 0%, rgba(255, 255, 255, .75), transparent 60%),
        linear-gradient(135deg, #e3f0ff 0%, #d6e8ff 60%, #cfe3ff 100%);
    box-shadow: 0 1px 2px rgba(30, 64, 175, .06), 0 12px 28px -18px rgba(37, 99, 235, .35);
}
.up-hsum::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px; border-radius: 999px; background: radial-gradient(circle, rgba(59, 130, 246, .16), transparent 70%); pointer-events: none; }
.up-hsum-art { position: relative; z-index: 1; width: 64px; height: 64px; flex-shrink: 0; filter: drop-shadow(0 8px 12px rgba(37, 99, 235, .28)); animation: upBob 5s ease-in-out infinite; }
.up-hsum-grid { position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 20px; align-items: center; }
.up-hsum-grid > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.up-hsum-l { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #3b5a8a; }
.up-hsum-l b { margin-left: auto; color: #0b2a5b; font-weight: 600; }
.up-hsum-v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: #0b2a5b; white-space: nowrap; }
.up-dot-s { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.up-hsum-ratio { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(147, 189, 247, .5); }
.up-hsum-bar { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: rgba(37, 99, 235, .14); overflow: hidden; }
.up-hsum-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); transform-origin: left; animation: upGrowX 1s var(--up-ease) .25s both; }

/* ---------- History: toolbar + filter ---------- */
.up-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--up-line-soft); }
.up-toolbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.up-toolbar-title h2 { font-size: 15px; font-weight: 600; color: var(--up-ink); }
.up-toolbar-title p { font-size: 12.5px; color: var(--up-muted); margin-top: 1px; }
.up-filter { position: relative; flex-shrink: 0; }
.up-filter-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px;
    border-radius: 10px; border: 1px solid var(--up-line); background: #fff; cursor: pointer;
    font-size: 13.5px; font-weight: 500; color: var(--up-text); box-shadow: var(--up-shadow);
    transition: border-color .15s, box-shadow .15s;
}
.up-filter-btn:hover, .up-filter-btn[aria-expanded="true"] { border-color: #bcd0f5; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.up-filter-chip { padding: 2px 8px; border-radius: 6px; background: var(--up-accent-soft); color: var(--up-accent); font-size: 12px; font-weight: 600; }
.up-filter-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 290px; padding: 6px;
    background: #fff; border: 1px solid var(--up-line); border-radius: 14px;
    box-shadow: 0 20px 40px -16px rgba(16, 24, 40, .25), 0 4px 10px -4px rgba(16, 24, 40, .08);
}
.up-filter-head { padding: 8px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--up-faint); }
.up-filter-opt {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px;
    background: transparent; cursor: pointer; text-align: left; color: inherit; transition: background .15s;
}
.up-filter-opt:hover { background: var(--up-subtle); }
.up-filter-opt.is-on { background: var(--up-accent-soft); }
.up-filter-opt.is-on .up-ibox { color: var(--up-accent); background: #fff; border-color: #dbe6fe; }
.up-filter-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.up-filter-txt b { font-size: 13.5px; font-weight: 500; color: var(--up-ink); }
.up-filter-txt small { font-size: 12px; color: var(--up-muted); }
.up-drop-from { opacity: 0; transform: translateY(-6px) scale(.98); }

/* ---------- History: compact rows with expandable detail ---------- */
.up-day {
    padding: 10px 20px; font-size: 12px; font-weight: 600; color: var(--up-muted); letter-spacing: .02em;
    background: var(--up-subtle); border-bottom: 1px solid var(--up-line-soft);
}
.up-hrow { border-bottom: 1px solid var(--up-line-soft); }
.up-hrow-btn {
    width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 13px 20px; border: 0; background: #fff; cursor: pointer; text-align: left; color: inherit;
    transition: background .15s;
}
.up-hrow-btn:hover { background: #fafbfd; }
.up-hrow-btn:focus { outline: none; }
.up-hrow-btn:focus-visible { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35); }
.up-hrow-btn[aria-expanded="true"] { background: #f8faff; }
.up-hrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.up-hrow-t { font-size: 14px; font-weight: 500; color: var(--up-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-hrow-s { font-size: 12.5px; color: var(--up-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-hrow-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.up-hrow-amt { font-size: 14px; font-weight: 600; color: var(--up-ink); white-space: nowrap; }
.up-hrow-amt.in { color: #059669; }
.up-hrow-amt.out { color: var(--up-ink); }
.up-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; text-transform: capitalize; white-space: nowrap; }
.up-st::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.up-st.success { color: #15803d; }
.up-st.warn { color: #b45309; }
.up-st.danger { color: #b91c1c; }
.up-hrow-chev { color: var(--up-faint); transition: transform .25s var(--up-ease); }
.up-hrow-chev.is-open { transform: rotate(180deg); color: var(--up-text); }
.up-hrow-detail { background: #f8faff; }
.up-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; padding: 4px 20px 16px 66px; max-width: 820px; }
.up-dl > div { min-width: 0; }
.up-dl > div.is-wide { grid-column: 1 / -1; }
.up-dl dt { font-size: 12px; color: var(--up-muted); margin-bottom: 3px; }
.up-dl dd { margin: 0; font-size: 13.5px; color: var(--up-ink); word-break: break-word; }
.up-copyline { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.up-copyline > span:first-child { min-width: 0; }
.up-hrow-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 20px 16px; }

/* ---------- History page ---------- */
.up-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.up-sum > div { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border-left: 1px solid var(--up-line-soft); min-width: 0; }
.up-sum > div:first-child { border-left: 0; }
.up-sum-l { font-size: 13px; color: var(--up-muted); }
.up-sum-v { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--up-ink); }
.up-sum .up-bar { display: block; height: 4px; }
.up-eyebrow a { color: var(--up-muted) !important; }
.up-eyebrow a:hover { color: var(--up-accent) !important; }
.up-tabbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--up-line-soft); }
.up-tabs-line { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.up-tabs-line::-webkit-scrollbar { display: none; }
.up-tabs-line button {
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 15px 12px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer;
    font-size: 13.5px; font-weight: 500; color: var(--up-muted);
    transition: color .15s, border-color .2s, background .15s;
}
.up-tabs-line button:hover { color: var(--up-ink); }
.up-tabs-line button.is-on { color: var(--up-accent); border-bottom-color: var(--up-accent); }
.up-tabs-line button.is-on .up-ico { color: var(--up-accent); }
.up-loading { font-size: 12.5px; color: var(--up-muted); flex-shrink: 0; }
.up-dim { opacity: .5; transition: opacity .2s; pointer-events: none; }

.up-flash { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px solid; font-size: 13.5px; font-weight: 500; }
.up-flash.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.up-flash.danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }

.up-ellipsis { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-date { display: inline-flex; flex-direction: column; color: var(--up-ink); font-size: 13.5px; line-height: 1.35; }
.up-date small { font-size: 12px; color: var(--up-muted); }
.up-amount { font-weight: 600; font-size: 14px; }
.up-amount.in { color: #059669; }
.up-amount.out { color: #e11d48; }
.up-refid { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; padding: 3px 8px; border-radius: 7px; background: var(--up-subtle); border: 1px solid var(--up-line-soft); font-family: var(--up-mono); font-size: 12px; color: var(--up-muted); }
.up-sn { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--up-subtle); border: 1px solid var(--up-line-soft); font-size: 12.5px; color: var(--up-text); }
.up-sn .up-ellipsis { max-width: 210px; }
.up-empty-img { width: 72px; height: 72px; margin-bottom: 6px; filter: drop-shadow(0 8px 12px rgba(37, 99, 235, .2)); animation: upBob 4.5s ease-in-out infinite; }
.up-pager { padding: 14px 20px; border-top: 1px solid var(--up-line-soft); }

/* ---------- Announcement popup ---------- */
.up-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 20px; }
.up-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.up-modal-card {
    position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 40px);
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 20px; border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .35), 0 0 0 1px rgba(255, 255, 255, .6) inset;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.up-modal-grip { display: none; }
.up-modal-x {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer;
    display: grid; place-items: center; background: rgba(255, 255, 255, .8); color: #64748b;
    transition: background .15s, color .15s;
}
.up-modal-x:hover { background: #fff; color: #0f172a; }
.up-modal-x:focus { outline: none; }
.up-modal-x:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); }
.up-modal-hero {
    position: relative; display: grid; place-items: center; height: 116px; flex-shrink: 0;
    background:
        radial-gradient(240px 120px at 50% 120%, rgba(59, 130, 246, .22), transparent 70%),
        linear-gradient(180deg, #eaf3ff, #f6faff);
    border-bottom: 1px solid #e6eefb;
}
.up-modal-hero::before, .up-modal-hero::after {
    content: ""; position: absolute; border-radius: 999px; border: 1px solid rgba(59, 130, 246, .18);
    width: 120px; height: 120px; animation: upRipple 3s ease-out infinite;
}
.up-modal-hero::after { animation-delay: 1.5s; }
.up-modal-hero img { position: relative; width: 76px; height: 76px; filter: drop-shadow(0 10px 14px rgba(37, 99, 235, .28)); animation: upBob 4s ease-in-out infinite; }
.up-modal-body { padding: 20px 24px 6px; overflow-y: auto; }
.up-modal-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #eff4ff; color: #1d4ed8; font-size: 12px; font-weight: 600; }
.up-modal-body h2 { margin: 10px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -.015em; color: #0f172a; line-height: 1.3; }
.up-modal-text { margin-top: 10px; font-size: 14.5px; line-height: 1.65; color: #475569; word-break: break-word; }
.up-modal-text a { color: #2563eb; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.up-modal-foot { padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }
.up-modal-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; cursor: pointer; user-select: none; }
.up-modal-check input { width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; }
.up-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.up-modal-actions .up-btn { height: 42px; font-size: 14px; }

/* Transitions */
.up-fade-enter { transition: opacity .3s ease; }
.up-fade-leave { transition: opacity .2s ease; }
.up-fade-from { opacity: 0; }
.up-fade-to { opacity: 1; }
.up-pop-enter { transition: opacity .35s var(--up-ease), transform .45s var(--up-ease); }
.up-pop-leave { transition: opacity .2s ease, transform .2s ease; }
.up-pop-from { opacity: 0; transform: translateY(16px) scale(.97); }
.up-pop-to { opacity: 1; transform: none; }

@media (max-width: 640px) {
    .up-modal { align-items: flex-end; padding: 0; }
    .up-modal-card { max-width: none; max-height: 88vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .up-modal-grip { display: block; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 999px; background: #cbd5e1; z-index: 2; }
    .up-modal-hero { height: 104px; }
    .up-modal-body { padding: 18px 20px 4px; }
    .up-modal-body h2 { font-size: 18px; }
    .up-modal-foot { padding: 14px 20px 18px; }
    .up-pop-from { opacity: 1; transform: translateY(100%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .up-g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .up-g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .up-page { gap: 14px; padding-bottom: 32px; }
    .up-header h1 { font-size: 22px; }
    .up-header.is-simple h1 { font-size: 19px; }
    .up-actions { width: 100%; }
    .up-actions .up-btn { flex: 1 1 auto; }
    .up-grid { gap: 12px; }
    .up-g-2 { grid-template-columns: minmax(0, 1fr); }
    .up-kpi { padding: 14px 16px; gap: 8px; }
    .up-kpi-value { font-size: 20px; }
    .up-g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .up-kpi-wide { grid-column: span 2; }

    .up-wallet-main { flex-wrap: wrap; gap: 14px; padding: 18px; }
    .up-wallet-art { width: 72px; height: 69px; }
    .up-wallet-value { font-size: 26px; }
    .up-wallet-actions { margin-left: 0; width: 100%; }
    .up-wallet-actions .up-btn { flex: 1 1 0; }
    .up-wallet-foot { padding: 12px 18px; }
    .up-wallet-logos img { width: 26px; height: 26px; }
    .up-kpi .up-spark { display: none; }
    .up-kpi-foot { min-height: 0; }
    .up-kpi-note { font-size: 12px; }

    .up-shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .up-shortcuts .up-tile { flex-direction: column; text-align: center; gap: 8px; padding: 12px 6px; }
    .up-shortcuts .up-tile-name { font-size: 12px; line-height: 1.3; }
    .up-shortcuts .up-tile-desc, .up-shortcuts .up-go { display: none; }
    .up-shortcuts .up-tile-art { width: 42px; height: 42px; }
    .up-card-head { padding: 14px 16px; }
    .up-card-body { padding: 16px; }
    .up-row { padding: 12px 16px; }
    .up-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .up-stats > div { padding: 12px 16px; }
    .up-stats > div:nth-child(3) { border-left: 0; }
    .up-stats > div:nth-child(n+3) { border-top: 1px solid var(--up-line-soft); }

    /* table → stacked rows */
    .up-table.up-stack thead { display: none; }
    .up-table.up-stack, .up-table.up-stack tbody, .up-table.up-stack tr, .up-table.up-stack td { display: block; width: 100%; }
    .up-table.up-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--up-line-soft); }
    .up-table.up-stack tbody tr:last-child { border-bottom: 0; }
    .up-table.up-stack td { padding: 4px 0; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .up-table.up-stack td[data-label]::before { content: attr(data-label); font-size: 12.5px; color: var(--up-muted); }
    .up-table.up-stack td.up-td-head { padding-bottom: 8px; }
    .up-table.up-stack td.up-td-act { justify-content: flex-end; padding-top: 8px; }
    .up-orders tbody td:first-child, .up-orders tbody tr:hover td:first-child, .up-orders tbody tr.tone-warn td:first-child { box-shadow: none; }

    /* compact order cards: [head] / [phone | status] / [otp] / [price | action] */
    .up-orders.up-stack tbody tr:not(:has(.up-td-empty)) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; }
    .up-orders.up-stack td[data-label]::before { display: none; }
    .up-orders.up-stack td { padding: 0; }
    .up-orders.up-stack td.up-td-head { grid-column: 1 / -1; padding-bottom: 2px; }
    .up-orders.up-stack td.c-phone { grid-column: 1; grid-row: 2; justify-content: flex-start; }
    .up-orders.up-stack td.c-status { grid-column: 2; grid-row: 2; }
    .up-orders.up-stack td.c-otp { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
    .up-orders.up-stack td.c-otp.is-empty { display: none; }
    .up-orders.up-stack td.c-price { grid-column: 1; grid-row: 4; justify-content: flex-start; font-size: 15px; }
    .up-orders.up-stack td.up-td-act { grid-column: 2; grid-row: 4; padding: 0; }

    /* generic compact rows: [head] / [g2l | g2r] / [g3l | g3r] / [g4] */
    .up-cards.up-stack tbody tr:not(:has(.up-td-empty)) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; }
    .up-cards.up-stack td[data-label]::before { display: none; }
    .up-cards.up-stack td { padding: 0; }
    .up-cards.up-stack td.up-td-head { grid-column: 1 / -1; padding-bottom: 2px; }
    .up-cards.up-stack td.g2l { grid-column: 1; grid-row: 2; justify-content: flex-start; }
    .up-cards.up-stack td.g2r { grid-column: 2; grid-row: 2; justify-content: flex-end; }
    .up-cards.up-stack td.g3l { grid-column: 1; grid-row: 3; justify-content: flex-start; }
    .up-cards.up-stack td.g3r { grid-column: 2; grid-row: 3; justify-content: flex-end; }
    .up-cards.up-stack td.g4 { grid-column: 1 / -1; grid-row: 4; justify-content: flex-end; }
    .up-cards.up-stack td.g4 .up-sn { max-width: 100%; }
    .up-cards .up-date { flex-direction: row; gap: 6px; align-items: baseline; font-size: 13px; }
    .up-cards .up-ellipsis { max-width: 230px; }
    .up-cards.up-stack td.g3l, .up-cards.up-stack td.g2l { min-width: 0; }
    .up-cards .up-refid { max-width: 100%; align-self: center; height: auto; line-height: 1.4; }
    .up-cards.up-stack td { align-items: center; align-self: center; }
    .up-phead h1 { font-size: 20px; }
    .up-stats3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .up-stats3 > div { padding: 12px 16px; }
    .up-stats3 > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--up-line-soft); }
    .up-stats3 > div:nth-child(2) { border-left: 0; }
    .up-stats3 strong { font-size: 17px; }
    .up-hsum { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
    .up-hsum-art { position: absolute; right: 12px; top: 12px; width: 52px; height: 52px; }
    .up-hsum-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .up-hsum-grid { padding-right: 52px; }
    .up-hsum-ratio { grid-column: 1 / -1; margin-right: -52px; }
    .up-hsum-v { font-size: 18px; }
    .up-toolbar { padding: 12px 16px; }
    .up-toolbar-title .up-ibox { display: none; }
    .up-filter-btn > span:first-of-type { display: none; }
    .up-filter-menu { width: min(290px, calc(100vw - 48px)); }
    .up-day { padding: 9px 16px; }
    .up-hrow-btn { padding: 12px 16px; gap: 10px; }
    .up-hrow-chev { display: none; }
    .up-dl { padding: 4px 16px 14px; gap: 12px 16px; }
    .up-hrow-actions { padding: 0 16px 14px; }
    .up-hrow-actions .up-btn { flex: 1; }
    .up-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .up-sum > div { padding: 14px 16px; }
    .up-sum > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--up-line-soft); }
    .up-sum-v { font-size: 18px; }
    .up-tabbar { padding: 0 8px; }
    .up-tabs-line button { padding: 13px 10px 11px; font-size: 13px; }
    .up-loading { display: none !important; }
    .up-pager { padding: 12px 16px; }

    .up-chart-summary { padding: 14px 16px 0; gap: 8px; }
    .up-series { flex: 1 1 0; min-width: 0; padding: 8px 10px; }
    .up-series-value { font-size: 15px; }
    .up-chart-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px 16px 16px; gap: 8px; }
    .up-chart-stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
    .up-chart-stat .up-tint { width: 26px; height: 26px; border-radius: 8px; }
    .up-chart-stat-l { font-size: 11px; }
    .up-chart-stat-v { font-size: 13px; }

    .up-ref { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
    .up-ref-art { position: absolute; right: 12px; top: 12px; width: 76px; height: 76px; }
    .up-ref-intro h2 { font-size: 17px; max-width: calc(100% - 84px); }
    .up-ref-intro p { max-width: calc(100% - 84px); }
    .up-ref-share .up-btn { flex: 1 1 100%; }
    .up-table.up-stack td.up-td-empty { display: block; }
    .up-table.up-stack tbody tr:hover td { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .up-page *, .up-page *::before, .up-page *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Deposit / Top up
   ========================================================================== */
.dp { max-width: 1040px; }
/* Balance card (same as the mobile app) */
.dp-card {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; min-height: 156px; padding: 26px 28px; border-radius: 24px;
    background: linear-gradient(90deg, #6366f1 0%, #7a5cf4 52%, #6b4fe3 100%);
    box-shadow: 0 16px 32px -14px rgba(99, 102, 241, .6);
    color: #fff;
}
.dp-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(420px 180px at 0% 0%, rgba(255, 255, 255, .16), transparent 70%);
}
.dp-card-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; max-width: 62%; }
.dp-card-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .92); }
.dp-card-text strong { font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; color: #fff; }
.dp-card-text small { font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.dp-card-art {
    position: absolute; z-index: 0; right: -18px; bottom: -34px; width: 210px; height: 210px; object-fit: cover;
    -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
    animation: dpFloat 6s ease-in-out infinite;
}
@keyframes dpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .dp-card-art { animation: none; } }

/* Crypto invoice */
.dp-cx { width: 100%; display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 16px; border: 1px solid var(--up-line); background: var(--up-subtle); text-align: left; }
.dp-cx-head { display: flex; align-items: center; gap: 12px; }
.dp-cx-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dp-cx-head b { font-size: 14.5px; font-weight: 600; color: var(--up-ink); }
.dp-cx-head small { font-size: 12px; color: var(--up-muted); font-variant-numeric: tabular-nums; }
.dp-cx-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: #fff4e8; color: #f7931a; border: 1px solid #fde3c3; }
.dp-cx-ico svg { width: 22px; height: 22px; }
.dp-cx-secure { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--up-green-soft); border: 1px solid #c6f0d4; color: #15803d; font-size: 11.5px; font-weight: 600; }
.dp-cx-rows { margin: 0; padding: 4px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--up-line); }
.dp-cx-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 13.5px; }
.dp-cx-rows > div + div { border-top: 1px dashed var(--up-line); }
.dp-cx-rows dt { color: var(--up-muted); flex-shrink: 0; }
.dp-cx-rows dd { margin: 0; font-weight: 600; color: var(--up-ink); text-align: right; }
.dp-coins { display: flex; flex-direction: column; gap: 10px; }
.dp-coins-label { font-size: 12.5px; font-weight: 600; color: var(--up-muted); }
.dp-coins-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dp-coin {
    display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; border-radius: 10px;
    background: #fff; border: 1px solid var(--up-line); font-size: 12.5px; font-weight: 600; color: var(--up-ink); letter-spacing: .01em;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.dp-coin:hover { border-color: #cdd8ea; transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(15, 23, 42, .25); }
.dp-coin img { width: 22px; height: 22px; flex-shrink: 0; border-radius: 999px; }
.dp-coin.is-more { justify-content: center; color: var(--up-accent); background: var(--up-accent-soft); border-color: #dbe6fe; font-size: 12px; }
.dp-steps { margin: 0; padding: 0; list-style: none; counter-reset: dp; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; }
.dp-steps li { counter-increment: dp; display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--up-text); }
.dp-steps li::before { content: counter(dp); width: 22px; height: 22px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center; background: var(--up-accent-soft); border: 1px solid #dbe6fe; color: var(--up-accent); font-size: 12px; font-weight: 600; }
.dp-cx .dp-steps li { color: var(--up-muted); }
.dp-cx .dp-steps b { color: var(--up-ink); font-weight: 600; }
.dp-cx-actions { display: flex; gap: 8px; }
.dp-cx-actions .dp-cx-pay { flex: 1; height: 40px; font-size: 14px; font-weight: 600; border-radius: 10px; gap: 7px; }
.dp-cx-copy { width: 40px; height: 40px; padding: 0; border-radius: 10px; flex-shrink: 0; }
.dp-cx-copy .dp-cx-c2 { display: none; color: var(--up-green); }
.dp-cx-copy.is-done .dp-cx-c1 { display: none; }
.dp-cx-copy.is-done .dp-cx-c2 { display: inline-block; }
.dp-cx-warn { display: flex; gap: 10px; padding: 11px 12px; border-radius: 10px; background: var(--up-amber-soft); border: 1px solid #fde68a; color: #b45309; }
.dp-cx-warn .up-ico { flex-shrink: 0; margin-top: 1px; }
.dp-cx-warn p { font-size: 12.5px; line-height: 1.55; color: #92400e; }

.dp-alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.dp-alert.is-ok { background: var(--up-green-soft); border: 1px solid #bbf7d0; color: #15803d; }

.dp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dp-main { padding: 0; }
.dp-sec { padding: 22px 24px; }
.dp-sec + .dp-sec { border-top: 1px solid var(--up-line-soft); }
.dp-h { display: block; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--up-ink); letter-spacing: -.01em; }

.dp-amount {
    display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 20px; border-radius: 14px;
    border: 1.5px solid var(--up-line); background: #fff; color: var(--up-faint); transition: border-color .15s, box-shadow .15s;
}
.dp-amount:focus-within { border-color: #6c9cf5; box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); color: var(--up-accent); }
.dp-amount.is-err { border-color: #fca5a5; }
.dp-amount > span { font-size: 26px; font-weight: 700; color: var(--up-accent); letter-spacing: -.02em; }
.dp-amount input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; padding: 0; box-shadow: none;
    font-family: inherit; font-size: 30px; font-weight: 700; color: var(--up-ink); letter-spacing: -.025em; font-variant-numeric: tabular-nums;
    -moz-appearance: textfield; appearance: textfield;
}
.dp-amount input:focus { box-shadow: none; outline: none; }
.dp-amount input::-webkit-outer-spin-button, .dp-amount input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dp-amount input::placeholder { color: #cbd5e1; }
.dp-hint, .dp-err { margin-top: 8px !important; font-size: 12.5px; color: var(--up-faint); }
.dp-err { color: #b91c1c; font-weight: 500; }

.dp-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.dp-chips button {
    height: 42px; border-radius: 10px; border: 1px solid var(--up-line); background: #fff; cursor: pointer;
    font-size: 13.5px; font-weight: 600; color: var(--up-text); font-variant-numeric: tabular-nums;
    transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.dp-chips button:hover { border-color: #b9cff8; color: var(--up-accent); }
.dp-chips button:active { transform: scale(.97); }
.dp-chips button.is-on { border-color: var(--up-accent); background: var(--up-accent-soft); color: var(--up-accent); }

.dp-methods { display: flex; flex-direction: column; gap: 10px; }
.dp-method {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; cursor: pointer;
    border: 1.5px solid var(--up-line); background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
}
.dp-method:hover { border-color: #c7d6ef; }
.dp-method.is-on { border-color: var(--up-accent); background: #fbfcff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.dp-method:has(.dp-sr:focus-visible) { outline: 2px solid var(--up-accent); outline-offset: 2px; }
.dp-sr { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dp-method-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.dp-method-ico.is-blue { background: var(--up-accent-soft); color: var(--up-accent); }
.dp-method-ico.is-orange { background: #fff4e8; color: #f7931a; }
.dp-method-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dp-method-body b { font-size: 14.5px; font-weight: 600; color: var(--up-ink); }
.dp-method-body small { font-size: 12.5px; color: var(--up-muted); }
.dp-method-logos { display: flex; gap: 5px; margin-top: 6px; }
.dp-method-logos img { width: 20px; height: 20px; border-radius: 5px; box-shadow: 0 1px 3px rgba(15, 23, 42, .18); }
.dp-radio { width: 22px; height: 22px; border-radius: 999px; border: 2px solid #cfd6e1; flex-shrink: 0; transition: border-color .15s, background .15s; position: relative; }
.dp-method.is-on .dp-radio { border-color: var(--up-accent); background: var(--up-accent); }
.dp-method.is-on .dp-radio::after {
    content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.dp-sum { position: sticky; top: 88px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dp-sum h2 { font-size: 15px; font-weight: 600; color: var(--up-ink); }
.dp-sum dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.dp-sum dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.dp-sum dt { color: var(--up-muted); }
.dp-sum dd { margin: 0; font-weight: 600; color: var(--up-ink); text-align: right; }
.dp-sum .is-total { padding-top: 12px; border-top: 1px dashed var(--up-line); }
.dp-sum .is-total dd { font-size: 18px; color: var(--up-accent); }
.dp-btn-lg { height: 48px; width: 100%; font-size: 15px; font-weight: 600; border-radius: 12px; gap: 8px; }
.dp-note { display: flex; gap: 7px; font-size: 12.5px; line-height: 1.55; color: var(--up-muted); }
.dp-note .up-ico { flex-shrink: 0; margin-top: 2px; color: var(--up-accent); }
.dp-foot { font-size: 12.5px; color: var(--up-faint); text-align: center; }
.dp-foot a { color: var(--up-accent) !important; font-weight: 500; }
.dp-foot a:hover { text-decoration: underline; }

/* Waiting for payment */
.dp-pay { max-width: 520px; width: 100%; margin: 0 auto; padding: 28px 24px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.dp-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--up-amber-soft); border: 1px solid #fde68a; color: #b45309; font-size: 13px; font-weight: 600; }
.dp-status i { width: 8px; height: 8px; border-radius: 999px; background: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); animation: dpPulse 1.6s infinite; }
@keyframes dpPulse { 70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
.dp-pay-label { font-size: 13.5px; color: var(--up-muted); margin-top: 4px !important; }
.dp-pay-amount { margin-top: -8px; font-size: 34px; font-weight: 700; color: var(--up-ink); letter-spacing: -.03em; }
.dp-qr { width: 100%; max-width: 300px; aspect-ratio: 1; padding: 16px; border-radius: 18px; border: 1px solid var(--up-line); background: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -20px rgba(15, 23, 42, .35); }
.dp-qr img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.dp-qr-fail { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--up-muted); padding: 12px; }
.dp-wallets { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.dp-wallets span { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--up-muted); }
.dp-wallets img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 6px -2px rgba(15, 23, 42, .3); }
.dp-muted { font-size: 13px; color: var(--up-faint); line-height: 1.55; }
.dp-timer { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--up-accent); }
.dp-timer b { font-weight: 700; font-variant-numeric: tabular-nums; }
.dp-pay-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--up-line-soft); }
.dp-pay-actions .up-btn { height: 46px; font-size: 14.5px; font-weight: 600; border-radius: 12px; }
.dp-cancel { color: #dc2626 !important; border-color: #fecaca !important; }
.dp-cancel:hover { background: var(--up-red-soft) !important; }


@media (max-width: 900px) {
    .dp-grid { grid-template-columns: minmax(0, 1fr); }
    .dp-sum { position: static; }
}
@media (max-width: 640px) {
    .dp-card { min-height: 140px; padding: 22px 20px; border-radius: 22px; }
    .dp-card-text { max-width: 64%; }
    .dp-card-text strong { font-size: 28px; }
    .dp-card-text small { font-size: 11.5px; }
    .dp-card-art { width: 170px; height: 170px; right: -26px; bottom: -30px; }
    .dp-cx { padding: 14px; }
    .dp-coin { gap: 5px; padding: 0 6px; font-size: 11.5px; justify-content: center; }
    .dp-coin img { width: 18px; height: 18px; }
    .dp-cx-rows { padding: 2px 12px; }
    .dp-sec { padding: 18px 16px; }
    .dp-amount { height: 64px; padding: 0 16px; }
    .dp-amount > span { font-size: 22px; }
    .dp-amount input { font-size: 26px; }
    .dp-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dp-chips button { font-size: 13px; }
    .dp-pay { padding: 22px 16px 18px; }
    .dp-pay-amount { font-size: 30px; }
    .dp-wallets { gap: 10px; }
}

/* ---------- API keys: webhook ---------- */
.ak-wh .ak-card-head p { max-width: 620px; }
.ak-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--up-muted); font-size: 11.5px; font-weight: 600; vertical-align: 2px; }
.ak-badge.is-on { background: var(--up-green-soft); color: #15803d; }
.ak-wh-flash { display: flex; align-items: center; gap: 8px; margin: 14px 20px 0; padding: 10px 12px; border-radius: 10px; background: var(--up-green-soft); border: 1px solid #c6f0d4; color: #15803d; font-size: 13.5px; }
.ak-wh-ip { display: flex; align-items: center; gap: 12px; margin: 16px 20px 0; padding: 12px 14px; border-radius: 12px; background: var(--up-amber-soft); border: 1px solid #fde68a; color: #92400e; }
.ak-wh-ip > .up-ico { flex-shrink: 0; color: #d97706; }
.ak-wh-ip > div:first-of-type { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ak-wh-ip b { font-size: 13.5px; font-weight: 600; color: #78350f; }
.ak-wh-ip span { font-size: 12.5px; line-height: 1.5; }
.ak-wh-ipval { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ak-wh-ipval code { padding: 5px 10px; border-radius: 8px; background: #fff; border: 1px solid #fde68a; font-size: 13.5px; font-weight: 600; color: var(--up-ink); }
.ak-wh-ipval button, .ak-chip {
    height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--up-line); background: #fff; cursor: pointer;
    font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--up-text); white-space: nowrap;
}
.ak-wh-ipval button:hover, .ak-chip:hover { border-color: #cbd5e1; background: var(--up-subtle); }
.ak-wh .ak-form { border-bottom: 0; }
.ak-wh-secret { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 20px; padding: 14px 0; border-top: 1px solid var(--up-line-soft); }
.ak-wh-secret-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ak-wh-secret-label b { font-size: 13.5px; font-weight: 600; color: var(--up-ink); }
.ak-wh-secret-label span { font-size: 12.5px; color: var(--up-muted); }
.ak-wh-secret-val { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ak-wh-secret-val code { padding: 6px 10px; border-radius: 8px; background: var(--up-subtle); border: 1px solid var(--up-line); font-size: 12.5px; color: var(--up-ink); word-break: break-all; }
.ak-wh-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 20px 18px; }
.ak-wh-actions .ak-revoke { margin-left: auto; }
.ak-wh-test { display: flex; align-items: flex-start; gap: 8px; margin: 0 20px 18px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; }
.ak-wh-test .up-ico { flex-shrink: 0; margin-top: 2px; }
.ak-wh-test.is-ok { background: var(--up-green-soft); border: 1px solid #c6f0d4; color: #15803d; }
.ak-wh-test.is-err { background: var(--up-red-soft); border: 1px solid #fecaca; color: #b91c1c; }
.ak-wh-log { padding: 14px 20px 6px; border-top: 1px solid var(--up-line-soft); }
.ak-wh-log h3 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--up-ink); }
.ak-wh-log ul { list-style: none; margin: 0; padding: 0; }
.ak-wh-log li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 8px 0; font-size: 13px; }
.ak-wh-log li + li { border-top: 1px dashed var(--up-line-soft); }
.ak-wh-log li small { grid-column: 2 / -1; font-size: 12px; color: #b91c1c; }
.ak-wh-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--up-faint); }
.ak-wh-dot.is-delivered { background: #22c55e; }
.ak-wh-dot.is-pending, .ak-wh-dot.is-sending { background: #f59e0b; }
.ak-wh-dot.is-failed { background: #ef4444; }
.ak-wh-ev { font-weight: 600; color: var(--up-ink); }
.ak-wh-st { color: var(--up-muted); white-space: nowrap; }
.ak-wh-log time { color: var(--up-faint); white-space: nowrap; font-size: 12.5px; }
.ak-wh-docs { padding: 12px 20px 18px; font-size: 13px; color: var(--up-muted); }
@media (max-width: 640px) {
    .ak-wh-ip { flex-wrap: wrap; }
    .ak-wh-ipval { width: 100%; }
    .ak-wh-actions .ak-revoke { margin-left: 0; }
    .ak-wh-log li { grid-template-columns: 10px minmax(0, 1fr) auto; }
    .ak-wh-log li time { grid-column: 2 / -1; }
}

/* ---------- API docs: webhook lists ---------- */
.dx-text h3 { margin: 18px 0 6px !important; font-size: 14.5px; font-weight: 600; color: var(--up-ink); }
.dx-steps, .dx-list { margin: 10px 0 14px !important; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; color: var(--up-text); }
.dx-steps { list-style: decimal; }
.dx-list { list-style: disc; }
.dx-steps a { color: var(--up-accent); font-weight: 600; }
.dx-text code { word-break: break-word; }
