body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #111827;
}

.container {
  width: min(1180px, calc(90% - 40px));
  margin: 0 auto;
}

.portal-header {
  background: #111827;
  color: #ffffff;
  padding: 16px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.portal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.portal-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}

.portal-nav a {
  color: #ffffff;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}

.portal-nav a:hover {
  text-decoration: underline;
}

.portal-main {
  padding: 30px 0 50px;
}

.portal-main h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.portal-main h2 {
  margin-top: 0;
  font-size: 20px;
}

.muted {
  color: #6b7280;
}

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

.portal-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(17,24,39,.06);
}

.portal-stat-card {
  text-align: center;
  padding: 26px 20px;
}

.portal-stat-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.portal-stat-value {
  font-size: 34px;
  font-weight: 700;
  color: #111827;
}

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

.portal-table thead th {
  background: #f9fafb;
  color: #374151;
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.portal-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.portal-table tr:hover td {
  background: #fbfdff;
}

.portal-feed-item {
  padding: 14px 0;
  border-bottom: 1px solid #eef2f7;
}

.portal-feed-item:last-child {
  border-bottom: none;
}

.portal-feed-item strong {
  display: block;
  margin-bottom: 4px;
}

.portal-feed-item small {
  display: block;
  color: #6b7280;
  margin-bottom: 8px;
}

.portal-card form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.portal-card input,
.portal-card textarea,
.portal-card select {
  width: 100%%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  margin-bottom: 16px;
  background: #ffffff;
  font-size: 14px;
  color: #111827;
}

.portal-card textarea {
  min-height: 120px;
  resize: vertical;
}

.portal-card button {
  background: #111827;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}

.portal-card button:hover {
  opacity: .95;
  transform: translateY(-1px);
}

.portal-card hr {
  border: 0;
  border-top: 1px solid #eef2f7;
  margin: 20px 0;
}

.portal-footer {
  padding: 24px 0 40px;
  color: #6b7280;
  font-size: 14px;
}

.portal-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f5f7fb;
}

.portal-login-wrap {
  width: min(420px, calc(100%% - 40px));
}

.portal-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

a {
  color: #2563eb;
}

table input, table select {
  width: 75%;
  padding: 6px;
}

table button {
  padding: 6px 10px;
}

table th {
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 960px) {
  .portal-grid-2,
  .portal-grid-3 {
    grid-template-columns: 1fr;
  }

  .portal-header-row {
    display: block;
  }

  .portal-nav {
    margin-top: 12px;
  }

  .portal-nav a {
    display: inline-block;
    margin: 0 12px 8px 0;
  }

  .portal-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
