/* =========================================
   RESET
========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #031217;
  --panel: #071e26;
  --panel-light: #0a2932;

  --text: #edf8f6;
  --muted: #718d91;

  --cyan: #75ead9;
  --cyan-dark: #2a9f9a;

  --green: #69e29a;
  --yellow: #f0c85b;
  --red: #f07878;

  --border: rgba(255, 255, 255, 0.085);

  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;
}

/* =========================================
   BASE
========================================= */

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  color: var(--text);
  background:
    radial-gradient(
      circle at 80% 10%,
      rgba(57, 149, 153, 0.1),
      transparent 28%
    ),
    var(--background);

  font-family: var(--sans);

  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* =========================================
   APP
========================================= */

.lab-app {
  width: min(1400px, 100%);

  margin: auto;

  padding: 0 5vw 40px;
}

/* =========================================
   HEADER
========================================= */

.header {
  height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--text);

  text-decoration: none;

  font-size: 13px;
  font-weight: 700;

  letter-spacing: 0.18em;
}

.brand > span:last-child {
  color: var(--cyan);
}

.brand-mark {
  width: 28px;
  height: 28px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(117, 234, 217, 0.3);
  border-radius: 50%;

  color: var(--cyan);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--muted);

  font-size: 8px;
  letter-spacing: 0.17em;
}

.live-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--green);

  box-shadow: 0 0 9px var(--green);

  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.sample-id {
  color: var(--muted);

  font-size: 8px;
  letter-spacing: 0.15em;
}

.sample-id strong {
  color: var(--text);
  font-weight: 500;
}

/* =========================================
   HERO
========================================= */

.hero {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 310px;

  padding: 60px 0;
}

.eyebrow,
.panel-label {
  color: var(--cyan);

  font-size: 8px;
  font-weight: 600;

  letter-spacing: 0.2em;
}

.hero h1 {
  margin-top: 13px;

  font-family: var(--serif);

  font-size: clamp(3rem, 6vw, 5.7rem);

  font-weight: 500;
  line-height: 0.96;

  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--cyan);

  font-weight: 500;
}

.hero-description {
  max-width: 480px;

  margin-top: 23px;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.8;
}

/* =========================================
   HERO DECORATION
========================================= */

.hero-decoration {
  position: relative;

  width: 230px;
  height: 230px;

  display: grid;
  place-items: center;

  margin-right: 5%;
}

.ring {
  position: absolute;

  border: 1px solid rgba(117, 234, 217, 0.12);

  border-radius: 50%;

  animation: rotateRing 20s linear infinite;
}

.ring-1 {
  width: 100%;
  height: 100%;
}

.ring-2 {
  width: 72%;
  height: 72%;

  border-style: dashed;

  animation-duration: 13s;
  animation-direction: reverse;
}

.ring-3 {
  width: 44%;
  height: 44%;

  border-color: rgba(117, 234, 217, 0.25);
}

.center-drop {
  position: relative;

  width: 65px;
  height: 65px;

  display: grid;
  place-items: center;

  color: var(--cyan);

  background: rgba(117, 234, 217, 0.05);

  border: 1px solid rgba(117, 234, 217, 0.3);

  border-radius: 50%;

  font-family: var(--serif);
  font-size: 20px;

  box-shadow: 0 0 50px rgba(117, 234, 217, 0.08);
}

@keyframes rotateRing {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================
   DASHBOARD
========================================= */

.dashboard {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 20px;
}

/* =========================================
   PANELS
========================================= */

.panel {
  background: linear-gradient(
    145deg,
    rgba(10, 41, 50, 0.82),
    rgba(5, 25, 32, 0.9)
  );

  border: 1px solid var(--border);

  border-radius: 7px;
}

.input-panel {
  padding: 30px;
}

.results-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.health-panel,
.parameter-panel {
  padding: 30px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  margin-bottom: 30px;
}

.panel-heading h2,
.section-heading h2 {
  margin-top: 7px;

  font-family: var(--serif);

  font-size: 28px;
  font-weight: 500;
}

.unit-badge {
  padding: 6px 9px;

  color: var(--muted);

  border: 1px solid var(--border);
  border-radius: 3px;

  font-size: 7px;
  letter-spacing: 0.13em;
}

/* =========================================
   FORM FIELDS
========================================= */

.field {
  margin-bottom: 25px;
}

.field-top {
  display: flex;
  justify-content: space-between;

  margin-bottom: 9px;
}

.field-top label {
  color: var(--text);

  font-size: 8px;
  font-weight: 600;

  letter-spacing: 0.14em;
}

.ideal {
  color: var(--muted);

  font-size: 7px;

  letter-spacing: 0.08em;
}

.input-wrap {
  position: relative;

  display: flex;
  align-items: center;

  background: rgba(0, 0, 0, 0.12);

  border: 1px solid var(--border);
  border-radius: 4px;

  transition: 0.25s ease;
}

.input-wrap:focus-within {
  border-color: rgba(117, 234, 217, 0.5);

  box-shadow: 0 0 0 3px rgba(117, 234, 217, 0.04);
}

.input-wrap input {
  width: 100%;

  padding: 14px 45px 14px 15px;

  color: var(--text);

  background: transparent;

  border: 0;

  outline: none;

  font-size: 13px;
}

.input-wrap > span {
  position: absolute;

  right: 15px;

  color: var(--muted);

  font-size: 9px;
  letter-spacing: 0.08em;
}

.parameter-line {
  height: 2px;

  margin-top: 7px;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.045);
}

