:root {
  --ink: #15202b;
  --ink-2: #3d4a57;
  --muted: #6b7380;
  --paper: #f4f0e8;
  --card: #fffdf8;
  --line: #e4ddd0;
  --rust: #c45c16;
  --rust-2: #a44b10;
  --pine: #2f6f4e;
  --warn: #b45309;
  --danger: #b42318;
  --info: #1d4e89;
  --sidebar: #101820;
  --sidebar-2: #1b2733;
  --chip: #efe8dc;
  --shadow: 0 10px 30px rgba(16, 24, 32, 0.06);
  --radius: 14px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}
a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #d7dee6;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--rust); color: #fff; display: grid; place-items: center;
  font-weight: 800; letter-spacing: -0.04em;
}
.brand small { display: block; color: #8b97a4; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: #c5ced6; padding: 9px 10px; border-radius: 10px; margin-bottom: 4px;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav .sec { margin: 18px 10px 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7d8894; }
.side-user { margin-top: 28px; padding: 12px; background: rgba(255,255,255,.04); border-radius: 12px; }
.side-user b { color: #fff; display: block; }
.side-user span { color: #8b97a4; font-size: 12px; }
.content { padding: 28px 32px 48px; }
.top {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  margin-bottom: 22px;
}
h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.03em; }
.lead { margin: 0; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  appearance: none; border: 0; background: var(--rust); color: #fff;
  padding: 10px 14px; border-radius: 10px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
}
.btn:hover { background: var(--rust-2); text-decoration: none; color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 10px; font-size: 13px; font-weight: 600; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.grid { display: grid; gap: 14px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: 1.2fr .8fr; }
.stat b { display: block; font-size: 28px; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chip {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  background: var(--chip); color: var(--ink-2); font-size: 12px; font-weight: 700;
}
.chip.ok { background: #e4f4ea; color: var(--pine); }
.chip.warn { background: #fdf0d8; color: var(--warn); }
.chip.info { background: #e4eef8; color: var(--info); }
.chip.err { background: #fde8e6; color: var(--danger); }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.flash.ok { background: #e8f6ee; color: #1f5c38; }
.flash.err { background: #fdecea; color: #8a1f16; }
label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font: inherit; color: inherit;
}
textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.muted { color: var(--muted); }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(1000px 400px at 10% -10%, rgba(196,92,22,.18), transparent),
    linear-gradient(160deg, #101820, #243140);
}
.login-card { width: min(420px, 92vw); background: #fffdf8; padding: 28px; border-radius: 20px; }
.login-card h1 { font-size: 26px; }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos img, .thumb {
  width: 140px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line);
}
.section-head {
  background: #efe6d8; padding: 10px 12px; border-radius: 10px; font-weight: 800; margin: 18px 0 10px;
}
.field { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.progress {
  height: 8px; background: #e9e2d6; border-radius: 99px; overflow: hidden;
}
.progress > span { display: block; height: 100%; background: var(--rust); }
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.filters .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.filters .btn { width: auto; }
a.chip { text-decoration: none; cursor: pointer; }
a.chip:hover { filter: brightness(0.97); text-decoration: none; }
.filter-meta { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.req { color: var(--danger); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
code { font-family: var(--mono); font-size: 12px; background: #efe8dc; padding: 1px 6px; border-radius: 6px; }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .grid.stats, .grid.two, .form-grid { grid-template-columns: 1fr; }
}
