:root {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #0d1a2b;
  --panel-2: #111f33;
  --line: #203451;
  --text: #edf4ff;
  --muted: #93a7c4;
  --accent: #64d2ff;
  --accent2: #8b7cff;
  --ok: #52d69a;
  --warn: #f6c45d;
  --bad: #ff7383;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 15% -10%, #18385d 0, transparent 30%), var(--bg); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { width: min(1450px, calc(100% - 32px)); margin: 0 auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; padding: 20px 0; gap:16px; }
.brand { display:flex; align-items:center; gap:12px; }
.logo { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#07101d; font-weight:900; box-shadow:var(--shadow); }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:22px; margin-bottom:2px; }
.muted { color:var(--muted); }
.pill { display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:rgba(255,255,255,.02); }
.dot { width:8px; height:8px; border-radius:50%; background:var(--ok); box-shadow:0 0 14px var(--ok); }
.grid { display:grid; grid-template-columns: 390px minmax(0,1fr); gap:18px; align-items:start; }
.panel { background:linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.008)), var(--panel); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); overflow:hidden; }
.panel-head { padding:18px 20px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.panel-body { padding:20px; }
.label { display:block; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin:0 0 7px; }
.field { margin-bottom:15px; }
input, textarea, select { width:100%; border:1px solid var(--line); background:#091522; color:var(--text); border-radius:11px; padding:11px 12px; outline:none; transition:.15s border-color,.15s box-shadow; }
input:focus, textarea:focus, select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(100,210,255,.12); }
textarea { min-height:250px; resize:vertical; }
.btn { border:0; border-radius:11px; padding:10px 14px; background:#182a43; color:var(--text); font-weight:750; }
.btn:hover { filter:brightness(1.08); }
.btn.primary { background:linear-gradient(135deg,var(--accent),#77a7ff); color:#06101c; }
.btn.good { background:var(--ok); color:#07140f; }
.btn.bad { background:#391b24; color:#ff9daa; border:1px solid #693141; }
.btn.ghost { background:transparent; border:1px solid var(--line); }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.row > .grow { flex:1; }
.cards { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
.card { padding:16px; background:var(--panel-2); border:1px solid var(--line); border-radius:15px; }
.card .n { font-size:30px; font-weight:900; letter-spacing:-.04em; margin-top:3px; }
.card .k { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:900px; }
th,td { text-align:left; padding:12px 13px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; background:#0b1727; position:sticky; top:0; z-index:1; }
tr:hover td { background:rgba(255,255,255,.018); }
.badge { display:inline-block; padding:4px 8px; border-radius:999px; font-size:11px; font-weight:850; letter-spacing:.04em; background:#182a43; }
.badge.NEW { color:#8fdfff; background:#10304a; }
.badge.REVISION { color:#ffd37c; background:#3a2c11; }
.badge.CANCEL { color:#ff9daa; background:#3c1722; }
.badge.PO { color:#8ff0ba; background:#123526; }
.conf { font-variant-numeric:tabular-nums; }
.tabs { display:flex; gap:8px; padding:0 20px 16px; }
.tab { border:1px solid var(--line); background:transparent; color:var(--muted); border-radius:999px; padding:7px 11px; }
.tab.active { color:var(--text); background:#17304e; }
.hidden { display:none !important; }
.notice { padding:12px 14px; border:1px solid var(--line); border-radius:12px; color:var(--muted); background:#0a1625; }
.notice.ok { border-color:#235d47; color:#92ecc0; }
.notice.err { border-color:#6a3040; color:#ff9daa; }
.modal { position:fixed; inset:0; background:rgba(2,7,14,.78); backdrop-filter:blur(8px); display:grid; place-items:center; padding:20px; z-index:20; }
.modal-card { width:min(900px,100%); max-height:90vh; overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:20px; box-shadow:0 30px 100px rgba(0,0,0,.6); }
.modal-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.reason { padding:14px; background:#091522; border:1px solid var(--line); border-radius:12px; color:#c8d7ea; }
.login-page { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(430px,100%); padding:28px; background:var(--panel); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); }
.login-card .logo { width:54px; height:54px; margin-bottom:20px; }
.small { font-size:12px; }
@media (max-width: 980px) { .grid{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 620px) { .shell{width:min(100% - 18px,1450px)} .cards{grid-template-columns:1fr 1fr}.modal-grid{grid-template-columns:1fr}.topbar{align-items:flex-start}.topbar .row{justify-content:flex-end} }