.line-fill {
  display: block;

  height: 100%;

  width: 45%;

  background: var(--cyan);

  transition:
    width 0.5s ease,
    background 0.5s ease;
}

/* =========================================
   ANALYZE BUTTON
========================================= */

.analyze-button {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 7px;
  padding: 15px 17px;

  color: #031217;
  background: var(--cyan);

  border: 0;
  border-radius: 4px;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 0.13em;

  transition: 0.3s ease;
}

.analyze-button strong {
  font-size: 16px;
  font-weight: 400;
}

.analyze-button:hover {
  background: #a3fff3;

  transform: translateY(-1px);

  box-shadow: 0 8px 25px rgba(117, 234, 217, 0.12);
}

/* =========================================
   STATUS
========================================= */

.status-badge {
  padding: 6px 9px;

  border-radius: 3px;

  font-size: 7px;
  font-weight: 600;

  letter-spacing: 0.1em;

  transition: 0.3s ease;
}

.status-badge.excellent {
  color: var(--green);
  background: rgba(105, 226, 154, 0.08);
  border: 1px solid rgba(105, 226, 154, 0.18);
}

.status-badge.warning {
  color: var(--yellow);
  background: rgba(240, 200, 91, 0.08);
  border: 1px solid rgba(240, 200, 91, 0.18);
}

.status-badge.critical {
  color: var(--red);
  background: rgba(240, 120, 120, 0.08);
  border: 1px solid rgba(240, 120, 120, 0.18);
}

/* =========================================
   SCORE
========================================= */

.score-area {
  display: flex;
  align-items: center;
  gap: 30px;
}

.score-ring {
  position: relative;

  flex: 0 0 145px;

  width: 145px;
  height: 145px;
}

.score-ring svg {
  width: 100%;
  height: 100%;

  transform: rotate(-90deg);
}

.score-track,
.score-progress {
  fill: none;

  stroke-width: 6;
}

.score-track {
  stroke: rgba(255, 255, 255, 0.05);
}

.score-progress {
  stroke: var(--cyan);

  stroke-linecap: round;

  stroke-dasharray: 326.7;

  stroke-dashoffset: 13.1;

  transition:
    stroke-dashoffset 0.8s ease,
    stroke 0.5s ease;
}

.score-number {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-direction: column;
}

.score-number strong {
  font-family: var(--serif);

  font-size: 38px;
  font-weight: 500;
}

.score-number span {
  margin-top: -3px;

  color: var(--muted);

  font-size: 8px;
}

.score-copy {
  min-width: 0;
}

.score-label {
  color: var(--muted);

  font-size: 7px;
  letter-spacing: 0.15em;
}

.score-copy h3 {
  margin-top: 9px;

  font-family: var(--serif);

  font-size: 23px;
  font-weight: 500;
}

.score-copy p {
  margin-top: 10px;

  color: var(--muted);

  font-size: 9px;
  line-height: 1.7;
}

/* =========================================
   PARAMETER RESULTS
========================================= */

.parameter-results {
  display: flex;
  flex-direction: column;
}

.result-row {
  display: grid;

  grid-template-columns: 38px 1fr auto;

  align-items: center;

  gap: 13px;

  padding: 12px 0;

  border-top: 1px solid var(--border);
}

.result-row:first-child {
  border-top: 0;
}

