/* ================================================================
   Design Tokens
   ================================================================ */
/* Paper-and-ink palette — canonical brand skin (docs/PAPER_STYLE.md).
   Token NAMES are unchanged from the old dark theme; values flipped
   light. Hover DARKENS on paper (--accent-hover = orange-deep). */
:root {
  --bg: #F6F3EC;            /* paper */
  --surface: #FFFDF8;       /* card */
  --surface2: #F0EBDD;      /* recessed paper */
  --border: #E4DECD;        /* line */
  --border-strong: #D4CCB6; /* line-strong */
  --text: #1A1813;          /* ink */
  --text-secondary: #3F3B33;
  --text-dim: #57534A;      /* ink-soft */
  --accent: #D14A1F;        /* orange */
  --accent-hover: #A03812;  /* orange-deep */
  --accent-bg: rgba(209,74,31,.09);
  --green: #0E6B52;         /* teal = live/success */
  --green-bg: rgba(14,107,82,.10);
  --red: #B3261E;
  --red-bg: rgba(179,38,30,.08);
  --yellow: #7A5A10;        /* gold-ink */
  --yellow-bg: rgba(122,90,16,.10);
  --cyan: #2456B3;          /* blue-ink (no neon on paper) */
  --cyan-bg: rgba(36,86,179,.08);
  --card-bg: #FFFDF8;
  --shadow-sm: 0 1px 2px rgba(26,24,19,.08);
  --shadow-md: 0 4px 14px rgba(26,24,19,.10);
  --shadow-lg: 0 18px 50px -20px rgba(26,24,19,.25);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 300px;
  --topbar-h: 56px;
  --sans: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --serif: 'Fraunces',Georgia,'Times New Roman',serif;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{color-scheme:light}
body{font-family:var(--sans);background:var(--bg);color:var(--text);line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
h1,h2{font-family:var(--serif);font-weight:600;letter-spacing:-.01em}
button,select,input,textarea{color:inherit;font-family:inherit}

/* ================================================================
   Skip link (a11y) — visible only on keyboard focus
   ================================================================ */
.skip-link{
  position:absolute;top:-100px;left:16px;
  background:var(--accent);color:#fff;padding:10px 18px;
  border-radius:8px;z-index:9999;font-weight:600;font-size:.9rem;
  text-decoration:none;transition:top .2s;
}
.skip-link:focus{top:16px}

/* ================================================================
   Topbar (full-width, above everything)
   ================================================================ */
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 24px;height:var(--topbar-h);
  border-bottom:1px solid var(--border);background:rgba(255,253,248,.88);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  position:fixed;top:0;left:0;right:0;z-index:110;
}
.topbar-left{display:flex;align-items:center;gap:12px}
.topbar-brand{display:inline-flex;align-items:center;gap:8px;font-size:1.05rem;font-weight:700;color:var(--text);text-decoration:none;letter-spacing:-.02em}
.topbar-brand:hover{color:var(--text)}
.topbar-mascot{width:36px;height:36px;object-fit:contain}
.topbar-title{display:none}
.topbar-right{display:flex;align-items:center;gap:8px}
.topbar-balance{display:inline-flex;align-items:stretch;gap:0;padding:0;border-radius:8px;text-decoration:none;background:rgba(148,163,184,.06);border:1px solid var(--border);overflow:hidden}
.topbar-balance:hover{background:rgba(148,163,184,.10)}
.topbar-balance-cell{display:flex;flex-direction:column;justify-content:center;padding:4px 12px;line-height:1.15}
.topbar-balance-cell + .topbar-balance-cell{border-left:1px solid var(--border)}
.topbar-balance-label{font-size:.62rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-dim)}
.topbar-balance-value{font-size:.85rem;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}
.topbar-balance-cell-accent .topbar-balance-value{color:var(--accent)}
@media (max-width:640px){.topbar-balance-label{display:none}.topbar-balance-cell{padding:4px 8px}}
.status-pill{display:none;align-items:center;gap:6px;padding:5px 14px;border-radius:20px;font-size:.78rem;font-weight:600;text-decoration:none}
.status-pill.running{display:inline-flex;background:var(--green-bg);color:var(--green)}
.status-pill .dot{width:7px;height:7px;border-radius:50%;background:currentColor;animation:pulse-dot 2s ease-in-out infinite}
@keyframes pulse-dot{0%,100%{opacity:1}50%{opacity:.4}}
.topbar-stop-btn{padding:4px 12px;border-radius:6px;font-size:.73rem;font-weight:600;border:1px solid rgba(179,38,30,.3);background:var(--red-bg);color:var(--red);cursor:pointer;transition:all .15s;font-family:inherit;white-space:nowrap}
.topbar-stop-btn:hover{background:var(--red);color:#fff;border-color:var(--red)}

/* Profile dropdown */
.profile-menu{position:relative}
.profile-menu-btn{display:flex;align-items:center;gap:8px;height:36px;border-radius:20px;border:1px solid var(--border);background:var(--surface2);color:var(--text);cursor:pointer;font-weight:500;font-size:.8rem;transition:all .15s;padding:2px 10px 2px 2px}
.profile-menu-btn:hover{border-color:var(--border-strong);background:rgba(26,24,19,.05)}
.profile-avatar{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:var(--accent);color:#fff;font-weight:700;font-size:.78rem;flex-shrink:0}
.profile-email-text{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary);font-size:.8rem}
.profile-chevron{color:var(--text-dim);transition:transform .15s;flex-shrink:0}
.profile-menu-btn[aria-expanded="true"] .profile-chevron{transform:rotate(180deg)}
.profile-dropdown{display:none;position:absolute;top:calc(100% + 8px);right:0;min-width:220px;background:var(--card-bg);border:1px solid var(--border-strong);border-radius:12px;box-shadow:var(--shadow-lg);z-index:200;padding:6px;overflow:hidden}
.profile-dropdown.open{display:block}
.profile-dropdown-header{padding:10px 12px 8px;border-bottom:1px solid var(--border);margin-bottom:4px}
.profile-dropdown-email{font-size:.78rem;color:var(--text);font-weight:500;word-break:break-all}
.profile-dropdown-item{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;font-size:.82rem;color:var(--text-dim);text-decoration:none;transition:all .12s}
.profile-dropdown-item:hover{background:var(--surface2);color:var(--text)}
.profile-dropdown-divider{height:1px;background:var(--border);margin:4px 0}
.profile-dropdown-signout{color:var(--red,#B3261E)}
.profile-dropdown-signout:hover{background:rgba(248,113,113,.08);color:var(--red,#B3261E)}

/* Mobile-only elements hidden on desktop */
.mobile-only{display:none !important}

/* ================================================================
   App Layout (sidebar + main, below topbar)
   ================================================================ */
.app-layout{display:flex;min-height:calc(100vh - var(--topbar-h));margin-top:var(--topbar-h)}

/* Sidebar */
.sidebar{
  width:var(--sidebar-w);background:var(--surface);
  border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  position:fixed;top:var(--topbar-h);left:0;bottom:0;
  z-index:100;
}
/* Sidebar density: dense vertically, roomy horizontally.
   Rows stay tight top-to-bottom (owner ask 2026-05-20: cut vertical
   padding + gap; breathing room only between sections, not every row).
   But the rail width + left/right padding are deliberately generous
   (owner ask 2026-05-22) so bot names don't truncate. Don't cut the
   horizontal padding back to match the vertical tightness. */
.sidebar-nav{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:6px 10px 12px;display:flex;flex-direction:column;gap:0}
.nav-item{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:var(--radius-sm);color:var(--text-dim);font-size:.82rem;font-weight:500;text-decoration:none;transition:all .15s}
.nav-item:hover{color:var(--text);background:rgba(26,24,19,.04)}
.nav-item.active{color:var(--accent);background:var(--accent-bg);font-weight:600}
.nav-item svg{width:16px;height:16px;flex-shrink:0;opacity:.7}
.nav-item.active svg{opacity:1}
.nav-item:hover svg{opacity:1}
/* New bot renders as a plain nav-item (no accent) — owner ask 2026-05-21:
   the orange + read as "too much". The .nav-item-new-bot hook is kept for
   future targeting but intentionally carries no special styling now. */
/* Utility-styled nav item — Manage Apps and similar meta-actions. Lives
   AFTER the installed apps loop, dimmer + smaller icon so it reads as
   a setting, not a primary destination. */
.nav-item-utility{font-size:.75rem;color:var(--text-dim);opacity:.78;margin-top:2px}
.nav-item-utility svg{width:14px;height:14px;opacity:.55}
.nav-item-utility:hover{opacity:1}

/* Share & Save — small + muted, reads as a setting, not a primary CTA.
   Owner ask 2026-05-20: previous accent-orange + bold inline styles
   were too obtuse for what's effectively a "did you know" utility. */
.nav-item-share{font-size:.72rem;color:color-mix(in srgb,var(--accent) 70%,var(--text-dim));opacity:.82;margin:2px 0 4px}
.nav-item-share svg{width:13px;height:13px;opacity:.75}
.nav-item-share:hover{opacity:1;color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,transparent)}
.nav-section{font-size:.66rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim);padding:10px 14px 3px;opacity:.55}
button.nav-section{display:flex;align-items:center;justify-content:space-between;width:100%;background:none;border:0;cursor:pointer;font-family:inherit;text-align:left}
button.nav-section:hover{opacity:.9;color:var(--text)}
.nav-section-chevron{width:11px;height:11px;flex-shrink:0;transition:transform .15s}
button.nav-section[aria-expanded="false"] .nav-section-chevron{transform:rotate(-90deg)}
.nav-section-items{display:flex;flex-direction:column;gap:2px}
.nav-section-items[hidden]{display:none}
.sidebar-footer{padding:14px 16px;border-top:1px solid var(--border);font-size:.78rem;color:var(--text-dim)}
.sidebar-footer .user-email{color:var(--text);font-weight:500;display:block;margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-footer .sign-out-link{color:var(--text-dim);font-size:.82rem;padding:8px 14px;margin:-4px -14px;border-radius:var(--radius-sm)}
.sidebar-footer .sign-out-link:hover{color:var(--red);background:var(--red-bg)}
.sidebar-support{border-top:1px solid var(--border);padding:10px 10px;flex-shrink:0}
.sidebar-support .nav-item{padding:12px 14px;font-size:.86rem}
body.sidebar-open{overflow:hidden;touch-action:none}

/* Main content area */
.main-content{margin-left:var(--sidebar-w);flex:1;min-width:0;display:flex;flex-direction:column;min-height:calc(100vh - var(--topbar-h))}
.app-layout:not(:has(.sidebar)) .main-content{margin-left:0}
body:has(.app-layout:not(:has(.sidebar))) .hamburger{display:none !important}

/* Footer */
.app-footer{margin-top:auto;padding:16px 28px;font-size:.75rem;color:var(--text-dim);border-top:1px solid var(--border);display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px}
.app-footer a{color:var(--text-dim);text-decoration:none}
.app-footer a:hover{color:var(--text)}
@media(max-width:640px){.app-footer{padding:12px 8px;font-size:.7rem;gap:3px 6px}}

/* Container */
.container{max-width:1200px;margin:0 auto;padding:24px 32px;display:flex;flex-direction:column;gap:20px;align-items:stretch;width:100%}
.row{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.full{grid-column:1/-1}
.page-title{font-size:1.15rem;font-weight:700;margin-bottom:4px}
.page-desc{font-size:.84rem;color:var(--text-dim)}

/* ================================================================
   Card
   ================================================================ */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px 24px;box-shadow:var(--shadow-sm)}
.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:10px;flex-wrap:wrap}
.card-header h2{font-size:.9rem;font-weight:600;white-space:nowrap;color:var(--text-secondary);letter-spacing:-.01em}

/* Stat cards (inline metrics) */
.stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.stat-card{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px 18px}
.stat-label{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim);margin-bottom:6px}
.stat-value{font-size:1.35rem;font-weight:700;color:var(--text);letter-spacing:-.02em;line-height:1.2}

/* ================================================================
   Buttons
   ================================================================ */
button,.btn{font-family:inherit;font-size:.82rem;font-weight:500;border:none;border-radius:var(--radius-sm);padding:8px 16px;cursor:pointer;transition:all .15s}
button:disabled{opacity:.35;cursor:not-allowed}
.btn-accent{background:var(--accent);color:#fff;box-shadow:0 1px 3px rgba(209,74,31,.3)}
.btn-accent:hover:not(:disabled){background:var(--accent-hover);box-shadow:0 2px 8px rgba(209,74,31,.35)}
.btn-green{background:var(--green);color:#fff;box-shadow:0 1px 3px rgba(14,107,82,.25)}
.btn-green:hover:not(:disabled){background:#0E6B52}
.btn-red{background:var(--red);color:#fff}
.btn-red:hover:not(:disabled){background:#B3261E}
.btn-ghost{background:transparent;color:var(--text-dim);border:1px solid var(--border)}
.btn-ghost:hover:not(:disabled){color:var(--text);border-color:var(--border-strong);background:rgba(26,24,19,.03)}
.btn-sm{padding:5px 10px;font-size:.73rem}
.btn-primary{background:var(--accent);color:#fff;box-shadow:0 1px 3px rgba(209,74,31,.3)}
.btn-primary:hover:not(:disabled){background:var(--accent-hover)}
.btn-group{display:flex;gap:6px}

/* ================================================================
   Forms
   ================================================================ */
label{display:block;font-size:.75rem;color:var(--text-dim);margin-bottom:3px;font-weight:500;text-transform:uppercase;letter-spacing:.04em}
input,select,textarea{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--text);font-size:17px;font-family:inherit}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--text-dim)}
.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.form-group{margin-bottom:14px}
.form-group label{text-transform:none;font-size:.82rem;color:var(--text);font-weight:500;margin-bottom:5px}
.form-help{font-size:.75rem;color:var(--text-dim);margin-top:3px}

/* ================================================================
   Tables
   ================================================================ */
table{width:100%;border-collapse:collapse;font-size:.8rem}
th{text-align:left;color:var(--text-dim);font-weight:500;padding:7px 10px;border-bottom:1px solid var(--border);font-size:.73rem;text-transform:uppercase;letter-spacing:.04em}
td{padding:8px 10px;border-bottom:1px solid var(--border)}
tr:last-child td{border-bottom:none}

/* ================================================================
   Badges
   ================================================================ */
.badge{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.7rem;font-weight:600;text-transform:uppercase}
.b-green{background:var(--green-bg);color:var(--green)}
.b-red{background:var(--red-bg);color:var(--red)}
.b-yellow{background:var(--yellow-bg);color:var(--yellow)}
.b-accent{background:var(--accent-bg);color:var(--accent)}
.b-cyan{background:var(--cyan-bg);color:var(--cyan)}
.b-ghost{background:rgba(26,24,19,.05);color:var(--text-dim)}
/* Market-state badge: same shape as .badge, neutral color (the market just
   ended — not an error, not a success). Sits next to bot-status badges in
   the My Bots list, so visual consistency matters. */
.bot-market-pill{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.7rem;font-weight:600;text-transform:uppercase;background:rgba(26,24,19,.05);color:var(--text-dim)}
.badge-green{background:var(--green-bg);color:var(--green)}
.badge-blue{background:var(--accent-bg);color:var(--accent)}
.badge-dim{background:rgba(26,24,19,.05);color:var(--text-dim)}

.empty{color:var(--text-dim);font-size:.84rem;text-align:center;padding:20px 0}

/* ================================================================
   Bot Builder
   ================================================================ */
.templates{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.tpl-btn{padding:8px 16px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface2);color:var(--text);font-size:.82rem;cursor:pointer;transition:all .15s;display:inline-flex;align-items:center;gap:6px}
.tpl-btn:hover{border-color:var(--accent);color:var(--accent)}
.tpl-btn.active{border-color:var(--accent);background:var(--accent-bg);color:var(--accent)}
.beta-badge{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:2px 6px;border-radius:4px;background:rgba(122,90,16,.16);color:#7A5A10;border:1px solid rgba(122,90,16,.35);line-height:1}
.tpl-btn.active .beta-badge{background:rgba(234,179,8,.25)}
.beta-notice{display:flex;align-items:center;gap:8px;margin-bottom:12px;padding:8px 12px;border-radius:8px;background:rgba(122,90,16,.10);border:1px solid rgba(234,179,8,.3);color:#7A5A10;font-size:.8rem;line-height:1.4}

.step-chain{display:flex;flex-direction:column;gap:0}
.step-card{background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px;position:relative}
.step-card .step-label{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim);margin-bottom:10px;display:flex;align-items:center;justify-content:space-between}
.step-card .step-label span{color:var(--text)}
/* ── Stop Loss card ───────────────────────────────────────────── */
.stop-loss-card{border-left:3px solid var(--red,#B3261E)}
.stop-loss-note{font-size:.76rem;color:var(--text-dim);padding:2px 0 10px;line-height:1.45}
.exit-order-divider{margin:12px 0 8px;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-dim);display:flex;align-items:center;gap:8px}
.exit-order-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.step-connector{display:flex;align-items:center;justify-content:center;padding:4px 0;color:var(--text-dim);font-size:.72rem;font-weight:600;letter-spacing:.05em}
.step-connector::before,.step-connector::after{content:'';flex:1;height:1px;background:var(--border)}
.step-connector::before{margin-right:10px}
.step-connector::after{margin-left:10px}

/* Disabled radio button (e.g. Loop when no recurring series selected) */
.radio-group .radio-btn:disabled{opacity:.35;cursor:not-allowed}
.radio-group .radio-btn:disabled:hover{background:transparent;color:var(--text-dim)}

.builder-top-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.builder-top-fields label{display:block;margin-bottom:4px}
.builder-top-fields input{width:100%;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);font-size:17px;font-family:inherit}
.builder-top-fields input:focus{outline:none;border-color:var(--text-dim)}

.ticker-input-wrap{position:relative}
.ticker-input-wrap input{padding-right:80px}
.ticker-browse-btn{position:absolute;right:4px;top:50%;transform:translateY(-50%);padding:5px 12px;border:none;border-radius:6px;background:var(--accent);color:#fff;font-size:.78rem;font-weight:600;cursor:pointer;transition:background .15s;font-family:inherit}
.ticker-browse-btn:hover{background:var(--accent-hover)}

.ticker-item{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .1s}
.ticker-item:hover,.ticker-item:active{background:var(--surface2)}
.ticker-item-name{font-size:.88rem;font-weight:600;color:var(--text)}
.ticker-item-title{font-size:.8rem;color:var(--text-dim);margin-top:2px;line-height:1.35}
.ticker-item-vol{font-size:.78rem;color:var(--text-dim);white-space:nowrap;margin-left:12px}

/* Full-page ticker browser */
.ticker-browser{position:fixed;inset:0;z-index:300;background:var(--bg);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .25s ease;will-change:transform}
.ticker-browser.open{transform:translateX(0)}
.ticker-browser-header{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0}
.ticker-browser-header h2{font-size:1rem;font-weight:600;margin:0}
.ticker-browser-back{background:none;border:none;cursor:pointer;color:var(--text);display:flex;align-items:center;padding:4px;border-radius:6px;transition:background .15s}
.ticker-browser-back:hover{background:var(--surface2)}
.ticker-browser-search{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0}
.ticker-browser-search input{flex:1;border:none;background:transparent;color:var(--text);font-size:17px;font-family:inherit;padding:4px 0;outline:none}
.ticker-browser-search input::placeholder{color:var(--text-dim)}
.ticker-browser-list{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}

/* Event browser (full-page overlay) */
.event-browser{position:fixed;inset:0;z-index:300;background:var(--bg);display:flex;flex-direction:column;transform:translateX(100%);transition:transform .25s ease;will-change:transform;pointer-events:none}
.event-browser.open{transform:translateX(0);pointer-events:auto}
.event-browser-header{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0}
.event-browser-header h2{font-size:1rem;font-weight:600;margin:0}
.event-browser-back{background:none;border:none;cursor:pointer;color:var(--text);display:flex;align-items:center;padding:4px;border-radius:6px;transition:background .15s}
.event-browser-back:hover{background:var(--surface2)}
.event-browser-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 16px}
.event-search-bar{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);margin-bottom:12px}
.event-search-bar input{flex:1;border:none;background:transparent;color:var(--text);font-size:16px;font-family:inherit;padding:0;outline:none}
.event-search-bar input::placeholder{color:var(--text-dim)}
.event-browser-list{display:flex;flex-direction:column;gap:8px}
.event-card{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--border);border-radius:8px;cursor:pointer;transition:all .15s;background:var(--surface)}
.event-card:hover{border-color:var(--accent);background:var(--accent-bg)}
.event-card-title{font-size:.9rem;font-weight:600;color:var(--text);line-height:1.35}
.event-card-sub{font-size:.78rem;color:var(--text-dim);line-height:1.3}
.event-card-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:2px}
.event-card-tag{font-size:.72rem;padding:2px 8px;border-radius:10px;background:var(--surface2);color:var(--text-dim);white-space:nowrap}
.market-card{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border:1px solid var(--border);border-radius:8px;cursor:pointer;transition:all .15s;background:var(--surface)}
.market-card:hover{border-color:var(--accent);background:var(--accent-bg)}
.market-card-left{flex:1;min-width:0}
.market-card-title{font-size:.88rem;font-weight:600;color:var(--text)}
.market-card-sub{font-size:.78rem;color:var(--text-dim);margin-top:2px}
.market-card-right{display:flex;gap:16px;align-items:center;flex-shrink:0;margin-left:12px}
.market-card-price{font-size:.9rem;font-weight:700;color:var(--accent)}
.market-card-vol{font-size:.75rem;color:var(--text-dim)}
/* Outcome table (Kalshi-style event drill-down) */
.outcome-table{width:100%;border-collapse:collapse}
.outcome-table thead th{text-align:left;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim);padding:8px 12px;border-bottom:1px solid var(--border)}
.outcome-table th.ot-price,.outcome-table th.ot-vol{text-align:center;width:70px}
.outcome-row{cursor:pointer;transition:background .1s}
.outcome-row:hover{background:var(--accent-bg)}
.outcome-row td{padding:12px;border-bottom:1px solid var(--border);font-size:.85rem}
.outcome-row:last-child td{border-bottom:none}
.ot-outcome-name{font-weight:600;color:var(--text)}
.ot-yes{text-align:center;font-weight:700;color:var(--green)}
.ot-no{text-align:center;font-weight:700;color:var(--red)}
.ot-vol-val{text-align:center;color:var(--text-dim);font-size:.78rem}

/* Desktop: event browser as centered modal dialog */
@media (min-width: 768px) {
  .event-browser{
    inset:auto;
    position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(.96);
    width:calc(100vw - 80px);max-width:720px;max-height:calc(100vh - 120px);
    border-radius:16px;box-shadow:0 24px 80px rgba(26,24,19,.20);
    opacity:0;pointer-events:none;transition:transform .2s ease,opacity .2s ease;
  }
  .event-browser.open{transform:translate(-50%,-50%) scale(1);opacity:1;pointer-events:auto}
  .event-browser-header{padding:16px 24px;border-radius:16px 16px 0 0}
  .event-browser-header h2{font-size:1.08rem}
  .event-browser-body{padding:8px 24px 24px}
  .event-browser-backdrop{position:fixed;inset:0;background:rgba(26,24,19,.45);z-index:299;opacity:0;pointer-events:none;transition:opacity .2s ease;backdrop-filter:blur(2px)}
  .event-browser-backdrop.open{opacity:1;pointer-events:auto}
  .outcome-table{width:100%}
  .outcome-table th{padding:12px 16px;font-size:.78rem}
  .outcome-row td{padding:14px 16px}
}

/* Discovery page (event finder) */
#builderPage{width:100%;max-width:800px;min-width:0;min-height:400px;margin:0 auto}
#discoverySection{width:100%}
#recentMarketsSection,#browseEventsSection{width:100%}
#builderSection{width:100%;max-width:800px}
.discovery-search{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);margin-bottom:12px;position:relative;width:100%}
.discovery-search input{flex:1;border:none;background:transparent;color:var(--text);font-size:16px;font-family:inherit;padding:0;outline:none}
.discovery-search input::placeholder{color:var(--text-dim)}

/* Search dropdown */
.search-dropdown{display:none;position:absolute;top:100%;left:0;right:0;margin-top:4px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);max-height:400px;overflow-y:auto;z-index:200;box-shadow:0 12px 40px rgba(26,24,19,.16)}
.search-dropdown.open{display:block}
.search-dropdown-section{padding:8px 0}
.search-dropdown-label{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim);padding:4px 14px 6px}
.search-dropdown-item{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;cursor:pointer;transition:background .1s;gap:12px}
.search-dropdown-item:hover{background:var(--surface2)}
.search-dropdown-item-title{font-size:.85rem;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.search-dropdown-item-meta{font-size:.75rem;color:var(--text-dim);white-space:nowrap;flex-shrink:0}
.search-dropdown-item-price{font-size:.82rem;font-weight:700;color:var(--accent);flex-shrink:0}
.search-dropdown-empty{padding:16px 14px;text-align:center;font-size:.84rem;color:var(--text-dim)}
.search-dropdown-loading{padding:16px 14px;text-align:center;font-size:.84rem;color:var(--text-dim)}
.search-dropdown-divider{border-top:1px solid var(--border);margin:4px 0}
.discovery-tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:16px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.discovery-tabs::-webkit-scrollbar{display:none}
.discovery-tab{padding:10px 20px;font-size:.84rem;font-weight:500;color:var(--text-dim);background:none;border:none;border-bottom:2px solid transparent;border-radius:0;cursor:pointer;transition:all .15s;font-family:inherit;white-space:nowrap;flex-shrink:0}
.discovery-tab:hover{color:var(--text)}
.discovery-tab.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}
.discovery-heading{font-size:.82rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim);margin-bottom:10px}
/* Vertical side tabs (Bot Builder pages) */
.side-tab{display:flex;align-items:center;gap:8px;padding:10px 16px;font-size:.84rem;font-weight:500;color:var(--text-dim);border-left:2px solid transparent;border-radius:0;cursor:pointer;transition:all .15s;white-space:nowrap}
.side-tab:hover{color:var(--text);background:var(--surface)}
.side-tab.active{color:var(--accent);border-left-color:var(--accent);font-weight:600;background:var(--surface)}
.discovery-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:24px}
.discovery-card{display:flex;flex-direction:column;gap:6px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;transition:all .15s;background:var(--surface)}
.discovery-card:hover{border-color:var(--accent);background:var(--accent-bg)}
.discovery-card-title{font-size:.88rem;font-weight:600;color:var(--text);line-height:1.35}
.discovery-card-sub{font-size:.78rem;color:var(--text-dim);line-height:1.3}
.discovery-card-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:2px}
.discovery-card-price{font-size:.85rem;font-weight:700;color:var(--accent)}
.discovery-card-tag{font-size:.7rem;padding:2px 8px;border-radius:10px;background:var(--surface2);color:var(--text-dim);white-space:nowrap}
.discovery-card-tag.recurring{background:var(--cyan-bg);color:var(--cyan)}
.discovery-card-tag.active-tag{background:var(--green-bg);color:var(--green)}
.discovery-card-vol{font-size:.78rem;color:var(--text-dim)}
.discovery-card-kalshi{font-size:.7rem;color:var(--text-dim);text-decoration:none;margin-left:auto;padding:2px 6px;border-radius:4px;transition:all .15s;white-space:nowrap}
.discovery-card-kalshi:hover{color:var(--accent);background:var(--accent-bg)}

