/* ======================================================
   MediBuddy V2 — Public Website and Registration
   ====================================================== */

:root {
  --primary: #087d71;
  --primary-dark: #075c54;
  --primary-soft: #dff7f3;
  --secondary: #0f3f69;
  --accent: #22c991;
  --surface: #ffffff;
  --background: #edfafa;
  --text: #173a3a;
  --muted: #667b7b;
  --border: #cfe8e5;
  --danger: #c83232;
  --success: #087d52;
  --shadow: 0 22px 55px rgba(7, 92, 84, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(34, 201, 145, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at 90% 90%,
      rgba(15, 63, 105, 0.13),
      transparent 30%
    ),
    linear-gradient(135deg, #edfafa 0%, #f7fbff 100%);
}

/* Public header */

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 32px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.logo {
  height: 46px;
  max-width: 180px;
  object-fit: contain;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

nav a {
  padding: 10px 14px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  border-radius: 20px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

nav a:hover {
  background: var(--primary-soft);
  transform: translateY(-2px);
}

/* Existing public homepage */

.hero {
  padding: 80px;
}

.badge {
  display: inline-flex;
  padding: 10px 18px;
  color: var(--primary);
  font-weight: 700;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(7, 92, 84, 0.08);
}

h1 {
  color: var(--primary-dark);
}

/* Registration layout */

.registration-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 34px;
}

.registration-page::before,
.registration-page::after {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  content: "";
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.55;
}

.registration-page::before {
  top: -180px;
  left: -120px;
  background: rgba(34, 201, 145, 0.2);
}

.registration-page::after {
  right: -160px;
  bottom: -190px;
  background: rgba(15, 63, 105, 0.17);
}

.registration-shell {
  width: min(1240px, 100%);
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 28px;
  align-items: stretch;
  margin: 0 auto;
}

/* Animated MediBuddy scene */

.software-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 42px;
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      rgba(7, 92, 84, 0.97),
      rgba(15, 63, 105, 0.96)
    );
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.software-showcase::before {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  content: "";
  background: rgba(34, 201, 145, 0.24);
  border-radius: 50%;
  animation: orbFloat 7s ease-in-out infinite;
}

.software-showcase::after {
  position: absolute;
  bottom: -120px;
  left: -70px;
  width: 310px;
  height: 310px;
  content: "";
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  animation: orbFloat 8s ease-in-out infinite reverse;
}

.showcase-content {
  position: relative;
  z-index: 2;
}

.showcase-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #e7fff8;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
}

.showcase-title {
  max-width: 650px;
  margin: 0;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1.05;
  color: #ffffff;
}

.showcase-description {
  max-width: 650px;
  margin: 18px 0 28px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.81);
}

/* Animated dashboard mock-up */

.software-window {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  padding: 15px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 22px;
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.2);
  animation: dashboardFloat 5s ease-in-out infinite;
}

.window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 14px;
  border-bottom: 1px solid #e5efee;
}

.window-brand {
  font-weight: 800;
  color: var(--primary-dark);
}

.window-controls {
  display: flex;
  gap: 6px;
}

.window-controls span {
  width: 9px;
  height: 9px;
  background: #cbd8d7;
  border-radius: 50%;
}

.window-layout {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 13px;
  padding-top: 14px;
}

.demo-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  background: #f0f8f7;
  border-radius: 13px;
}

.demo-sidebar span {
  height: 10px;
  background: #cfe7e3;
  border-radius: 8px;
}

.demo-sidebar span:first-child {
  width: 80%;
  background: var(--primary);
}

.demo-content {
  display: grid;
  gap: 12px;
}

.demo-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.demo-stat {
  min-height: 66px;
  padding: 10px;
  background: #f5faf9;
  border: 1px solid #e2efed;
  border-radius: 12px;
}

.demo-stat strong,
.demo-stat span {
  display: block;
}

.demo-stat strong {
  margin-top: 8px;
  color: var(--primary-dark);
}

.demo-stat span {
  font-size: 10px;
  color: var(--muted);
}

.demo-chart {
  position: relative;
  min-height: 124px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 24px,
      #e8f1f0 25px
    ),
    #fbfdfd;
  border: 1px solid #e2efed;
  border-radius: 12px;
}

.chart-line {
  position: absolute;
  right: 10%;
  bottom: 28px;
  left: 8%;
  height: 88px;
}

.chart-line span {
  position: absolute;
  bottom: 0;
  width: 11%;
  background: linear-gradient(to top, var(--primary), var(--accent));
  border-radius: 8px 8px 3px 3px;
  animation: chartGrow 1.4s ease both;
}

.chart-line span:nth-child(1) {
  left: 0;
  height: 38%;
}

.chart-line span:nth-child(2) {
  left: 18%;
  height: 60%;
  animation-delay: 0.12s;
}

.chart-line span:nth-child(3) {
  left: 36%;
  height: 47%;
  animation-delay: 0.24s;
}

.chart-line span:nth-child(4) {
  left: 54%;
  height: 78%;
  animation-delay: 0.36s;
}

