:root {
  --bg: #f3f5f2;
  --panel: #fffffc;
  --ink: #17211f;
  --muted: #61716d;
  --line: #d9e2dd;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --soft: #f7faf8;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(31, 48, 44, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, #e9efec 0, var(--bg) 320px); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
.app { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0; }
.hero { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; border-radius: 8px; background: linear-gradient(135deg, #143833, #1d4b44); color: #fff; padding: 28px; box-shadow: 0 22px 60px rgba(20, 56, 51, 0.18); }
.eyebrow { margin: 0 0 6px; color: #a9dfd5; font-size: 12px; font-weight: 850; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
h2 { margin-bottom: 12px; font-size: 20px; }
.subtitle { margin-bottom: 0; color: rgba(255,255,255,.78); max-width: 680px; }
.hero-actions { display: grid; justify-items: end; gap: 10px; }
.session-pill { border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.1); padding: 7px 11px; font-size: 12px; font-weight: 850; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 800; padding: 0 16px; text-decoration: none; }
.button:hover { background: var(--accent-strong); }
.button.secondary { background: #e9efed; color: var(--ink); }
.button.light { background: #fff; color: #143833; }
.button.icon { width: 38px; padding: 0; background: transparent; color: var(--muted); font-size: 24px; }
.button.icon:hover { background: #f0f4f3; color: var(--danger); }
.button.full { width: 100%; margin-top: 14px; }
.panel, .stat { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.panel { margin-top: 18px; padding: 20px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.section-head p, .help { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.auth-grid, .form-grid, .main-grid, .stats, .check-row, .modal-grid { display: grid; gap: 14px; }
.auth-grid { grid-template-columns: 1fr 1fr auto; align-items: end; }
.main-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.check-row { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.check-row label { display: flex; align-items: center; gap: 10px; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 11px; font-weight: 800; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #bfccc6; border-radius: 8px; background: #fff; color: var(--ink); outline: none; padding: 11px 12px; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; padding: 0; }
.check-row label span { min-width: 0; overflow-wrap: anywhere; }
textarea { min-height: 116px; resize: vertical; }
.stack, .stack-form { display: grid; gap: 14px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.stat { padding: 18px; }
.stat span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat strong { font-size: 28px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; white-space: nowrap; }
th { background: var(--soft); color: #40514d; font-size: 12px; text-transform: uppercase; }
.entries { display: grid; gap: 12px; }
.entry { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 15px; }
.entry-top { display: flex; justify-content: space-between; gap: 12px; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; min-height: 27px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; padding: 0 10px; }
.badge.outline { border: 1px solid #bfccc6; background: #fff; color: #2d3d39; }
.badge.soft { background: #dff4ef; color: var(--accent-strong); }
.empty { border: 1px dashed #bfccc6; border-radius: 8px; background: var(--soft); color: var(--muted); padding: 26px 18px; text-align: center; }
.modal { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; background: rgba(16,32,29,.46); padding: 18px; }
.modal.open { display: flex; }
.modal-window { width: min(980px, 100%); max-height: calc(100vh - 36px); overflow: auto; border-radius: 8px; background: var(--panel); padding: 18px; }
.modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manager-list { display: grid; gap: 8px; }
.manager-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 8px; }
.view-hidden { display: none !important; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 360px; border: 1px solid #badbd3; border-radius: 8px; background: #f4fffc; color: #124942; box-shadow: var(--shadow); font-weight: 800; opacity: 0; padding: 13px 15px; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) {
  .hero, .section-head, .entry-top { flex-direction: column; align-items: stretch; }
  .auth-grid, .main-grid, .form-grid, .stats, .check-row, .modal-grid, .inline-form, .manager-row { grid-template-columns: 1fr; }
}
