:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #eef2f5;
  --text: #17202a;
  --muted: #687586;
  --line: #d9e0e7;
  --accent: #1d75d8;
  --accent-strong: #155bb0;
  --ok: #18794e;
  --warning: #a96300;
  --shadow: 0 10px 26px rgba(28, 42, 56, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

.shell {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.person {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.person__name {
  font-size: 18px;
  font-weight: 750;
}

.person__meta {
  color: var(--muted);
  font-size: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 14px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(28, 42, 56, 0.08);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 10px;
}

.section-title span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item__title {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
}

.item__period {
  color: var(--muted);
  font-size: 14px;
}

.badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f5ee;
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.badge.pending {
  background: #fff4df;
  color: var(--warning);
}

.primary-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.primary-button:active {
  background: var(--accent-strong);
}

.empty,
.error {
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.45;
}

.error {
  border-color: #efb7b7;
  color: #b42318;
  background: #fff4f2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111820;
    --surface: #19232e;
    --surface-muted: #121b24;
    --text: #eef3f7;
    --muted: #a5b1bf;
    --line: #2c3a47;
    --shadow: none;
  }
}

@media (max-width: 430px) {
  .shell {
    padding: 14px 10px 24px;
  }

  .tab {
    font-size: 12px;
  }
}
