:root { --bg:#0b1020; --surface:#121a2d; --surface-2:#18233b; --line:#263552; --text:#f3f6ff; --muted:#9aa8c4; --accent:#57d6a0; --danger:#ff768c; --shadow:0 18px 50px rgba(0,0,0,.22); }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at top right,#1b3356 0,#0b1020 40%); color:var(--text); font:15px/1.6 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:inherit; text-decoration:none; }
.app-shell { display:flex; min-height:100vh; }
.sidebar { width:245px; padding:28px 18px; border-right:1px solid var(--line); background:rgba(10,15,30,.7); display:flex; flex-direction:column; }
.brand { display:flex; align-items:center; gap:10px; font-size:20px; font-weight:800; letter-spacing:-.03em; }
.brand-mark { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; color:#07151a; background:linear-gradient(135deg,var(--accent),#75a5ff); }
.nav-links { display:grid; gap:8px; margin-top:48px; }
.nav-links a { padding:11px 13px; color:var(--muted); border-radius:10px; }
.nav-links a:hover,.nav-links a.active { color:var(--text); background:var(--surface-2); }
.sidebar-note { margin-top:auto; color:var(--muted); font-size:12px; }
.main-content { width:min(1120px,100%); padding:34px clamp(22px,4vw,58px); margin:0 auto; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:34px; }
h1,h2,p { margin-top:0; } h1 { margin-bottom:0; font-size:32px; letter-spacing:-.04em; } h2 { margin-bottom:8px; font-size:23px; letter-spacing:-.03em; }
.eyebrow { margin-bottom:4px; color:var(--accent); font-size:11px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.muted,small { color:var(--muted); } .topbar-actions,.form-actions { display:flex; align-items:center; gap:12px; }
.mode-pill,.status-badge { display:inline-flex; padding:6px 10px; border:1px solid rgba(87,214,160,.28); border-radius:999px; color:var(--accent); background:rgba(87,214,160,.08); font-size:11px; font-weight:800; }
.status-off { color:var(--muted); border-color:var(--line); background:transparent; } .status-on { color:var(--accent); }
.button { display:inline-flex; justify-content:center; align-items:center; min-height:40px; padding:0 16px; border:1px solid transparent; border-radius:10px; cursor:pointer; font:inherit; font-weight:700; }
.button-primary { color:#07151a; background:var(--accent); } .button-primary:hover { filter:brightness(1.08); }
.button-ghost { color:var(--muted); background:transparent; border-color:var(--line); } .button-ghost:hover { color:var(--text); background:var(--surface); }
.button-wide { width:100%; }
.hero-card,.panel,.stat-card { border:1px solid var(--line); background:linear-gradient(145deg,rgba(24,35,59,.96),rgba(18,26,45,.96)); box-shadow:var(--shadow); border-radius:18px; }
.hero-card { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:28px; margin-bottom:20px; } .hero-card .muted { max-width:700px; margin-bottom:0; }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:20px; }.stat-card { padding:20px; }.stat-card span,.stat-card small { display:block; }.stat-card span { color:var(--muted); font-size:13px; }.stat-card strong { display:block; margin:6px 0; font-size:28px; }
.panel { padding:24px; }.narrow-panel { max-width:740px; }.panel-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:24px; }.panel-heading h2 { margin-bottom:0; }
.empty-state { display:grid; gap:4px; padding:36px 10px; color:var(--muted); text-align:center; }.empty-state strong { color:var(--text); }.account-list { display:grid; gap:14px; }.account-card { padding:18px; border:1px solid var(--line); border-radius:14px; background:rgba(12,20,38,.65); }.account-main { display:flex; align-items:center; gap:13px; }.account-main h3 { margin:0 0 2px; }.exchange-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:#07151a; background:linear-gradient(135deg,#f7d66a,#f09864); font-weight:900; }.account-meta { display:flex; align-items:center; gap:10px; margin:13px 0; font-size:12px; }.account-result { padding:10px 12px; margin-bottom:13px; border-radius:9px; color:var(--accent); background:rgba(87,214,160,.07); font-size:13px; }.result-error { color:#ffb0bc; background:rgba(255,118,140,.07); }.account-actions { display:flex; flex-wrap:wrap; gap:8px; }.button-danger { color:#ffb0bc; background:transparent; border-color:rgba(255,118,140,.3); }.button-danger:hover { background:rgba(255,118,140,.09); }.security-note { padding:11px 13px; color:var(--muted); background:rgba(87,214,160,.06); border-left:3px solid var(--accent); border-radius:5px; font-size:13px; }
.token-warning { display:grid; gap:6px; padding:15px; margin-bottom:18px; color:#ffd88a; background:rgba(255,216,138,.08); border:1px solid rgba(255,216,138,.3); border-radius:10px; }.token-warning span { color:var(--muted); font-size:13px; }.token-warning code,.webhook-url-box code { display:block; overflow:auto; padding:10px; color:var(--text); background:#0a1120; border-radius:7px; white-space:nowrap; }.webhook-url-box { display:grid; gap:5px; padding:14px; background:rgba(12,20,38,.65); border:1px solid var(--line); border-radius:10px; }.webhook-url-box span { color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }.webhook-url-box small { font-size:12px; }.webhook-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }.compact-stats { margin:18px 0 0; }.small-stat { font-size:18px!important; }.webhook-guide { margin-top:20px; }.webhook-guide pre { overflow:auto; padding:16px; margin:0; color:#c9f7e3; background:#09101f; border:1px solid var(--line); border-radius:10px; font-size:12px; }.event-table-wrap { overflow-x:auto; }.event-table { width:100%; border-collapse:collapse; font-size:13px; }.event-table th,.event-table td { padding:12px 10px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }.event-table th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }.event-status { padding:4px 7px; border-radius:999px; font-size:10px; font-weight:800; }.event-received { color:var(--accent); background:rgba(87,214,160,.1); }.event-rejected { color:#ffb0bc; background:rgba(255,118,140,.1); }.event-duplicate { color:#ffd88a; background:rgba(255,216,138,.1); }
.execution-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px; margin-top:18px; border:1px solid var(--line); border-radius:10px; background:rgba(12,20,38,.65); }.execution-banner span { display:grid; gap:2px; }.execution-banner strong { color:var(--text); }.execution-banner small { color:var(--muted); }.execution-ready { border-color:rgba(87,214,160,.35); background:rgba(87,214,160,.06); }.event-submitted { color:var(--accent); background:rgba(87,214,160,.1); }.event-pending { color:#ffd88a; background:rgba(255,216,138,.1); }.event-failed { color:#ffb0bc; background:rgba(255,118,140,.1); }.event-skipped { color:var(--muted); background:rgba(154,168,196,.1); }
.webhook-host-note { margin-top:18px; }.webhook-host-note code { color:var(--text); }
.check-list { display:grid; gap:14px; }.check-list>div { display:flex; align-items:center; gap:12px; color:var(--muted); }.check-icon { width:25px; height:25px; display:grid; place-items:center; color:#08151c; background:var(--accent); border-radius:50%; font-weight:900; }.check-icon.pending { color:var(--muted); background:var(--surface-2); }
.form-stack { display:grid; gap:10px; }.form-stack label { color:var(--muted); font-size:13px; font-weight:700; }.form-stack input:not([type=checkbox]),.form-stack select { width:100%; min-height:44px; padding:0 12px; color:var(--text); background:#0c1426; border:1px solid var(--line); border-radius:9px; font:inherit; }.form-stack input:focus,.form-stack select:focus { outline:2px solid rgba(87,214,160,.35); border-color:var(--accent); }.checkbox-row { display:flex; align-items:center; gap:8px; margin:4px 0; font-weight:400!important; }.switch-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px 0; border-bottom:1px solid var(--line); }.switch-row span { display:grid; gap:2px; }.switch-row strong { color:var(--text); }.switch-row input { width:20px; height:20px; accent-color:var(--accent); }
.rule-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:7px; }.rule-grid > div { display:grid; gap:10px; }.rule-grid input { width:100%; }
.rule-intro { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-top:20px; }.rule-intro h2 { margin-bottom:4px; }.rule-intro .muted { margin-bottom:0; }.rule-total { padding:9px 12px; color:var(--muted); border:1px solid var(--line); border-radius:9px; font-size:12px; white-space:nowrap; }.rule-total strong { color:var(--text); }.tp-rule-list { display:grid; gap:12px; }.tp-rule-card { padding:16px; border:1px solid var(--line); border-radius:12px; background:rgba(12,20,38,.65); }.tp-rule-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }.tp-rule-heading > div { display:grid; gap:2px; }.tp-rule-heading strong { color:var(--text); font-size:18px; }.tp-rule-heading small { color:var(--muted); }.tp-rule-heading .checkbox-row { color:var(--text); margin:0; }.tp-rule-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }.tp-rule-grid > div { display:grid; align-content:start; gap:8px; }.tp-rule-grid label { color:var(--muted); font-size:12px; font-weight:700; }.tp-rule-grid input,.tp-rule-grid select { width:100%; min-height:40px; padding:0 9px; color:var(--text); background:#0c1426; border:1px solid var(--line); border-radius:8px; font:inherit; }.tp-rule-grid small { font-size:11px; line-height:1.35; }
.alert { padding:13px 15px; margin-bottom:20px; border:1px solid var(--line); border-radius:10px; }.alert ul { margin:0; padding-left:18px; }.alert-success { color:var(--accent); background:rgba(87,214,160,.08); }.alert-error { color:#ffb0bc; background:rgba(255,118,140,.08); border-color:rgba(255,118,140,.3); }
.auth-page { display:grid; place-items:center; padding:24px; }.auth-card { width:min(430px,100%); padding:34px; border:1px solid var(--line); border-radius:20px; background:rgba(18,26,45,.95); box-shadow:var(--shadow); }.brand-centered { justify-content:center; margin-bottom:34px; }.auth-card h1 { margin-bottom:8px; }.auth-card .muted { margin-bottom:26px; }
@media (max-width:900px) { .tp-rule-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:760px) { .app-shell { display:block; }.sidebar { width:auto; padding:18px 20px; border-right:0; border-bottom:1px solid var(--line); }.nav-links { display:flex; flex-wrap:wrap; margin-top:18px; }.sidebar-note { display:none; }.main-content { padding:25px 18px; }.topbar,.hero-card,.panel-heading,.rule-intro { display:block; }.topbar-actions { margin-top:15px; justify-content:flex-start; }.hero-card .status-badge { margin-top:18px; }.stats-grid { grid-template-columns:1fr; }.rule-grid,.tp-rule-grid { grid-template-columns:1fr; }.rule-total { margin-top:14px; white-space:normal; }.tp-rule-heading { align-items:flex-start; flex-direction:column; }.panel-heading .button { margin-top:16px; } }
