:root {
  --green-dark: #064b2d;
  --green: #008c45;
  --lime: #8bd72e;
  --yellow: #f4d500;
  --bg: #f5f7f6;
  --text: #1a2420;
  --muted: #66756c;
  --line: #e4ece7;
  --shadow: 0 1px 2px rgba(16, 36, 24, .04), 0 8px 24px rgba(16, 36, 24, .04);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, .btn {
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  transition: background .16s ease, border-color .16s ease;
}
.btn-green { background: #0b7a3e; color: white; }
.btn-green:hover { background: #086634; }
.btn-dark { background: var(--green-dark); color: white; }
.btn-dark:hover { background: #043823; }
.btn-line { background: white; border: 1px solid #d5e0da; color: #243028; }
.btn-line:hover { background: #f6faf7; }
.btn-sm { padding: 6px 11px; border-radius: 7px; font-size: 13px; }
.shell { display: flex; min-height: 100vh; }
.side {
  width: 252px;
  background: #fff;
  color: var(--text);
  padding: 18px 12px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand img { width: 42px; height: 42px; object-fit: contain; background: #f4faf6; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.brand strong { font-size: 14px; letter-spacing: .08em; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 2px; letter-spacing: 0; }
.nav { display: grid; gap: 2px; }
.nav-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8b9a92; }
.nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  color: #314038;
  font-size: 13.5px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.nav svg { width: 17px; height: 17px; flex: none; color: #6d7d74; }
.nav a:hover { background: #f4f8f6; }
.nav a.active { background: #f3faf6; color: var(--green-dark); box-shadow: inset 2px 0 0 var(--green); }
.nav a.active svg { color: var(--green); }
.side-foot { margin-top: auto; padding: 14px 10px 4px; color: #8b9a92; font-size: 12px; border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; }
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  height: 68px;
  padding: 0 24px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.crumb b { display: block; font-size: 14px; }
.crumb span { color: var(--muted); font-size: 12px; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: white; border: 1px solid var(--line); padding: 8px; }
.lang { background: #f4f7f5; border-radius: 999px; padding: 3px; display: flex; gap: 2px; }
.lang button { background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 11px; font-size: 12px; }
.lang button.on { background: white; color: var(--green-dark); box-shadow: 0 1px 2px rgba(16,36,24,.08); }
.userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-weight: 700;
}
.userchip b { display: block; font-size: 13px; line-height: 1.15; }
.userchip small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e7f6ec; color: var(--green-dark); font-size: 13px;
}
.page { padding: 4px 28px 48px; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 22px 0 16px;
}
.kicker { margin: 0 0 2px; color: #7d8d84; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.page h1, .page-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.card {
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: none;
  border: 1px solid var(--line);
}
.card > strong { display: flex; align-items: center; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.card + .card, .stack + .card, .card + form { margin-top: 14px; }
.stat { display: flex; justify-content: space-between; align-items: flex-start; min-height: 0; }
.stat > div:first-child { display: flex; flex-direction: column-reverse; gap: 6px; }
.stat b { font-size: 28px; display: block; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat span { color: #7d8d84; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bubble {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: #f3faf6; color: var(--green);
}
.bubble svg { width: 18px; height: 18px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr .9fr .8fr; gap: 14px; margin-top: 14px; }
.grid-bottom { display: grid; grid-template-columns: 1.4fr .8fr; gap: 14px; margin-top: 14px; }
.card:has(table) { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: #7b8b83; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 11px 16px; background: #f8faf9; border-bottom: 1px solid var(--line); }
td { padding: 12px 16px; border-top: 1px solid #eef3f0; vertical-align: middle; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.who .avatar { font-style: normal; flex: none; width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.who small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .01em; color: #5c6b63; font-size: 12.5px; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #f4faf6; }
td small { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 0; padding: 0; font-size: 13px; font-weight: 600; background: transparent; color: var(--green); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill-A, .pill-S, .pill-C { background: transparent; color: #087a45; }
.pill-P, .pill-R, .pill-V { background: transparent; color: #9a6b00; }
.pill-U, .pill-F { background: transparent; color: #b45309; }
.pill-E, .pill-J { background: transparent; color: #b42318; }
.pill-I { background: transparent; color: #5e6b63; }
.actions { display: grid; gap: 8px; }
.actions a {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 650;
  font-size: 13.5px;
  transition: border-color .18s ease, background .18s ease;
}
.actions a:hover { background: #eef7f1; border-color: #cfe3d6; }
.filters, .form-grid, .toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters { margin-bottom: 14px; }
.filters input, .filters select, .toolbar input, .toolbar select { flex: 1 1 180px; min-width: 0; height: 38px; }
.toolbar { padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; margin: 0; }
input, select, textarea {
  border: 1px solid #d7e2db;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: white;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(0, 140, 69, .12); }
textarea { min-height: 90px; width: 100%; }
.alert { background: #e7f6ec; color: var(--green-dark); padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; }
.alert.bad { background: #fde8e6; color: #b42318; }
.stack { display: grid; gap: 12px; }
.form-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card .wide, .form-card button, .form-card .field-check { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; font-weight: 700; }
.field-check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  background: #eef3f0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.seg a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: #516058;
}
.seg a b {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: white;
  color: var(--green-dark);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.seg a.on {
  background: white;
  color: var(--green-dark);
  box-shadow: 0 1px 2px rgba(16, 36, 24, .08);
}
.seg a.on b { background: #e7f6ec; color: var(--green); }
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f6ec;
  color: var(--green-dark);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.notice-item { padding: 12px 0; border-top: 1px solid var(--line); }
.notice-item:first-of-type { border-top: 0; }
.notice-item small { color: var(--muted); }
.history { display: grid; gap: 10px; margin-top: 10px; }
.history article { background: #f7faf8; border-radius: 12px; padding: 12px; }
.history small { color: var(--muted); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(145deg, var(--green-dark), var(--green)); }
.login-card { width: min(420px, 92vw); background: white; border-radius: 22px; padding: 28px; }
.login-card img { height: 52px; }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-brand {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, #043823 0%, #064b2d 48%, #087a45 100%);
  color: white; padding: 56px 64px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; background: rgba(139, 215, 46, .16); }
.auth-brand::before { width: 320px; height: 320px; top: -120px; right: -80px; }
.auth-brand::after { width: 220px; height: 220px; bottom: -70px; left: -50px; background: rgba(255,255,255,.06); }
.auth-brand-inner, .auth-foot { position: relative; z-index: 1; }
.auth-logo { background: white; display: inline-flex; border-radius: 16px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.auth-logo img { height: 54px; display: block; }
.auth-kicker { margin: 36px 0 8px; letter-spacing: .16em; font-size: 12px; font-weight: 700; color: #b7e38a; }
.auth-brand h1 { margin: 0; font-size: 40px; line-height: 1.15; max-width: 460px; }
.auth-brand p { max-width: 420px; color: #d7e8dc; line-height: 1.55; font-size: 16px; }
.auth-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: #edf7f0; font-weight: 600; }
.auth-points i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(139, 215, 46, .22); color: #d8f5a8; font-style: normal; font-size: 14px; }
.auth-foot { color: #c5dccf; font-size: 13px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: #f7faf8; }
.auth-form { width: min(420px, 100%); }
.auth-form h2 { margin: 6px 0 6px; font-size: 30px; }
.auth-form .lead { margin: 0 0 22px; color: var(--muted); }
.auth-form .field input { height: 48px; }
.auth-form .btn-green { width: 100%; height: 50px; font-size: 15px; margin-top: 6px; }
.auth-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.page > *, .stats .card, .grid-2 .card, .grid-bottom .card { animation: rise .32s ease both; }
.stats .card:nth-child(2) { animation-delay: .04s; }
.stats .card:nth-child(3) { animation-delay: .08s; }
.stats .card:nth-child(4) { animation-delay: .12s; }
.stats .card:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1100px) {
  .stats, .grid-2, .grid-bottom, .form-card { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; transform: translateX(-110%); transition: transform .25s ease; }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .scrim { display: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(4, 24, 14, .35); z-index: 15; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px; }
  .auth-brand h1 { font-size: 30px; }
  .auth-points, .auth-foot { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .filters input, .filters select, .filters .btn, .toolbar input, .toolbar select, .toolbar .btn { flex: 1 1 100%; }
  .page { padding: 8px 16px 32px; }
}
@media print {
  .side, .top, .filters, .menu-btn { display: none !important; }
  .page { padding: 0; }
}
