body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f3f5f7;
  color: #18212b;
}

a {
  color: #0f5fa8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.portal-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 12px;
}

.portal-header {
  background: #ffffff;
  border-bottom: 1px solid #d7dde5;
  margin-bottom: 24px;
}

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

.brand-block {
  display: flex;
  flex-direction: column;
}

.brand-link {
  color: #18212b;
  font-size: 22px;
  font-weight: 700;
}

.brand-caption {
  color: #5b6775;
  font-size: 14px;
}

.portal-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-nav a {
  color: #243444;
  font-weight: 600;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0 0 6px 0;
  font-size: 30px;
}

.page-header p {
  margin: 0;
  color: #5b6775;
}

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

.panel {
  background: #ffffff;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(24, 33, 43, 0.03);
}

.action-panel {
  margin-bottom: 16px;
}

.panel h2 {
  margin-top: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.meta-list dt {
  color: #5b6775;
  font-weight: 700;
}

.meta-list dd {
  margin: 0;
}

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

.metric-card {
  background: #f8fafc;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 14px;
}

.metric-card span {
  display: block;
  color: #5b6775;
  margin-bottom: 6px;
}

.metric-card strong {
  font-size: 22px;
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.simple-list li {
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  border-bottom: 1px solid #e5ebf1;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.portal-table th {
  background: #f8fafc;
  color: #4d5a68;
  white-space: nowrap;
}

.content-viewer {
  margin: 0;
  background: #0f1720;
  color: #dce5ef;
  padding: 18px;
  border-radius: 8px;
  overflow: auto;
  min-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.filter-grid input {
  border: 1px solid #c8d0da;
  border-radius: 6px;
  padding: 8px 10px;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-actions button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #18212b;
  border-radius: 6px;
  background: #18212b;
  color: #ffffff;
  cursor: pointer;
}

.button-link {
  background: #ffffff;
  color: #18212b;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #18212b;
  border-radius: 6px;
  background: #18212b;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.status-banner {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #d7dde5;
}

.status-success {
  background: #eef8f1;
  border-color: #b8d8bf;
  color: #1d5c2d;
}

.status-error {
  background: #fff1f0;
  border-color: #e2b7b3;
  color: #8c2b22;
}

.muted {
  color: #5b6775;
}

.mt-20 {
  margin-top: 20px;
}

.portal-footer {
  margin-top: 28px;
  border-top: 1px solid #d7dde5;
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  color: #5b6775;
  font-size: 14px;
}

@media (max-width: 900px) {
  .dashboard-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .portal-header .portal-shell,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
