* { box-sizing: border-box; }
:root { --ink: #1b2430; --muted: #66727f; --line: #e3e7ec; --bg: #f3f5f8; --card: #fff; --brand: #2747d6; --brand-soft: #e8edff;
  --red: #b42318; --red-soft: #fdecea; --amber: #a15c00; --amber-soft: #fff4dc; --green: #157347; --green-soft: #e3f6ec; }
body { margin: 0; font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 10px 20px;
  background: #121a2b; color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.2); }
header .brand { font-weight: 700; font-size: 17px; letter-spacing: .01em; margin-right: 10px; display: flex; align-items: center; gap: 8px; }
header .brand::before { content: ""; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #5b7cff, #2747d6); }
header nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
header nav a { color: #b9c3d3; padding: 6px 12px; border-radius: 6px; font-weight: 500; }
header nav a:hover { color: #fff; background: #1f2a40; text-decoration: none; }
header nav a.on { background: #2a3754; color: #fff; }
header .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; text-align: center; }
header .who { color: #b9c3d3; font-size: 13px; }
header button { background: transparent; color: #dfe5ee; border-color: #3a4766; }
header button:hover:not(:disabled) { background: #1f2a40; }
main { padding: 22px 20px 40px; max-width: 1320px; margin: 0 auto; }
h1 { font-size: 21px; margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
h2 { font-size: 12px; margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#banner { position: sticky; top: 0; z-index: 5; padding: 10px 20px; background: var(--red); color: #fff; cursor: pointer; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
.wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.wrap table, .box table { border: 0; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: #f8f9fb; font-weight: 600; font-size: 12px; color: var(--muted); }
tbody tr:hover td, table tr:hover td { background: #fafbfd; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.mail { white-space: pre-wrap; font-family: inherit; margin: 8px 0 0; padding: 12px; background: #f8f9fb; border-radius: 8px; }
.tag { display: inline-block; padding: 1px 8px; margin: 1px 3px 1px 0; font-size: 11px; font-weight: 600; border-radius: 999px; background: #eef1f5; color: #445063; white-space: nowrap; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.blue { background: var(--brand-soft); color: var(--brand); }
.flag { padding: 8px 12px; margin-bottom: 6px; border-radius: 8px; border-left: 4px solid #9aa5b1; background: #eef1f5; }
.flag.red { background: var(--red-soft); border-color: var(--red); }
.flag.amber { background: var(--amber-soft); border-color: #d98a00; }
.option { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.option.recommended { border-color: #9fd8b8; box-shadow: 0 0 0 3px var(--green-soft); }
.option.rejected { opacity: .55; }
.option h3 { margin: 0 0 6px; font-size: 15px; }
.option ul { margin: 6px 0; padding-left: 20px; }
.muted { color: var(--muted); }
.overdue { color: var(--red); font-weight: 600; }
button { font: inherit; font-weight: 500; padding: 6px 12px; border: 1px solid #c9d0d9; background: #fff; border-radius: 7px; cursor: pointer; color: var(--ink); }
button:hover:not(:disabled) { background: #f1f3f6; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover:not(:disabled) { background: #1f3bb8; }
button.danger { color: var(--red); border-color: #f0b4ae; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid #c9d0d9; border-radius: 7px; max-width: 100%; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { width: 100%; min-height: 130px; }
form .row { margin-bottom: 10px; }
form label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.login { max-width: 420px; margin: 70px auto; padding: 28px; }
.login h1 { font-size: 26px; margin-bottom: 4px; }
.login input { width: 100%; }
.login button.primary { width: 100%; padding: 9px; }
.risk { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; background: #eef1f5; color: #445063; }
.risk-critical { background: #b42318; color: #fff; }
.risk-high { background: var(--red-soft); color: var(--red); }
.risk-medium { background: var(--amber-soft); color: var(--amber); }
.risk-low { background: var(--green-soft); color: var(--green); }
.status { white-space: nowrap; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; background: #eef1f5; color: #445063; }
.status-review, .status-processing { background: var(--brand-soft); color: var(--brand); }
.status-needs_info, .status-pending_approval { background: var(--amber-soft); color: var(--amber); }
.status-in_progress, .status-resolved, .status-closed { background: var(--green-soft); color: var(--green); }
.status-cancelled { background: #eef1f5; color: var(--muted); text-decoration: line-through; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.steps { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 18px; padding: 0; list-style: none; }
.steps li { flex: 1; min-width: 110px; position: relative; padding: 8px 4px 0; font-size: 12px; font-weight: 600; color: #9aa5b1; text-align: center; border-top: 4px solid #dde2e8; }
.steps li.done { color: var(--green); border-color: #6cc596; }
.steps li.now { color: var(--brand); border-color: var(--brand); }
.meter { height: 8px; border-radius: 99px; background: #eef1f5; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.meter.low i { background: #e5484d; }
.meter.mid i { background: #e0a100; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
pre.text { white-space: pre-wrap; font-family: inherit; margin: 6px 0; }
td.nowrap { white-space: nowrap; }
.detail { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; } main { padding: 12px; } header { padding: 8px 12px; gap: 8px; } header nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; } }
.flag.next { background: var(--brand-soft); border-color: var(--brand); margin-bottom: 16px; }
details summary { cursor: pointer; }
