/* TLT visual system: warm cream header, red/orange accents, slate surfaces. */
:root {
  color-scheme: light;
  --primary: #e53935;
  --primary-dark: #c62828;
  --secondary: #ea580c;
  --secondary-dark: #c2410c;
  --gold: #d97706;
  --success: #059669;
  --danger: #dc2626;
  --bg: #f8fafc;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 8% 0, #e539350f, transparent 42%),
    radial-gradient(circle at 92% 8%, #ea580c12, transparent 40%), var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { position: sticky; top: 0; z-index: 20; background: #fffdf5; border-bottom: 1px solid #f1ead4; box-shadow: 0 3px 12px #7860230a; }
.topbar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; max-width: 1180px; min-height: 78px; margin: auto; padding: 10px 24px; }
.brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand img { display: block; width: 168px; height: 62px; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 1px 2px #1e40642e); }
.brand:hover { text-decoration: none; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tlt-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 9px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #475569; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.tlt-btn:hover { color: var(--secondary-dark); background: #fff7ed; border-color: #fdba74; text-decoration: none; }
.tlt-btn.small { min-height: 38px; padding: 7px 13px; font-size: 12.5px; }
main { max-width: 1180px; margin: auto; padding: 26px 24px 56px; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 20px; padding: 32px 34px; border: 1px solid #fecaca; border-radius: 22px; background: linear-gradient(120deg, #fff1f2, #ffedd5 58%, #fef3c7); overflow: hidden; }
.intro-copy { min-width: 0; }
.eyebrow { display: block; margin: 0; color: var(--secondary-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.intro h1 { margin: 10px 0; color: #7f1d1d; font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.8px; }
.intro p:not(.eyebrow) { max-width: 620px; margin: 0; color: #7c5a4a; font-size: 13.5px; line-height: 1.7; }
.hero-icon { display: grid; flex-shrink: 0; width: 92px; height: 92px; place-items: center; color: var(--secondary); background: #ffffffc7; border: 1px solid #fff; border-radius: 26px; box-shadow: 0 10px 30px #ea580c29; transform: rotate(-8deg); }
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.card { min-width: 0; margin-bottom: 20px; padding: 26px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: 0 4px 24px #0f172a0a; }
#login-panel { max-width: 480px; margin: 26px auto 20px; }
#login-panel h2 { margin: 8px 0; font-size: 25px; letter-spacing: -.5px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
h2 { margin: 0 0 14px; color: var(--text); font-size: 17px; font-weight: 750; letter-spacing: -.2px; }
.section-heading h2 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.open { color: #047857; background: #d1fae5; }
p { margin: 8px 0 16px; }
.muted, .help { color: var(--muted); }
.help { margin-top: 7px; font-size: 12px; line-height: 1.65; }
label { display: block; margin: 16px 0 6px; color: #475569; font-size: 12.5px; font-weight: 650; }
input { display: block; width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; color: var(--text); font: inherit; font-size: 13.5px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus { background: #fff; border-color: var(--secondary); box-shadow: 0 0 0 3px #ea580c1f; }
input:disabled { background: #f1f5f9; color: #64748b; cursor: not-allowed; }
:focus-visible { outline: 3px solid #fdba74; outline-offset: 2px; }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 10px; background: linear-gradient(120deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 4px 14px #e5393538; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; transition: filter .2s, color .2s, background .2s, border-color .2s; }
button:hover:not(:disabled), .button:hover { filter: brightness(1.06); text-decoration: none; }
button:disabled { background: #bd4639; color: #fff; box-shadow: none; cursor: not-allowed; }
button.secondary, .secondary { background: #fff; border: 1px solid var(--border); color: #475569; box-shadow: none; }
button.secondary:hover:not(:disabled), .secondary:hover { background: #fff7ed; border-color: #fdba74; color: var(--secondary-dark); filter: none; }
button.secondary:disabled, .secondary:disabled { background: #e2e8f0; border-color: #cbd5e1; color: #64748b; }
#submit-order, #retry-order, #submit-test-order, .wallet-card .button, #refresh { width: 100%; }
.secondary-link { display: inline-block; margin: 12px 0 0 4px; font-size: 13px; color: var(--secondary-dark); }
.quote { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding: 16px 18px; border: 1px solid #fed7aa; border-radius: 14px; background: linear-gradient(120deg, #fff7ed, #fffbeb); color: #7c2d12; font-size: 13px; }
.quote strong { color: var(--secondary-dark); font-size: 22px; font-weight: 800; }
.wallet-card h2 { margin: 10px 0 4px; color: var(--primary-dark); font-size: 32px; letter-spacing: -1px; overflow-wrap: anywhere; }
.wallet-card hr { margin: 22px 0; border: 0; border-top: 1px solid var(--border); }
.wallet-card strong { color: var(--secondary-dark); font-size: 23px; }
#refresh { margin-top: 10px; }
.notice, .pending { margin-bottom: 18px; padding: 16px 18px; border: 1px solid #fde68a; border-radius: 16px; background: linear-gradient(120deg, #fffbeb, #fff7ed); color: #78716c; overflow-wrap: anywhere; }
.notice.success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.notice.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.pending { margin: 18px 0 0; }
.pending strong { display: block; margin-bottom: 4px; color: #92400e; font-size: 13px; font-weight: 800; }
.pending .help { color: #78716c; }
code { padding: 2px 5px; border-radius: 5px; background: #f1f5f9; color: #475569; overflow-wrap: anywhere; }
.order-list { display: grid; gap: 14px; }
.order-item { padding: 16px 18px; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 2px 10px #0f172a08; }
.order-item > strong { display: block; font-size: 15px; font-weight: 750; }
.order-item .order-id { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.order-item dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0 0; }
dt { color: var(--muted); font-size: 11.5px; }
dd { margin: 3px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.order-item button { margin-top: 14px; }
.order-item.queued, .order-item.running { border-left-color: var(--secondary); background: linear-gradient(#fff7ed, #fff); }
.order-item.queued > strong, .order-item.running > strong { color: var(--secondary-dark); }
.order-item.done { border-left-color: var(--success); background: linear-gradient(#ecfdf5, #fff); }
.order-item.done > strong { color: #047857; }
.order-item.failed, .order-item.review { border-left-color: var(--danger); background: linear-gradient(#fef2f2, #fff); }
.order-item.failed > strong, .order-item.review > strong { color: #b91c1c; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #475569; font-size: 12.5px; font-weight: 650; }
.check input { width: 16px; height: 16px; min-height: 16px; accent-color: var(--secondary); }
#settings-form { max-width: 520px; }
.ctv-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.ctv-tier-form { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #f8fafc; }
.ctv-tier-form label { margin-top: 0; overflow-wrap: anywhere; }
.ctv-tier-form button { width: 100%; }
.admin-heading { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--border); }
.tlt-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; max-width: 1180px; margin: auto; padding: 24px; border-top: 1px solid var(--border); color: #94a3b8; font-size: 12px; }
.tlt-footer span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 720px) {
  .topbar-inner { min-height: 0; padding: 8px 14px; gap: 8px; }
  .brand img { width: 132px; height: 46px; }
  nav { width: 100%; justify-content: flex-end; }
  main { padding: 14px 14px 36px; }
  .intro { gap: 14px; margin-bottom: 14px; padding: 18px 16px; border-radius: 16px; }
  .intro h1 { margin: 6px 0; font-size: 22px; }
  .intro p:not(.eyebrow) { font-size: 12.5px; }
  .hero-icon { display: none; }
  .card { margin-bottom: 14px; padding: 16px 14px; border-radius: 16px; }
  .order-item { padding: 14px; border-radius: 12px; }
  .order-item dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tlt-footer { display: block; padding: 20px 14px; font-size: 11.5px; line-height: 2; }
  .tlt-footer span { display: block; }
}
/* Native checkboxes stay keyboard/touch accessible; no external assets. */
.tag-groups { max-height: 360px; overflow: auto; margin-top: 12px; }
.tag-groups summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.tag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tag-choice { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px; border: 1px solid #dedbd0; border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.tag-choice input { width: 18px; height: 18px; flex: 0 0 18px; }
.tag-choice[hidden] { display: none; }
.tag-distribution { max-height: 220px; overflow: auto; font-size: .9rem; }
.tag-distribution p { margin: 6px 0; }
#tag-picker { min-width: 0; border: 1px solid #dedbd0; border-radius: 12px; padding: 12px; margin: 16px 0; }
@media (max-width: 560px) { .tag-grid { grid-template-columns: 1fr; } }
