/* HospitalCare360 — hospital portal */
:root {
  --ink: #0b1f24;
  --ink-soft: #1a3a42;
  --teal: #0d7377;
  --teal-deep: #095456;
  --mint: #14a3a8;
  --foam: #e8f6f6;
  --sand: #f3efe6;
  --coral: #c45c3e;
  --gold: #c4a35a;
  --white: #ffffff;
  --muted: #5a7378;
  --line: rgba(13, 115, 119, 0.14);
  --shadow: 0 24px 60px rgba(11, 31, 36, 0.18);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: 1.25rem 0;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--mint), var(--teal-deep));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__sub {
  font-size: 0.68rem;
  opacity: 0.75;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(196, 92, 62, 0.35);
}

.btn--primary:hover {
  background: #b04f33;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn--solid {
  background: var(--teal);
  color: var(--white);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(9, 40, 45, 0.92) 8%, rgba(13, 115, 119, 0.55) 48%, rgba(11, 31, 36, 0.78) 100%),
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(20, 163, 168, 0.45), transparent 55%),
    linear-gradient(160deg, #0b2c32 0%, #164e54 45%, #0d3a3e 100%);
}

.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.5px);
  background-size: 42px 42px, 28px 28px;
  animation: drift 28s linear infinite;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 163, 90, 0.28), transparent 70%);
  right: -80px;
  top: 10%;
  filter: blur(10px);
  animation: pulse 6s ease-in-out infinite;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 8rem 0 5.5rem;
  max-width: 640px;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.15s;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 450;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  animation: rise 0.9s ease forwards 0.35s;
}

.hero__lead {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.5s;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.65s;
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
  z-index: 2;
}

/* —— Roles strip —— */
.roles {
  padding: 4.5rem 0 5rem;
  background: var(--sand);
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.role-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
}

.role-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.3s ease;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.role-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--foam);
  color: var(--teal);
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}

.role-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.role-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* —— Journey —— */
.journey {
  padding: 4rem 0;
  background:
    linear-gradient(180deg, #0d3d42 0%, #0b2c32 100%);
  color: var(--white);
}

.journey .section-head p {
  color: rgba(255, 255, 255, 0.7);
}

.journey-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.journey-flow span {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* —— Auth / Login —— */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.auth-visual {
  position: relative;
  background:
    linear-gradient(160deg, rgba(9, 40, 45, 0.88), rgba(13, 115, 119, 0.7)),
    linear-gradient(160deg, #0b2c32, #164e54);
  color: var(--white);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-visual__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 28px 28px;
}

.auth-visual__copy {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.auth-visual__copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin: 1rem 0 0.75rem;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 2.5rem 1.5rem;
  background: var(--sand);
}

.auth-card {
  width: min(400px, 100%);
  background: var(--white);
  border-radius: 22px;
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.7s ease;
}

.auth-card h2 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.7rem;
}

.auth-card .lede {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(20, 163, 168, 0.2);
  background: var(--white);
}

.alert {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.alert--error {
  background: #fdeceb;
  color: #8a2f22;
}

.alert--ok {
  background: var(--foam);
  color: var(--teal-deep);
}

.demo-users {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.demo-users summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
}

.demo-users table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.78rem;
}

.demo-users th,
.demo-users td {
  text-align: left;
  padding: 0.35rem 0.2rem;
  border-bottom: 1px solid var(--line);
}

.auth-card .btn {
  width: 100%;
  margin-top: 0.35rem;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Portal dashboard —— */
.portal {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(20, 163, 168, 0.12), transparent),
    var(--sand);
}

.portal-top {
  background: linear-gradient(120deg, #0b2c32, #0d7377);
  color: var(--white);
  padding: 1.1rem 0 2.5rem;
}

.portal-top__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.portal-top h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 0.4rem;
}

.portal-top p {
  margin: 0;
  opacity: 0.8;
  max-width: 36rem;
}

.portal-body {
  margin-top: -1.5rem;
  padding-bottom: 3rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(11, 31, 36, 0.06);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.panel {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1.35rem 1.4rem;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.action-list {
  display: grid;
  gap: 0.55rem;
}

.action-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--foam);
  color: var(--ink-soft);
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}

.action-list a:hover {
  background: #d7efef;
  transform: translateX(3px);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.denied {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}

.denied h1 {
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 84px 42px, -56px 28px;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 240px;
    padding: 2rem 1.5rem;
  }

  .hero__content {
    padding-top: 7rem;
  }
}

/* —— Forms / booking / reception —— */
.page-bar {
  padding: 1rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.page-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand--dark {
  color: var(--ink);
}

.brand--dark .brand__sub {
  color: var(--muted);
}

.form-page {
  padding: 2.5rem 0 4rem;
}

.form-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 0.5rem;
}

.form-lede {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

.form-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.25rem;
  align-items: start;
}

.form-card {
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.field-error,
.hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--coral);
}

.hint {
  color: var(--muted);
}

.side-card h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.doctor-list,
.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.doctor-list li,
.queue-list li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.doctor-list .fee,
.queue-list .fee {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.88rem;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.ticket {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem;
}

.ticket h1 {
  font-family: var(--font-display);
  margin: 0.5rem 0 0.75rem;
}

.ticket-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.ticket-grid dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.ticket-grid dd {
  margin: 0;
  font-weight: 600;
}

.chip--teal {
  background: var(--foam);
  color: var(--teal-deep);
}

.pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.pay-row select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

@media (max-width: 900px) {
  .form-layout,
  .form-grid,
  .ticket-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Patient ID card —— */
.id-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.75rem;
}

.id-card__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.id-card h1 {
  font-family: var(--font-display);
  margin: 0.4rem 0 0.25rem;
  font-size: 1.85rem;
}

.id-uhid {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin: 0;
}

.id-qr {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
}

.id-barcode-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

.id-barcode {
  width: min(100%, 420px);
  height: auto;
  background: #fff;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* —— Doctor chart —— */
.chart-search {
  padding: 1.25rem 1.4rem;
}

.search-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.search-row input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.chart-hero__row {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.chart-hero h2 {
  font-family: var(--font-display);
  margin: 0.35rem 0;
  font-size: 1.75rem;
}

.chart-codes {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.detail-block {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.detail-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.detail-block p {
  margin: 0;
  white-space: pre-wrap;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
}

.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  font: inherit;
  resize: vertical;
}


.report-group {
  margin-top: 1.25rem;
}

.report-type {
  display: inline-block;
  background: var(--foam);
  color: var(--teal-deep);
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-right: 0.35rem;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-top: 0.65rem;
  background: #fafafa;
}

.report-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.findings {
  margin: 0.65rem 0 0;
  padding: 0.75rem 0.9rem;
  background: var(--white);
  border-radius: 10px;
  border: 1px dashed var(--line);
  font-family: var(--font-body);
  font-size: 0.86rem;
  white-space: pre-wrap;
  color: var(--ink-soft);
}

.visit-timeline {
  display: grid;
  gap: 0.85rem;
}

.visit-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.visit-item ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

@media print {
  .no-print,
  .page-bar {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .id-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
