:root {
  --navy: #08111f;
  --blue: #0ea5e9;
  --blue-dark: #075985;
  --teal: #14b8a6;
  --green: #22c55e;
  --muted: #64748b;
  --card: rgba(255,255,255,.94);
  --border: rgba(226,232,240,.9);
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.12), transparent 35%),
    radial-gradient(circle at top right, rgba(20,184,166,.10), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--navy);
  margin: 0;
  padding: 0;
  font-family: Inter, sans-serif;
}

.portal-wrap,
.home-wrap,
.faq-wrap {
  width: 100%;
  max-width: 1220px;
  margin: 20px auto 80px;
  padding: 0 18px;
}

/* Navigation */

.top-tabs,
.recovery-nav {
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 10px 35px rgba(15,23,42,.06);
}

.top-tabs a,
.recovery-nav a {
  flex: 1 1 auto;
  min-width: 120px;
  background: white;
  color: #0f172a !important;
  text-decoration: none;
  font-weight: 800;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  text-align: center;
  line-height: 1.2;
  transition: .2s ease;
  border: 1px solid rgba(226,232,240,.7);
}

.top-tabs a:hover,
.recovery-nav a:hover {
  background: #e0f2fe;
  color: #075985 !important;
  transform: translateY(-1px);
}

/* Hero / Header */

.portal-header,
.hero {
  background:
    linear-gradient(135deg, rgba(8,17,31,.98), rgba(7,89,133,.95)),
    radial-gradient(circle at top right, rgba(45,212,191,.25), transparent 30%);
  color: white;
  padding: 52px;
  border-radius: 34px;
  margin-bottom: 30px;
  box-shadow: 0 28px 70px rgba(2,6,23,.22);
  position: relative;
  overflow: hidden;
}

.portal-header::after,
.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -90px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}

.portal-header > div,
.hero > div,
.hero > * {
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #a7f3d0;
  padding: 8px 14px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1.4;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

.portal-header h1,
.hero h1 {
  color: white;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: -2px;
  margin: 16px 0;
  max-width: 900px;
}

.portal-header p,
.hero p {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
  max-width: 780px;
}

/* Buttons */

.btn-main,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-weight: 900;
  border-radius: 999px;
  padding: 14px 22px;
  transition: .2s ease;
}

.btn-main,
.btn-primary {
  background: white;
  color: #075985 !important;
  box-shadow: 0 12px 28px rgba(2,6,23,.14);
}

.btn-secondary {
  background: rgba(255,255,255,.10);
  color: white !important;
  border: 1px solid rgba(255,255,255,.18);
}

.btn-main:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.cta-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Grids */

.stats-grid,
.metrics,
.grid,
.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 30px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}

/* Cards */

.stat-card,
.metric,
.card,
.action-card,
.table-card,
.section,
.cta-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.stat-card,
.metric,
.card,
.section,
.cta-box {
  padding: 28px;
}

.card h3,
.action-card h3,
.section h2,
.table-card h3,
.section-header h3 {
  color: #0f172a;
  font-weight: 900;
}

.card p,
.action-card p,
.section p,
.section li,
.section-header p {
  color: #64748b;
  line-height: 1.7;
}

.action-card {
  padding: 26px;
  text-decoration: none;
  color: #0f172a !important;
  transition: .2s ease;
}

.action-card:hover {
  transform: translateY(-2px);
}

.stat-card span,
.metric span {
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.stat-card strong,
.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  color: #0f172a;
}

/* Section Headers */

.section-header {
  margin-bottom: 18px;
}

.section-header h3 {
  font-size: 26px;
  margin-bottom: 6px;
}

.section-header p {
  margin: 0;
}

/* Tables */

.table-card {
  padding: 26px;
  overflow-x: auto;
  margin-bottom: 28px;
}

.table-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.table-card th {
  text-align: left;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  padding: 12px;
}

.table-card td {
  background: white;
  padding: 15px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table-card tr td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 16px 0 0 16px;
  font-weight: 900;
}

.table-card tr td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 16px 16px 0;
}

/* Badges */

.status,
.priority-badge {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status {
  background: #e0f2fe;
  color: #075985;
}

.priority-low,
.priority-info {
  background: #dcfce7;
  color: #166534;
}

.priority-medium {
  background: #fef9c3;
  color: #854d0e;
}

.priority-high {
  background: #ffedd5;
  color: #9a3412;
}

.priority-critical {
  background: #fee2e2;
  color: #991b1b;
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 760px;
}

.form-grid textarea {
  grid-column: 1 / -1;
  min-height: 120px;
}

.action-panel {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.action-panel select,
.action-panel input,
.form-grid input,
.form-grid select,
.form-grid textarea,
.form-control,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: white;
  font-size: 13px;
}

.action-panel button,
.action-panel a,
.form-grid button,
button {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: white !important;
  border: none;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.action-panel a {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

/* Dashboard Preview */

.dashboard-preview {
  background: #08111f;
  border-radius: 28px;
  padding: 24px;
  color: white;
  box-shadow: 0 20px 50px rgba(2,6,23,.24);
}

.preview-row {
  background: rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.preview-row span {
  color: #bae6fd;
}

/* Links */

.link-box {
  background: #eff6ff;
  border-left: 4px solid #0284c7;
  padding: 14px;
  margin-top: 14px;
  border-radius: 14px;
}

.link-box a {
  color: #075985;
  text-decoration: none;
  font-weight: 900;
}

/* Toolbar */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 24px;
}

.toolbar-btn {
  background: white;
  color: #075985 !important;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
}

/* CTA */

.cta-box {
  background: linear-gradient(135deg, #0369a1, #0f766e);
  color: white;
  text-align: center;
}

.cta-box h2,
.cta-box p {
  color: white;
}

/* Mobile */

@media (max-width: 900px) {

  .portal-wrap,
  .home-wrap,
  .faq-wrap {
    padding: 0 12px;
    margin-top: 12px;
  }

  .top-tabs,
  .recovery-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .top-tabs a,
  .recovery-nav a {
    min-width: auto;
    font-size: 12px;
    padding: 11px 8px;
  }

  .portal-header,
  .hero {
    padding: 28px !important;
    border-radius: 28px !important;
  }

  .portal-header h1,
  .hero h1 {
    font-size: 40px !important;
    line-height: 1.05 !important;
    letter-spacing: -1px;
  }

  .portal-header p,
  .hero p {
    font-size: 15px !important;
  }

  .metrics,
  .stats-grid,
  .grid,
  .actions-grid,
  .split,
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .form-grid textarea {
    grid-column: auto;
  }

  .card,
  .metric,
  .stat-card,
  .section,
  .table-card,
  .cta-box,
  .action-card {
    padding: 20px !important;
    border-radius: 22px;
  }

  .table-card table {
    min-width: 760px;
  }

  .preview-row {
    flex-direction: column;
    gap: 4px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar-btn {
    text-align: center;
  }
}

@media (max-width: 480px) {

  .top-tabs,
  .recovery-nav {
    grid-template-columns: 1fr !important;
  }

  .portal-header,
  .hero {
    padding: 22px !important;
  }

  .portal-header h1,
  .hero h1 {
    font-size: 30px !important;
    line-height: 1.08;
  }

  .portal-header p,
  .hero p {
    font-size: 14px !important;
  }

  .badge {
    width: 100%;
    text-align: center;
    border-radius: 14px;
    font-size: 8px;
    padding: 8px 10px;
  }

  .btn-main,
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .cta-row,
  .footer-links {
    display: grid;
    grid-template-columns: 1fr;
  }
}