﻿/* MedLifeMonitor premium UI refresh */

:root {
  --mlm-ink: #102a3a;
  --mlm-ink-soft: #456170;
  --mlm-muted: #647784;
  --mlm-teal: #087f8c;
  --mlm-teal-dark: #075c6d;
  --mlm-teal-soft: #dff5f4;
  --mlm-aqua: #f4fbfb;
  --mlm-mist: #eef8f7;
  --mlm-card: rgba(255, 255, 255, 0.82);
  --mlm-border: rgba(16, 42, 58, 0.12);
  --mlm-gold: #c58b3d;
  --mlm-shadow: 0 18px 50px rgba(12, 44, 62, 0.12);
  --mlm-shadow-lg: 0 30px 80px rgba(12, 44, 62, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(8, 127, 140, 0.13), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(197, 139, 61, 0.13), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0%, #eff8f7 42%, #f9fbf8 100%) !important;
  color: var(--mlm-ink) !important;
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 42, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 58, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 74%);
}

::selection {
  background: rgba(8, 127, 140, 0.18);
  color: var(--mlm-ink);
}

.font-display {
  font-family: "Fraunces", Georgia, serif !important;
}

.font-mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

.text-ink {
  color: var(--mlm-ink) !important;
}

.text-wine {
  color: var(--mlm-teal) !important;
}

.text-copper {
  color: var(--mlm-gold) !important;
}

.text-olive {
  color: #28765f !important;
}

.text-porcelain {
  color: #f7fffd !important;
}

.bg-porcelain,
.bg-porcelain\/95 {
  background-color: rgba(248, 252, 252, 0.9) !important;
}

.bg-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(232, 248, 247, 0.72)),
    var(--mlm-aqua) !important;
}

.bg-porcelaindark\/40,
.bg-stone\/40 {
  background: linear-gradient(135deg, rgba(223, 245, 244, 0.84), rgba(255, 255, 255, 0.62)) !important;
}

.bg-wine {
  background: linear-gradient(135deg, var(--mlm-teal), var(--mlm-teal-dark)) !important;
  color: #ffffff !important;
}

.hover\:bg-wine-dark:hover,
.hover\:bg-wine\/90:hover {
  background: linear-gradient(135deg, #076c78, #064c5c) !important;
}

.bg-copper {
  background: linear-gradient(135deg, #f5d391, var(--mlm-gold)) !important;
}

.hover\:bg-copper\/90:hover {
  background: linear-gradient(135deg, #eec16f, #b9782c) !important;
}

.bg-ink {
  background:
    radial-gradient(circle at 12% 0%, rgba(89, 214, 205, 0.22), transparent 22rem),
    linear-gradient(135deg, #0b2d3d 0%, #0f4858 56%, #082431 100%) !important;
}

.hairline,
.border,
.border-t,
.border-b,
.border-y {
  border-color: var(--mlm-border) !important;
}

.border-wine,
.focus\:border-wine:focus {
  border-color: var(--mlm-teal) !important;
}

.card-shadow {
  box-shadow: var(--mlm-shadow) !important;
}

.card-shadow-lg {
  box-shadow: var(--mlm-shadow-lg) !important;
}

.max-w-7xl {
  max-width: 1180px !important;
}

header.sticky {
  top: 0 !important;
  border-bottom: 1px solid rgba(16, 42, 58, 0.08) !important;
  box-shadow: 0 16px 40px rgba(12, 44, 62, 0.08);
}

header.sticky > div:first-child {
  min-height: 78px;
}

header a {
  text-decoration: none;
}

header nav a,
#mobileMenu a {
  position: relative;
  font-weight: 600;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  border-radius: 999px;
  background: var(--mlm-teal);
  transition: transform 180ms ease;
}

header nav a:hover::after,
header nav a.text-wine::after {
  transform: scaleX(1);
}

header svg circle,
header svg path,
footer svg circle,
footer svg path,
main svg circle,
main svg path,
section svg circle,
section svg path,
section svg rect {
  stroke: currentColor;
}

header a svg,
section svg {
  color: var(--mlm-teal);
}

footer svg {
  color: var(--mlm-gold);
}

.hero-section{
    margin-top: 40px;
}

a,
button,
input,
textarea {
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease !important;
}

a.bg-wine,
a.bg-copper,
button.bg-wine,
button.bg-copper,
button[type="submit"] {
  box-shadow: 0 12px 28px rgba(8, 127, 140, 0.22);
}

a.bg-wine:hover,
a.bg-copper:hover,
button.bg-wine:hover,
button.bg-copper:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(8, 127, 140, 0.28);
}

a.border:hover,
button.border:hover {
  background: rgba(8, 127, 140, 0.08) !important;
  border-color: rgba(8, 127, 140, 0.42) !important;
  color: var(--mlm-teal-dark) !important;
}

section {
  position: relative;
}

section[class*="py-14"],
section[class*="py-16"],
section[class*="py-20"] {
  padding-top: clamp(4.5rem, 7vw, 7rem) !important;
  padding-bottom: clamp(4.5rem, 7vw, 7rem) !important;
}

section:first-of-type {
  padding-top: clamp(4rem, 7vw, 6.5rem) !important;
}

section.bg-card,
section.bg-stone\/40,
section.bg-ink {
  overflow: hidden;
}

section.bg-card::before,
section.bg-stone\/40::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 24%, rgba(8, 127, 140, 0.08), transparent 22rem),
    radial-gradient(circle at 82% 36%, rgba(197, 139, 61, 0.1), transparent 24rem);
}