/* Inline outcome previews on event cards (Kalshi-style) */
.event-inline-outcomes{margin-top:8px;display:flex;flex-direction:column;gap:0}
.event-inline-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-top:1px solid var(--border)}
.eir-name{font-size:.78rem;color:var(--text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.eir-price{font-size:.78rem;font-weight:700;color:var(--accent);margin-left:8px;flex-shrink:0}
.eir-more{font-size:.72rem;color:var(--text-dim);padding-top:4px;border-top:1px solid var(--border)}

/* Selected market badge (expanded Kalshi-style) */
.selected-market{padding:16px 20px;border:1px solid var(--green);border-radius:var(--radius);background:var(--green-bg)}
.sm-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.selected-market-label{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--green)}
.sm-event-question{font-size:.82rem;color:var(--text-dim);line-height:1.4;margin-bottom:2px}
.sm-title{font-size:1.05rem;font-weight:700;color:var(--text);line-height:1.35;word-break:break-word}
.sm-ticker{font-size:.75rem;color:var(--text-dim);margin-top:2px;font-family:ui-monospace,monospace;word-break:break-all}

/* Price / probability */
.sm-price-section{display:flex;align-items:center;gap:20px;margin-top:14px;padding-top:14px;border-top:1px solid rgba(14,107,82,.12)}
.sm-price-big{font-size:2rem;font-weight:800;color:var(--green);line-height:1;min-width:70px}
/* Live dot + price-flash */
.live-dot{display:inline-flex;align-items:center;gap:4px;font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--green);margin-top:3px}
.live-dot::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);animation:live-pulse 1.8s ease-in-out infinite}
@keyframes live-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.75)}}
@keyframes price-flash{0%{color:var(--green)}100%{color:inherit}}
.price-flash{animation:price-flash .55s ease-out}
.sm-prices-row{display:flex;gap:16px;flex:1}
.sm-price-cell{display:flex;flex-direction:column;gap:1px}
.sm-price-label{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim)}
.sm-price-val{font-size:.95rem;font-weight:700;color:var(--text)}
.sm-yes .sm-price-val{color:var(--green)}
.sm-no .sm-price-val{color:var(--red)}

