.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: var(--portal-btn);
  color: var(--portal-text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.btn:hover {
  background: var(--portal-btn-hover);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.14);
  border-color: rgba(134, 239, 172, 0.34);
}

.btn.primary {
  background: rgba(134, 239, 172, 0.14);
  border-color: rgba(134, 239, 172, 0.34);
  color: var(--portal-text);
}

.btn.primary:hover {
  background: rgba(134, 239, 172, 0.2);
}

.btn.soft {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.2);
  color: var(--portal-text);
}

.btn.soft:hover {
  background: rgba(56, 189, 248, 0.18);
}

.btn.small {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.045));
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(7, 16, 24, 0.94), rgba(7, 16, 24, 0.76));
  border-bottom: 1px solid var(--portal-line);
}

.portal-header-inner {
  max-width: var(--max);
  min-height: 78px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.portal-brand img {
  width: auto;
  height: 58px;
  object-fit: contain;
}

.portal-brand-copy {
  min-width: 0;
}

.portal-brand-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.portal-brand-copy span {
  display: block;
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
  padding: 10px 14px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--portal-text);
  font: inherit;
}

.search-wrap input::placeholder {
  color: var(--portal-muted);
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: var(--portal-btn);
  color: var(--portal-text);
  font-size: 14px;
  font-weight: 800;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(134, 239, 172, 0.28);
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.14);
  color: var(--portal-accent);
  font-size: 13px;
  font-weight: 900;
}

.user-meta strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.user-meta span {
  display: block;
  margin-top: 2px;
  color: var(--portal-muted);
  font-size: 11px;
}

.hero-card {
  padding: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(134, 239, 172, 0.24);
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.1);
  color: var(--portal-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-subtext {
  max-width: 72ch;
  margin: 0;
  color: var(--portal-muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.point {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: var(--portal-card-strong);
}

.point-label {
  margin-bottom: 8px;
  color: var(--portal-muted);
  font-size: 12px;
}

.point-value {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.section-card {
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
}

.section-heading p {
  max-width: 64ch;
  margin: 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.7;
}

.stat-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: var(--portal-card-strong);
}

.stat-label {
  margin-bottom: 8px;
  color: var(--portal-muted);
  font-size: 12px;
}

.stat-value {
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.stat-note {
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  padding: 20px;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-top h3 {
  margin: 0;
  font-size: 18px;
}

.panel-top p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 13px;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.mini-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.mini-item span,
.mini-item p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.6;
}

.time-chip {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 8px 10px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  color: #bdeaff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.status-chip {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.status-chip.good {
  background: rgba(134, 239, 172, 0.12);
  border-color: rgba(134, 239, 172, 0.24);
  color: var(--portal-accent);
}

.status-chip.warn {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.24);
  color: var(--warning, #fbbf24);
}

.status-chip.danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.24);
  color: var(--danger, #f87171);
}

.status-chip.info {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.18);
  color: #bdeaff;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--portal-muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.info-box {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: var(--portal-card-strong);
}

.info-box h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.info-box p,
.info-box li {
  margin: 0;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.65;
}

.info-box ul {
  margin: 0;
  padding-left: 18px;
}

.footer {
  max-width: var(--max);
  margin: 20px auto 0;
  padding: 0 24px 28px;
}

.footer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 22px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: auto;
  height: 42px;
}

.footer-copy strong {
  display: block;
  font-size: 13px;
}

.footer-copy span {
  display: block;
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--portal-text);
  transform: translateY(-1px);
}

/* Form components */

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  display: block;
  margin: 0;
  color: var(--portal-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--portal-text);
  font: inherit;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--portal-muted);
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(134, 239, 172, 0.45);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.12);
}

.form-grid .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 880px) {
  .portal-header-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .portal-brand {
    width: 100%;
    justify-content: center;
  }

  .portal-header-actions {
    width: 100%;
    justify-content: center;
  }

  .search-wrap {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .portal-header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-card,
  .section-card,
  .panel,
  .footer-card {
    padding: 18px;
  }

  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 34px;
  }
}