section.bg-card > *,
section.bg-stone\/40 > *,
section.bg-ink > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.75rem, 6vw, 5.35rem) !important;
  line-height: 0.96 !important;
}

h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.45rem) !important;
  line-height: 1.03 !important;
}

h3,
.font-display.text-lg {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem) !important;
  line-height: 1.2 !important;
}

p {
  line-height: 1.78;
}

p.text-lg {
  font-size: clamp(1.05rem, 1.3vw, 1.22rem) !important;
}

.font-mono.text-xs.uppercase,
p.font-mono.text-xs {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(8, 127, 140, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--mlm-teal-dark) !important;
  letter-spacing: 0.16em !important;
}

.bg-ink .font-mono.text-xs.uppercase,
.bg-ink p.font-mono.text-xs {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #bceee8 !important;
}

div[class*="rounded-"][class*="overflow-hidden"]:has(img) {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--mlm-shadow-lg) !important;
}

div[class*="rounded-"][class*="overflow-hidden"]:has(img)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 127, 140, 0) 48%, rgba(8, 127, 140, 0.16)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%);
}

img {
  filter: saturate(0.95) contrast(1.02);
}

div[class*="rounded-"][class*="overflow-hidden"]:has(img) img {
  transform: scale(1.01);
}

div[class*="rounded-"][class*="border"],
[data-vital-item],
[data-diagnostic-item],
form input,
form textarea,
table {
  backdrop-filter: blur(18px);
}

div[class*="rounded-"][class*="border"],
[data-vital-item],
[data-diagnostic-item] {
  background: var(--mlm-card) !important;
  border: 1px solid rgba(16, 42, 58, 0.1) !important;
  box-shadow: 0 14px 40px rgba(12, 44, 62, 0.08);
}

div[class*="rounded-"][class*="border"]:hover,
[data-vital-item]:hover,
[data-diagnostic-item]:hover {
  transform: translateY(-4px);
  border-color: rgba(8, 127, 140, 0.24) !important;
  box-shadow: 0 22px 52px rgba(12, 44, 62, 0.13);
}