/* Stats row */
.sm-stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid rgba(14,107,82,.12)}
.sm-stat{display:flex;flex-direction:column;gap:1px}
.sm-stat-label{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim)}
.sm-stat-val{font-size:.85rem;font-weight:600;color:var(--text)}

/* Orderbook depth ladder
   Two stacked ladders: ASKS on top (high → low), BIDS underneath (high → low).
   Bar width is sized by relative volume.  Cells are clickable so the user can
   prefill their limit price by clicking any level. */
.sm-orderbook{margin-top:14px;padding-top:14px;border-top:1px solid rgba(14,107,82,.12)}
.sm-ob-header{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}
.sm-ob-title{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim)}
.sm-ob-tabs{display:inline-flex;gap:2px;border:1px solid var(--border);border-radius:6px;padding:2px;background:var(--bg)}
.sm-ob-tab{appearance:none;background:transparent;border:none;color:var(--text-dim);font-size:.72rem;font-weight:600;padding:3px 10px;border-radius:4px;cursor:pointer;font-family:inherit}
.sm-ob-tab.active{background:var(--surface2);color:var(--text)}
.sm-ob-empty{padding:14px;border:1px dashed var(--border);border-radius:6px;font-size:.78rem;color:var(--text-dim);text-align:center}
.sm-ob-cols{display:grid;grid-template-columns:55px 1fr 70px;gap:0;font-size:.72rem;color:var(--text-dim);padding:0 6px 4px;font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.sm-ob-cols span:nth-child(2){text-align:right;padding-right:8px}
.sm-ob-cols span:nth-child(3){text-align:right}
.sm-ob-ladder{display:flex;flex-direction:column;gap:1px}
.sm-ob-row{display:grid;grid-template-columns:55px 1fr 70px;align-items:center;gap:0;font-size:.78rem;padding:3px 6px;border-radius:4px;cursor:pointer;position:relative;background:var(--bg);transition:background .1s}
.sm-ob-row:hover{background:var(--surface2)}
.sm-ob-row .sm-ob-price{font-weight:700;font-variant-numeric:tabular-nums;z-index:1}
.sm-ob-row .sm-ob-bar-wrap{position:relative;height:14px;border-radius:3px;overflow:hidden;background:transparent;margin-right:8px}
.sm-ob-row .sm-ob-bar{position:absolute;top:0;right:0;bottom:0;border-radius:3px}
.sm-ob-row .sm-ob-size{font-variant-numeric:tabular-nums;text-align:right;color:var(--text);z-index:1}
.sm-ob-ask .sm-ob-price{color:var(--red)}
.sm-ob-ask .sm-ob-bar{background:rgba(239,68,68,.16)}
.sm-ob-bid .sm-ob-price{color:var(--green)}
.sm-ob-bid .sm-ob-bar{background:rgba(34,197,94,.16)}
.sm-ob-spread{display:flex;justify-content:space-between;align-items:center;padding:5px 6px;margin:2px 0;font-size:.7rem;color:var(--text-dim);border-top:1px dashed var(--border);border-bottom:1px dashed var(--border);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.sm-ob-spread .sm-ob-spread-val{color:var(--text);font-weight:700;text-transform:none;letter-spacing:0;font-variant-numeric:tabular-nums}
.sm-ob-row.sm-ob-userprice{outline:2px solid var(--accent);outline-offset:-2px;background:var(--accent-bg)}
.sm-ob-userprice-marker{padding:5px 8px;margin:2px 0;font-size:.72rem;color:var(--accent);background:var(--accent-bg);border-radius:4px;border:1px dashed var(--accent);text-align:center;font-weight:600}

/* Closed-market warning banner — shown above the form when status != active */
.sm-closed-warning{margin-top:14px;padding:12px 14px;border-radius:8px;font-size:.85rem;line-height:1.4;background:rgba(234,179,8,.1);border:1px solid rgba(122,90,16,.35);color:#7A5A10;display:flex;align-items:flex-start;gap:10px}
.sm-closed-warning strong{color:var(--text);display:block;margin-bottom:2px}

/* Time-to-close countdown */
.sm-stat-val.sm-countdown{font-variant-numeric:tabular-nums}
.sm-stat-val.sm-countdown.urgent{color:var(--red)}
.sm-stat-val.sm-countdown.soon{color:#7A5A10}

/* Status banner: loading / no-orders / error / no-keys */
.sm-status-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;padding:10px 12px;border-radius:8px;font-size:.84rem;line-height:1.4;border:1px solid transparent}
.sm-status-banner strong{font-weight:700;margin-right:2px}
.sm-status-banner .sm-banner-btn{margin-left:auto;background:transparent;border:1px solid currentColor;color:inherit;padding:4px 10px;border-radius:6px;font-size:.78rem;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap}
.sm-status-banner .sm-banner-btn:hover{background:rgba(26,24,19,.08)}
.sm-status-loading{background:rgba(26,24,19,.06);border-color:rgba(148,163,184,.25);color:var(--text-dim)}
.sm-status-info{background:rgba(122,90,16,.10);border-color:rgba(234,179,8,.3);color:#7A5A10}
.sm-status-error{background:rgba(179,38,30,.08);border-color:rgba(179,38,30,.3);color:#8C1D17}
.sm-status-spinner{width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;animation:sm-spin .8s linear infinite;flex-shrink:0}
@keyframes sm-spin{to{transform:rotate(360deg)}}

/* Yes/No context pills */
.selected-market-context{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid rgba(14,107,82,.12)}
.selected-market-context .market-outcome{font-size:.78rem;padding:4px 10px;border-radius:6px;font-weight:500}
.selected-market-context .yes-outcome{background:var(--green-bg);color:var(--green)}
.selected-market-context .no-outcome{background:var(--red-bg);color:var(--red)}
.side-context{font-size:.72rem;color:var(--text-dim);margin-top:3px;font-style:italic}
/* NO-side selected market: override accent colours to red */
.selected-market--no{border-color:var(--red)!important;background:var(--red-bg)!important}
.selected-market--no .selected-market-label{color:var(--red)!important}
.selected-market--no .sm-price-section{border-top-color:rgba(179,38,30,.12)!important}
.selected-market--no .sm-stats-row{border-top-color:rgba(179,38,30,.12)!important}
.selected-market--no .selected-market-context{border-top-color:rgba(179,38,30,.12)!important}

@media(max-width:768px){
  .sm-price-section{flex-direction:column;align-items:flex-start;gap:10px}
  .sm-stats-row{grid-template-columns:repeat(2,1fr)}
}

/* More Strategies modal grid */
.more-strats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.more-strat-card{padding:16px;border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;transition:all .15s;background:var(--surface2);position:relative}
.more-strat-card:hover:not(.locked){border-color:var(--accent);background:var(--accent-bg)}
.more-strat-card.locked{opacity:.5;cursor:not-allowed}
.more-strat-name{font-size:.88rem;font-weight:600;color:var(--text);margin-bottom:4px}
.more-strat-desc{font-size:.75rem;color:var(--text-dim);line-height:1.35}
.more-strat-badge{position:absolute;top:8px;right:8px;font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:2px 7px;border-radius:6px;background:var(--accent-bg);color:var(--accent)}

/* Cents input with $0. prefix and stepper buttons */
.cents-wrap{display:flex;align-items:center;border:1px solid var(--border);border-radius:6px;background:var(--bg);overflow:hidden}
.cents-wrap:focus-within{border-color:var(--text-dim)}
.cents-prefix{padding:0 0 0 10px;font-size:17px;font-weight:600;color:var(--text-dim);white-space:nowrap;user-select:none;pointer-events:none;line-height:1}
.cents-wrap input[type="number"]{border:none;background:transparent;padding:10px 2px 10px 0;width:48px;font-size:17px;font-weight:600;color:var(--text);text-align:left;-moz-appearance:textfield;outline:none}
.cents-wrap input[type="number"]::-webkit-inner-spin-button,.cents-wrap input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.cents-stepper{display:flex;align-items:center;justify-content:center;width:36px;height:100%;min-height:40px;border:none;border-left:1px solid var(--border);background:var(--surface2);color:var(--text);font-size:1.1rem;font-weight:600;cursor:pointer;transition:all .1s;font-family:inherit;padding:0;flex-shrink:0}
.cents-stepper:hover{background:var(--accent-bg);color:var(--accent)}
.cents-stepper:active{background:var(--accent);color:#fff}
.cents-hint{font-size:.72rem;color:var(--text-dim);margin-top:3px}
.cents-hint .current-val{color:var(--accent);font-weight:600}

/* Step summary & validation */
.step-summary{margin-top:10px;padding:8px 12px;border-radius:6px;background:var(--bg);font-size:.78rem;color:var(--text-dim);line-height:1.45}
.step-summary strong{color:var(--text);font-weight:600}
.step-warning{margin-top:6px;padding:8px 12px;border-radius:6px;background:var(--yellow-bg);border:1px solid rgba(234,179,8,.2);font-size:.75rem;color:var(--yellow);line-height:1.4}

/* Skeleton loading */
@keyframes shimmer{0%{background-position:-400px 0}100%{background-position:400px 0}}
.skeleton-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.skeleton-line{height:14px;border-radius:4px;background:linear-gradient(90deg,var(--surface2) 25%,var(--border) 50%,var(--surface2) 75%);background-size:800px 100%;animation:shimmer 1.5s infinite linear}
.skeleton-line.w80{width:80%}.skeleton-line.w60{width:60%}.skeleton-line.w40{width:40%}.skeleton-line.short{height:10px;width:30%}

.builder-footer{display:flex;align-items:center;justify-content:flex-end;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}

/* ================================================================
   Log scroll
   ================================================================ */
.log-scroll{max-height:420px;overflow-y:auto;font-size:0.875rem}
.log-scroll table{width:100%;border-collapse:collapse}
.log-scroll th{text-align:left;padding:8px 10px;font-weight:600;color:var(--text-dim);border-bottom:1px solid var(--border);white-space:nowrap}
.log-scroll td{padding:10px;vertical-align:top;border-bottom:1px solid var(--border)}
.log-scroll td.log-time{white-space:nowrap;color:var(--text-dim);font-size:0.8rem}
.log-scroll td.log-msg{word-break:break-word;line-height:1.45;max-width:1px}
.log-scroll td.log-details{font-size:0.78rem;color:var(--text-dim);font-family:ui-monospace,monospace;background:var(--bg);padding:8px;border-radius:4px;margin-top:4px;white-space:pre-wrap;word-break:break-word;max-height:120px;overflow-y:auto}
.log-scroll tr:hover td{background:var(--bg)}

/* ================================================================
   Bot cards (mobile)
   ================================================================ */
.bot-cards{display:flex;flex-direction:column;gap:10px}
.bot-card{padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface2);cursor:pointer;transition:all .15s}
.bot-card:active{background:var(--bg)}
.bc-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}
.bc-name{font-size:.88rem;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.bc-progress{font-size:.76rem;color:var(--text-dim);margin-bottom:10px}
.bc-actions{display:flex;gap:6px;justify-content:flex-end}
.bc-name-cell{cursor:pointer;color:var(--text);font-weight:500;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bc-name-cell:hover{color:var(--accent)}

/* ================================================================
   Bot progress bar & step pipeline
   ================================================================ */
/* Inline stepper timeline (used in bot list table/cards) */
.bp-tracker{display:flex;flex-direction:column;gap:6px}
.bp-stepper{display:flex;align-items:center;gap:0;position:relative}
.bp-node{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.62rem;font-weight:700;flex-shrink:0;border:2px solid var(--border);background:rgba(26,24,19,.04);color:var(--text-dim);position:relative;z-index:1;transition:all .25s}
.bp-node.bp-filled{border-color:var(--green);background:rgba(14,107,82,.12);color:var(--green)}
.bp-node.bp-active,.bp-node.bp-placed{border-color:var(--yellow);background:rgba(122,90,16,.16);color:var(--yellow);animation:bp-glow 2s ease-in-out infinite}
.bp-node.bp-error{border-color:var(--red);background:rgba(179,38,30,.12);color:var(--red)}
.bp-node.bp-cancelled{opacity:.35}
.bp-wire{flex:1;height:2px;background:var(--border);position:relative;transition:background .3s}
.bp-wire.bp-filled{background:var(--green)}
.bp-wire.bp-active,.bp-wire.bp-placed{background:var(--yellow);overflow:hidden}
.bp-wire.bp-active::after,.bp-wire.bp-placed::after{content:'';position:absolute;top:0;left:-40%;width:40%;height:100%;background:linear-gradient(90deg,transparent,rgba(234,179,8,.7),transparent);animation:bp-flow 1.5s linear infinite}
.bp-status-row{display:flex;align-items:center;gap:8px}
.bp-pct{font-size:.78rem;font-weight:700;color:var(--text);min-width:32px}
.bp-activity{font-size:.7rem;color:var(--text-dim);display:flex;align-items:center;gap:5px}
.bp-activity-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.bp-activity-dot.filled{background:var(--green)}
.bp-activity-dot.active,.bp-activity-dot.placed{background:var(--yellow);animation:bp-pulse 1.5s ease-in-out infinite}
.bp-activity-dot.pending{background:var(--text-dim);opacity:.3}
.bp-activity-dot.error{background:var(--red)}
.bp-activity-dot.idle{background:var(--text-dim);opacity:.2}

@keyframes bp-pulse{0%,100%{opacity:1}50%{opacity:.3}}
@keyframes bp-glow{0%,100%{box-shadow:0 0 0 0 rgba(234,179,8,0)}50%{box-shadow:0 0 8px 2px rgba(234,179,8,.25)}}
@keyframes bp-flow{0%{left:-40%}100%{left:100%}}

/* Step pipeline (used in bot detail modal) */
.bp-pipeline{display:flex;flex-direction:column;gap:0;position:relative}
.bp-step{display:flex;align-items:flex-start;gap:0;padding:0;background:none;border:none;position:relative}
.bp-step-track{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:40px}
.bp-step-dot{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.82rem;font-weight:700;background:rgba(26,24,19,.08);color:var(--text-dim);border:2px solid var(--border);transition:all .25s;position:relative;z-index:2}
.bp-step.bp-filled .bp-step-dot{background:rgba(14,107,82,.12);color:var(--green);border-color:var(--green)}
.bp-step.bp-active .bp-step-dot,.bp-step.bp-placed .bp-step-dot{background:rgba(122,90,16,.16);color:var(--yellow);border-color:var(--yellow);animation:bp-glow 2s ease-in-out infinite}
.bp-step.bp-error .bp-step-dot{background:rgba(179,38,30,.12);color:var(--red);border-color:var(--red)}
.bp-step.bp-cancelled .bp-step-dot{opacity:.35}
.bp-step-line{width:2px;flex:1;min-height:20px;background:var(--border);transition:background .3s}
.bp-step.bp-filled .bp-step-line{background:var(--green)}
.bp-step-card{flex:1;margin-left:14px;padding:12px 16px;border:1px solid var(--border);border-radius:10px;background:var(--surface2);margin-bottom:12px;transition:all .25s}
.bp-step.bp-filled .bp-step-card{border-color:rgba(14,107,82,.25);background:rgba(14,107,82,.05)}
.bp-step.bp-active .bp-step-card,.bp-step.bp-placed .bp-step-card{border-color:rgba(122,90,16,.35);background:rgba(234,179,8,.04);box-shadow:0 0 16px rgba(234,179,8,.06)}
.bp-step.bp-error .bp-step-card{border-color:rgba(179,38,30,.25);background:rgba(239,68,68,.04)}
.bp-step-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.bp-step-title{font-size:.84rem;font-weight:600;color:var(--text)}
.bp-step-badge{font-size:.7rem}
.bp-step-meta{font-size:.74rem;color:var(--text-dim);margin-bottom:3px}
.bp-step-oid{font-size:.66rem;color:var(--text-dim);font-family:monospace;opacity:.6}
.bp-step-activity{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:.72rem;color:var(--yellow);font-weight:500}
.bp-step-activity-icon{display:inline-block;width:14px;height:14px;border:2px solid var(--yellow);border-top-color:transparent;border-radius:50%;animation:bp-spin .8s linear infinite}
@keyframes bp-spin{to{transform:rotate(360deg)}}

/* Detail header progress ring */
.bp-ring-wrap{display:flex;align-items:center;gap:16px}
.po-row{transition:background .12s}
.po-row:hover td{background:rgba(26,24,19,.03)}
.po-row:hover td:first-child{color:var(--accent)}
.bp-ring{position:relative;width:64px;height:64px;flex-shrink:0}
.bp-ring svg{transform:rotate(-90deg)}
.bp-ring-bg{fill:none;stroke:rgba(26,24,19,.08);stroke-width:5}
.bp-ring-fill{fill:none;stroke-width:5;stroke-linecap:round;transition:stroke-dashoffset .6s ease,stroke .3s}
.bp-ring-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.82rem;font-weight:700;color:var(--text)}
.bp-ring-info{display:flex;flex-direction:column;gap:2px}
.bp-ring-info-main{font-size:.95rem;font-weight:600;color:var(--text)}
.bp-ring-info-sub{font-size:.75rem;color:var(--text-dim)}

/* ================================================================
   History cards (mobile)
   ================================================================ */
.history-cards{display:flex;flex-direction:column;gap:8px;max-height:400px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.history-card{padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface2)}
.hc-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.hc-ticker{font-size:.82rem;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65%}
.hc-row{display:flex;align-items:center;gap:8px;font-size:.82rem}
.hc-dim{color:var(--text-dim);text-transform:uppercase;font-size:.72rem;font-weight:500}
.hc-time{font-size:.72rem;color:var(--text-dim);margin-top:6px}

/* ================================================================
   Toast
   ================================================================ */
.toast{position:fixed;bottom:20px;right:20px;padding:10px 18px;border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-size:.84rem;opacity:0;transition:opacity .25s;pointer-events:none;z-index:1000;box-shadow:var(--shadow-md)}
.toast.show{opacity:1}

/* ================================================================
   Modal
   ================================================================ */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(26,24,19,.45);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:900;align-items:center;justify-content:center}
.modal-overlay.open{display:flex}
.modal{background:var(--surface);border:1px solid var(--border-strong);border-radius:16px;padding:24px 28px;width:90%;max-width:960px;max-height:85vh;overflow-y:auto;box-shadow:var(--shadow-lg)}
.modal h2{font-size:1rem;font-weight:600;margin-bottom:16px}

/* Upgrade modal — full-page overlay */
.upgrade-overlay{display:none;position:fixed;inset:0;background:var(--bg);z-index:999;align-items:center;justify-content:center;overflow-y:auto}
.upgrade-overlay.open{display:flex}
.upgrade-modal{max-width:420px;width:90%;padding:40px 28px;text-align:center;position:relative;margin:auto;background:transparent;border:none}
.upgrade-close{position:fixed;top:16px;right:20px;background:none;border:none;color:var(--text-dim);font-size:1.8rem;cursor:pointer;padding:4px 8px;line-height:1;z-index:1000}
.upgrade-close:hover{color:var(--text)}
.upgrade-mascot{margin-bottom:16px}
.upgrade-mascot img{display:block;margin:0 auto}
.upgrade-title{font-size:1.2rem;font-weight:700;margin-bottom:6px}
.upgrade-subtitle{font-size:.84rem;color:var(--text-dim);margin-bottom:20px;line-height:1.5}
.upgrade-benefits{display:flex;flex-direction:column;gap:10px;text-align:left;margin-bottom:22px;padding:0 4px}
.upgrade-benefit{display:flex;align-items:center;gap:10px;font-size:.84rem}
.upgrade-benefit strong{color:var(--text)}
.upgrade-pricing{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
.upgrade-plan{padding:16px 12px;border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;transition:all .15s;text-align:center;position:relative}
.upgrade-plan:hover{border-color:var(--text-dim)}
.upgrade-plan.selected{border-color:var(--accent);background:var(--accent-bg)}
.upgrade-plan-save{position:absolute;top:-9px;left:50%;transform:translateX(-50%);background:var(--accent);color:#fff;font-size:.6rem;font-weight:700;padding:2px 8px;border-radius:8px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.upgrade-plan-name{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim);margin-bottom:4px}
.upgrade-plan-price{font-size:1.3rem;font-weight:700}
.upgrade-plan-price span{font-size:.72rem;font-weight:400;color:var(--text-dim)}
.upgrade-plan-sub{font-size:.72rem;color:var(--text-dim);margin-top:2px}
.upgrade-cta{width:100%;padding:14px;font-size:.95rem;font-weight:700;border-radius:var(--radius-sm)}
.upgrade-footer{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:14px;font-size:.72rem;color:var(--text-dim)}

/* Plan limit hint under bot list */
.plan-hint{text-align:center;padding:10px 0 2px;font-size:.76rem;color:var(--text-dim)}
.plan-hint a{color:var(--accent);text-decoration:none}
.plan-hint a:hover{color:var(--accent-hover)}

/* ================================================================
   Auth pages (login / register)
   ================================================================ */
.auth-page{display:flex;align-items:center;justify-content:center;min-height:100vh;background:var(--bg)}
.auth-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:36px 40px;width:400px;text-align:center;box-shadow:var(--shadow-lg)}
.auth-card h1{font-size:1.3rem;font-weight:700;margin-bottom:6px}
.auth-card .subtitle{font-size:.84rem;color:var(--text-dim);margin-bottom:24px}
.auth-card input{margin-bottom:12px}
.auth-card button[type="submit"]{width:100%;padding:10px;margin-top:4px}
.auth-divider{display:flex;align-items:center;gap:12px;margin:20px 0;font-size:.78rem;color:var(--text-dim)}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.auth-card .auth-link{font-size:.82rem;color:var(--text-dim);margin-top:16px}
.auth-card .auth-link a{color:var(--accent);text-decoration:none}
.auth-card .auth-link a:hover{color:var(--accent-hover)}
.auth-card .error{color:var(--red);font-size:.82rem;margin-bottom:12px}
.btn-google{width:100%;padding:10px;background:var(--surface2);border:1px solid var(--border);color:var(--text);display:flex;align-items:center;justify-content:center;gap:8px;font-size:.85rem;font-weight:500;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s}
.btn-google:hover{border-color:var(--text-dim);background:var(--bg)}

/* ================================================================
   Settings sections
   ================================================================ */
.settings-section{margin-bottom:28px}
.settings-section h3{font-size:.9rem;font-weight:600;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}
.key-status{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:var(--radius-sm);font-size:.8rem;font-weight:500;margin-bottom:12px}
.key-status.connected{background:var(--green-bg);color:var(--green)}
.key-status.disconnected{background:var(--red-bg);color:var(--red)}
.keys-banner{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:8px;background:var(--accent-bg);border:1px solid rgba(209,74,31,.25);color:var(--text);font-size:.85rem;margin-bottom:16px}
.keys-banner a{text-decoration:none}
.keys-banner a:hover{text-decoration:underline}
.keys-banner-full{display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:24px;border-radius:12px;background:var(--surface2);border:1px solid var(--border);color:var(--text);font-size:.9rem;margin:20px 0}
.pem-upload-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-bg)}
.pem-upload-name{font-size:.8rem;color:var(--green);font-weight:500}

/* ================================================================
   Hamburger
   ================================================================ */
.hamburger{display:flex;flex-direction:column;gap:4px;background:none;border:none;cursor:pointer;padding:6px}
.hamburger span{display:block;width:20px;height:2px;background:var(--text);border-radius:2px;transition:all .2s}

/* Sidebar overlay (mobile only) */
.sidebar-overlay{display:none}

/* ================================================================
   Toggle switch
   ================================================================ */
/* Radio-style button group */
.radio-group{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}
.radio-group .radio-btn{padding:6px 16px;font-size:.82rem;font-weight:500;cursor:pointer;border:none;background:transparent;color:var(--text-dim);transition:all .15s;font-family:inherit}
.radio-group .radio-btn:not(:last-child){border-right:1px solid var(--border)}
.radio-group .radio-btn.active{background:var(--surface2);color:var(--text);font-weight:600}
.radio-group .radio-btn.active-buy{background:var(--green-bg);color:var(--green);font-weight:600;border-color:rgba(34,197,94,.2)}
.radio-group .radio-btn.active-sell{background:var(--red-bg);color:var(--red);font-weight:600;border-color:rgba(239,68,68,.2)}
.radio-group .radio-btn:hover:not(.active):not(.active-buy):not(.active-sell){background:var(--surface2);color:var(--text)}

/* Pill-style radio buttons (separated, not joined toggle) */
.radio-pills{display:flex;gap:6px}
.radio-pills .pill-btn{padding:6px 16px;font-size:.82rem;font-weight:500;cursor:pointer;border:1px solid var(--border);border-radius:20px;background:transparent;color:var(--text-dim);transition:all .15s;font-family:inherit}
.radio-pills .pill-btn:hover:not(.active):not(.active-buy):not(.active-sell){border-color:var(--text-dim);color:var(--text)}
.radio-pills .pill-btn.active{background:var(--surface2);color:var(--text);font-weight:600;border-color:var(--text-dim)}
.radio-pills .pill-btn.active-buy{background:var(--green-bg);color:var(--green);font-weight:600;border-color:rgba(14,107,82,.4)}
.radio-pills .pill-btn.active-sell{background:var(--red-bg);color:var(--red);font-weight:600;border-color:rgba(239,68,68,.4)}

/* Legacy toggle (kept for other uses) */
.toggle-wrap{display:flex;align-items:center;gap:12px}
.toggle-label{font-size:.84rem;color:var(--text-dim);font-weight:500}
.toggle-label.active{color:var(--text)}
.toggle{position:relative;width:44px;height:24px;flex-shrink:0}
.toggle input{opacity:0;width:0;height:0}
.toggle .slider{position:absolute;inset:0;background:var(--border);border-radius:12px;cursor:pointer;transition:all .2s}
.toggle .slider::before{content:'';position:absolute;width:18px;height:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:all .2s}
.toggle input:checked+.slider{background:var(--text-dim)}
.toggle input:checked+.slider::before{transform:translateX(20px)}

/* ================================================================
   Settings Widget (centered card with own left nav)
   ================================================================ */
.settings-widget{
  display:flex;
  width:100%;
  max-width:860px;
  min-width:0;
  margin:0 auto;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  min-height:480px;
}
.settings-nav{
  width:200px;
  flex-shrink:0;
  background:var(--bg);
  border-right:1px solid var(--border);
  padding:20px 0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.settings-nav-item{
  display:flex;align-items:center;gap:10px;
  padding:10px 20px;
  font-size:.85rem;font-weight:500;
  color:var(--text-dim);
  text-decoration:none;
  transition:color .15s, background .15s;
  border-left:3px solid transparent;
}
.settings-nav-item:hover{
  color:var(--text);
  background:rgba(26,24,19,.03);
}
.settings-nav-item.active{
  color:var(--accent);
  background:var(--accent-bg);
  border-left-color:var(--accent);
  font-weight:600;
}
.settings-body{
  flex:1;
  padding:28px 32px;
  min-width:0;
}
.settings-body h3{
  font-size:1rem;font-weight:600;margin-bottom:16px;
}

/* Back-to-dashboard link above settings widget */
.settings-back-link{
  display:inline-flex;align-items:center;gap:6px;
  max-width:860px;margin:0 auto 14px;
  padding:6px 10px 6px 6px;
  font-size:.82rem;font-weight:500;
  color:var(--text-dim);
  text-decoration:none;
  border-radius:6px;
  transition:color .15s, background .15s;
}
.settings-back-link:hover{color:var(--text);background:rgba(26,24,19,.04)}
.settings-back-link svg{flex-shrink:0}

/* Success CTA shown after API keys connect successfully */
.keys-success-cta{
  margin-top:14px;
  padding:16px 18px;
  border:1px solid rgba(14,107,82,.25);
  background:var(--green-bg);
  border-radius:10px;
  display:flex;flex-direction:column;gap:6px;
}
.keys-success-title{font-size:.92rem;font-weight:600;color:var(--text)}
.keys-success-desc{font-size:.8rem;color:var(--text-dim);line-height:1.5}
.keys-success-btn{
  align-self:flex-start;margin-top:8px;
  padding:9px 18px;border-radius:var(--radius-sm);
  font-size:.85rem;font-weight:600;
  text-decoration:none;
}

/* ================================================================
   Responsive
   ================================================================ */
@media(max-width:768px){
  .topbar{padding:0 12px}
  .topbar-brand{font-size:.88rem;gap:6px}
  .topbar-brand-text{display:none}
  .topbar-mascot{width:30px;height:30px}
  .mobile-only{display:flex !important}
  .profile-email-text{display:none}

  .app-layout{flex-direction:column}

  .sidebar{
    display:flex;
    position:fixed;top:var(--topbar-h);left:0;bottom:0;
    width:260px;
    transform:translateX(-100%);
    transition:transform .25s ease;
    z-index:200;
  }
  .sidebar.open{transform:translateX(0)}

  .sidebar-overlay{
    display:block;
    position:fixed;inset:0;top:var(--topbar-h);
    background:rgba(26,24,19,.45);
    backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);
    opacity:0;
    pointer-events:none;
    transition:opacity .25s;
    z-index:150;
  }
  .sidebar-overlay.open{opacity:1;pointer-events:auto}

  .main-content{margin-left:0;width:100%;overflow-x:hidden}
  .container{padding:16px}
  .row{grid-template-columns:1fr}

  .card{padding:16px}
  .modal{width:95%;max-width:none;padding:18px}

  /* Prevent iOS zoom on focus — inputs must be >= 16px */
  input,select,textarea{font-size:17px}

  .form-row{grid-template-columns:1fr}
  .btn-group{flex-wrap:wrap}

  table{font-size:.75rem}
  th,td{padding:6px 8px}

  .templates{gap:6px}
  .tpl-btn{padding:6px 12px;font-size:.78rem}
  .builder-top-fields{grid-template-columns:1fr}
  .builder-actions{width:100%}
  .builder-actions .btn-accent{width:100%}
  .stat-row{grid-template-columns:1fr 1fr}

  /* Radio groups: wrap on small screens */
  .radio-group{flex-wrap:wrap;border-radius:8px}
  .radio-group .radio-btn{flex:1 1 auto;text-align:center;white-space:nowrap}

  /* More strategies modal: single column */
  .more-strats-grid{grid-template-columns:1fr}

  .settings-widget{flex-direction:column;min-height:auto;border-radius:0;border-left:none;border-right:none}
  .settings-nav{width:100%;flex-direction:row;overflow-x:auto;-webkit-overflow-scrolling:touch;border-right:none;border-bottom:1px solid var(--border);padding:0;gap:0;scrollbar-width:none}
  .settings-nav::-webkit-scrollbar{display:none}
  .settings-nav-item{padding:10px 14px;white-space:nowrap;border-left:none;border-bottom:3px solid transparent;font-size:.78rem;gap:6px;flex-shrink:0}
  .settings-nav-item svg{width:14px;height:14px}
  .settings-nav-item.active{border-left-color:transparent;border-bottom-color:var(--accent)}
  .settings-body{padding:16px 14px;overflow-x:hidden;word-break:break-word}
  .settings-body input,.settings-body textarea{font-size:16px;max-width:100%;box-sizing:border-box}
  .settings-body .form-help{word-break:break-word;overflow-wrap:anywhere}
  .settings-body .guide-card{padding:16px 14px;margin-top:20px}
  .settings-body .step-pill{word-break:break-all}
  .settings-body .toggle-wrap{flex-wrap:wrap}

  /* Guide card mobile */
  .guide-card{padding:16px}
  .guide-step{gap:10px}

  /* Upgrade pricing grid */
  .upgrade-pricing{grid-template-columns:1fr 1fr}

  /* Performance stats */
  .perf-summary{grid-template-columns:1fr 1fr}
  .strat-breakdown{grid-template-columns:1fr}
}

@media(max-width:380px){
  .container{padding:12px}
  .card{padding:14px 12px}
  .radio-group .radio-btn{padding:6px 10px;font-size:.75rem}
}

/* ================================================================
   Trade Wizard
   ================================================================ */

/* Progress bar */
.wiz-progress{position:relative;margin-bottom:28px;padding:0 4px}
.wiz-progress-bar{position:absolute;top:50%;left:0;height:3px;background:var(--accent);border-radius:2px;transition:width .4s ease;transform:translateY(-50%);z-index:0}
.wiz-progress::before{content:'';position:absolute;top:50%;left:0;right:0;height:3px;background:var(--border);border-radius:2px;transform:translateY(-50%)}
.wiz-progress-steps{position:relative;display:flex;justify-content:space-between;z-index:1}
.wiz-step-dot{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--surface);border:2px solid var(--border);color:var(--text-dim);font-size:.72rem;font-weight:700;transition:all .3s}
.wiz-step-dot.active{background:var(--accent);border-color:var(--accent);color:#fff}
.wiz-step-dot.skip{opacity:.3}

/* Screen transitions */
.wiz-screen{display:none;animation:wizFadeIn .3s ease}
.wiz-screen.active{display:block}
@keyframes wizFadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* Header */
.wiz-header{margin-bottom:24px}
.wiz-header h2{font-size:1.3rem;font-weight:700;margin:0 0 6px;color:var(--text)}
.wiz-header p{font-size:.88rem;color:var(--text-dim);margin:0}

/* URL input box */
.wiz-url-box{display:flex;align-items:center;gap:10px;padding:10px 10px 10px 18px;border:2px solid var(--accent);border-radius:12px;background:var(--surface);box-shadow:0 4px 20px rgba(26,24,19,.08);max-width:620px}
.wiz-url-box input{flex:1;border:none;background:transparent;color:var(--text);font-size:.95rem;font-family:inherit;outline:none;min-width:0;padding:6px 0}
.wiz-hint{font-size:.78rem;color:var(--text-dim);margin-top:10px}

/* Step 1 hero — large, centered URL input */
.wiz-step1-hero{max-width:680px;margin:48px auto 32px;text-align:center}
.wiz-step1-title{font-size:1.75rem;font-weight:700;color:var(--text);margin:0 0 10px}
.wiz-step1-sub{font-size:.95rem;color:var(--text-dim);margin:0 0 28px;line-height:1.5}
.wiz-step1-sub a{color:var(--accent);text-decoration:none;font-weight:500}
.wiz-step1-sub a:hover{text-decoration:underline}
.wiz-url-box-lg{padding:14px 14px 14px 22px;border-radius:16px;max-width:100%;box-shadow:0 8px 32px rgba(26,24,19,.08),0 0 0 4px var(--accent-bg)}
.wiz-url-box-lg input{font-size:1.05rem;padding:8px 0}
.wiz-url-load{white-space:nowrap;padding:11px 24px;border-radius:10px;font-size:.95rem;flex-shrink:0;font-weight:600}
.wiz-step1-example{margin-top:18px;display:inline-flex;align-items:center;gap:10px;font-size:.78rem;color:var(--text-dim)}
.wiz-step1-example-label{text-transform:uppercase;letter-spacing:.06em;font-weight:600;font-size:.7rem}
.wiz-step1-example code{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:4px 8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--text)}

/* Outcome picker header — search filter sits next to the title */
.wiz-outcome-header{display:flex;align-items:center;gap:12px;margin:8px 0 6px;flex-wrap:wrap}
.wiz-outcome-header .wiz-section-label{margin:0;flex:1;min-width:200px}
.wiz-outcome-filter{flex:0 1 260px;padding:9px 14px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:.88rem;font-family:inherit;outline:none;transition:border-color .15s}
.wiz-outcome-filter:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.wiz-outcome-count{font-size:.76rem;color:var(--text-dim);margin:0 0 12px}

/* Section labels */
.wiz-section-label{padding:4px 0 10px;font-size:.76rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim)}

/* Market cards — cover + body layout */
.wiz-market-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.wiz-market-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:0;cursor:pointer;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;display:flex;flex-direction:column;overflow:hidden;min-height:200px}
.wiz-market-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 12px 28px rgba(26,24,19,.14)}
/* Cover — gradient + emoji */
.wiz-mc-cover{position:relative;height:72px;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}
.wiz-mc-cover::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at top right,rgba(255,255,255,.12),transparent 60%);pointer-events:none}
.wiz-mc-cover-emoji{font-size:38px;line-height:1;filter:drop-shadow(0 2px 6px rgba(26,24,19,.14));z-index:1}
.wiz-mc-cover-cat{position:absolute;bottom:7px;left:10px;font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.95);background:rgba(0,0,0,.32);padding:2px 7px;border-radius:4px;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:1}
/* Body — content under the cover */
.wiz-mc-body{display:flex;flex-direction:column;gap:8px;padding:14px 16px;flex:1}
/* Flat variant (outcome picker, etc.) — no cover, smaller min-height */
.wiz-market-card-flat{min-height:0}
.wiz-market-card-flat .wiz-mc-body{padding:14px 16px}
.wiz-mc-title{font-weight:600;font-size:.92rem;color:var(--text);line-height:1.35;letter-spacing:-.005em}
.wiz-mc-meta{display:flex;align-items:center;gap:10px;margin-top:auto;font-size:.78rem;flex-wrap:wrap}
.wiz-mc-price{color:var(--accent);font-weight:600}
.wiz-mc-vol{color:var(--text-dim)}

