body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  color: #5f5b55;
  background: #fdfdf9;
}

.top {
  background: #66625e;
  border-top: 4px solid #d50d15;
  color: white;
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  margin-right: auto;
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.nav a {
  color: rgba(255, 255, 255, .84);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

main {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 54px 0 76px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #d50d15;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  color: #4f4b47;
  font-size: 42px;
  line-height: 1.08;
}

p {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.62;
}

.muted {
  color: #7d796f;
}

.panel {
  padding: 22px;
  border: 1px solid #c2c3b8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 34px rgba(57, 54, 49, .08);
}

.panel h2 {
  margin: 0 0 8px;
  color: #4f4b47;
  font-size: 25px;
  line-height: 1.15;
}

.panel p {
  margin: 0 0 18px;
  font-size: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0;
  color: #7d796f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  border: 1px solid #c2c3b8;
  border-radius: 8px;
  padding: 0 12px;
  background: #fefefb;
  color: #4f4b47;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: #d50d15;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.btn.secondary {
  border: 1px solid #c2c3b8;
  background: #fefefb;
  color: #4f4b47;
}

.link-button {
  border: 0;
  background: transparent;
  color: #d50d15;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.auth-register-link {
  margin-top: 18px;
}

.status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.status.ok {
  display: block;
  border: 1px solid #c9d9bd;
  background: #edf5e8;
  color: #345f28;
}

.status.err {
  display: block;
  border: 1px solid #edb8b8;
  background: #fff2f1;
  color: #a2080f;
}

[hidden] {
  display: none !important;
}

.role-list,
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.role-card,
.portal-card {
  display: block;
  padding: 16px;
  border: 1px solid #c2c3b8;
  border-radius: 8px;
  background: white;
  color: inherit;
  text-decoration: none;
}

.role-card strong,
.portal-card strong {
  display: block;
  margin-bottom: 6px;
  color: #4f4b47;
}

.role-card span,
.portal-card span {
  color: #7d796f;
  font-size: 14px;
  line-height: 1.45;
}

.account-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 18px 0 28px;
  padding: 14px 16px;
  border: 1px solid #c2c3b8;
  border-radius: 8px;
  background: white;
}

.portal-section,
.pending-panel {
  margin-top: 22px;
}

.compact-grid {
  margin-top: 12px;
}

.inline-form {
  max-width: 460px;
}

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

.section-head h2 {
  margin-bottom: 6px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid #c2c3b8;
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: white;
}

.admin-table th,
.admin-table td {
  padding: 11px 12px;
  border-top: 1px solid #e4e2da;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.admin-table th {
  border-top: 0;
  background: #f1efea;
  color: #66625e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-table select {
  min-height: 38px;
  font-size: 14px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.small-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

footer {
  border-top: 1px solid #c2c3b8;
  padding: 28px 22px;
  color: #7d796f;
  text-align: center;
}

@media (max-width: 820px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }
}