.result-icon {
  width: 35px;
  height: 35px;

  display: grid;
  place-items: center;

  color: var(--cyan);

  background: rgba(117, 234, 217, 0.05);

  border: 1px solid rgba(117, 234, 217, 0.1);

  border-radius: 4px;

  font-size: 8px;
  font-weight: 600;
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-info strong {
  font-size: 9px;
  font-weight: 500;
}

.result-info span {
  color: var(--muted);

  font-size: 7px;
}

.result-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-value > strong {
  font-size: 10px;
  font-weight: 500;
}

.result-status {
  min-width: 37px;

  padding: 4px 5px;

  text-align: center;

  border-radius: 3px;

  font-size: 6px;
  font-weight: 600;

  letter-spacing: 0.08em;
}

.result-status.good {
  color: var(--green);
  background: rgba(105, 226, 154, 0.08);
}

.result-status.warning {
  color: var(--yellow);
  background: rgba(240, 200, 91, 0.08);
}

.result-status.critical {
  color: var(--red);
  background: rgba(240, 120, 120, 0.08);
}

/* =========================================
   RECOMMENDATIONS
========================================= */

.recommendations-section {
  margin-top: 55px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-bottom: 20px;
}

.section-heading > span {
  color: var(--muted);

  font-size: 7px;
  letter-spacing: 0.14em;
}

.recommendations {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 15px;
}

.recommendation-card {
  display: flex;
  gap: 15px;

  min-height: 145px;

  padding: 22px;

  background: linear-gradient(
    145deg,
    rgba(9, 38, 47, 0.8),
    rgba(4, 23, 30, 0.9)
  );

  border: 1px solid var(--border);
  border-radius: 6px;

  transition: 0.3s ease;
}

.recommendation-card:hover {
  border-color: rgba(117, 234, 217, 0.2);

  transform: translateY(-2px);
}

.recommendation-icon {
  flex: 0 0 31px;

  width: 31px;
  height: 31px;

  display: grid;
  place-items: center;

  color: var(--cyan);

  background: rgba(117, 234, 217, 0.07);

  border: 1px solid rgba(117, 234, 217, 0.13);

  border-radius: 50%;

  font-size: 12px;
}

.recommendation-card > div:last-child {
  min-width: 0;
}

.recommendation-card span {
  color: var(--cyan);

  font-size: 7px;
  letter-spacing: 0.15em;
}

.recommendation-card h3 {
  margin-top: 7px;

  font-family: var(--serif);

  font-size: 17px;
  font-weight: 500;
}

.recommendation-card p {
  margin-top: 7px;

  color: var(--muted);

  font-size: 8px;
  line-height: 1.7;
}

.good-card {
  border-color: rgba(105, 226, 154, 0.15);
}

.good-card .recommendation-icon {
  color: var(--green);
}

/* =========================================
   FOOTER
========================================= */

.footer {
  display: flex;
  justify-content: space-between;

  margin-top: 50px;
  padding-top: 22px;

  color: rgba(255, 255, 255, 0.2);

  border-top: 1px solid var(--border);

  font-size: 7px;

  letter-spacing: 0.15em;
}

/* =========================================
   TOAST
========================================= */

.toast {
  position: fixed;

  left: 50%;
  bottom: 30px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 18px;

  color: var(--text);

  background: rgba(4, 22, 28, 0.94);

  border: 1px solid rgba(117, 234, 217, 0.2);

  border-radius: 50px;

  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);

  transform: translate(-50%, 20px);

  opacity: 0;
  visibility: hidden;

  transition: 0.35s ease;

  z-index: 100;

  font-size: 9px;
}

.toast.show {
  transform: translate(-50%, 0);

  opacity: 1;
  visibility: visible;
}

.toast span {
  color: var(--cyan);
}

/* =========================================
   RESPONSIVE
========================================= */

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

  .hero-decoration {
    width: 170px;
    height: 170px;
  }

  .recommendations {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .lab-app {
    padding: 0 5vw 30px;
  }

  .header {
    height: 70px;
  }

  .header-center,
  .sample-id {
    display: none;
  }

  .hero {
    min-height: auto;

    padding: 55px 0;
  }

  .hero-decoration {
    display: none;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .input-panel,
  .health-panel,
  .parameter-panel {
    padding: 22px;
  }

  .panel-heading h2 {
    font-size: 23px;
  }

  .score-area {
    flex-direction: column;
    align-items: flex-start;
  }

  .score-ring {
    margin: auto;
  }

  .score-copy {
    text-align: center;
  }

  .result-row {
    grid-template-columns: 35px 1fr;
  }

  .result-value {
    grid-column: 2;

    margin-top: -5px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
  }
}
