/* =====================================================
   UrgenCare — stylesheet
   Palette:
   --ink     #14342B  deep pine (text / header)
   --mist    #F2F7F4  pale mint-grey (page)
   --sea     #2E86AB  trust blue (links / actions)
   --gold    #F6AE2D  marigold (badges / highlights)
   --coral   #D64550  alerts / declines
   Type: Sora (display) + Karla (body)
   ===================================================== */

:root {
  --ink:   #14342B;
  --mist:  #F2F7F4;
  --sea:   #2E86AB;
  --sea-d: #226685;
  --gold:  #F6AE2D;
  --coral: #D64550;
  --ok:    #2F9E62;
  --card:  #FFFFFF;
  --line:  #D8E4DE;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--mist);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .brand { font-family: 'Sora', sans-serif; }
h1 { font-size: 1.9rem; margin: .2em 0 .4em; }
h2 { font-size: 1.25rem; margin: 1.4em 0 .5em; }
a  { color: var(--sea); }

/* ---------- header & badges ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 24px;
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { color: #fff; text-decoration: none; font-size: 1.25rem; letter-spacing: .5px; }
.brand strong { color: var(--gold); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; margin-right: 6px;
  background: var(--gold); color: var(--ink);
  border-radius: 8px; font-size: 1rem;
}

.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff; text-decoration: none;
  font-weight: 500; font-size: .95rem;
  transition: background .15s;
}
.badge:hover { background: rgba(255,255,255,.18); }
.badge small {
  background: var(--gold); color: var(--ink);
  border-radius: 999px; padding: 1px 8px;
  font-size: .7rem; font-weight: 700;
}
.badge-active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.badge-active small { background: var(--ink); color: var(--gold); }
.badge-quiet { opacity: .75; }

/* ---------- layout ---------- */
.page { flex: 1; width: min(1060px, 100% - 40px); margin: 28px auto; }
.flash {
  width: min(1060px, 100% - 40px);
  margin: 16px auto -8px;
  padding: 12px 16px;
  background: #E7F6EE; border: 1px solid var(--ok);
  border-radius: var(--radius); font-weight: 500;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- forms & buttons ---------- */
label { display: block; font-weight: 700; margin: 12px 0 4px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], textarea, select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff;
}
textarea { min-height: 90px; resize: vertical; }

.btn {
  display: inline-block; cursor: pointer;
  padding: 10px 20px; margin-top: 14px;
  background: var(--sea); color: #fff;
  border: 0; border-radius: 999px;
  font: 700 .95rem 'Karla', sans-serif;
  text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--sea-d); }
.btn-gold  { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #E09B18; }
.btn-danger { background: var(--coral); }
.btn-sm { padding: 6px 14px; font-size: .85rem; margin-top: 6px; }

/* ---------- status pills & tables ---------- */
.pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: .78rem; font-weight: 700;
}
.pill-pending   { background: #FDF1DA; color: #8A6100; }
.pill-approved, .pill-confirmed { background: #E7F6EE; color: #1C6B42; }
.pill-rejected, .pill-declined, .pill-cancelled { background: #FBE4E6; color: #96222C; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #567; }

/* ---------- home page: lead-clinician photo backdrop ---------- */
body.home { background: var(--ink); color: #fff; }
body.home .page { position: relative; z-index: 1; }

.carer-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(52vw, 780px);
  background: url('carer.jpg') no-repeat right top / cover;
  pointer-events: none;
  z-index: 0;
}
/* fade the photo into the dark page on its left edge (single mask = wide support) */
.carer-backdrop {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 24%, #000 60%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 24%, #000 60%);
}
/* tint into the UrgenCare palette + fade the bottom into the page */
.carer-backdrop::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,52,43,0) 55%, var(--ink) 100%),
    linear-gradient(120deg, rgba(20,52,43,.55), rgba(20,52,43,.05));
}

