:root {
  --bg: #020712;
  --cyan: #06d9ff;
  --green: #00e0a4;
  --white: #f5fbff;
  --muted: rgba(235, 248, 255, 0.68);
  --border: rgba(6, 217, 255, 0.22);
  --border-strong: rgba(6, 217, 255, 0.48);
  --glass: rgba(4, 15, 28, 0.68);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 70% 30%, rgba(6, 217, 255, 0.16), transparent 28%),
    radial-gradient(circle at 20% 70%, rgba(0, 224, 164, 0.12), transparent 30%),
    linear-gradient(180deg, #020712 0%, #030b18 55%, #020712 100%);
}

a {
  color: inherit;
}

.portal-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.portal-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 78px;
  padding: 14px 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(2, 7, 18, 0.86), rgba(2, 7, 18, 0.26));
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(6, 217, 255, 0.22));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.brand-text span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.header-link {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 900;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(6, 217, 255, 0.075);
  box-shadow: 0 0 28px rgba(6, 217, 255, 0.14);
  cursor: pointer;
  transition: 0.25s ease;
}

.header-link:hover {
  transform: translateY(-2px);
  background: rgba(6, 217, 255, 0.14);
  box-shadow: 0 0 42px rgba(6, 217, 255, 0.28);
}

.auth-page {
  min-height: 100vh;
  padding: 112px 18px 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(520px, 100%);
  padding: clamp(26px, 5vw, 42px);
  border-radius: 30px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(6, 217, 255, 0.13), transparent 32%),
    linear-gradient(145deg, rgba(4, 15, 28, 0.86), rgba(4, 15, 28, 0.52));
  box-shadow:
    0 34px 140px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 14px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(6, 217, 255, 0.44);
  border-radius: 999px;
  background: rgba(6, 217, 255, 0.07);
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.auth-card p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field label {
  color: rgba(245, 251, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 850;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--white);
  border-radius: 14px;
  border: 1px solid rgba(6, 217, 255, 0.22);
  outline: none;
  background: rgba(2, 7, 18, 0.46);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.form-field input:focus {
  border-color: var(--border-strong);
  background: rgba(2, 7, 18, 0.62);
  box-shadow: 0 0 0 4px rgba(6, 217, 255, 0.08);
}

.form-button {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  border: none;
  border-radius: 14px;
  color: #00131c;
  font-size: 0.95rem;
  font-weight: 950;
  cursor: pointer;
  background: linear-gradient(135deg, #20e8ff 0%, #0b8dff 100%);
  box-shadow:
    0 16px 52px rgba(6, 217, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition: 0.26s ease;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 78px rgba(6, 217, 255, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.form-button:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
}

.auth-switch {
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 0.94rem;
}

.auth-switch a {
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.form-message {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-message.error {
  color: #ffd9d9;
  border: 1px solid rgba(255, 90, 90, 0.32);
  background: rgba(255, 70, 70, 0.12);
}

.form-message.success {
  color: #d7fff1;
  border: 1px solid rgba(0, 224, 164, 0.32);
  background: rgba(0, 224, 164, 0.1);
}

/* =========================
   DASHBOARD
========================= */

.dashboard-page {
  min-height: 100vh;
  padding: 112px 5vw 60px;
}

.dashboard-container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.dashboard-hero {
  margin-bottom: 28px;
  padding: clamp(26px, 5vw, 42px);
  border-radius: 30px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(6, 217, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(4, 15, 28, 0.86), rgba(4, 15, 28, 0.48));
  box-shadow: 0 34px 140px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.dashboard-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.dashboard-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}

.panel {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(6, 217, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(4, 15, 28, 0.72), rgba(4, 15, 28, 0.36));
  backdrop-filter: blur(20px);
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-item {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(6, 217, 255, 0.12);
  background: rgba(2, 7, 18, 0.34);
}

.info-item span {
  display: block;
  margin-bottom: 5px;
  color: rgba(235, 248, 255, 0.52);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-item strong {
  color: var(--white);
  font-size: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  min-height: 170px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(6, 217, 255, 0.18);
  background: rgba(2, 7, 18, 0.34);
}

.product-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -60px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(0, 224, 164, 0.14);
}

.product-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(6, 217, 255, 0.28);
  background: rgba(6, 217, 255, 0.06);
}

.product-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.product-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.logout-button {
  border: none;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 880px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .portal-header {
    height: 72px;
    padding: 12px 18px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-text span {
    display: none;
  }

  .header-link {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .auth-page {
    padding: 96px 14px 36px;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .dashboard-page {
    padding: 96px 18px 42px;
  }

  .dashboard-hero,
  .panel {
    padding: 22px;
    border-radius: 24px;
  }
}