﻿:root {
  --ink: #10151d;
  --muted: #5b6b82;
  --line: #dfe6ef;
  --brand: #0c2f66;
  --brand-2: #164f9e;
  --accent: #b56e3f;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --soft: #fbfcfe;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--brand-2);
  text-decoration: none;
  font-weight: 700;
}

.portal-auth-shell,
.portal-shell,
.portal-page-shell {
  min-height: 100vh;
  padding: 20px;
}

.portal-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef4fb 48%, #e5edf7 100%);
}

.portal-shell {
  display: grid;
  place-items: center;
}

.portal-page-shell {
  width: min(100%, 940px);
  margin: 0 auto;
}

.portal-form-shell {
  width: min(100%, 820px);
}

.portal-auth-copy,
.portal-card,
.portal-login-card,
.portal-panel,
.portal-choice-grid a {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(15, 23, 36, 0.08);
}

.portal-auth-copy,
.portal-card,
.portal-login-card,
.portal-panel {
  padding: 26px;
}

.portal-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 12px;
  color: var(--brand);
  line-height: 1.08;
}

h1 {
  font-size: clamp(1.75rem, 6vw, 3rem);
}

h2 {
  font-size: 1.35rem;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.portal-role-strip,
.portal-grid,
.portal-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.portal-role-strip span,
.portal-grid span,
.portal-status-list span {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 12px;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 700;
}

.portal-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.portal-form {
  display: grid;
  gap: 13px;
}

.portal-form label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.portal-form input,
.portal-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

.portal-form textarea {
  resize: vertical;
}

.portal-form input:focus,
.portal-form textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(22, 79, 158, 0.12);
  outline: none;
}

.portal-form button,
.portal-link-button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-form-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.portal-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.portal-check input {
  width: auto;
}

.portal-note {
  margin-top: 12px;
  font-size: 0.82rem;
}

.portal-page-header {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 22px;
}

.portal-page-header a {
  display: inline-block;
  margin-bottom: 14px;
}

.portal-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-choice-grid a {
  display: block;
  min-height: 150px;
  padding: 18px;
}

.portal-choice-grid strong,
.portal-choice-grid span {
  display: block;
}

.portal-choice-grid strong {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 1.05rem;
}

.portal-choice-grid span {
  color: var(--muted);
  line-height: 1.4;
}

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

.portal-span,
.portal-panel button {
  grid-column: 1 / -1;
}

.portal-status-card .portal-link-button {
  margin-top: 20px;
}

.portal-alert {
  margin: 0 0 14px;
  border: 1px solid #f0c5b3;
  border-radius: 10px;
  background: #fff7f3;
  color: #7b3a22;
  padding: 12px;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand);
  padding: 2px 5px;
  font-size: 0.92em;
}

.portal-admin-shell {
  width: min(100%, 1180px);
}

.portal-admin-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.portal-admin-topline a {
  margin-bottom: 0;
}

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

.portal-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

.portal-table th {
  color: var(--brand);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.portal-table-note td {
  background: var(--soft);
  color: var(--muted);
  line-height: 1.45;
}

.portal-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-inline-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  padding: 0 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 760px) {
  .portal-auth-shell,
  .portal-panel.portal-form,
  .portal-choice-grid,
  .portal-role-strip,
  .portal-grid,
  .portal-status-list {
    grid-template-columns: 1fr;
  }

  .portal-auth-copy {
    display: none;
  }

  .portal-auth-shell,
  .portal-shell,
  .portal-page-shell {
    padding: 14px;
  }

  .portal-card,
  .portal-login-card,
  .portal-panel,
  .portal-page-header {
    padding: 20px;
    border-radius: 14px;
  }

  .portal-choice-grid a {
    min-height: auto;
  }
}
