/* ==========================================================================
   SEOTOP — seotop.site
   Red Noir design system. Single stylesheet for every page
   (landing, auth, member, buyer, admin, tasks, go).
   Tokens → base → controls → surfaces → page shells → utilities.
   ========================================================================== */

@property --seotop-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #000;
  --bg-soft: #0a0506;
  --surface: rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.06);
  --surface-solid: #0c0c0e;
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.17);
  --text: #fafafa;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --dim: #71717a;
  --red: #ef233c;
  --red-2: #ff4d63;
  --red-deep: #b3122a;
  --red-soft: rgba(239,35,60,.12);
  --red-line: rgba(239,35,60,.42);
  --red-glow: rgba(239,35,60,.45);
  --ok: #34d399;
  --warn: #fbbf24;
  --info: #60a5fa;
  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-pill: 999px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-d: "Manrope", "Inter", system-ui, sans-serif;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.9);
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 400 15px/1.6 var(--font); color: var(--text);
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(239,35,60,.17), transparent 70%),
    linear-gradient(180deg, #14050700 0%, #000 60%), #000;
  background-attachment: fixed;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 25%, transparent 78%);
          mask-image: radial-gradient(circle at 50% 30%, #000 25%, transparent 78%);
}
::selection { background: var(--red); color: #fff; }
img, svg, video { max-width: 100%; }
a { color: var(--red-2); text-decoration: none; transition: color .15s; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(28px, 4.4vw, 44px); }
h2 { font-size: clamp(20px, 2.6vw, 26px); }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { margin: 0 0 .8em; color: var(--text-2); }
small { color: var(--muted); }
b, strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code, pre, kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
code { background: var(--red-soft); color: #ffb4be; padding: .12em .45em; border-radius: 6px; font-size: .9em; }
pre { background: #060606; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; overflow: auto; color: #e4e4e7; font-size: 13px; line-height: 1.6; }
pre code { background: none; padding: 0; color: inherit; }
ol, ul { padding-left: 20px; color: var(--text-2); }
li { margin: 4px 0; }
:focus-visible { outline: 2px solid var(--red-2); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }
[hidden], .hidden { display: none !important; }
.muted { color: var(--muted); }
.tm-atmosphere, .buyer-bg, .tm-menu-meteors, .tm-gridline { display: none !important; }
canvas.cosmic, .cosmic-canvas { display: none !important; }

/* ---------- Labels (eyebrow / kicker) ---------- */
.eyebrow, .kicker, .ba-kicker, .quick-kicker, .admin-section-kicker, .task-label, .embed-label {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1 var(--font-d); letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-2); margin: 0 0 12px;
}
.eyebrow::before, .kicker::before, .ba-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px var(--red-soft), 0 0 12px var(--red-glow);
}

/* ---------- Buttons ---------- */
button { font: inherit; color: inherit; }
.btn, .cta, .ghost, .hero-btn, .ba-submit, .admin-btn, .small-btn, .small-button, .glass-btn,
.open-btn, .detail-btn, .security-btn, .tm-shortlink-picker-btn.__none {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid var(--red); background: var(--red); color: #fff;
  font: 600 14px/1 var(--font-d); letter-spacing: .01em; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .2s;
  box-shadow: 0 8px 28px -10px var(--red-glow);
}
.btn:hover, .cta:hover, .hero-btn:hover, .ba-submit:hover, .admin-btn:hover, .open-btn:hover, .detail-btn:hover {
  background: var(--red-2); border-color: var(--red-2); color: #fff; box-shadow: 0 10px 34px -8px var(--red-glow);
}
.btn:active, .cta:active, .hero-btn:active, .ba-submit:active { transform: scale(.97); }
.btn:disabled, button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.full, .full.btn, .ba-submit { width: 100%; }
.btn.large, .large { min-height: 52px; padding: 0 28px; font-size: 15px; }
.small-btn, .small-button, .open-btn, .detail-btn, .btn.small { min-height: 34px; padding: 0 14px; font-size: 13px; }

/* secondary */
.btn.secondary, .btn.ghost, .ghost, .glass-btn, .security-btn, .btn.outline {
  background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: none;
}
.btn.secondary:hover, .btn.ghost:hover, .ghost:hover, .glass-btn:hover, .security-btn:hover {
  background: var(--surface-2); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: none;
}
.btn.danger, button.danger, .danger.btn { background: transparent; border-color: var(--red-line); color: #ff8a98; box-shadow: none; }
.btn.danger:hover, button.danger:hover { background: var(--red-soft); border-color: var(--red); color: #fff; }

/* shiny CTA (rotating red edge) */
.cta, .hero-btn, .ba-submit, .btn.primary.large {
  position: relative; isolation: isolate; overflow: hidden; border: 2px solid transparent;
  background:
    linear-gradient(#0a0a0a, #0a0a0a) padding-box,
    conic-gradient(from var(--seotop-angle), transparent 0%, var(--red) 6%, var(--red-2) 16%, var(--red) 30%, transparent 42%, transparent 100%) border-box;
  animation: seotop-spin 3s linear infinite; box-shadow: 0 0 40px -14px var(--red-glow);
}
.cta:hover, .hero-btn:hover, .ba-submit:hover, .btn.primary.large:hover { background:
    linear-gradient(#170608, #170608) padding-box,
    conic-gradient(from var(--seotop-angle), transparent 0%, var(--red) 6%, var(--red-2) 16%, var(--red) 30%, transparent 42%, transparent 100%) border-box; border-color: transparent; }
@keyframes seotop-spin { to { --seotop-angle: 360deg; } }
.landing-btn-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.landing-btn-icon svg { width: 20px; height: 20px; }
.landing-arrow { transition: transform .2s var(--ease); }
.cta:hover .landing-arrow, .ghost:hover .landing-arrow { transform: translateX(3px); }

/* admin: plain .btn is neutral, .primary is red */
.admin-shell .btn:not(.primary):not(.danger), .admin-main .btn:not(.primary):not(.danger) {
  background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: none; animation: none;
}
.admin-shell .btn:not(.primary):not(.danger):hover { background: var(--surface-2); border-color: rgba(255,255,255,.3); }
.admin-shell .btn.primary { animation: none; background: var(--red); border: 1px solid var(--red); }
.admin-shell .btn.primary:hover { background: var(--red-2); }

/* ---------- Forms ---------- */
label { display: block; font: 500 13px/1.4 var(--font); color: var(--text-2); margin: 12px 0 0; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { margin: 0; font-weight: 600; color: var(--text); }
.field small, .field-help, small.hint-text { color: var(--dim); font-size: 12px; line-height: 1.5; }
input, select, textarea, .task-input, .review-link {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: rgba(255,255,255,.04); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: 400 14px/1.4 var(--font); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
label > input, label > select, label > textarea { margin-top: 7px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
select option { background: #111; color: #fff; }
input::placeholder, textarea::placeholder { color: #52525b; }
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,.28); }
input:focus, select:focus, textarea:focus { border-color: var(--red); background: rgba(239,35,60,.05); box-shadow: 0 0 0 4px var(--red-soft); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--red); vertical-align: middle; }
input[type="file"] { padding: 9px 12px; font-size: 13px; }
input[type="file"]::file-selector-button { background: var(--red-soft); color: #ffb4be; border: 1px solid var(--red-line); border-radius: var(--r-pill); padding: 6px 14px; margin-right: 12px; font: 600 12px var(--font-d); cursor: pointer; }
input[type="range"] { accent-color: var(--red); padding: 0; min-height: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid .full, .form-grid > .field.full { grid-column: 1 / -1; }
.compact-form { display: grid; gap: 12px; }
.calc { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px dashed var(--red-line); border-radius: var(--r-sm); background: var(--red-soft); }
.calc span { font-size: 12px; color: var(--muted); }
.calc b { font: 800 20px var(--font-d); color: #fff; }
.upload-preview, .task-img-preview, .guide-img, .preview img { display: block; max-width: 100%; max-height: 220px; border-radius: var(--r-sm); border: 1px solid var(--line); margin-top: 8px; object-fit: contain; }

/* ---------- Messages & notices ---------- */
.msg, .buyer-msg, .buyer-error, .security-msg, .task-error, .tmcw-msg:not([class*="tmcw-"]) { min-height: 0; margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.msg:empty, .buyer-msg:empty { display: none; }
.msg.success, .msg.ok, .ok, .good { color: var(--ok); }
.msg.error, .buyer-error, .error, .err, .task-error, .security-msg.error { color: #ff8a98; }
.notice, .alert, .hint, .warn, .detail-note, .auto-box, .usdt-rate-box {
  display: block; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  border-left: 3px solid var(--red); background: var(--surface); color: var(--text-2); font-size: 14px; line-height: 1.6;
}
.warn { border-left-color: var(--warn); background: rgba(251,191,36,.07); color: #fde68a; }
.hint { border-left-color: var(--info); background: rgba(96,165,250,.07); }
.empty, .empty-panel, .tm-notify-empty {
  padding: 28px 18px; text-align: center; color: var(--muted); font-size: 14px;
  border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--surface);
}
.loading, .member-loading-panel, .fatal { padding: 28px 18px; text-align: center; color: var(--muted); }
.fatal { color: #ff8a98; border: 1px solid var(--red-line); border-radius: var(--r); background: var(--red-soft); }
.loading-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--red); animation: seotop-rot .8s linear infinite; margin: 0 auto 10px; }
@keyframes seotop-rot { to { transform: rotate(360deg); } }

/* ---------- Surfaces ---------- */
.card, .panel, .admin-card, .box, .stat, .order, .item, .rule-card, .api-doc-card, .api-guide-card, .api-use-card,
.profile-card, .profile-card-pro, .profile-password-card, .security-card, .embed-card, .create-link-card,
.member-chart-card, .member-rate-card, .tm-quick-card, .tm-history-card, .tm-review-scans-card, .task-modal-card, .task-card, .task-head,
.source-card, .location-card, .notification-card, .withdraw-balance-card, .payment-box, .vietqr-box, .ba-card, .tm-task-list-card,
.api-key-card-pro, .api-hero-pro, .payout-history, .user-row, .report-row, .ledger-row.__card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card, .panel, .admin-card, .box, .profile-card, .profile-card-pro, .security-card, .embed-card, .create-link-card, .member-chart-card, .member-rate-card, .api-hero-pro, .api-key-card-pro, .withdraw-balance-card { padding: 22px; margin-bottom: 18px; }
.card-body { padding: 20px 22px; }
.card-head, .panel-title, .section-head, .page-title, .item-head, .detail-head, .chart-head, .embed-head, .rules-head, .local-history-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.card-head { padding: 18px 22px 0; margin: 0; }
.panel-title h2, .page-title h2, .section-head h2, .card-head h2 { margin: 0; }
.panel-title p, .page-title p { margin: 6px 0 0; font-size: 14px; }
.page-head { margin: 4px 0 24px; }
.page-head h1 { margin-bottom: 8px; }
.page-head p { max-width: 70ch; color: var(--muted); }
.panel:hover, .admin-card:hover, .order:hover { border-color: var(--line-2); }
.glow-border, .tm-quick-card:hover, .rule-card:hover { border-color: var(--red-line); }

/* stats */
.stats, .member-overview-grid, .tm-neutral-grid, .stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px;
}
.stat { position: relative; overflow: hidden; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, var(--red-soft), transparent 70%); pointer-events: none; }
.stat > span, .stat > small { font: 500 12px/1.3 var(--font); color: var(--muted); letter-spacing: .04em; }
.stat > b { font: 800 clamp(20px, 2.3vw, 28px)/1.15 var(--font-d); color: #fff; letter-spacing: -.02em; overflow-wrap: break-word; word-break: normal; white-space: nowrap; }
.stat > em { font-style: normal; font-size: 12px; color: var(--dim); }
.stat-gold > b, .stat-orange > b, .stat-purple > b, .stat-blue > b { color: #fff; }
.stat-gold::before, .stat-orange::before, .stat-purple::before, .stat-blue::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.stat-purple::before { opacity: .75; } .stat-blue::before { opacity: .55; } .stat-orange::before { opacity: .4; }

.grid2, .detail-grid, .task-modal-grid, .profile-grid, .profile-info-grid, .rules-grid, .deposit-grid, .notification-grid, .api-doc-grid, .api-doc-grid-pro, .withdraw-grid-pro, .withdraw-subgrid, .source-approval-grid, .tm-task-list-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px;
}
.grid { display: grid; gap: 14px; }
.actions, .hero-actions, .gb-actions, .source-actions, .user-actions, .short-result-actions, .local-link-actions, .task-actions, .auto-row, .api-create-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}

/* tags / badges / status */
.tag, .badge, .tm-live-pill, .tm-cache-badge, .source-status, .order-status, .tm-earn-type-badge, .source-approval-badge, .api-live-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill);
  font: 600 12px/1.3 var(--font-d); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); white-space: nowrap;
}
.order-status.active, .source-status.approved, .source-status.on, .tag.good, .badge.good, .tm-live-pill, .api-live-badge, .approved { color: var(--ok); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.order-status.pending, .source-status.pending, .pending { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.08); }
.order-status.completed { color: var(--info); border-color: rgba(96,165,250,.35); background: rgba(96,165,250,.08); }
.source-status.locked, .tag.danger { color: #ff8a98; border-color: var(--red-line); background: var(--red-soft); }
.tm-live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: seotop-pulse 1.8s infinite; }
@keyframes seotop-pulse { 50% { opacity: .3; } }

/* progress */
.progress { height: 7px; margin-top: 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.08); overflow: hidden; }
.progress > i, .progress > .bar, .progress > span, .bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red-deep), var(--red), var(--red-2)); box-shadow: 0 0 14px var(--red-glow); }
.bar { height: 6px; }

/* orders */
.orders { display: grid; gap: 12px; }
.order { padding: 18px 20px; }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.order-title { font: 700 15px var(--font-d); color: #fff; }
.order-meta, .meta, .task-meta, .task-modal-meta, .tm-history-meta, .compact-meta, .user-meta { color: var(--muted); font-size: 13px; line-height: 1.6; }
.id-soft { color: var(--dim); font-weight: 400; }

/* tables */
.table-wrap, .user-list-frame { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(0,0,0,.35); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 16px; font: 600 12px/1.3 var(--font-d); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.035); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(239,35,60,.05); }
tbody tr:last-child td { border-bottom: 0; }
.member-rate-table { width: 100%; }
.member-rate-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ==========================================================================
   Brand mark
   ========================================================================== */
.brand, .st-top-brand, .st-side-brand, .admin-brand, .admin-top-brand, .ba-brand, .tm-task-brand, .st-brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0;
}
.brand img, .st-top-brand img, .st-side-logo, .admin-brand img, .admin-top-brand img, .buyer-auth-logo, .tm-task-brand img { width: 32px; height: 32px; flex: 0 0 auto; object-fit: contain; }
.brand span, .brand strong, .brand b, .st-top-brand strong, .st-side-brand strong, .admin-brand span {
  font: 800 18px/1 var(--font-d); letter-spacing: -.02em; color: #fff;
}
.brand small { display: block; margin-top: 3px; font: 600 10px/1 var(--font-d); letter-spacing: .16em; color: var(--red-2); }
.brand:hover { color: #fff; }

/* ==========================================================================
   Landing pages (index.html, buyer-landing.html)
   ========================================================================== */
.site-header, body.tm-modern-buyer > header {
  position: fixed; z-index: 50; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(100% - 28px, 1040px); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px; border-radius: var(--r-pill);
  background: rgba(8,8,8,.62); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.9);
}
.site-header nav, body.tm-modern-buyer > header nav { display: flex; align-items: center; gap: 6px; }
.site-header nav a:not(.cta), body.tm-modern-buyer > header nav a:not(.cta) { padding: 8px 14px; border-radius: var(--r-pill); color: var(--muted); font: 500 14px var(--font); }
.site-header nav a:not(.cta):hover, body.tm-modern-buyer > header nav a:not(.cta):hover { color: #fff; background: var(--surface-2); }
.site-header .cta, body.tm-modern-buyer > header .cta { min-height: 38px; padding: 0 18px; font-size: 13px; }

body.member-landing main, body.tm-modern-buyer > main { position: relative; z-index: 1; }
body.member-landing .hero, body.tm-modern-buyer > main > .hero {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 130px 22px 70px; background: none; border: 0; box-shadow: none; margin: 0;
}
body.member-landing .hero-copy, body.tm-modern-buyer > main > .hero > div { max-width: 880px; margin: 0 auto; }
body.member-landing .hero .eyebrow, body.tm-modern-buyer > main > .hero .eyebrow {
  padding: 8px 16px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); backdrop-filter: blur(8px); margin-bottom: 28px;
}
body.member-landing .hero h1, body.tm-modern-buyer > main > .hero h1 {
  font-size: clamp(44px, 8.4vw, 92px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; margin-bottom: 26px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.42)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.member-landing .hero h1 span, body.tm-modern-buyer > main > .hero h1 span {
  background: linear-gradient(180deg, var(--red-2), var(--red-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.member-landing .hero p, body.tm-modern-buyer > main > .hero p { font-size: clamp(16px, 2.2vw, 21px); color: var(--muted); max-width: 640px; margin: 0 auto 38px; line-height: 1.65; }
body.member-landing .hero-actions, body.tm-modern-buyer > main > .hero .actions { justify-content: center; gap: 14px; }
body.member-landing .hero-actions .ghost, body.tm-modern-buyer > main > .hero .actions .ghost { background: rgba(255,255,255,.04); }

.section { max-width: 1120px; margin: 0 auto; padding: 56px 22px; }
.section.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.section h2 { font-size: clamp(28px, 4.4vw, 46px); letter-spacing: -.035em; }
.trust-points, .features { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.features { grid-template-columns: 1fr; }
.trust-points > div, .features > div {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease);
}
.features > div { flex-direction: row; align-items: center; gap: 18px; padding: 18px 22px; }
.trust-points > div:hover, .features > div:hover { border-color: var(--red-line); transform: translateY(-3px); }
.trust-points b, .features b { font: 800 13px var(--font-d); color: var(--red-2); letter-spacing: .1em; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--red-soft); border: 1px solid var(--red-line); flex: 0 0 auto; }
.trust-points span, .features span { font: 600 17px var(--font-d); color: #fff; }
body.member-landing > footer, body.tm-modern-buyer > footer {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 26px max(22px, calc((100% - 1120px) / 2)); border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; background: rgba(255,255,255,.015);
}
body.member-landing > footer b, body.tm-modern-buyer > footer span:first-child { color: var(--text-2); font-family: var(--font-d); letter-spacing: .1em; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth, .ba-card {
  width: min(100% - 28px, 440px); margin: 8vh auto 40px; padding: 34px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line-2); border-radius: 24px; box-shadow: var(--shadow), 0 0 80px -30px var(--red-glow);
  backdrop-filter: blur(16px); position: relative; z-index: 1;
}
.auth .brand, .ba-brand { margin-bottom: 18px; }
.auth h1, .ba-card h1 { font-size: 28px; margin: 6px 0 8px; }
.auth-subtitle, .ba-card > p { color: var(--muted); margin-bottom: 18px; }
.auth form, .ba-card form { margin-top: 6px; }
.auth form .btn.full, .ba-submit { margin-top: 18px; min-height: 50px; }
.auth form .btn.ghost.full { margin-top: 0; }
.auth > p, .ba-switch, .ba-back { text-align: center; font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.ba-back { display: block; }
.ba-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; position: relative; z-index: 1; }
.ba-wrap .ba-card { margin: 0; }
.captcha-box, .captcha, .captcha-slot { margin: 14px 0 0; }
.captcha-box { display: none; }
.captcha-box.show, .captcha-box.active { display: block; }

/* ==========================================================================
   Member app shell (dashboard.html)
   ========================================================================== */
.ct-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; position: relative; z-index: 1; }
.ct-sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px; background: rgba(6,6,6,.82); border-right: 1px solid var(--line); backdrop-filter: blur(18px); z-index: 60;
}
.st-side-user { padding: 4px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.st-side-name { display: grid; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.st-side-name b { font: 700 14px var(--font-d); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-side-name small { font-size: 12px; color: var(--red-2); }
.st-side-label { padding: 10px 12px 4px; font: 600 11px var(--font-d); letter-spacing: .14em; color: var(--dim); }
.ct-nav { display: flex; flex-direction: column; gap: 3px; }
.ct-link, .ct-logout, .admin-nav a, .admin-sidebar-bottom a, .admin-sidebar-bottom button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--muted); font: 500 14px var(--font); text-align: left; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ct-link:hover, .ct-logout:hover, .admin-nav a:hover, .admin-sidebar-bottom a:hover, .admin-sidebar-bottom button:hover { background: var(--surface-2); color: #fff; }
.ct-link.active, .admin-nav a.active { background: var(--red-soft); border-color: var(--red-line); color: #fff; position: relative; }
.ct-link.active::before, .admin-nav a.active::before { content: ""; position: absolute; left: -15px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); box-shadow: 0 0 12px var(--red-glow); }
.nav-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; font-style: normal; }
.nav-icon svg, .tm-ui-icon, .tm-ui-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ct-link.active .nav-icon { color: var(--red-2); }
.ct-nav-divider { height: 1px; margin: 10px 4px; background: var(--line); }
.st-side-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.ct-logout:hover { color: #ff8a98; }

.ct-content { min-width: 0; padding: 0 clamp(16px, 3vw, 36px) 56px; }
.topbar, .st-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(clamp(16px, 3vw, 36px) * -1) 26px; padding: 14px clamp(16px, 3vw, 36px);
  background: rgba(0,0,0,.6); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.st-top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-top-brand { display: none; }
.st-top-title { font: 700 20px var(--font-d); letter-spacing: -.02em; color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-top-actions { display: flex; align-items: center; gap: 8px; }
.st-menu-button, .st-top-theme, .st-top-avatar, .st-top-logout, .tm-notify-button, .buyer-avatar-btn, .admin-mobile-toggle, .tm-modal-close, .tm-notify-close, .detail-close {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; overflow: hidden; transition: background .15s, border-color .15s; box-shadow: none;
}
.st-menu-button:hover, .st-top-theme:hover, .st-top-avatar:hover, .st-top-logout:hover, .buyer-avatar-btn:hover, .tm-modal-close:hover, .tm-notify-close:hover, .detail-close:hover { background: var(--surface-2); border-color: var(--red-line); color: #fff; }
.st-menu-button { display: none; }
.st-top-avatar img, .buyer-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.st-top-avatar { font: 700 15px var(--font-d); background: var(--red-soft); border-color: var(--red-line); color: #fff; }
.tm-notify-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #000, 0 0 10px var(--red-glow); }
.st-menu-button svg, .st-top-theme svg, .st-top-logout svg, .buyer-avatar-btn svg, .tm-modal-close svg, .tm-notify-close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* member content blocks */
.tm-quick-section, .tm-section-title { margin-bottom: 22px; }
.tm-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tm-quick-card { display: flex; align-items: center; gap: 14px; padding: 18px; color: var(--text); cursor: pointer; text-align: left; transition: border-color .2s, transform .2s var(--ease); }
.tm-quick-card:hover { transform: translateY(-2px); }
.tm-qicon, .tm-neutral-icon, .member-task-icon, .tm-admin-icon, .rule-icon, .api-doc-icon, .notice-icon, .security-icon, .empty-icon, .tm-history-icon, .tm-notify-icon, .ledger-icon, .task-icon, .tm-task-list-icon, .source-current-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; font-size: 20px;
  background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red-2);
}
.tm-qicon svg, .tm-neutral-icon svg, .member-task-icon svg, .rule-icon svg, .notice-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tm-quick-card b, .tm-quick-card strong { display: block; font: 700 15px var(--font-d); color: #fff; }
.tm-quick-card small, .tm-quick-card span:not(.tm-qicon) { font-size: 13px; color: var(--muted); }
.member-quick-create, .quick-create-main, .create-link-hero, .tm-manager-hero, .task-list-hero, .tm-task-list-hero, .api-hero-pro, .profile-head-pro, .source-approval-head {
  position: relative; overflow: hidden; padding: 26px; margin-bottom: 18px; border-radius: var(--r-lg);
  border: 1px solid var(--red-line); background: radial-gradient(520px 220px at 100% 0%, rgba(239,35,60,.2), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}
.quick-create-btn { display: inline-flex; }
.member-notifications, .member-page-notice, .notice-panel, .notice-source, .notice-shortlink { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--red-line); background: var(--red-soft); color: var(--text-2); margin-bottom: 16px; }
.tm-shortlink-picker { position: relative; display: block; width: 100%; margin: 0 0 18px; z-index: 20; }
.tm-shortlink-picker-btn { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: #fff; cursor: pointer; text-align: left; }
.tm-shortlink-picker-btn:hover { border-color: var(--red-line); }
.tm-shortlink-picker-btn span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-shortlink-picker-btn small { font: 600 10px var(--font-d); letter-spacing: .14em; color: var(--red-2); text-transform: uppercase; }
.tm-shortlink-picker-btn b { font: 700 15px var(--font-d); }
.tm-shortlink-popup { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 8px; border-radius: var(--r); background: #0b0b0c; border: 1px solid var(--line-2); box-shadow: 0 30px 70px rgba(0,0,0,.8); z-index: 99; }
.tm-shortlink-popup.hidden { display: none; }
.tm-shortlink-popup-title { padding: 8px 10px; font: 600 11px var(--font-d); letter-spacing: .12em; color: var(--dim); }
.tm-shortlink-option { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: #fff; cursor: pointer; text-align: left; }
.tm-shortlink-option:hover, .tm-shortlink-option:focus { background: var(--red-soft); border-color: var(--red-line); outline: 0; }
.tm-shortlink-option b { font: 700 14px var(--font-d); }
.tm-shortlink-option small { font-size: 12px; color: var(--muted); }
.tm-daily-code-card { display: block; width: 100%; margin: 18px 0 0; padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--red-line); background: linear-gradient(180deg, var(--red-soft), rgba(255,255,255,.015)); overflow: hidden; }
.tm-daily-code-head, .tm-daily-code-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tm-daily-code-head > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tm-daily-code-head b { font: 700 15px var(--font-d); color: #fff; }
.tm-daily-code-head > strong { font: 800 24px var(--font-d); color: var(--red-2); }
.tm-daily-code-track { height: 8px; margin: 14px 0; border-radius: var(--r-pill); background: rgba(255,255,255,.09); overflow: hidden; }
.tm-daily-code-track > * { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red-2)); border-radius: inherit; }
.tm-ip-limit-box { display: grid; gap: 4px; padding: 14px 16px; margin: 14px 0; border-radius: var(--r-sm); border: 1px solid var(--red-line); background: var(--red-soft); }
.tm-ip-limit-box span { font: 600 11px var(--font-d); letter-spacing: .14em; color: var(--red-2); }
.tm-ip-limit-box strong { font: 800 20px var(--font-d); }
.tm-ip-limit-box small { color: var(--muted); }
.tm-chart-wrap { position: relative; width: 100%; overflow: hidden; }
.tm-line-chart, .tm-chart-wrap svg { width: 100%; height: auto; display: block; }
.tm-line { stroke: var(--red); stroke-width: 2.4; fill: none; filter: drop-shadow(0 0 6px var(--red-glow)); }
.tm-area { fill: url(#tmArea); fill-opacity: .25; stroke: none; }
.tm-axis { fill: var(--dim); font-size: 11px; }
.tm-chart-select { width: auto; min-height: 36px; padding: 6px 34px 6px 12px; border-radius: var(--r-pill); font-size: 13px; }
.tm-dot { fill: var(--red-2); }
.tm-earnings-groups, .tm-earnings-group-list, .tm-notify-list, .local-link-history, .source-history, .embed-list, .profile-rows { display: grid; gap: 10px; }
.tm-earnings-group-head, .tm-earn-type-row, .tm-history-row, .ledger-row, .source-history-row, .tm-review-history-row, .local-link-row, .profile-info-item, .report-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
}
.tm-earn-type-main, .tm-history-main, .ledger-main, .local-link-main, .source-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tm-earn-type-side, .report-right, .ledger-total { text-align: right; font: 700 15px var(--font-d); color: #fff; white-space: nowrap; }
.ledger-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; }
.num, .step-no, .rule-no { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red-2); font: 800 13px var(--font-d); }
.step { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step h3 { display: flex; align-items: center; margin: 0 0 8px; font-size: 16px; }
.step-no { margin-right: 10px; }
.profile-avatar, .profile-avatar-pro, .avatar, .user-avatar { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--red-soft); border: 2px solid var(--red-line); font: 800 22px var(--font-d); color: #fff; }
.profile-avatar img, .profile-avatar-pro img, .avatar img, .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-editor { display: flex; align-items: center; gap: 16px; }
.profile-avatar-button { cursor: pointer; background: none; border: 0; padding: 0; }
.profile-info-item { flex-direction: column; align-items: flex-start; gap: 4px; }
.profile-info-item small { font: 600 11px var(--font-d); letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }

/* modals */
.tm-modal-backdrop, .detail-modal, .tmcw-overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tm-modal-backdrop.show, .detail-modal:not(.hidden) { display: flex; animation: seotop-fade .18s ease; }
.tm-modal, .detail-dialog, .tm-notify-panel, .tm-review-content { position: relative; width: min(100%, 720px); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; border-radius: 24px; background: #0b0b0c; border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0,0,0,.9), 0 0 80px -40px var(--red-glow); }
.tm-modal-head, .tm-notify-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.tm-modal-head h3, .tm-notify-head h3 { margin: 0; }
.tm-modal-close, .tm-notify-close, .detail-close { width: 38px; height: 38px; font-size: 22px; line-height: 1; flex: 0 0 auto; }
.detail-close { position: absolute; top: 14px; right: 14px; }
.tm-notify-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 18px; }
.tm-notify-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
.tm-notify-panel { z-index: 1; width: min(100%, 520px); }
.tm-notify-item { display: flex; gap: 14px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.tm-notify-item b { display: block; color: #fff; font: 700 14px var(--font-d); }
.tm-notify-item p { margin: 4px 0; font-size: 13px; color: var(--muted); }
.tm-notify-item small { font-size: 12px; color: var(--dim); }
@keyframes seotop-fade { from { opacity: 0; } to { opacity: 1; } }

/* api / code */
.api-tabs, .service-tabs, .user-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(0,0,0,.4); margin-bottom: 16px; flex-wrap: wrap; }
.api-tab, .service-tab, .user-tabs button { min-height: 36px; padding: 0 18px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--muted); font: 600 13px var(--font-d); cursor: pointer; transition: background .15s, color .15s; }
.api-tab:hover, .service-tab:hover, .user-tabs button:hover { color: #fff; }
.api-tab.active, .service-tab.active, .user-tabs button.active { background: var(--red); color: #fff; box-shadow: 0 6px 20px -8px var(--red-glow); }
.api-panel { margin-top: 10px; min-width: 0; }
.api-code, .detail-code, .tmcw-code, .code-example, .api-key-box-pro, .api-endpoint, .payment-code, .embed-code { display: block; padding: 14px 16px; border-radius: var(--r-sm); background: #050505; border: 1px solid var(--line); color: #fecdd3; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.copy, .copy-now, .api-copy-inline, .local-copy-link, .ct-link.__copy { min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--red-line); background: var(--red-soft); color: #ffb4be; font: 600 12px var(--font-d); cursor: pointer; }
.copy:hover, .copy-now:hover, .api-copy-inline:hover, .local-copy-link:hover { background: var(--red); color: #fff; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.service { padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; display: grid; gap: 6px; transition: border-color .15s, background .15s; }
.service:hover { border-color: var(--line-2); }
.service.active, .service.selected, .service[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 3px var(--red-soft); }
.review-guarantee-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.review-day { padding: 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; display: grid; gap: 4px; text-align: center; }
.review-day b { font: 800 16px var(--font-d); }
.review-day span { font-size: 12px; color: var(--muted); }
.review-day.active { border-color: var(--red); background: var(--red-soft); }
.google-business-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px; margin: 16px 0; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); }
.google-business-box > div:first-child { display: grid; gap: 4px; }

/* ==========================================================================
   Buyer app shell (trafficbuyer.html)
   ========================================================================== */
.buyer-app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }
.buyer-top {
  position: sticky; top: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px clamp(16px, 3vw, 36px); background: rgba(0,0,0,.62); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.buyer-top .brand span { display: grid; gap: 0; }
.buyer-top .brand b { font: 800 18px/1 var(--font-d); }
.top-right { position: relative; display: flex; align-items: center; gap: 10px; }
.balance-chip { display: grid; gap: 1px; padding: 6px 16px; border-radius: var(--r-pill); border: 1px solid var(--red-line); background: var(--red-soft); text-align: right; }
.balance-chip small { font: 600 9px var(--font-d); letter-spacing: .16em; color: var(--red-2); }
.balance-chip b { font: 800 15px var(--font-d); color: #fff; }
.buyer-account-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 6px; border-radius: var(--r); background: #0b0b0c; border: 1px solid var(--line-2); box-shadow: 0 30px 70px rgba(0,0,0,.85); z-index: 80; }
.buyer-account-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; text-align: left; }
.buyer-account-menu button:hover { background: var(--red-soft); color: #fff; }
.buyer-account-menu svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.buyer-shell { max-width: 1160px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 36px) 130px; }
.buyer-main { min-width: 0; }
.view { animation: seotop-fade .25s ease; }
body.tm-buyer-v210 .hero { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; padding: 30px; margin-bottom: 18px; border-radius: var(--r-lg); border: 1px solid var(--red-line); background: radial-gradient(560px 240px at 100% 0%, rgba(239,35,60,.22), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }
body.tm-buyer-v210 .hero h1 { margin-bottom: 8px; }
body.tm-buyer-v210 .hero p { margin: 0; color: var(--muted); max-width: 60ch; }
.mobile-nav {
  position: fixed; z-index: 90; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(100% - 24px, 560px); display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px;
  border-radius: var(--r-pill); background: rgba(10,10,10,.78); border: 1px solid var(--line-2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.95), 0 0 50px -24px var(--red-glow);
}
.side-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 4px; border-radius: var(--r-pill); border: 1px solid transparent; background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.side-btn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-btn small { font: 600 11px var(--font-d); color: inherit; }
.side-btn:hover { color: #fff; background: var(--surface-2); }
.side-btn.active { color: #fff; background: var(--red); box-shadow: 0 8px 24px -8px var(--red-glow); }
.embed-rule { display: flex; gap: 16px; align-items: flex-start; }
.embed-domain { font: 700 14px var(--font-d); color: #fff; }
.embed-title { font: 700 16px var(--font-d); color: #fff; }
.embed-explain { color: var(--muted); font-size: 13px; }
.deposit-form, .withdraw-title { display: grid; gap: 14px; }
.payment-box, .vietqr-box { padding: 20px; margin: 14px 0; display: grid; gap: 10px; justify-items: start; }
.vietqr-box img { border-radius: var(--r-sm); background: #fff; padding: 8px; max-width: 260px; }

/* ==========================================================================
   Admin shell
   ========================================================================== */
.admin-shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; position: relative; z-index: 1; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; background: rgba(6,6,6,.85); border-right: 1px solid var(--line); backdrop-filter: blur(18px); }
.admin-brand { padding: 4px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.admin-brand span { font-size: 16px; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-sidebar-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.admin-main { min-width: 0; padding: 0 clamp(16px, 3vw, 36px) 60px; }
.admin-top { position: sticky; top: 0; z-index: 30; margin: 0 calc(clamp(16px, 3vw, 36px) * -1) 26px; padding: 16px clamp(16px, 3vw, 36px); background: rgba(0,0,0,.6); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.admin-top h1 { font-size: 22px; margin: 0; }
.admin-user { font-size: 12px; color: var(--muted); }
.admin-mobile-toggle { position: fixed; left: 12px; top: 12px; z-index: 1100; background: rgba(8,8,8,.85); }
.admin-backdrop { z-index: 1000; }
.admin-main .page-title { align-items: center; }
.admin-main .page-title h2 { margin: 0; }
.admin-main .stats { margin-top: 0; }
.user-manager { display: grid; gap: 16px; }
.user-main { min-width: 0; display: grid; gap: 12px; }
.user-search { display: flex; gap: 10px; flex-wrap: wrap; }
.user-search input { flex: 1; min-width: 200px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; box-shadow: none; }
.user-count { font: 600 13px var(--font-d); color: var(--muted); }
.user-pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; }
.auto-row, .auto-box { align-items: center; }
.source-card, .source-page-pro .source-card { padding: 18px 20px; margin-bottom: 12px; display: grid; gap: 10px; }
.source-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.source-url { color: var(--red-2); word-break: break-all; font-size: 13px; }
.source-email { color: var(--muted); font-size: 13px; }
.source-current, .member-source-current { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); border: 1px solid var(--red-line); background: var(--red-soft); }

/* ==========================================================================
   Task pages: claim lists, map tasks, go.html
   ========================================================================== */
body.tm-task-list-page, body.task-page-body { padding-bottom: 40px; }
.task-list-shell, .task-page, .ad-wrap { width: min(100% - 28px, 920px); margin: 0 auto; padding: 22px 0 50px; position: relative; z-index: 1; }
.task-page { max-width: 780px; }
.task-list-main, .tm-task-list-main { display: grid; gap: 16px; }
.tm-task-list-top, .task-list-top, .st-topbar.__task, .ad-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; margin-bottom: 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(8,8,8,.62); backdrop-filter: blur(16px); }
.ad-header .home, .back { color: var(--muted); font: 500 14px var(--font); padding: 8px 14px; border-radius: var(--r-pill); }
.ad-header .home:hover, .back:hover { background: var(--surface-2); color: #fff; }
.tm-task-list-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tm-task-list-card, .task-card, .task-item { padding: 20px; display: grid; gap: 12px; }
.tm-task-list-card:hover, .task-card:hover { border-color: var(--red-line); }
.tm-task-list-bottom, .task-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.task-head { padding: 18px 22px; margin-bottom: 14px; }
.tm-task-list-keyword, .task-keyword, .keyword, .tm-keyword, .st-keyword { display: inline-block; padding: 6px 12px; border-radius: var(--r-sm); background: var(--red-soft); border: 1px solid var(--red-line); color: #ffb4be; font: 600 13px var(--font-d); word-break: break-word; }
.task-title { font: 700 18px var(--font-d); color: #fff; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.task-title h2, .task-body h3, .task-body b { color: #fff; }
.task-body { color: var(--text-2); }
.task-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.map-open, .openmap { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; margin: 12px 0; border-radius: var(--r-pill); background: var(--red); color: #fff; font: 700 14px var(--font-d); text-align: center; }
.map-open:hover, .openmap:hover { background: var(--red-2); color: #fff; }
.location-card { padding: 16px; display: grid; gap: 7px; box-shadow: none; }
.location-card strong { font: 700 18px var(--font-d); }
.review-rule { margin: 0; padding-left: 18px; color: var(--text-2); line-height: 1.7; }
.ad-app { min-height: 100vh; min-height: 100dvh; }
.ad-wrap .hero { padding: 28px; margin-bottom: 18px; border-radius: var(--r-lg); border: 1px solid var(--red-line); background: radial-gradient(500px 220px at 100% 0%, rgba(239,35,60,.22), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }
.ad-wrap .hero h1 { font-size: clamp(24px, 4vw, 34px); }
.ad-wrap .card { margin-bottom: 16px; padding: 0; overflow: hidden; }
.timer, .tmcw-timer, .tm-countdown, .tm-review-countdown { font: 800 28px var(--font-d); color: var(--red-2); font-variant-numeric: tabular-nums; }
.tm-review-stars { color: var(--warn); letter-spacing: 2px; }
.detail-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.compact-order .order-top + * { margin-top: 10px; }
.break, .turn, .check, .checks, .claim, .suggestion, .submit, .calc-wrap { min-width: 0; }
.locked { opacity: .55; pointer-events: none; }
.usage ol { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .grid2, .detail-grid, .task-modal-grid, .profile-grid, .profile-info-grid, .rules-grid, .deposit-grid, .notification-grid, .api-doc-grid, .api-doc-grid-pro, .withdraw-grid-pro, .withdraw-subgrid, .source-approval-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ct-shell { display: block; }
  .ct-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); height: 100dvh; transform: translateX(-105%); visibility: hidden; transition: transform .22s var(--ease), visibility .22s; z-index: 1001; background: rgba(6,6,6,.97); box-shadow: 30px 0 80px rgba(0,0,0,.8); }
  .ct-sidebar.open { transform: translateX(0); visibility: visible; }
  .ct-sidebar.open::after { content: ""; position: fixed; inset: 0 0 0 min(300px, 86vw); background: rgba(0,0,0,.6); z-index: -1; }
  .st-menu-button { display: inline-grid; }
  .st-top-brand { display: inline-flex; }
  .st-top-brand strong { display: none; }
  .st-top-title { font-size: 17px; }
  .section.split { grid-template-columns: 1fr; gap: 24px; }
  .trust-points { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .site-header, body.tm-modern-buyer > header { top: 10px; padding: 8px 8px 8px 14px; }
  .site-header nav a:not(.cta), body.tm-modern-buyer > header nav a:not(.cta):not(:first-child) { display: none; }
  body.member-landing .hero, body.tm-modern-buyer > main > .hero { padding-top: 110px; }
  body.member-landing .hero-actions, body.tm-modern-buyer > main > .hero .actions { flex-direction: column; align-items: stretch; }
  body.member-landing .hero-actions .btn, body.member-landing .hero-actions .cta, body.member-landing .hero-actions .ghost { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .auth, .ba-card { padding: 26px 20px; margin-top: 5vh; border-radius: 20px; }
  .card, .panel, .admin-card, .box, .profile-card, .profile-card-pro, .security-card, .embed-card, .create-link-card, .member-chart-card, .member-rate-card { padding: 18px; }
  .stats, .member-overview-grid, .tm-neutral-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .balance-chip { padding: 5px 12px; }
  .balance-chip small { display: none; }
  .buyer-top .brand small { display: none; }
  .review-guarantee-cards { grid-template-columns: 1fr; }
  .tm-modal, .detail-dialog, .tm-notify-panel { padding: 20px; border-radius: 20px; }
  .ledger-row { grid-template-columns: 40px minmax(0,1fr); }
  .tm-earn-type-side, .ledger-total { text-align: left; }
  th, td { padding: 10px 12px; }
}
@media (max-width: 380px) {
  .stats, .member-overview-grid, .tm-neutral-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  body, html { background: #fff; color: #000; } body::before { display: none; }
}

/* ==========================================================================
   Standalone tool pages (admin-map-tasks, google-map-create, admin-tasks)
   ========================================================================== */
.layout { max-width: 1450px; margin: 0 auto; padding: 22px clamp(14px, 3vw, 32px) 60px; position: relative; z-index: 1; }
.layout .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.layout > .grid { grid-template-columns: minmax(340px, 1fr) minmax(400px, 650px); gap: 20px; align-items: start; }
.form { display: grid; gap: 14px; }
.map-create { max-width: 760px; margin: 0 auto; padding: 28px 14px; position: relative; z-index: 1; }
.preview { max-width: 650px; margin: 0 auto; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); box-shadow: var(--shadow); }
.preview h1 { font-size: 25px; margin: 5px 0 8px; }
.preview .hero { padding: 0 0 15px; margin: 0 0 15px; border: 0; border-bottom: 1px solid var(--line); background: none; }
.preview .img { display: block; max-width: 100%; max-height: 300px; margin: 12px auto; border-radius: var(--r-sm); border: 1px solid var(--line); }
.copyrow { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.copyrow .suggestion { flex: 1; padding: 13px 14px; border-radius: var(--r-sm); background: #060606; border: 1px solid var(--line); line-height: 1.55; white-space: pre-wrap; color: var(--text-2); }
.copyrow .copy { min-height: 0; padding: 0 16px; }
.auto-row { justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .layout > .grid { grid-template-columns: 1fr; } .layout { padding: 14px; } }
.avatar.buyer-avatar-btn, .buyer-avatar-btn { width: 42px; height: 42px; font-size: 0; }
