:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #182230;
  --muted: #667085;
  --line: #d9e2ec;
  --primary: #12615d;
  --primary-dark: #0a4744;
  --accent: #c47f1a;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(24, 34, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #17212f;
  color: #eef4ff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand small,
.muted,
.page-head p {
  color: var(--muted);
}

.brand small {
  display: block;
  color: #a9b8cf;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  font-weight: 800;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a,
.ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.04);
}

.ghost {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.content {
  padding: 34px;
  min-width: 0;
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(300px, 420px);
  align-items: center;
  justify-content: center;
  gap: 72px;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(18, 97, 93, 0.16), transparent 42%),
    var(--bg);
}

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.1;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 20px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c8d4e0;
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button.secondary {
  background: #e6f0ef;
  color: var(--primary-dark);
}

button.danger,
.button.danger {
  background: #fee4e2;
  color: var(--danger);
  padding: 8px 10px;
}

button.small,
.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.inline-link {
  color: var(--primary-dark);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice {
  border-radius: 8px;
  padding: 11px 12px;
  font-weight: 650;
}

.notice.error {
  color: var(--danger);
  background: #fff1f0;
  border: 1px solid #fecdca;
}

.notice.success {
  color: var(--primary-dark);
  background: #e6f0ef;
  border: 1px solid #b7d4d1;
}

.narrow {
  max-width: 620px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.stats,
.grid-two {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
}

.details {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 16px;
}

.details dt {
  color: var(--muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
}

.wizard {
  max-width: 980px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.summary ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.summary span {
  color: var(--muted);
}

.table-panel {
  overflow-x: auto;
}

.filters {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  align-items: end;
  margin-bottom: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.actions form {
  display: inline-flex;
}

.block-actions {
  margin-bottom: 14px;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.check {
  display: inline-flex;
  grid-template-columns: auto;
  align-items: center;
  gap: 6px;
  font-weight: 650;
}

.check input {
  width: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 4px 8px;
  background: #edf2f7;
  color: #344054;
  font-weight: 750;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #475467;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

@media (max-width: 860px) {
  .app-shell,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .content {
    padding: 22px;
  }

  .stats,
  .grid-two,
  .summary,
  .filters {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