/* Mini badge (shows selected market on steps 2-5) — Kalshi-style */
.wiz-mini-badge{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px;margin-bottom:20px;overflow:hidden}
.wiz-badge-inner{display:flex;align-items:center;gap:10px}
.wiz-badge-title{font-weight:700;font-size:.92rem;color:var(--text);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wiz-badge-meta{display:flex;gap:12px;font-size:.78rem}
.wiz-badge-price{color:var(--accent);font-weight:600}
.wiz-badge-exp{color:var(--text-dim)}
.wiz-badge-countdown{font-size:.72rem;font-weight:600;color:var(--accent);margin-top:2px}

/* Price chart inside badge */
.wiz-chart-wrap{position:relative;margin:8px -16px 0;height:120px;overflow:hidden}
.wiz-chart-canvas{display:block;width:100%;height:100%}
.wiz-chart-overlay{position:absolute;top:8px;left:16px;pointer-events:none}
.wiz-chart-last{font-size:1.5rem;font-weight:800;color:var(--text)}
.wiz-chart-change{font-size:.78rem;font-weight:600}

/* Live price grid inside mini badge */
.wiz-live-prices{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
.wiz-lp-cell{text-align:center;padding:4px 0}
.wiz-lp-label{font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim);margin-bottom:1px}
.wiz-lp-val{font-size:1.1rem;font-weight:800;color:var(--text);transition:color .3s;line-height:1.2}
.wiz-lp-sub{font-size:.58rem;color:var(--text-dim);margin-top:1px}
.wiz-lp-yes .wiz-lp-val{color:var(--green)}
.wiz-lp-no .wiz-lp-val{color:var(--red)}

/* No orders warning */
.wiz-no-orders{display:flex;align-items:center;gap:8px;margin-top:10px;padding:10px 12px;border-radius:8px;background:rgba(122,90,16,.10);color:var(--text-dim);font-size:.8rem;border:1px solid rgba(122,90,16,.12)}
.wiz-no-orders-icon{font-size:1.1rem}
.wiz-no-orders strong{color:var(--text)}

.wiz-badge-stats{display:flex;gap:12px;align-items:center;margin-top:8px;font-size:.72rem;color:var(--text-dim)}
.wiz-live-dot{display:inline-flex;align-items:center;gap:4px;color:var(--green);font-weight:600}
.wiz-live-dot::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--green);animation:wizPulse 2s infinite}
@keyframes wizPulse{0%,100%{opacity:1}50%{opacity:.3}}
.wiz-price-flash{animation:wizFlash .4s ease}
@keyframes wizFlash{0%{color:var(--accent)}100%{color:inherit}}