.chart-line span:nth-child(5) {
  left: 72%;
  height: 90%;
  animation-delay: 0.48s;
}

.chart-line span:nth-child(6) {
  left: 90%;
  height: 68%;
  animation-delay: 0.6s;
}

/* Floating feature cards */

.feature-float {
  position: absolute;
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 150px;
  padding: 11px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16);
}

.feature-float .feature-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  font-size: 18px;
  background: var(--primary-soft);
  border-radius: 10px;
}

.feature-float strong,
.feature-float small {
  display: block;
}

.feature-float strong {
  font-size: 13px;
  color: var(--primary-dark);
}

.feature-float small {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.feature-pos {
  top: 38%;
  right: 16px;
  animation: floatingCard 4.2s ease-in-out infinite;
}

.feature-expiry {
  bottom: 26px;
  left: 16px;
  animation: floatingCard 4.7s ease-in-out infinite reverse;
}

.feature-fbr {
  right: 24px;
  bottom: 62px;
  animation: floatingCard 5.1s ease-in-out infinite;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 18px;
}

.feature-chip {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #eafff8;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.feature-chip:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

/* Registration form */

.page-card {
  margin: 0;
  padding: 38px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(207, 232, 229, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.registration-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.registration-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  color: var(--primary-dark);
}

.registration-intro {
  margin: 12px 0 26px;
  line-height: 1.55;
  color: var(--muted);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #294f4c;
}

.form-group input,
.form-group select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: #fbfefe;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(8, 125, 113, 0.11);
  transform: translateY(-1px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.trial-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-bottom: 16px;
}

.trial-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.trial-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.trial-card {
  min-height: 118px;
  padding: 15px;
  background: #f8fcfb;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.trial-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--primary-dark);
}

.trial-card small {
  line-height: 1.45;
  color: var(--muted);
}

.trial-option input:checked + .trial-card {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 125, 113, 0.11);
  transform: translateY(-2px);
}

.checkbox-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 7px 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.checkbox-row input {
  margin-top: 2px;
  accent-color: var(--primary);
}

#registerButton {
  width: 100%;
  min-height: 49px;
  padding: 12px 18px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--secondary)
    );
  border: 0;
  border-radius: 12px;
  box-shadow: 0 13px 26px rgba(8, 125, 113, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

#registerButton:hover {
  box-shadow: 0 17px 30px rgba(8, 125, 113, 0.27);
  transform: translateY(-2px);
}

#registerButton:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

#registerMessage {
  min-height: 20px;
  margin: 14px 0 0;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

#registerMessage.success {
  padding: 10px 12px;
  color: var(--success);
  background: #ddf7ea;
  border-radius: 9px;
}

#registerMessage.error {
  padding: 10px 12px;
  color: var(--danger);
  background: #ffebeb;
  border-radius: 9px;
}

.form-footer {
  margin: 18px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.form-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* Animations */

@keyframes dashboardFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-0.35deg);
  }

  50% {
    transform: translateY(-9px) rotate(0.35deg);
  }
}

@keyframes floatingCard {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-15px, 18px) scale(1.07);
  }
}

@keyframes chartGrow {
  from {
    height: 0;
  }
}

/* Responsive */

@media (max-width: 1050px) {
  .registration-shell {
    grid-template-columns: 1fr;
  }

  .software-showcase {
    min-height: 640px;
  }
}

@media (max-width: 680px) {
  .registration-page {
    padding: 14px;
  }

  .software-showcase,
  .page-card {
    padding: 24px;
    border-radius: 20px;
  }

  .software-showcase {
    min-height: 620px;
  }

  .window-layout {
    grid-template-columns: 76px 1fr;
  }

  .demo-stat-grid,
  .feature-strip,
  .form-row,
  .trial-options {
    grid-template-columns: 1fr;
  }

  .feature-pos,
  .feature-expiry,
  .feature-fbr {
    position: static;
    margin-top: 10px;
  }

  .feature-float {
    width: 100%;
  }

  .showcase-title {
    font-size: 35px;
  }
}
/* Compact registration layout */

.registration-page {
  padding: 14px;
}

.registration-shell {
  width: min(1180px, 100%);
  min-height: calc(100vh - 28px);
  grid-template-columns: 1fr 420px;
  gap: 16px;
}

.software-showcase {
  padding: 24px;
}

.showcase-title {
  font-size: 44px;
}

.showcase-description {
  margin: 10px 0 16px;
  font-size: 13px;
}

.software-window {
  min-height: 260px;
}

.page-card {
  padding: 22px;
}

.registration-card h1 {
  font-size: 32px;
}

.registration-intro {
  margin: 6px 0 12px;
}

.form-group {
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  min-height: 38px;
  padding: 8px 10px;
}

.trial-options {
  gap: 8px;
  margin-bottom: 8px;
}

.trial-card {
  min-height: 68px;
  padding: 9px;
}

.trial-card small {
  font-size: 9px;
}

#registerButton {
  min-height: 40px;
}

.checkbox-row {
  margin: 4px 0 9px;
}

@media (max-width: 1000px) {
  .registration-shell {
    grid-template-columns: 1fr;
  }
}