/* PPWEB-0 Trigger Desk — dark trading theme (the clickable design of 31-Oct-2026) */
:root {
  --bg: #0E1217; --panel: #161C23; --bar: #12171D; --line: #26303A; --line2: #1E262F; --field: #0E1217; --fieldline: #2C3642;
  --text: #E8ECF1; --muted: #9AA6B2; --soft: #B7C1CC; --accent: #4C8DFF; --accent2: #6A9FFF; --onaccent: #0B0F14;
  --pos: #5FE0A2; --neg: #FF8A7A; --warn: #F5C46B; --danger: #E5484D;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.boot { padding: 40px; color: var(--muted); }
h1, h2, h3 { margin: 0; }
h2 { font-size: 22px; } h3 { font-size: 16px; }
.muted { color: var(--muted); } .soft { color: var(--soft); }
.pos { color: var(--pos); } .neg { color: var(--neg); } .flat { color: var(--soft); }
a { color: #7FB0FF; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }
.login-head { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.logo { width: 52px; height: 52px; border-radius: 14px; background: #1F2B3D; display: flex; align-items: center; justify-content: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.card.pad { padding: 24px; }
form.card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }

/* fields and buttons */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.inp { height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--fieldline); background: var(--field); color: var(--text); font: 500 15px inherit; font-family: inherit; width: 100%; outline: none; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76,141,255,.25); }
.ro { height: 44px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--fieldline); color: var(--soft); display: flex; align-items: center; font-size: 14px; }
.btn { height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--fieldline); background: #1C232C; color: var(--text); font: 600 14px inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #242D38; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--onaccent); }
.btn.pri:hover { background: var(--accent2); }
.btn.sell { height: 36px; padding: 0 14px; background: transparent; border-color: var(--neg); color: var(--neg); }
.btn.sell:hover { background: rgba(255,138,122,.12); }
.btn.ghost { height: 36px; padding: 0 12px; background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.seg { display: flex; }
.seg button { flex: 1; height: 44px; border: 1px solid var(--fieldline); background: var(--field); color: var(--soft); font: 600 14px inherit; font-family: inherit; cursor: pointer; }
.seg button:first-child { border-radius: 8px 0 0 8px; } .seg button:last-child { border-radius: 0 8px 8px 0; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--onaccent); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.err { margin: 0; color: var(--neg); font-size: 14px; }
.okmsg { margin: 0; color: var(--pos); font-size: 14px; }
.note { margin: 0; padding: 12px 14px; border-radius: 8px; background: rgba(245,181,71,.10); color: var(--warn); font-size: 14px; }

/* shell */
header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--bar); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 13px; color: var(--soft); flex: 1 1 360px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: #3DD68C; } .dot.bad { background: var(--danger); } .dot.wait { background: var(--warn); }
.who { display: flex; align-items: center; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .06em; border: 0; cursor: pointer; font-family: inherit; }
.badge.PAPER { background: rgba(245,181,71,.16); color: var(--warn); }
.badge.LIVE { background: var(--danger); color: #fff; }
.livebar { background: #3A1416; color: #FFB4AE; padding: 10px 24px; font-size: 14px; font-weight: 600; border-bottom: 1px solid #5A2023; }
.haltbar { background: #3A2A10; color: var(--warn); padding: 10px 24px; font-size: 14px; font-weight: 600; }
.body { display: flex; flex-wrap: wrap; align-items: flex-start; }
nav.rail { flex: 1 1 220px; max-width: 100%; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.nav { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; color: var(--soft); font: 600 15px inherit; font-family: inherit; cursor: pointer; text-align: left; width: 100%; }
.nav:hover { background: #1C232C; color: var(--text); }
.nav.on { background: #1F2B3D; color: var(--text); box-shadow: inset 0 0 0 1px #33496B; }
.daybox { margin-top: 20px; padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
main { flex: 999 1 560px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 24px; max-width: 1200px; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; align-items: end; }
.rule { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--field); border: 1px solid #222B35; font-size: 14px; color: var(--soft); align-items: center; }
.rule b { color: var(--text); }
section.card { padding: 8px 0 0; }
section.card.pad { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 20px; }
.tablebox { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.r { text-align: right; }
.empty { padding: 16px 20px; color: var(--muted); font-size: 14px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; background: #232B35; color: #A8B3BF; }
.chip.ARMED { background: rgba(76,141,255,.16); color: #8DB6FF; }
.chip.TRIGGERED, .chip.ENTERING, .chip.BUYING, .chip.SELLING, .chip.EXITING, .chip.OPEN.order { background: rgba(245,181,71,.16); color: var(--warn); }
.chip.OPEN, .chip.COMPLETE, .chip.CLOSED { background: rgba(61,214,140,.14); color: var(--pos); }
.chip.ERROR, .chip.REJECTED, .chip.UNKNOWN { background: rgba(229,72,77,.18); color: #FF9A9E; }
.bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,138,122,.35), #26303A 50%, rgba(95,224,162,.35)); }
.bar .mid { position: absolute; left: 50%; top: -3px; width: 2px; height: 14px; background: #4C5866; }
.bar .knob { position: absolute; top: -4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--text); }
.trade { padding: 0 20px 14px; display: flex; flex-direction: column; gap: 8px; }
.events { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.ev { display: flex; gap: 14px; font-size: 14px; color: var(--soft); }
.ev .t { color: var(--muted); flex: 0 0 70px; }
.ev.HIGH, .ev.ERROR { color: #FFB4AE; }
.ev.WARN { color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.stat { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat .v { font-size: 24px; font-weight: 600; }
.gates { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.gate { display: flex; gap: 10px; } .gate .p { flex: 0 0 44px; font-weight: 700; }

/* modal */
#modal { position: fixed; inset: 0; background: rgba(5,8,12,.72); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
#modal[hidden] { display: none; }
.dlg { width: 100%; max-width: 460px; background: var(--panel); border: 1px solid #33404D; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.dlg.red { border-color: #5A2023; }
.dlg p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.5; }
.dlg .acts { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { header.top, main { padding: 14px 16px; } .livebar, .haltbar { padding: 10px 16px; } }