/* Outcome picker: probability bar + recommended badge */
.wiz-mc-recommended{border-color:var(--accent);background:var(--accent-bg)}
.wiz-mc-hot{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--accent);margin-bottom:4px}
.wiz-mc-prob-row{display:flex;align-items:center;gap:8px;margin-top:6px}
.wiz-mc-prob-bar{flex:1;height:6px;border-radius:3px;background:var(--border);overflow:hidden}
.wiz-mc-prob-bar>div{height:100%;border-radius:3px;transition:width .3s}
.wiz-mc-prob-pct{font-size:.78rem;font-weight:700;color:var(--text);min-width:32px;text-align:right}

/* ================================================================
   Step 1 Discover — popular + your markets + search
   ================================================================ */
/* Find Trades + bot wizard discover: widen the container so the popular
 * grid can stretch to 4-5 cards on big desktop monitors. */
body.page-find_trades .container,
body.page-bot_builder .container{max-width:1640px}

.wiz-discover{margin:8px 0 0;width:100%}

/* Top-of-page inputs row: URL paste (primary) + "or" + Search (secondary).
 * Both visible by default — URL paste is a very common entry vector. */
.wiz-inputs-row{display:flex;align-items:stretch;gap:14px;margin-bottom:22px;flex-wrap:wrap}
.wiz-inputs-row .wiz-url-box-top{flex:1 1 360px;min-width:280px;margin:0}
.wiz-inputs-row .wiz-search-box{flex:1 1 320px;min-width:240px;max-width:none}
.wiz-input-or{display:flex;align-items:center;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);padding:0 4px;user-select:none}

