:root{--bg: #0f1419;--surface: #182028;--text: #e6edf3;--muted: #8b98a5;--accent: #3fb950;--warn: #d29922;--danger: #f85149;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0}a{color:inherit}.layout{min-height:100vh;display:flex;flex-direction:column}.header{display:flex;align-items:center;gap:24px;padding:12px 16px;background:var(--surface)}.brand{font-size:1.2rem;color:var(--accent)}.header nav{display:flex;gap:16px;flex:1}.header nav a{text-decoration:none;color:var(--muted)}.header nav a.active{color:var(--text)}.main{flex:1;padding:24px 16px;max-width:1100px;width:100%;margin:0 auto}.muted{color:var(--muted)}.footer{padding:16px;font-size:.85rem;color:var(--muted);background:var(--surface)}.badge{font-size:.8rem;padding:2px 8px;border-radius:999px;background:var(--bg)}.badge-ok{color:var(--accent)}.badge-degraded,.badge-checking{color:var(--warn)}.badge-offline{color:var(--danger)}:root{--border: #2a3540;--hover: #1f2933}h1,h2,h3{margin:0 0 12px}h2{font-size:1.1rem;margin-top:24px}h3{font-size:1rem;margin:0}.small{font-size:.8rem}.error{color:var(--danger)}code{font-family:ui-monospace,Consolas,monospace;font-size:.85em}button,input,select{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 10px}button{cursor:pointer}button:hover:not(:disabled){background:var(--hover)}button:disabled{opacity:.5;cursor:default}button.link{background:none;border:none;color:var(--muted)}.file-button{border:1px solid var(--border);border-radius:6px;padding:6px 10px;cursor:pointer;background:var(--surface)}.file-button:hover:not(.disabled){background:var(--hover)}.file-button.disabled{opacity:.5;cursor:default}.import-slip{padding:4px 16px;margin-top:12px}.import-result ul{margin:4px 0 0;padding-left:20px}.card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:16px}.gate{max-width:420px;margin:40px auto;display:flex;flex-direction:column;gap:12px}.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:16px 0 12px}.toolbar h2,.toolbar h3{margin:0 8px 0 0}.toolbar input{min-width:0;flex:0 1 240px}.toolbar>button.link{margin-left:auto}.tabs{display:flex;flex-wrap:wrap;gap:4px}.tab{background:none;border-color:transparent;color:var(--muted)}.tab.active{color:var(--text);border-color:var(--border);background:var(--surface)}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.stat{display:flex;flex-direction:column;gap:4px}.stat-value{font-size:1.8rem;font-weight:600;font-variant-numeric:tabular-nums}.counts{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px}.count{display:flex;justify-content:space-between;padding:6px 10px;background:var(--surface);border-radius:6px;font-size:.9rem}.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:8px}.table{width:100%;border-collapse:collapse;font-size:.85rem}.table th,.table td{padding:6px 10px;text-align:left;border-bottom:1px solid var(--border);white-space:nowrap}.table th{color:var(--muted);font-weight:500;background:var(--surface);position:sticky;top:0}.table td code{white-space:nowrap}.table .num{text-align:right;font-variant-numeric:tabular-nums}.table tr.clickable{cursor:pointer}.table tr.clickable:hover td,.table tr.selected td{background:var(--hover)}.pager{display:flex;align-items:center;gap:12px;margin-top:12px}.pill{font-size:.75rem;padding:1px 6px;border-radius:4px;background:var(--bg);color:var(--muted)}.pill-FT,.pill-AET,.pill-PEN{color:var(--accent)}.pill-1H,.pill-2H,.pill-HT,.pill-ET,.pill-LIVE{color:var(--warn)}.pill-PST,.pill-CANC,.pill-ABD{color:var(--danger)}.json-panel{margin-top:16px}.json{max-height:60vh;overflow:auto;margin:0;font-size:.8rem;background:var(--bg);padding:12px;border-radius:6px}.good{color:var(--accent)}.derived{font-style:italic;color:var(--muted)}.notice{border-left:3px solid var(--warn);background:var(--surface);padding:10px 14px;border-radius:6px;margin:0 0 16px;font-size:.9rem;color:var(--muted)}.pill-won{color:var(--accent)}.pill-lost{color:var(--danger)}.pill-pending,.pill-void{color:var(--muted)}.slip-type{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;padding:1px 6px;border-radius:4px;margin-right:8px;vertical-align:.15em;border:1px solid currentColor}.slip-type-safe{color:var(--accent)}.slip-type-risky{color:var(--danger)}.slips{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}.slip{display:flex;flex-direction:column;gap:12px}.slip-head{display:flex;justify-content:space-between;align-items:flex-start}.slip-code{font-family:ui-monospace,Consolas,monospace;font-size:1.2rem;font-weight:600;letter-spacing:.05em}.legs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.legs li{display:flex;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}.leg-right{display:flex;flex-direction:column;align-items:flex-end;font-variant-numeric:tabular-nums}.slip-foot{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.slip-foot div{display:flex;flex-direction:column;font-variant-numeric:tabular-nums}.builder{margin-bottom:24px}.builder h2{margin-top:0}.builder .legs{margin:12px 0}.guide-group{margin:20px 0 8px}.guide-table td{white-space:normal;vertical-align:top}.guide-text{color:var(--muted)}.toolbar input[type=number]{width:70px;flex:none}.converter .toolbar input{flex:0 1 140px}.search-results{list-style:none;margin:0 0 12px;padding:0;border:1px solid var(--border);border-radius:8px;overflow:hidden}.search-results button{width:100%;text-align:left;border:none;border-radius:0;border-bottom:1px solid var(--border)}.legs-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.leg-row{display:grid;grid-template-columns:1.6fr 1.4fr auto 110px auto auto;align-items:center;gap:12px;padding:12px}.leg-fair,.leg-price,.leg-value{display:flex;flex-direction:column;gap:2px;font-variant-numeric:tabular-nums}.leg-price input{width:100%}.verdict{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.verdict div{display:flex;flex-direction:column;font-variant-numeric:tabular-nums}.verdict strong{font-size:1.3rem}.verdict-note{grid-column:1 / -1;margin:0}@media(max-width:800px){.leg-row{grid-template-columns:1fr 1fr}.leg-match,.leg-row select{grid-column:1 / -1}}@media(max-width:600px){.header{flex-wrap:wrap;gap:12px}.toolbar input{flex:1 1 100%}.slips{grid-template-columns:1fr}.slip-foot,.verdict{grid-template-columns:repeat(2,1fr)}}.spinner{display:inline-block;width:.9em;height:.9em;margin-right:6px;vertical-align:-.1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}button[aria-busy=true]:disabled{opacity:.8}.booking-code{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:12px;padding:10px 12px;border:1px dashed var(--accent);border-radius:6px}.booking-code>div{display:flex;flex-direction:column}.booking-code-value{font-size:1.3rem;letter-spacing:.08em;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.booking-code>.muted{flex-basis:100%}
