:root {
  --navy: #0b1f3a;
  --navy2: #163154;
  --cream: #f7f1e8;
  --paper: #fffcf7;
  --ink: #1a1a1a;
  --mute: #5c6570;
  --line: #d9d0c2;
  --amber: #d4920a;
  --teal: #2f6f7a;
  --rose: #c45c6a;
  --blue: #3d6ea8;
  --ok: #2e7d4f;
  --bad: #b3543a;
  --graycell: #d4d0c8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font: 15px/1.45 "Segoe UI", Calibri, sans-serif; }
a { color: var(--teal); text-decoration: none; }
.layout { display: block; min-height: 100vh; background: #f4f0e8; }
.side {
  background: #122a44;
  color: #d5dee8;
  padding: 18px 14px 14px;
  border-radius: 22px;
  width: 216px;
  height: calc(100vh - 32px);
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 50;
  box-sizing: border-box;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.side-brand { text-align: center; padding: 2px 0 12px; }
.side-logo { width: 88px; height: 88px; display: block; margin: 0 auto 8px; }
.side-fund { color: #8a97a8; font-size: 11px; letter-spacing: .02em; line-height: 1.3; }
.side-title { color: #fff; font-weight: 700; font-size: 26px; line-height: 1.15; margin: 2px 0 10px; }
.side-nav {
  flex: 0 0 auto;
  overflow: visible;
  border-top: 1px solid #f4d400;
  padding-top: 10px;
}
.side a { display: block; color: #c9d3de; padding: 8px 10px; border-radius: 8px; margin-bottom: 2px; }
.side a.active, .side a:hover { background: #1b3d5c; color: #fff; box-shadow: inset 3px 0 0 #f4d400; }
.side .nav-sub { padding: 2px 0 8px 10px; }
.side .nav-sub a { font-size: 13px; padding: 6px 10px; color: #aeb8c6; }
.side-user { margin-top: 10px; padding-top: 0; flex-shrink: 0; }
.user-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(244,212,0,.28);
  border-radius: 14px;
  padding: 10px;
}
.user-ava {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #f4d400; color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  float: left; margin: 0 8px 8px 0;
}
.user-name { color: #fff; font-weight: 600; font-size: 13px; line-height: 1.3; padding: 0 !important; margin: 0; background: transparent !important; box-shadow: none !important; display: inline !important; }
.user-name:hover { color: #f4d400 !important; }
.user-roles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; clear: both; }
.user-roles .chip { font-size: 10px; padding: 2px 6px; background: #1b3d5c; border: 1px solid rgba(255,255,255,.12); color: #d5dee8; }
.side-out {
  display: flex !important; align-items: center; gap: 8px;
  color: #8a97a8 !important; margin-top: 8px; padding: 8px 10px;
  background: transparent !important; box-shadow: none !important;
}
.side-out:hover { color: #fff !important; }

.nav-toggle {
  display:none; position:fixed; top:16px; left:16px; z-index:45;
  width:42px; height:42px; border:0; border-radius:12px;
  background:#122a44; color:#fff; font-size:20px; cursor:pointer;
}
.nav-scrim { display:none; position:fixed; inset:0; background:rgba(18,42,68,.35); z-index:40; }

.main { padding: 22px 0 48px; }
h1 { margin: 0 0 6px; font-size: 26px; color: var(--navy); }
.lead { color: var(--mute); margin-bottom: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.card { background: var(--paper); border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 0 rgba(0,0,0,.04); margin-bottom: 14px; }
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; background: var(--navy); color: #fff; }
.btn.sec { background: #efe6d6; color: var(--navy); }
.btn.warn { background: var(--bad); }
.btn.ok { background: var(--ok); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chip { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip.op { background: #d7e4f5; color: var(--blue); }
.chip.ko { background: #f3d4d8; color: var(--rose); }
.chip.spg { background: #3d5a45; color: #fff; }
.chip.ok { background: #d7efe0; color: var(--ok); }
.chip.bad { background: #f3d8d0; color: var(--bad); }
.chip.mute { background: #e6e1d6; color: var(--mute); }
.chip.amber { background: #f8e6bd; color: #8a5b00; }
.chip.adm { background: #f4d400; color: #122a44; }
.chip.sr { background: #b7ddd4; color: #1a5c54; }
.chip.col { background: #e4d4f5; color: #6b3fa0; }
.chip.bg { background: #d8c0a0; color: #5a3a18; }
.chip.dev { background: #122a44; color: #f4d400; }
.nav-fb {
  display:flex !important; align-items:center; justify-content:space-between; gap:8px;
  margin-top: 8px; padding-top: 10px !important;
  border-top: 1px solid rgba(244,212,0,.35);
  color: #f4d400 !important; font-weight: 700;
}
.nav-fb:hover, .nav-fb.active {
  background: #1b3d5c; color: #f4d400 !important;
  box-shadow: inset 3px 0 0 #f4d400;
}
.fb-lab { display:inline-flex; align-items:center; gap:8px; }
.fb-lab svg { width:16px; height:16px; fill:none; stroke:#f4d400; stroke-width:1.8; stroke-linejoin:round; }
.fb-dot {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:22px; height:22px; padding:0 6px; border-radius:999px;
  background:#f4d400; color:#122a44; font-size:12px; font-weight:800;
  flex-shrink:0;
}
.marks { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; vertical-align: middle; }
.mark { display: inline-flex; width: 22px; height: 22px; margin: 0; }
.mark svg { width: 22px; height: 22px; display: block; }
input, select, textarea {
  font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
label { display: block; font-size: 13px; color: var(--mute); margin: 8px 0 4px; }
table.grid { border-collapse: collapse; width: 100%; background: var(--paper); font-size: 12px; }
table.grid th, table.grid td { border: 1px solid #eadfcf; padding: 3px; text-align: center; min-width: 28px; }
table.grid th { background: var(--navy); color: #fff; font-weight: 600; position: sticky; top: 0; }
table.grid td.name { text-align: left; padding: 4px 8px; white-space: nowrap; background: #f3eee4; position: sticky; left: 0; }
td.cell.gray { background: var(--graycell); }
td.cell.op { background: #c5d8f0; }
td.cell.ko { background: #efc4cb; }
td.cell.solo { background: repeating-linear-gradient(135deg, #c5d8f0, #c5d8f0 6px, #efc4cb 6px, #efc4cb 12px); }
td.cell.hole { background: #f7d2c8; }
td.cell.pairwarn { outline: 2px solid var(--amber); }
.flash { background: #f8e6bd; color: #5c3b00; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.okbox { background: #d7efe0; color: #14532d; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.badbox { background: #f3d8d0; color: #7a271a; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 36px); gap: 6px; }
.cal button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.cal button.on { background: var(--graycell); }
.schemes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.schemes label { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--ink); cursor: pointer; }
.schemes input { margin-right: 6px; }
.login { max-width: 420px; margin: 12vh auto; background: var(--paper); padding: 28px; border-radius: 16px; }
.muted { color: var(--mute); font-size: 13px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 22px; }
.tile { display: block; background: var(--paper); border-radius: 12px; padding: 16px 18px; color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.tile:hover { background: #fff; }
.tile strong { display: block; color: var(--navy); font-size: 16px; margin-bottom: 6px; }
.tile span { display: block; color: var(--mute); font-size: 13px; }
body.nav-compact .nav-toggle { display:block; }
body.nav-compact .side { display:none; left:16px; }
body.nav-compact.nav-open .side { display:block !important; z-index:50; }
body.nav-compact.nav-open .nav-scrim { display:block; }
body.nav-compact .mnav { display:none !important; }
.stage { width:1180px; max-width:100%; margin:0; box-sizing:border-box; }
.page-brand { margin: 0 0 12px; }
.page-brand img { height: 52px; width: auto; max-width: min(360px, 100%); display: block; }
@media (max-width: 720px) {
  .page-brand img { height: 40px; }
}
body.nav-compact .stage { width:auto; max-width:1180px; margin:0 auto; padding:0 16px; }
body.nav-compact .stage { margin:0 auto; }
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
}
.pills { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.pill { border-radius:999px; padding:4px 10px; font-size:12px; font-weight:600; background:#fff; border:1px solid var(--line); }
.pill-search { color:#2f5f8a; border-color:#c5d8f0; background:#eaf2fb; }
.pill-alive { color:#1e6b3c; border-color:#bfe4cb; background:#e7f6ec; }
.pill-dead { color:#8a2d22; border-color:#f0c2b8; background:#fbeceb; }
.filters { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.board { display:grid; grid-template-columns:2fr 1fr; gap:14px; align-items:start; }
.rating p { display:flex; justify-content:space-between; margin:6px 0; font-size:14px; }
tr.st-alive td { background:#eef8f1; }
tr.st-dead td { background:#fbeceb; }
tr.st-closed td { background:#f3eee4; }
tr.st-search td { background:#fff; }
.badge { display:inline-block; border-radius:8px; padding:2px 8px; font-size:12px; font-weight:600; }
.badge.st-alive { background:#d7efe0; color:#14532d; }
.badge.st-dead { background:#f3d8d0; color:#7a271a; }
.badge.st-closed { background:#e6e1d6; color:#5c6570; }
.badge.st-search { background:#d7e4f5; color:#2f5f8a; }
table.cases { text-align:left; }
table.cases td, table.cases th { text-align:left; padding:8px 10px; }
@media (max-width: 900px) { .filters, .board { grid-template-columns:1fr; } }

.toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:8px 0 14px; }
.toolbar details { background:var(--paper); border-radius:10px; border:1px solid var(--line); }
.toolbar details > summary { list-style:none; cursor:pointer; padding:8px 14px; font-size:14px; color:var(--navy); }
.toolbar details > summary::-webkit-details-marker { display:none; }
.toolbar .drop { padding:12px 14px; min-width:280px; }
.head-dela { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
table.cases { width:100%; }
.more { position:relative; }
.more .drop { position:absolute; right:0; z-index:5; background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:10px; min-width:220px; }
.mnav { display:none; }
.case-cards { display:none; }
.case-card { background:var(--paper); border-radius:12px; padding:14px 14px 12px; margin-bottom:10px; border-left:4px solid #3d6ea8; }
.case-card.st-alive { border-left-color:#2e7d4f; background:#eef8f1; }
.case-card.st-dead { border-left-color:#b3543a; background:#fbeceb; }
.case-card.st-closed { border-left-color:#8a7a5c; background:#f3eee4; }
.case-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.case-fio { font-weight:700; margin-top:8px; }
.case-bot { display:flex; justify-content:space-between; align-items:center; margin-top:12px; }
@media (max-width: 900px) {
  .mnav { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 14px; font-size:14px; }
  .head-dela { flex-direction:column; }
  .pills { justify-content:flex-start; }
  .toolbar { flex-direction:column; align-items:stretch; }
  .toolbar details, .toolbar .btn, .toolbar form { width:100%; }
  .toolbar details > summary { width:100%; }
  .toolbar .drop { min-width:0; }
  table.cases { display:none; }
  .case-cards { display:block; }
  .filters { grid-template-columns:1fr; }
  .main { padding:16px 14px 40px; }
}

.dela-wrap { max-width: 1100px; margin: 0 auto; }
.dela-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-start; margin: 8px 0 16px; }
.dela-controls .panel { background:var(--paper); border:1px solid var(--line); border-radius:12px; }
.dela-controls .panel > summary { list-style:none; cursor:pointer; padding:8px 14px; color:var(--navy); font-weight:600; }
.dela-controls .panel > summary::-webkit-details-marker { display:none; }
.dela-controls .panel[open] { flex: 1 1 560px; }
.dela-controls .panel[open] > summary { border-bottom:1px solid var(--line); }
.dela-right { display:flex; flex-direction:column; gap:8px; flex: 0 1 300px; min-width:240px; }
.dela-actions { display:flex; gap:8px; flex-wrap:wrap; }
.filters { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px 12px; }
.filters label { margin:0; }
.filters input, .filters select { width:100%; height:38px; box-sizing:border-box; }
@media (max-width: 900px) {
  .dela-controls { flex-direction:column; }
  .dela-controls .panel, .dela-right, .dela-actions form, .dela-actions .btn { width:100%; }
  .dela-controls .panel[open] { flex-basis:auto; }
}