/* URL paste box at the top — slightly accent-bordered to read as the
 * "fast path" without overpowering the search box next to it. */
.wiz-url-box-top{padding:8px 8px 8px 14px;border-radius:10px;border:1.5px solid var(--accent);background:var(--surface);transition:border-color .15s,box-shadow .15s}
.wiz-url-box-top:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.wiz-url-box-top input{font-size:.92rem;padding:9px 0}
.wiz-url-box-top .wiz-url-load{padding:9px 18px;font-size:.85rem;border-radius:7px;font-weight:600}

@media (max-width:640px){
  .wiz-inputs-row{gap:8px;margin-bottom:16px}
  .wiz-input-or{flex:0 0 100%;justify-content:center;padding:2px 0}
  .wiz-inputs-row .wiz-url-box-top,
  .wiz-inputs-row .wiz-search-box{flex-basis:100%}
}
.wiz-discover-header{display:flex;align-items:center;gap:20px;margin-bottom:22px;flex-wrap:wrap}
.wiz-discover-title{flex:1;min-width:160px;font-size:1.6rem;font-weight:700;color:var(--text);margin:0;letter-spacing:-.015em}
.wiz-search-box{position:relative;display:flex;align-items:center;flex:0 1 480px;min-width:260px;background:var(--surface);border:1px solid var(--border);border-radius:10px;transition:border-color .15s,box-shadow .15s}
.wiz-search-box:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.wiz-search-box svg{position:absolute;left:12px;color:var(--text-dim);pointer-events:none}
.wiz-search-box input{flex:1;border:none;background:transparent;color:var(--text);font-size:.92rem;font-family:inherit;outline:none;padding:11px 14px 11px 38px;min-width:0;width:100%}
.wiz-search-box input::placeholder{color:var(--text-dim)}

/* Category chip row — pill filters above the popular grid */
.wiz-category-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px}
.wiz-cat-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:20px;border:1px solid var(--border);background:var(--surface);color:var(--text-secondary);font-size:.82rem;font-weight:600;font-family:inherit;cursor:pointer;transition:all .15s;white-space:nowrap}
.wiz-cat-chip:hover{border-color:var(--border-strong);color:var(--text);background:var(--surface2)}
.wiz-cat-chip-active{border-color:var(--accent);color:var(--accent);background:var(--accent-bg)}
.wiz-cat-chip-active:hover{border-color:var(--accent-hover);color:var(--accent-hover);background:var(--accent-bg)}
.wiz-cat-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:rgba(148,163,184,.18);font-size:.66rem;font-weight:700;color:var(--text-dim);line-height:1}
.wiz-cat-chip-active .wiz-cat-count{background:var(--accent);color:#fff}
.wiz-cat-emoji{font-size:.95rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;filter:saturate(1.1)}

/* Per-card category badge — small pill at top of each card */
.wiz-mc-cat-badge{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;padding:3px 9px 3px 7px;border-radius:10px;background:rgba(148,163,184,.10);font-size:.66rem;font-weight:600;color:var(--text-dim);letter-spacing:.02em;text-transform:uppercase;line-height:1;border:1px solid rgba(26,24,19,.06)}
.wiz-mc-cat-emoji{font-size:.85rem;line-height:1;display:inline-flex;align-items:center}

/* Section subtitle — small caption next to the section label */
.wiz-section-sub{margin-left:10px;font-size:.7rem;font-weight:500;color:var(--text-dim);text-transform:none;letter-spacing:0}

/* Hero card — spans 2 columns, taller cover, bigger everything */
.wiz-market-card-hero{grid-column:span 2;min-height:260px}
.wiz-market-card-hero .wiz-mc-cover{height:120px}
.wiz-market-card-hero .wiz-mc-cover-emoji{font-size:62px}
.wiz-market-card-hero .wiz-mc-cover-cat{font-size:.66rem;padding:3px 10px;bottom:10px;left:14px}
.wiz-market-card-hero .wiz-mc-body{padding:18px 22px;gap:10px}
.wiz-market-card-hero .wiz-mc-title{font-size:1.3rem;line-height:1.25;font-weight:700;letter-spacing:-.015em}
.wiz-market-card-hero .wiz-mc-sub{font-size:.86rem;margin-top:2px}
.wiz-market-card-hero .wiz-mc-prob-bar{height:9px;border-radius:5px}
.wiz-market-card-hero .wiz-mc-prob-bar>div{border-radius:5px}
.wiz-market-card-hero .wiz-mc-prob-pct{font-size:1.15rem;min-width:46px}
.wiz-market-card-hero .wiz-mc-meta{font-size:.84rem;gap:14px}

@media (max-width:640px){
  .wiz-market-card-hero{grid-column:span 1;min-height:0}
  .wiz-market-card-hero .wiz-mc-cover{height:84px}
  .wiz-market-card-hero .wiz-mc-cover-emoji{font-size:44px}
  .wiz-market-card-hero .wiz-mc-title{font-size:1.05rem}
}

/* Skeleton loading cards — pulse animation, no content yet */
.wiz-skel-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:16px 18px;min-height:120px;display:flex;flex-direction:column;gap:10px;position:relative;overflow:hidden}
.wiz-skel-card::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(26,24,19,.04),transparent);animation:wiz-skel-shimmer 1.6s infinite}
.wiz-skel-line{background:rgba(26,24,19,.06);border-radius:4px;height:10px}
.wiz-skel-line-title{width:78%;height:14px}
.wiz-skel-line-sub{width:42%;height:10px}
.wiz-skel-line-bar{width:100%;height:6px;margin-top:6px}
@keyframes wiz-skel-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}

.wiz-discover-section{margin-bottom:22px}
.wiz-discover-section .wiz-section-label{display:flex;align-items:center;padding:0 0 10px}

.wiz-discover-loading,
.wiz-discover-empty{grid-column:1/-1;padding:32px 20px;text-align:center;color:var(--text-dim);font-size:.88rem;background:var(--surface);border:1px dashed var(--border);border-radius:12px}
.wiz-link-btn{background:none;border:none;color:var(--accent);font-weight:600;font-size:inherit;font-family:inherit;cursor:pointer;padding:0;margin-left:4px}
.wiz-link-btn:hover{text-decoration:underline}

/* Event card additions — subtitle + outcome count tag */
.wiz-mc-sub{font-size:.74rem;color:var(--text-dim);margin-top:3px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.wiz-mc-tag{font-size:.7rem;font-weight:600;color:var(--text-dim);background:rgba(148,163,184,.1);padding:2px 7px;border-radius:10px;letter-spacing:.01em}
.wiz-mc-tag-interval{color:var(--accent);background:rgba(209,74,31,.12)}

/* Your markets — green hint that you've been here before */
.wiz-mc-yours{border-color:rgba(14,107,82,.25);background:linear-gradient(180deg,rgba(14,107,82,.05),var(--surface))}
.wiz-mc-yours:hover{border-color:var(--green);background:var(--green-bg)}
.wiz-mc-yours-badge{display:inline-block;font-size:.62rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--green);background:var(--green-bg);padding:2px 7px;border-radius:10px;margin-bottom:6px}

/* Outcome picker back button */
.wiz-outcome-back{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text-secondary);cursor:pointer;transition:all .15s;flex-shrink:0;padding:0}
.wiz-outcome-back:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-bg)}

/* URL paste fallback — collapsed at bottom of discover */
.wiz-url-fallback{margin-top:28px;padding-top:20px;border-top:1px solid var(--border);text-align:center}
.wiz-url-fallback-toggle{display:inline-flex;align-items:center;gap:6px;background:none;border:none;color:var(--text-dim);font-size:.82rem;font-weight:500;cursor:pointer;padding:6px 10px;border-radius:6px;font-family:inherit;transition:color .15s}
.wiz-url-fallback-toggle:hover{color:var(--text)}
.wiz-url-fallback-toggle svg{transition:transform .2s}
.wiz-url-fallback-toggle.wiz-url-fallback-open svg{transform:rotate(180deg)}
.wiz-url-fallback-body{max-width:620px;margin:14px auto 0}

@media (max-width:640px){
  .wiz-discover-header{gap:10px;margin-bottom:14px}
  .wiz-discover-title{font-size:1.15rem;min-width:0;flex-basis:100%}
  .wiz-search-box{max-width:100%}
  .wiz-discover-section{margin-bottom:18px}
}