.bg-ink div[class*="rounded-"][class*="border"] {
  background:
    linear-gradient(145deg, rgba(17, 90, 105, 0.9), rgba(8, 52, 67, 0.82)),
    rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(188, 238, 232, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 48px rgba(0, 0, 0, 0.18);
}

.bg-ink div[class*="rounded-"][class*="border"]:hover {
  background:
    linear-gradient(145deg, rgba(22, 112, 128, 0.94), rgba(9, 62, 78, 0.88)),
    rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(188, 238, 232, 0.36) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 28px 58px rgba(0, 0, 0, 0.22);
}

.bg-ink div[class*="rounded-"][class*="border"] h3,
.bg-ink div[class*="rounded-"][class*="border"] .font-display {
  color: #f7fffd !important;
}

.bg-ink div[class*="rounded-"][class*="border"] p {
  color: rgba(231, 252, 249, 0.76) !important;
}

.bg-ink div[class*="rounded-"][class*="border"] a {
  color: #bceee8 !important;
}

section svg:not(.absolute) {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.48rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(8, 127, 140, 0.11), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 0 0 1px rgba(8, 127, 140, 0.08);
}

section.bg-ink svg:not(.absolute) {
  color: #bceee8;
  background: linear-gradient(135deg, rgba(188, 238, 232, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(188, 238, 232, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.font-mono.text-xl,
.font-mono.text-2xl {
  color: var(--mlm-teal-dark) !important;
  font-weight: 600;
}

.bg-ink .font-mono.text-xl,
.bg-ink .font-mono.text-2xl,
.bg-ink .font-mono.text-copper {
  color: #bceee8 !important;
}

table {
  background: rgba(255, 255, 255, 0.74);
  border-collapse: separate;
  border-spacing: 0;
}

thead,
tbody.bg-card {
  background: rgba(244, 251, 251, 0.88) !important;
}

th {
  color: var(--mlm-muted) !important;
  font-weight: 700 !important;
}

td,
th {
  border-color: rgba(16, 42, 58, 0.08) !important;
}

tr:hover td {
  background: rgba(8, 127, 140, 0.045);
}

input,
textarea {
  background: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid rgba(16, 42, 58, 0.13) !important;
  color: var(--mlm-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input::placeholder,
textarea::placeholder {
  color: rgba(69, 97, 112, 0.58) !important;
}

input:focus,
textarea:focus {
  border-color: var(--mlm-teal) !important;
  box-shadow: 0 0 0 4px rgba(8, 127, 140, 0.12);
}

.bg-ink input,
.bg-ink textarea {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.17) !important;
  color: #f7fffd !important;
}

.bg-ink input::placeholder,
.bg-ink textarea::placeholder {
  color: rgba(247, 255, 253, 0.48) !important;
}

.bg-ink input:focus,
.bg-ink textarea:focus {
  border-color: rgba(188, 238, 232, 0.78) !important;
  box-shadow: 0 0 0 4px rgba(188, 238, 232, 0.13);
}

footer {
  background:
    radial-gradient(circle at top left, rgba(89, 214, 205, 0.18), transparent 25rem),
    linear-gradient(135deg, #082431, #0b2f40) !important;
}

footer a {
  transition: color 180ms ease, padding-left 180ms ease !important;
}

footer a:hover {
  padding-left: 0.2rem;
}

#mobileMenu {
  border-bottom: 1px solid rgba(16, 42, 58, 0.08);
  box-shadow: 0 22px 44px rgba(12, 44, 62, 0.12);
}

@media (max-width: 1024px) {
  header.sticky > div:first-child {
    min-height: 72px;
  }

  nav {
    gap: 1.6rem !important;
  }
}

@media (max-width: 768px) {
  body::before {
    background-size: 44px 44px;
  }

  section[class*="py-14"],
  section[class*="py-16"],
  section[class*="py-20"] {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.6rem) !important;
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.75rem) !important;
  }

  .grid {
    row-gap: 2rem;
  }

  table {
    min-width: 520px;
  }

  div[class*="overflow-hidden"]:has(table) {
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .px-6 {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }

  section a.bg-wine,
  section a.border,
  section button.bg-wine,
  section button.border,
  form button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
}
