:root {
  --ink: #1d2433;
  --muted: #647084;
  --line: #d8dee8;
  --panel: #ffffff;
  --page: #f4f7fb;
  --brand: #176f8f;
  --brand-dark: #0d4d66;
  --accent: #d97706;
  --ok: #147a48;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--brand-dark);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: start;
}

.intro-panel {
  min-height: 460px;
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(145deg, var(--brand-dark), var(--brand));
  color: #fff;
  border-radius: 8px;
}

.intro-panel h1,
.section-head h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04;
}

.intro-panel p {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

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

.intro-panel .eyebrow {
  color: #ffd08a;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(24, 36, 52, 0.06);
}

.panel.wide {
  width: 100%;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(23, 111, 143, 0.18);
  border-color: var(--brand);
}

.two-cols,
.three-cols {
  display: grid;
  gap: 14px;
}

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

.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-dark);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button-secondary {
  border-color: var(--accent);
  background: var(--accent);
}

.button-light {
  margin-top: 14px;
  border-color: var(--line);
  background: #fff;
  color: var(--brand-dark);
}

.button-light:hover {
  background: #eef6f9;
}

.section-head {
  margin-bottom: 22px;
}

.section-head p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
}

.row-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.form-message {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.success {
  color: var(--ok);
}

.form-message.error {
  color: var(--danger);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef6f9;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  padding: 24px 0;
  text-align: center;
}

.empty-state p {
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(19, 45, 64, 0.07);
  color: inherit;
  text-decoration: none;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1;
}

.summary-card small {
  color: var(--muted);
  font-weight: 700;
}

.summary-card.danger strong {
  color: var(--danger);
}

.summary-card.success strong {
  color: var(--ok);
}

.cards-list {
  display: grid;
  gap: 14px;
}

.info-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(19, 45, 64, 0.07);
}

.info-card.flat {
  box-shadow: none;
}

.info-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.info-card-head h2 {
  margin: 4px 0 0;
  color: var(--brand-dark);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.details-grid div {
  min-width: 0;
}

.details-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.details-grid dd {
  margin: 0;
  color: var(--brand-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.footer {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .topbar,
  .row-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-grid,
  .two-cols,
  .three-cols,
  .summary-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .info-card-head {
    flex-direction: column;
  }

  .intro-panel {
    min-height: auto;
  }
}