/* Smart price suggestions */
.wiz-sug{font-size:.8rem;padding:8px 12px;border-radius:8px;margin-bottom:8px;line-height:1.4}
.wiz-sug-warn{background:var(--red-bg);color:var(--red);border:1px solid rgba(179,38,30,.12)}
.wiz-sug-info{background:rgba(122,90,16,.10);color:#7A5A10;border:1px solid rgba(122,90,16,.12)}
.wiz-sug-good{background:var(--green-bg);color:var(--green);border:1px solid rgba(14,107,82,.12)}

/* Quick price buttons */
.wiz-quick-prices{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.wiz-qp-btn{padding:8px 14px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:.82rem;font-weight:600;cursor:pointer;font-family:inherit;transition:all .15s;text-align:center;line-height:1.3}
.wiz-qp-btn:hover{border-color:var(--accent);background:var(--accent-bg)}
.wiz-qp-btn span{display:block;font-size:.68rem;font-weight:400;color:var(--text-dim);margin-top:1px}

/* Goal cards */
.wiz-goal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.wiz-goal-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px;cursor:pointer;transition:all .2s;text-align:left;color:var(--text);font-family:inherit}
.wiz-goal-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 4px 16px rgba(26,24,19,.08)}
.wiz-goal-card.selected{border-color:var(--accent);background:var(--accent-bg);box-shadow:0 0 0 2px var(--accent)}
.wiz-goal-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;margin-bottom:12px}
.wiz-goal-name{font-size:.95rem;font-weight:700;margin-bottom:4px}
.wiz-goal-desc{font-size:.8rem;color:var(--text-dim);line-height:1.4}

/* Fields */
.wiz-field{margin-bottom:22px}
.wiz-field-label{display:block;font-size:.88rem;font-weight:600;color:var(--text);margin-bottom:8px}
.wiz-field-hint{font-size:.78rem;color:var(--text-dim);margin:-4px 0 10px}
.wiz-optional{font-weight:400;color:var(--text-dim);font-size:.8rem}

/* Side picker */
.wiz-side-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:400px}
.wiz-side-btn{background:var(--surface);border:2px solid var(--border);border-radius:12px;padding:16px;cursor:pointer;transition:all .2s;text-align:left;font-family:inherit;color:var(--text)}
.wiz-side-btn:hover{border-color:var(--text-dim)}
.wiz-side-btn.active.wiz-side-yes{border-color:var(--green);background:var(--green-bg)}
.wiz-side-btn.active.wiz-side-no{border-color:var(--red);background:var(--red-bg)}
.wiz-side-label{display:block;font-size:1rem;font-weight:700;margin-bottom:2px}
.wiz-side-price{display:block;font-size:.88rem;font-weight:600;color:var(--accent);margin-bottom:4px}
.wiz-side-context{display:block;font-size:.76rem;color:var(--text-dim);line-height:1.3}

/* Price input */
.wiz-price-row{display:flex;align-items:center;gap:8px;max-width:240px}
.wiz-price-display{display:flex;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px 12px;flex:1}
.wiz-price-dollar{font-size:1.1rem;font-weight:600;color:var(--text-dim)}
.wiz-price-value{border:none;background:transparent;color:var(--text);font-size:1.3rem;font-weight:700;font-family:inherit;width:50px;text-align:center;outline:none;-moz-appearance:textfield}
.wiz-price-value::-webkit-inner-spin-button,.wiz-price-value::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.wiz-price-stepper{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:1.2rem;font-weight:600;cursor:pointer;transition:all .15s;font-family:inherit;flex-shrink:0}
.wiz-price-stepper:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}
.wiz-toggle{position:relative;display:inline-flex;cursor:pointer;flex-shrink:0}
.wiz-toggle input{position:absolute;opacity:0;width:0;height:0}
.wiz-toggle-track{width:44px;height:24px;border-radius:12px;background:var(--border);transition:background .2s;position:relative}
.wiz-toggle-track::after{content:'';position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:var(--text-dim);transition:transform .2s,background .2s}
.wiz-toggle input:checked+.wiz-toggle-track{background:var(--accent)}
.wiz-toggle input:checked+.wiz-toggle-track::after{transform:translateX(20px);background:#fff}
.bp-stop-badge{font-size:12px;margin-left:-4px;line-height:1}
/* Underline tabs. The active indicator is a pseudo-element (not border-bottom)
   so it stays a clean rectangle — the global `button` rule sets border-radius
   on every button, which would otherwise curve the underline's corners. */
.bots-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin:-4px 0 12px}
.bots-tab{background:transparent;border:0;border-radius:0;padding:10px 16px;color:var(--text-dim);cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;display:inline-flex;align-items:center;gap:7px;position:relative;transition:color .15s}
.bots-tab:hover{color:var(--text)}
.bots-tab.active{color:var(--accent)}
.bots-tab.active::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--accent)}
.bots-tab-count{font-size:12px;font-weight:500;color:var(--text-dim);font-variant-numeric:tabular-nums;opacity:.65}
.bots-tab.active .bots-tab-count{color:var(--accent);opacity:1}
.bots-tab-desc{font-size:12px;color:var(--text-dim);margin:0 0 12px}

/* ================================================================
   Unified My Bots list (templates/bots.html + static/js/my_bots_unified.js)

   Owner ask 2026-05-23: "I don't like all these boxes" → rows lose
   their per-card border + background; the parent .card already frames
   the section. Rows are now a divider-separated list, much lighter
   visually and much better on mobile.
   ================================================================ */

/* Top controls row — filter tabs on the left, sort dropdown on the
   right. Stack on narrow screens. */
.my-bots-controls{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--border);margin:-4px 0 0}
.my-bots-filter{display:flex;gap:4px}
.my-bots-filter-tab{background:transparent;border:0;padding:10px 14px;color:var(--text-dim);cursor:pointer;font-size:13px;font-weight:500;font-family:inherit;position:relative;transition:color .15s}
.my-bots-filter-tab:hover{color:var(--text)}
.my-bots-filter-tab.active{color:var(--accent)}
.my-bots-filter-tab.active::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--accent)}
.my-bots-sort{display:inline-flex;align-items:center;gap:6px;padding-bottom:8px;font-size:.74rem;color:var(--text-dim)}
.my-bots-sort-label{text-transform:uppercase;letter-spacing:.06em;font-weight:600;opacity:.7}
.my-bots-sort select{background:transparent;border:1px solid var(--border);border-radius:6px;color:var(--text);padding:4px 8px;font-size:.78rem;font-family:inherit;cursor:pointer}
.my-bots-sort select:hover{border-color:var(--border-strong)}
.my-bots-sort select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}

/* Divider list — no per-row chrome. The first row has no top border
   so it doesn't double up against the controls bar; every other row
   gets a thin top divider. Hover lifts the row with a subtle wash, no
   border highlight (kept the "less boxes" theme). */
#myBotsList{display:flex;flex-direction:column;margin-top:8px}
.my-bots-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 4px;border-top:1px solid var(--border);text-decoration:none;color:inherit;transition:background .12s}
.my-bots-row:first-child{border-top:0}
.my-bots-row:hover{background:rgba(26,24,19,.03)}
.my-bots-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
.my-bots-row-name{font-size:.95rem;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.my-bots-row-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.74rem;color:var(--text-dim)}
.my-bots-row-date{color:var(--text-dim);font-variant-numeric:tabular-nums}

/* Stat block on the right — wider gap, right-aligned. On mobile the
   meta + stats reflow inline under the name so the row stays compact. */
.my-bots-row-stats{display:flex;gap:22px;flex-shrink:0}
.my-bots-stat{display:flex;flex-direction:column;align-items:flex-end;gap:1px;min-width:56px}
.my-bots-stat-label{font-size:.62rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim);opacity:.7}
.my-bots-stat-val{font-size:.88rem;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}

.my-bots-kind{display:inline-block;padding:2px 7px;border-radius:10px;font-size:.66rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;border:1px solid transparent}
.my-bots-kind-classic{color:var(--text-dim);border-color:var(--border);background:rgba(26,24,19,.03)}
.my-bots-kind-nl{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);background:color-mix(in srgb,var(--accent) 10%,transparent)}

.my-bots-st{display:inline-block;padding:2px 7px;border-radius:10px;font-size:.66rem;font-weight:600;letter-spacing:.02em;border:1px solid transparent;background:rgba(26,24,19,.03);color:var(--text-dim)}
.my-bots-st-active{color:var(--green);border-color:color-mix(in srgb,var(--green) 40%,transparent);background:color-mix(in srgb,var(--green) 12%,transparent)}
.my-bots-st-paused{color:var(--yellow);border-color:color-mix(in srgb,var(--yellow) 40%,transparent);background:color-mix(in srgb,var(--yellow) 12%,transparent)}
.my-bots-st-done{color:var(--text-dim)}
.my-bots-st-error{color:var(--red);border-color:color-mix(in srgb,var(--red) 40%,transparent);background:color-mix(in srgb,var(--red) 12%,transparent)}
.my-bots-st-capped{color:#7A5A10;border-color:rgba(251,191,36,.4);background:rgba(251,191,36,.12)}
.my-bots-st-archived{color:var(--text-dim);opacity:.7}
.my-bots-st-draft{color:var(--text-dim);font-style:italic}
/* "New" = deployed bot that hasn't fired yet. Accent-tinted so it
   reads as a positive-neutral state ("freshly launched") rather than
   an error or warning. Owner ask 2026-05-23. */
.my-bots-st-new{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);background:color-mix(in srgb,var(--accent) 12%,transparent)}

/* Em-dash placeholder in the Trades stat for new bots. Keeps the row
   aligned with peers that do show a number. */
.my-bots-trades-na{color:var(--text-dim);opacity:.6}

.my-bots-pnl{font-variant-numeric:tabular-nums}
.my-bots-pnl-pos{color:var(--green)}
.my-bots-pnl-neg{color:var(--red)}
.my-bots-pnl-zero{color:var(--text-dim)}
.my-bots-pnl-na{color:var(--text-dim);opacity:.6}

/* Mobile: name on top, then a single meta+stats row under it. P&L and
   Trades collapse to inline value-label pairs ("+$3.20 P&L · 7 trades")
   so the row stays one line of stats instead of a 2x2 grid. */
@media (max-width: 560px) {
  .my-bots-controls{align-items:stretch}
  .my-bots-filter{flex-wrap:wrap}
  .my-bots-filter-tab{padding:8px 10px;font-size:12px}
  .my-bots-sort{padding-bottom:6px}

  .my-bots-row{flex-direction:column;align-items:stretch;gap:6px;padding:11px 2px}
  .my-bots-row-meta{font-size:.7rem;gap:6px}
  .my-bots-row-stats{justify-content:flex-start;gap:14px}
  .my-bots-stat{flex-direction:row;align-items:baseline;gap:5px;min-width:0}
  .my-bots-stat-label{order:2;font-size:.62rem;letter-spacing:.04em}
  .my-bots-stat-val{font-size:.82rem}
}

/* Loading + empty states for the bot list */
.bots-loading{padding:48px 24px;display:flex;flex-direction:column;align-items:center;gap:14px;color:var(--text-dim);font-size:13px}
.bots-loading-spinner{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:bots-spin .8s linear infinite}
@keyframes bots-spin{to{transform:rotate(360deg)}}
.bots-empty-v2{padding:48px 24px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px}
.bots-empty-icon{width:52px;height:52px;border-radius:14px;background:rgba(26,24,19,.04);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-dim);margin-bottom:6px}
.bots-empty-title{font-size:15px;font-weight:600;color:var(--text)}
.bots-empty-desc{font-size:13px;color:var(--text-dim);max-width:340px;line-height:1.5}
.bots-empty-cta{margin-top:10px;text-decoration:none}
.wiz-price-hint{font-size:.78rem;color:var(--text-dim);margin-top:6px}
.wiz-price-suggestion{font-size:.78rem;margin-top:4px}

/* Alert direction */
.wiz-alert-direction{display:flex;gap:8px}
.wiz-dir-btn{padding:8px 20px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text-dim);cursor:pointer;font-family:inherit;font-size:.88rem;font-weight:600;transition:all .15s}
.wiz-dir-btn.active{background:var(--accent);border-color:var(--accent);color:#fff}

/* Contracts */
.wiz-contracts-row{display:flex;align-items:center;gap:8px;max-width:180px}
.wiz-contracts-value{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:8px 12px;color:var(--text);font-size:1.3rem;font-weight:700;font-family:inherit;width:60px;text-align:center;-moz-appearance:textfield}
.wiz-contracts-value::-webkit-inner-spin-button,.wiz-contracts-value::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.wiz-cost-hint{font-size:.82rem;color:var(--text-dim);margin-top:8px}
.wiz-profit-hint,.wiz-loss-hint{font-size:.82rem;margin-top:8px}

/* Review card */
.wiz-review-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px 24px}
.wiz-review-section{display:flex;justify-content:space-between;align-items:baseline;padding:10px 0;border-bottom:1px solid var(--border)}
.wiz-review-section:last-child{border-bottom:none}
.wiz-review-label{font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim);flex-shrink:0}
.wiz-review-value{font-size:.92rem;color:var(--text);text-align:right;font-weight:500}
.wiz-review-highlight{font-size:1rem;font-weight:700;color:var(--accent)}
.wiz-review-side{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.78rem;font-weight:700}
.wiz-review-side-yes{background:var(--green-bg);color:var(--green)}
.wiz-review-side-no{background:var(--red-bg);color:var(--red)}

/* Navigation */
.wiz-nav{display:flex;justify-content:space-between;align-items:center;margin-top:28px;padding-top:16px;border-top:1px solid var(--border)}
.wiz-nav .btn-lg{padding:12px 32px;font-size:.95rem}

