:root {
  color-scheme: light;
  --ink: #1f2d38;
  --muted: #687887;
  --navy: #12283a;
  --navy-2: #244b68;
  --blue-soft: #eaf2f7;
  --surface: #ffffff;
  --surface-soft: #f4f7f9;
  --surface-warm: #fbf7ef;
  --line: #dce5eb;
  --line-strong: #c5d1d9;
  --accent: #e9b44c;
  --accent-strong: #d79b25;
  --success: #2d7650;
  --success-soft: #e8f4ed;
  --danger: #a13c42;
  --danger-soft: #fbecee;
  --warning: #91621a;
  --warning-soft: #fbf1dd;
  --purple: #66558d;
  --purple-soft: #f0edf8;
  --shadow: 0 12px 30px rgba(18, 40, 58, .08);
  --shadow-strong: 0 18px 44px rgba(18, 40, 58, .14);
  --radius: 16px;
  --radius-small: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: #eef3f6;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; color: var(--navy); font-size: clamp(2rem, 4vw, 3.55rem); line-height: 1.03; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; color: var(--navy); font-size: 1.25rem; line-height: 1.2; }
h3 { margin-bottom: 6px; color: var(--navy); font-size: 1rem; }
small { color: var(--muted); }

.shell { width: min(1480px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { margin-bottom: 8px; color: var(--navy-2); font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.view { display: none; }
.view.active { display: block; animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--navy);
  padding: 9px 14px;
  font-weight: 780;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(18, 40, 58, .04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); border-color: #9fb1bf; box-shadow: 0 8px 18px rgba(18, 40, 58, .08); }
.button-primary { border-color: var(--accent-strong); background: var(--accent); color: #1d2a31; }
.button-ghost { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; box-shadow: none; }
.button-subtle { background: var(--surface-soft); box-shadow: none; }
.button-danger { border-color: #e7c3c6; background: var(--danger-soft); color: var(--danger); }
.text-button { border: 0; background: transparent; color: var(--navy-2); padding: 4px 0; font-weight: 800; }
.text-button:hover { text-decoration: underline; }
.icon-button, .icon-pill {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--navy);
  font-size: 1.2rem;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(36,75,104,.13); }
textarea { resize: vertical; }
label { color: #445665; font-size: .8rem; font-weight: 800; }

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--navy-2);
  padding: 4px 8px;
  font-size: .68rem;
  font-weight: 850;
  line-height: 1.2;
}
.badge-accent { background: #f8e7bd; color: #6f4a08; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel-heading, .section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.panel-heading h2, .section-heading h2 { margin-bottom: 0; }
.empty-state { padding: 60px 24px; text-align: center; color: var(--muted); }

.modal {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(8, 22, 34, .34);
  padding: 0;
}
.modal::backdrop { background: rgba(10,25,37,.6); backdrop-filter: blur(4px); }
.modal form { padding: 22px; }
.modal-header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.modal-header h2 { font-size: 1.55rem; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.modal-actions > div { display: flex; gap: 10px; }
.modal-actions.end { justify-content: flex-end; }
.small-modal { width: min(620px, calc(100% - 28px)); }

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1480px); }
  .button { min-height: 40px; }
  .modal form { padding: 17px; }
}