.hero {
  position: relative; z-index: 1;
  max-width: 560px;
  margin-top: 6vh;
  background: rgba(20, 52, 43, .78);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 30px 32px;
}
.hero h1 { font-size: 2.3rem; line-height: 1.15; margin: 0 0 .4em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p  { font-size: 1.05rem; line-height: 1.55; color: #DCE9E2; }

/* ---------- lead clinician / infographic ---------- */
.lead {
  position: relative; z-index: 1;
  max-width: 620px;
  margin: 42px 0 10px;
}
.eyebrow {
  margin: 0;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
}
.lead-name {
  font-size: 2.4rem; margin: .1em 0 0;
  font-weight: 500; color: #fff;
}
.lead-role {
  margin: 0 0 6px;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #9DBDAF;
}

.creds { display: grid; gap: 4px; }
.cred {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.14);
}
.cred-badge {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
}
.cred-icon { width: 30px; height: 30px; }
.cred h3 {
  margin: 4px 0 6px;
  font-size: 1.02rem; letter-spacing: .02em;
  text-transform: uppercase; color: #fff;
}
.cred p  { margin: 0; line-height: 1.5; color: #DCE9E2; }
.cred ul { margin: 8px 0 0; padding-left: 18px; color: #B9D2C6; font-size: .92rem; }
.cred li { margin-bottom: 4px; }

.research {
  margin-top: 20px;
  padding: 16px 18px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  border-radius: var(--radius);
}
.research h4 {
  margin: 0 0 8px;
  font: 700 .74rem 'Sora', sans-serif;
  letter-spacing: .12em; text-transform: uppercase; color: #4E6B60;
}
.research p { margin: 0 0 10px; font-size: .92rem; line-height: 1.5; }
.research a { font-size: .88rem; font-weight: 700; text-decoration: none; }
.research a:hover { text-decoration: underline; }

.values {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 20px 0 0; padding: 0;
}
.values li {
  padding: 7px 14px;
  background: rgba(246,174,45,.14);
  border: 1px solid rgba(246,174,45,.45);
  border-radius: 999px;
  font-size: .85rem; font-weight: 700; color: var(--gold);
}
.tagline {
  margin: 22px 0 0;
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem; font-style: italic;
  color: #B9D2C6;
}

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.cal .dow { text-align: center; font-size: .75rem; font-weight: 700; color: #567; padding: 4px 0; }
.cal-day {
  min-height: 62px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-size: .85rem; position: relative;
  display: block; color: inherit; text-decoration: none;
}
.cal-day.blank { background: transparent; border: 0; }
.cal-day.past  { opacity: .38; }
.cal-day .num  { font-weight: 700; }
a.cal-day:hover { border-color: var(--sea); }
.cal-day.avail    { background: #E7F6EE; border-color: var(--ok); }
.cal-day.selected { outline: 3px solid var(--gold); }
.cal-day .dot {
  position: absolute; right: 7px; bottom: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; }

/* ---------- footer ---------- */
.site-footer {
  padding: 18px 24px;
  text-align: center;
  font-size: .85rem;
  color: #4E6B60;
}
body.home .site-footer { color: #9DBDAF; position: relative; z-index: 1; }

@media (max-width: 640px) {
  .site-header { padding: 12px 14px; }
  .badge { padding: 7px 11px; font-size: .85rem; }
  .hero { margin-top: 3vh; padding: 22px; }
  .hero h1 { font-size: 1.7rem; }
  .cal-day { min-height: 46px; }
}

/* ---------- home page: small screens ---------- */
@media (max-width: 860px) {
  .carer-backdrop {
    width: 100%;
    opacity: .3;
    background-position: 68% top;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
    mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
  }
  .hero, .lead { max-width: none; }
  .cred-badge { width: 46px; height: 46px; }
  .cred-icon { width: 26px; height: 26px; }
  .lead-name { font-size: 2rem; }
}