/* Split button: primary action + chevron toggle for secondary actions */
.wiz-split-btn{position:relative;display:inline-flex;align-items:stretch}
.wiz-split-btn .wiz-split-main{border-top-right-radius:0;border-bottom-right-radius:0;border-right:1px solid rgba(26,24,19,.15)}
.wiz-split-btn .wiz-split-toggle{display:inline-flex;align-items:center;justify-content:center;padding:0 10px;border-top-left-radius:0;border-bottom-left-radius:0;cursor:pointer}
.wiz-split-btn .wiz-split-toggle:hover{filter:brightness(1.08)}
.wiz-split-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:240px;background:var(--card-2,var(--card));border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px rgba(26,24,19,.16);padding:6px;z-index:50;display:flex;flex-direction:column;gap:2px}
.wiz-split-menu[hidden]{display:none}
.wiz-split-menu-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;padding:10px 12px;background:transparent;border:none;border-radius:6px;color:var(--text);cursor:pointer;font-size:.9rem}
.wiz-split-menu-item:hover{background:rgba(26,24,19,.08)}
.wiz-split-menu-item strong{font-weight:600}
.wiz-split-menu-item span{font-size:.78rem;color:var(--text-dim);font-weight:400}

/* Responsive */
@media(max-width:700px){
  /* The .container now sits edge-to-edge on mobile (see edge-to-edge block
     below). Wizard content isn't a .card so it needs its own gutter. */
  #wizardPage{padding:0 14px}
  .wiz-step1-hero{margin:24px auto 24px}
  .wiz-step1-title{font-size:1.4rem;line-height:1.25}
  .wiz-step1-sub{margin-bottom:20px}
  /* Stack the EXAMPLE label above the URL so the inline-flex row stops
     overflowing both edges on narrow screens. */
  .wiz-step1-example{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;margin-top:14px}
  .wiz-step1-example code{max-width:100%;overflow-wrap:anywhere;word-break:break-all;text-align:center;font-size:.72rem;line-height:1.4}
  .wiz-url-box-lg{padding:10px 10px 10px 16px;border-radius:14px;box-shadow:0 6px 20px rgba(26,24,19,.08),0 0 0 3px var(--accent-bg)}
}
@media(max-width:600px){
  .wiz-goal-grid{grid-template-columns:1fr}
  .wiz-side-picker{grid-template-columns:1fr}
  .wiz-market-grid{grid-template-columns:1fr}
  .wiz-review-section{flex-direction:column;gap:2px}
  .wiz-review-value{text-align:left}
  .wiz-chart-last{font-size:1.2rem}
  .wiz-lp-val{font-size:.95rem}
}

/* ================================================================
   Trade History page — market-grouped cards
   ================================================================ */
.th-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:20px}
.th-stat{background:var(--card-bg,var(--surface));border:1px solid var(--border);border-radius:10px;padding:14px 16px}
.th-stat-label{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim);margin-bottom:4px}
.th-stat-value{font-size:1.4rem;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}
.th-stat-value.pnl-pos{color:var(--green)}
.th-stat-value.pnl-neg{color:var(--red,#B3261E)}
.th-stat-sub{font-size:.7rem;color:var(--text-dim);margin-top:2px}

.th-tabs{display:flex;align-items:center;gap:0;margin-bottom:14px;border-bottom:1px solid var(--border)}
.th-tab{background:transparent;border:none;color:var(--text-dim);padding:10px 18px;font-size:.88rem;font-weight:600;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .15s,border-color .15s;display:inline-flex;align-items:center;gap:8px;border-radius:0}
.th-tab:hover{color:var(--text);background:rgba(26,24,19,.03)}
.th-tab.active{color:var(--accent);border-bottom-color:var(--accent)}
.th-count{font-size:.78rem;font-weight:600;color:inherit;opacity:.7}
.th-tab.active .th-count{opacity:1}
.th-refresh{margin-left:auto}

.th-list{display:flex;flex-direction:column;gap:10px}

.th-card{background:var(--card-bg,var(--surface));border:1px solid var(--border);border-radius:10px;overflow:hidden}
.th-card-head{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;cursor:pointer;transition:background .12s}
.th-card-head:hover{background:rgba(26,24,19,.03)}
.th-card-main{flex:1;min-width:0}
.th-card-title{font-size:.95rem;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px;line-height:1.3}
.th-caret{display:inline-block;color:var(--text-dim);font-size:.85rem;width:14px;flex-shrink:0}
.th-card-sub{font-size:.78rem;color:var(--text-dim);margin-top:2px;margin-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px;margin-left:22px}
.th-card-summary{font-size:.78rem;color:var(--text-dim);font-variant-numeric:tabular-nums}
.th-card-time{font-size:.75rem;color:var(--text-dim);margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums}
.th-card-pnl{font-size:1.1rem;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums;flex-shrink:0;text-align:right;min-width:80px}
.th-card-pnl.pnl-pos{color:var(--green)}
.th-card-pnl.pnl-neg{color:var(--red,#B3261E)}

.th-badge{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.th-b-blue{background:rgba(59,130,246,.15);color:#2456B3}
.th-b-green{background:var(--green-bg,rgba(14,107,82,.12));color:var(--green)}
.th-b-red{background:var(--red-bg,rgba(179,38,30,.12));color:var(--red,#B3261E)}
.th-b-ghost{background:rgba(26,24,19,.08);color:var(--text-dim)}
.th-b-yellow{background:rgba(122,90,16,.12);color:var(--yellow,#7A5A10)}

.th-side{display:inline-block;padding:2px 6px;border-radius:3px;font-size:.68rem;font-weight:700;letter-spacing:.04em}
.th-side-yes{background:var(--green-bg,rgba(14,107,82,.12));color:var(--green)}
.th-side-no{background:var(--red-bg,rgba(179,38,30,.12));color:var(--red,#B3261E)}

.th-breakdown{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;padding:14px 16px;background:var(--surface2,rgba(26,24,19,.02));border-top:1px solid var(--border)}
.th-breakdown div{display:flex;flex-direction:column;gap:2px;font-size:.85rem}
.th-breakdown span{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim)}
.th-breakdown b{font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}

.th-fills{padding:6px 16px 14px;border-top:1px solid var(--border)}
.th-fills-empty{font-size:.82rem;color:var(--text-dim);padding:8px 0;text-align:center}
.th-fill{display:grid;grid-template-columns:60px 50px 50px 16px 60px 80px 1fr;align-items:center;gap:8px;padding:6px 0;font-size:.82rem;font-variant-numeric:tabular-nums;border-bottom:1px solid var(--border)}
.th-fill:last-child{border-bottom:none}
.th-fill-action{font-weight:700;font-size:.7rem;letter-spacing:.04em;padding:2px 6px;border-radius:3px;text-align:center}
.th-act-buy{background:var(--green-bg,rgba(14,107,82,.12));color:var(--green)}
.th-act-sell{background:var(--red-bg,rgba(179,38,30,.12));color:var(--red,#B3261E)}
.th-fill-side{font-size:.7rem;color:var(--text-dim);font-weight:600}
.th-fill-qty{color:var(--text);text-align:right}
.th-fill-at{color:var(--text-dim);text-align:center}
.th-fill-price{color:var(--text)}
.th-fill-total{color:var(--text-dim);font-weight:500}
.th-fill-time{color:var(--text-dim);font-size:.75rem;text-align:right}

.th-empty{text-align:center;padding:48px 20px;background:var(--card-bg,var(--surface));border:1px dashed var(--border);border-radius:10px;color:var(--text-dim)}
.th-empty h3{color:var(--text);margin:0 0 6px;font-size:1rem}
.th-empty p{margin:0;font-size:.85rem}

.th-details{margin-top:32px}
.th-details summary{font-size:.85rem;color:var(--text-dim);cursor:pointer;padding:8px 0;font-weight:600}
.th-details summary:hover{color:var(--text)}
.th-details[open] summary{margin-bottom:10px}

@media(max-width:640px){
  .th-stat-value{font-size:1.15rem}
  .th-card-head{padding:12px 12px}
  .th-card-pnl{font-size:1rem;min-width:70px}
  .th-card-sub,.th-card-meta{margin-left:0}
  .th-fill{grid-template-columns:50px 36px 40px 12px 50px 70px;font-size:.78rem}
  .th-fill-time{display:none}
  .th-breakdown{padding:12px;gap:8px}
}

@media(max-width:420px){
  /* Tight phones: drop the rigid grid, let the fill row wrap if it must.
     Order stays: ACTION SIDE [LABEL] QTY @ PRICE TOTAL */
  .th-fills{padding:4px 12px 12px}
  .th-fill{
    display:flex;flex-wrap:wrap;align-items:center;
    column-gap:6px;row-gap:2px;font-size:.76rem;
    grid-template-columns:none;
  }
  .th-fill-qty{margin-left:auto}
  .th-fill-total{font-weight:600}
}

/* Stop-bot confirmation modal */
.sc-overlay{position:fixed;inset:0;background:rgba(26,24,19,.45);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}
.sc-modal{background:var(--card-bg,var(--surface));border:1px solid var(--border);border-radius:12px;max-width:520px;width:100%;padding:22px;box-shadow:0 20px 60px rgba(26,24,19,.20)}
.sc-title{font-size:1.05rem;font-weight:700;color:var(--text);margin-bottom:14px}
.sc-rows{display:flex;flex-direction:column;gap:10px;margin-bottom:18px}
.sc-row{display:flex;gap:10px;padding:12px;border-radius:8px;background:rgba(26,24,19,.03);border:1px solid var(--border)}
.sc-row-warn{background:rgba(179,38,30,.08);border-color:rgba(179,38,30,.25)}
.sc-row-icon{font-size:1.1rem;line-height:1.2}
.sc-row-body{flex:1;min-width:0}
.sc-row-title{font-size:.88rem;color:var(--text);font-weight:600;margin-bottom:2px}
.sc-row-sub{font-size:.78rem;color:var(--text-dim);line-height:1.4}
.sc-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.sc-actions button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:480px){
  .sc-actions{flex-direction:column-reverse}
  .sc-actions button{width:100%}
}

/* Bot detail price chart */
.chart-modal-wrap{background:var(--card-2,rgba(26,24,19,.02));border:1px solid var(--border);border-radius:10px;padding:12px;margin:14px 0}
.chart-modal-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;flex-wrap:wrap}
.chart-range-group{display:inline-flex;gap:2px;background:rgba(26,24,19,.03);border:1px solid var(--border);border-radius:6px;padding:2px}
.chart-range-btn{background:transparent;color:var(--text-dim);border:none;font:600 11px Inter,system-ui,sans-serif;padding:4px 10px;border-radius:4px;cursor:pointer;letter-spacing:.02em;text-transform:lowercase}
.chart-range-btn:hover{color:var(--text);background:rgba(26,24,19,.04)}
.chart-range-btn-active{background:var(--accent);color:#fff}
.chart-range-btn-active:hover{background:var(--accent-hover);color:#fff}
.chart-modal-status{font-size:11px;color:var(--text-dim);font-variant-numeric:tabular-nums;flex:1;text-align:right}
.chart-kalshi-link{font-size:11px;color:var(--accent);text-decoration:none;font-weight:500}
.chart-kalshi-link:hover{color:var(--accent-hover);text-decoration:underline}
.chart-stale-badge{font-size:10px;font-weight:600;color:#92600A;background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.3);border-radius:4px;padding:2px 6px;letter-spacing:.02em}
.chart-modal-canvas{width:100%;min-height:160px}
.chart-modal-canvas .uplot, .chart-modal-canvas .u-wrap{width:100% !important}
.chart-modal-legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px;font-size:11px;color:var(--text-dim)}
.chart-modal-legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;vertical-align:middle}

/* ================================================================
   Edge-to-edge mobile: kill side padding on .container and flatten
   section-level cards so content reads as a continuous flow with
   subtle dividers instead of stacked boxes. iOS-Settings pattern.
   These rules win over template-local styles via specificity, not
   !important — kept here so all pages pick them up automatically.
   ================================================================ */
@media(max-width:700px){
  .app-layout .main-content > .container,
  .app-layout .container{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:8px;gap:0}
  /* Flatten section cards used across the app + admin templates */
  .app-layout .card,
  .app-layout .ud-card,
  .app-layout .an-section,
  .app-layout .panel,
  .app-layout .section-card{
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
    padding:16px 14px;
    margin:0;
    border-bottom:1px solid var(--border);
  }
  .app-layout .card:last-child,
  .app-layout .ud-card:last-child,
  .app-layout .an-section:last-child,
  .app-layout .panel:last-child,
  .app-layout .section-card:last-child{border-bottom:0}
  /* Tighten the page heading to sit flush with the content edge */
  .app-layout .page-heading,
  .app-layout .page-title{padding-left:14px;padding-right:14px}
  /* Toolbars and search controls should sit within the edge gutter */
  .app-layout .container > .toolbar,
  .app-layout .container > .ud-toolbar{padding:8px 14px;margin:0}
  /* Tables already overflow-x-scroll where needed; remove the side
     border-radius that looked clipped against the new edge layout */
  .app-layout .tbl-scroll,
  .app-layout .users-table-wrap,
  .app-layout .leads-table-wrap{border-radius:0}
}
