:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --text: #0f172a;
  --muted: #475569;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --ok: #22c55e;
  --danger: #ef4444;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  text-decoration: none;
  font-weight: 700;
}

.brand-group {
  display: grid;
  gap: 2px;
}

.header-user-info {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}

.nav a[aria-current="page"] {
  color: var(--primary);
}

.hero {
  padding: 56px 0 42px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

h1,
h2,
h3 {
  font-family: Poppins, Inter, system-ui, Arial, sans-serif;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
}

.hero p {
  margin: 12px 0 0;
  color: var(--muted);
}

.searchbar {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea,
select,
button {
  font: inherit;
}

.searchbar input,
.searchbar button {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px 14px;
}

.searchbar button,
.btn {
  border: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease;
}

.searchbar button:hover,
.btn:hover {
  background: var(--primary-dark);
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn--ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: #f1f5f9;
}

.btn--success {
  background: var(--ok);
}

.btn--danger {
  background: var(--danger);
}

.section {
  padding: 24px 0 40px;
}

.section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.content-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.dashboard-panel {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.metric-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.metric-card__label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-card__value {
  font-size: 2rem;
  line-height: 1;
  color: var(--primary-dark);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.card h3 {
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.form-card {
  max-width: 760px;
  margin-top: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field input,
.field textarea,
.field select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.field small {
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.grid-2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-panel {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.simple-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

@media (max-width: 680px) {
  .searchbar {
    grid-template-columns: 1fr;
  }

  .section__title {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    position: static;
  }
}
