:root {
  color: #183a3b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #f5f5ef;
  --ink: #153b3a;
  --muted: #657a78;
  --green: #0e7067;
  --green-dark: #07574f;
  --line: #d9e1dd;
  --cream: #f5f5ef;
  --white: #fffefa;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; }

button, input, select { font: inherit; }

.access-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, 0.82fr) minmax(560px, 1.18fr); }

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  color: #f7fbf7;
  background: radial-gradient(circle at 15% 82%, rgba(99, 194, 164, .32), transparent 28%), linear-gradient(145deg, #063f3d, #0b625b 65%, #168073);
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -230px;
  bottom: -180px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02);
}

.brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 13px; color: inherit; font-weight: 700; letter-spacing: .12em; text-decoration: none; }
.brand-mark { position: relative; width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; }
.brand-mark span { position: absolute; inset: 8px 15px; border-radius: 2px; background: #fff; }
.brand-mark span:last-child { transform: rotate(90deg); }
.brand-copy { position: relative; z-index: 1; max-width: 570px; padding: 80px 0; }
.eyebrow { margin: 0 0 15px; color: #79c9b4; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.brand-copy h1 { max-width: 520px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 5vw, 5.6rem); font-weight: 600; line-height: .97; letter-spacing: 0; }
.brand-copy > p:last-child { max-width: 480px; margin: 28px 0 0; color: #c7deda; font-size: 1.05rem; line-height: 1.7; }
.trust-note { position: relative; z-index: 1; display: flex; gap: 14px; align-items: flex-start; max-width: 440px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.2); }
.trust-note p { margin: 0; color: #c7deda; font-size: .86rem; line-height: 1.55; }
.trust-note strong { color: #fff; font-weight: 600; }
.trust-icon { display: grid; flex: 0 0 29px; height: 29px; place-items: center; border: 1px solid #7ccbb7; border-radius: 50%; color: #9ce0cd; }

.form-panel { min-width: 0; padding: 45px clamp(25px, 7vw, 110px); background: var(--white); }
.form-wrap { width: min(100%, 680px); margin: 0 auto; }
.mode-control { position: absolute; opacity: 0; pointer-events: none; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: clamp(48px, 8vh, 90px); padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #f4f6f3; }
.mode-tabs label { padding: 12px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; text-align: center; cursor: pointer; transition: .2s ease; }
#mode-login:checked ~ .mode-tabs label[for="mode-login"], #mode-register:checked ~ .mode-tabs label[for="mode-register"] { color: var(--ink); background: var(--white); box-shadow: 0 2px 10px rgba(23, 59, 58, .08); }
.form-view { display: none; }
#mode-login:checked ~ .login-view, #mode-register:checked ~ .register-view { display: block; animation: reveal .3s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }
.form-heading { margin-bottom: 35px; }
.form-heading h2 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.35rem, 4vw, 3.6rem); font-weight: 600; line-height: 1; letter-spacing: 0; }
.form-heading > p:last-child { margin: 14px 0 0; color: var(--muted); line-height: 1.6; }
.field, form { display: grid; gap: 9px; }
form { gap: 21px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
label { color: var(--ink); font-size: .84rem; font-weight: 600; }
label span { color: #899995; font-weight: 400; }
.label-row { display: flex; justify-content: space-between; }
.label-row a { color: var(--green); font-size: .8rem; font-weight: 600; text-decoration: none; }
input, select { width: 100%; min-height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { border-color: #3b9a8e; box-shadow: 0 0 0 3px rgba(14,112,103,.1); }
input::placeholder { color: #a2afac; }
.field small { color: #83918f; font-size: .75rem; }
.phone-input { display: grid; grid-template-columns: auto 1fr; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.phone-input:focus-within { border-color: #3b9a8e; box-shadow: 0 0 0 3px rgba(14,112,103,.1); }
.phone-input span, .phone-input select { padding: 0 10px; border: 0; border-right: 1px solid var(--line); border-radius: 0; color: var(--ink); font-weight: 600; background: transparent; }
.phone-input input { border: 0; box-shadow: none; }
.phone-input input:focus { box-shadow: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-weight: 400; line-height: 1.5; }
.consent input { flex: 0 0 17px; width: 17px; min-height: 17px; margin-top: 2px; accent-color: var(--green); }
.primary-button { min-height: 54px; border: 0; border-radius: 8px; color: white; font-weight: 700; background: var(--green); cursor: pointer; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.switch-prompt { margin: 28px 0 0; color: var(--muted); font-size: .87rem; text-align: center; }
.switch-prompt label { color: var(--green); cursor: pointer; }
.form-message:empty { display: none; }
.message-card { display: grid; gap: 4px; padding: 14px 16px; border-radius: 8px; font-size: .82rem; line-height: 1.45; }
.message-card.error { color: #813529; background: #fff1ee; }
.message-card.notice { color: #245b55; background: #eaf6f2; }

@media (max-width: 850px) {
  .access-shell { display: block; }
  .brand-panel { min-height: auto; padding: 27px 24px 38px; }
  .brand-copy { padding: 55px 0 42px; }
  .brand-copy h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .trust-note { display: none; }
  .form-panel { padding: 34px 20px 60px; }
  .mode-tabs { margin-bottom: 48px; }
}

@media (max-width: 520px) {
  .field-grid { grid-template-columns: 1fr; }
  .optional-fields { display: none; }
  .form-heading h2 { font-size: 2.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.dashboard-body { background: #edf3ef; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(22px, 5vw, 72px); color: #d6e8e2; background: #073f3d; }
.dashboard-brand { color: white; font-weight: 800; letter-spacing: .13em; text-decoration: none; }
.dashboard-shell { width: min(1180px, calc(100% - 40px)); margin: 38px auto 70px; }
.welcome-card { padding: clamp(30px, 5vw, 58px); border-radius: 20px; color: white; background: linear-gradient(125deg, #09554f, #118071); box-shadow: 0 18px 45px rgba(7,63,61,.14); }
.welcome-card h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 500; }
.welcome-card > p:last-child { margin: 15px 0 0; color: #cbe3dc; }
.dashboard-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; margin-top: 22px; }
.dashboard-card, .doctor-section { padding: 28px; border: 1px solid #dce7e1; border-radius: 16px; background: #fffefa; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.section-heading > span { color: var(--muted); font-size: .78rem; }
.profile-card dl { display: grid; gap: 0; margin: 0; }
.profile-card dl div { padding: 14px 0; border-bottom: 1px solid #e5ece8; }
.profile-card dt { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.profile-card dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.empty-state { color: var(--muted); line-height: 1.65; }
.appointment-list { display: grid; gap: 12px; }
.appointment-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px; border-radius: 10px; background: #f1f6f3; }
.appointment-row div { display: grid; gap: 4px; }
.appointment-row div span { color: var(--muted); font-size: .8rem; }
.status-pill { padding: 5px 9px; border-radius: 99px; color: #176058; font-size: .7rem; text-transform: capitalize; background: #dcefe9; }
.doctor-section { margin-top: 22px; }
.doctor-section .eyebrow { margin-bottom: 8px; }
.doctor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doctor-card { display: grid; gap: 17px; padding: 21px; border: 1px solid var(--line); border-radius: 13px; }
.doctor-monogram { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: white; font-family: Georgia, serif; font-size: 1.35rem; background: #b8764c; }
.doctor-card h3 { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; }
.doctor-card p { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
.booking-message { margin-top: 18px; }
@media (max-width: 850px) { .dashboard-grid, .doctor-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .dashboard-shell { width: min(100% - 24px, 1180px); margin-top: 16px; } .dashboard-card, .doctor-section { padding: 20px; } .appointment-row { grid-template-columns: 1fr auto; } .status-pill { grid-column: 1 / -1; width: fit-content; } }

/* Authenticated portal */
.portal-body { min-height: 100vh; color: var(--ink); background: #f0f4f1; }
.portal-frame { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.portal-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 32px 20px 25px; overflow: hidden; color: #d2e5df; background: radial-gradient(circle at 10% 90%, rgba(55, 154, 132, .25), transparent 31%), #073f3d; }
.portal-sidebar::after { content: "+"; position: absolute; right: -28px; bottom: 104px; color: rgba(126, 202, 181, .08); font-family: Georgia, serif; font-size: 12rem; line-height: 1; }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 12px; color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-decoration: none; }
.brand-cross { position: relative; width: 27px; height: 27px; border: 1px solid #79c9b4; border-radius: 50%; }
.brand-cross::before, .brand-cross::after { content: ""; position: absolute; inset: 6px 11px; border-radius: 2px; background: #79c9b4; }
.brand-cross::after { transform: rotate(90deg); }
.sidebar-label { margin: 70px 14px 12px; color: #609f91; font-size: .62rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.portal-nav { display: grid; gap: 7px; }
.portal-nav a { display: flex; gap: 13px; align-items: center; padding: 14px; border-radius: 10px; color: #9fc1b8; font-size: .86rem; font-weight: 600; text-decoration: none; transition: .2s ease; }
.portal-nav a:hover, .portal-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(115, 202, 180, .21), rgba(115, 202, 180, .1)); box-shadow: inset 3px 0 #79c9b4; }
.nav-icon { position: relative; display: block; width: 18px; height: 18px; opacity: .85; }
.home-icon { border: 1.5px solid currentColor; border-radius: 4px; }
.home-icon::before { content: ""; position: absolute; width: 10px; height: 10px; left: 2px; top: -5px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: rotate(45deg); background: #073f3d; }
.calendar-icon { border: 1.5px solid currentColor; border-radius: 3px; }
.calendar-icon::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; border-top: 1.5px solid currentColor; }
.sidebar-foot { position: relative; z-index: 1; display: flex; gap: 11px; align-items: center; margin-top: auto; padding: 19px 8px 0; border-top: 1px solid rgba(207, 231, 222, .15); font-size: .75rem; }
.sidebar-foot > div:last-child { display: grid; min-width: 0; gap: 4px; }
.sidebar-avatar { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 50%; color: #073f3d; font-family: Georgia, serif; font-size: 1.05rem; background: #8fd0bd; }
.sidebar-foot span { color: #76b8a8; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-foot strong { color: #fff; font-size: .86rem; font-weight: 600; }
.sidebar-foot a { color: #9fc1b8; font-size: .68rem; text-decoration: none; }
.portal-mobile-bar { display: none; }
.portal-main { width: min(1220px, calc(100% - 80px)); margin: 0 auto; padding: 40px 0 90px; }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 35px; margin-bottom: 38px; }
.page-intro h1 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: clamp(2.4rem, 4vw, 4.2rem); font-weight: 500; letter-spacing: 0; }
.page-intro > div > p:last-child { max-width: 510px; margin: 14px 0 0; color: var(--muted); line-height: 1.6; }
.action-link, .primary-link { display: inline-flex; gap: 13px; align-items: center; padding: 13px 17px; border-radius: 8px; color: #fff; font-size: .82rem; font-weight: 700; text-decoration: none; background: var(--green); white-space: nowrap; }
.action-link span, .primary-link span { font-size: 1.1rem; }
.overview-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.profile-viewer, .next-step-card, .content-section, .doctor-directory { border: 1px solid #dce7e1; border-radius: 16px; background: #fffefa; box-shadow: 0 12px 32px rgba(32, 72, 62, .04); }
.profile-viewer { padding: 24px; }
.profile-identity { display: flex; gap: 16px; align-items: center; padding-bottom: 23px; border-bottom: 1px solid #e2ebe6; }
.profile-avatar, .doctor-avatar { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; color: #fff; font-family: Georgia, serif; font-size: 1.25rem; background: #b8764c; }
.card-kicker { display: block; margin-bottom: 6px; color: #8a9d98; font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.profile-identity h2, .next-step-card h2 { margin: 0; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.verified-line { display: inline-flex; gap: 5px; align-items: center; margin-top: 6px; color: var(--green); font-size: .72rem; }
.verified-line i { display: grid; width: 15px; height: 15px; place-items: center; border-radius: 50%; font-size: .6rem; font-style: normal; color: #fff; background: var(--green); }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 25px; padding-top: 21px; }
.profile-facts div { display: grid; gap: 5px; min-width: 0; }
.profile-facts span, .doctor-card-foot span { color: #8a9d98; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; }
.profile-facts strong { overflow-wrap: anywhere; font-size: .83rem; font-weight: 600; }
.next-step-card { display: flex; flex-direction: column; justify-content: center; padding: 30px; color: #e6f2ed; background: linear-gradient(145deg, #0d7067, #07534f); }
.next-step-card .card-kicker { color: #8dd1bd; }
.next-step-card h2 { color: #fff; font-size: 2rem; }
.next-step-card p { margin: 14px 0 25px; color: #c6e0d8; font-size: .86rem; line-height: 1.65; }
.primary-link { align-self: flex-start; color: #07534f; background: #e4f3ed; }
.content-section, .doctor-directory { margin-top: 21px; padding: 27px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.section-title-row h2 { margin: 0; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.section-title-row .eyebrow { margin-bottom: 7px; }
.count-badge { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: var(--green); font-size: .75rem; font-weight: 700; background: #e2f0eb; }
.empty-visual { display: flex; gap: 18px; align-items: center; padding: 27px; border-radius: 11px; background: #f2f7f4; }
.empty-visual h3 { margin: 0; font-family: Georgia, serif; font-size: 1.22rem; font-weight: 500; }
.empty-visual p { margin: 7px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.empty-calendar { position: relative; display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid #9bcbbd; border-radius: 10px; color: var(--green); }
.empty-calendar::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; border-top: 1px solid #9bcbbd; }
.empty-calendar b { margin-top: 8px; font-size: 1.2rem; font-weight: 400; }
.refined-list { gap: 8px; }
.refined-list .appointment-row { grid-template-columns: 130px 1fr auto auto; padding: 17px; border: 1px solid #e0eae5; background: #f7faf8; }
.appointment-date { display: grid; gap: 3px; }
.appointment-row div { display: grid; gap: 4px; }
.appointment-row div span { color: var(--muted); font-size: .75rem; }
.serial-mark { color: var(--green); font-size: 1.1rem; }
.doctor-search { display: flex; gap: 12px; align-items: center; margin-bottom: 29px; padding: 7px 8px 7px 16px; border: 1px solid #d5e2dc; border-radius: 11px; background: #fffefa; box-shadow: 0 8px 25px rgba(32, 72, 62, .05); }
.doctor-search input { min-height: 43px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.doctor-search input:focus { box-shadow: none; }
.doctor-search button { min-height: 43px; padding: 0 19px; border: 0; border-radius: 7px; color: white; font-size: .8rem; font-weight: 700; background: var(--green); cursor: pointer; }
.search-icon { position: relative; width: 17px; height: 17px; border: 1.5px solid #7c9790; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; border-top: 1.5px solid #7c9790; transform: rotate(45deg); }
.doctor-directory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.doctor-viewer { display: grid; gap: 22px; padding: 22px; border: 1px solid #dce7e1; border-radius: 13px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.doctor-viewer:hover { transform: translateY(-3px); box-shadow: 0 13px 25px rgba(32, 72, 62, .09); }
.doctor-card-top, .doctor-card-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.doctor-avatar { position: relative; width: 49px; height: 49px; font-size: 1.2rem; background: #9473a8; }
.doctor-avatar i { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: #50a67a; }
.available-chip { padding: 6px 8px; border-radius: 99px; color: #29715f; font-size: .62rem; font-weight: 700; background: #e5f3ed; }
.doctor-copy p { margin: 0 0 5px; color: var(--green); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.doctor-copy h2 { margin: 0; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 500; }
.availability-line { display: flex; gap: 7px; align-items: center; margin-top: 13px; color: var(--muted); font-size: .72rem; }
.tiny-calendar { width: 13px; height: 13px; border: 1px solid currentColor; border-radius: 3px; }
.doctor-card-foot { align-items: center; padding-top: 17px; border-top: 1px solid #e8efeb; }
.doctor-card-foot div { display: grid; gap: 4px; }
.doctor-card-foot strong { font-size: .78rem; }
.doctor-card-foot form { display: block; }
.doctor-card-foot button { padding: 9px 11px; border: 0; border-radius: 6px; color: var(--green); font-size: .72rem; font-weight: 700; background: #e4f2ed; cursor: pointer; }
.doctor-card-foot button span { color: var(--green); font-size: 1rem; }
.floating-message { margin-top: 18px; }
.intro-orbit { position: relative; width: 110px; height: 110px; margin-right: 30px; border: 1px solid #a9d0c4; border-radius: 50%; }
.intro-orbit::before, .intro-orbit::after { content: ""; position: absolute; inset: 17px; border: 1px solid #d1e5de; border-radius: 50%; }
.intro-orbit::after { inset: 35px; background: #b8774e; border: 0; }
.intro-orbit span { position: absolute; top: 12px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #0e7067; }
.intro-orbit b { position: absolute; bottom: 8px; left: 5px; color: #9bbeb4; font-size: 1.1rem; font-weight: 400; }

/* Patient dashboard */
.dashboard-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.35fr) .65fr; min-height: 340px; overflow: hidden; border-radius: 24px; color: #fff; background: radial-gradient(circle at 77% 16%, rgba(120, 207, 181, .2), transparent 25%), linear-gradient(125deg, #073f3d, #0d6960 72%, #147b6d); box-shadow: 0 25px 55px rgba(7, 63, 61, .16); }
.dashboard-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg, transparent 20%, #000); }
.hero-copy { align-self: center; padding: 45px 0 45px clamp(30px, 5vw, 64px); }
.hero-date { margin: 0 0 13px; color: #91d5c1; font-size: .68rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.hero-copy h1 { max-width: 680px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 4.6vw, 4.7rem); font-weight: 400; line-height: .98; letter-spacing: -.025em; }
.hero-copy h1 em { color: #9edbc9; font-weight: 400; }
.hero-copy > p:not(.hero-date) { max-width: 540px; margin: 19px 0 28px; color: #cce3dd; font-size: .9rem; line-height: 1.65; }
.hero-action { display: inline-grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; min-width: 275px; padding: 10px 13px 10px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: #fff; text-decoration: none; background: rgba(255,255,255,.1); backdrop-filter: blur(6px); transition: transform .2s, background .2s; }
.hero-action:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.hero-action-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 8px; color: #07574f; font-size: 1.4rem; background: #a5dfce; }
.hero-action small, .hero-action span { display: grid; }
.hero-action small { margin-bottom: 2px; color: #9bcfc1; font-size: .59rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-action span { font-size: .8rem; font-weight: 700; }
.hero-action b { color: #a5dfce; font-weight: 400; }
.hero-visual { position: relative; min-height: 340px; }
.hero-orbit { position: absolute; border: 1px solid rgba(167, 224, 207, .25); border-radius: 50%; }
.orbit-one { width: 290px; height: 290px; top: 25px; right: 16px; }
.orbit-two { width: 190px; height: 190px; top: 75px; right: 66px; box-shadow: 0 0 0 34px rgba(152, 218, 198, .025); }
.hero-cross { position: absolute; top: 125px; right: 116px; width: 90px; height: 90px; border-radius: 28px; transform: rotate(8deg); background: linear-gradient(145deg, #b6e6d7, #72c3ac); box-shadow: 0 18px 40px rgba(3, 42, 40, .3); }
.hero-cross i { position: absolute; inset: 20px 37px; border-radius: 5px; background: #096159; }
.hero-cross i:last-child { transform: rotate(90deg); }
.pulse-line { position: absolute; right: 21px; bottom: 41px; display: flex; align-items: center; width: 280px; }
.pulse-line i { flex: 1; border-top: 1px solid rgba(166, 223, 206, .45); }
.pulse-line b { width: 41px; height: 27px; border-left: 1px solid #9edbc9; border-top: 1px solid #9edbc9; transform: rotate(48deg) skew(-17deg); }
.care-summary { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: calc(100% - 48px); margin: -18px auto 28px; }
.summary-tile { display: flex; gap: 14px; align-items: center; min-width: 0; padding: 18px 20px; border: 1px solid #dbe6e1; border-radius: 14px; background: rgba(255, 254, 250, .97); box-shadow: 0 12px 28px rgba(28, 70, 60, .08); }
.summary-icon { position: relative; display: grid; flex: 0 0 43px; height: 43px; place-items: center; border-radius: 11px; color: var(--green); font-weight: 800; background: #e2f1eb; }
.calendar-summary { border: 1.5px solid #3b8f81; border-radius: 8px; background: transparent; transform: scale(.7); }
.calendar-summary::before { content: ""; position: absolute; top: 10px; left: 0; right: 0; border-top: 1.5px solid #3b8f81; }
.summary-tile div { display: grid; min-width: 0; }
.summary-tile small { color: #879a95; font-size: .61rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.summary-tile strong { margin-top: 3px; overflow: hidden; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.summary-tile p, .summary-tile a { margin: 2px 0 0; color: var(--muted); font-size: .68rem; text-decoration: none; }
.summary-action { border-color: #c6ded5; }
.summary-action a { color: var(--green); font-weight: 700; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.dashboard-columns .content-section, .dashboard-columns .profile-viewer { margin: 0; }
.appointment-section { padding: 30px; }
.section-link { color: var(--green); font-size: .75rem; font-weight: 700; text-decoration: none; }
.section-link span { margin-left: 5px; }
.dashboard-empty { min-height: 190px; padding: 35px; background: linear-gradient(135deg, #f3f8f5, #edf5f1); }
.dashboard-empty > div:last-child { max-width: 470px; }
.dashboard-empty a { display: inline-block; margin-top: 12px; color: var(--green); font-size: .76rem; font-weight: 700; text-decoration: none; }
.dashboard-appointment-list { gap: 10px; }
.appointment-card { display: grid; grid-template-columns: 130px minmax(180px, 1fr) auto auto; gap: 18px; align-items: center; padding: 18px; border: 1px solid #dfe9e4; border-radius: 12px; background: #fbfcfa; transition: border-color .2s, transform .2s; }
.appointment-card:hover { transform: translateY(-2px); border-color: #a9cfc3; }
.appointment-date-block { display: grid; gap: 3px; padding-right: 17px; border-right: 1px solid #e1e9e5; }
.appointment-date-block span, .appointment-doctor small, .queue-block small { color: #91a09c; font-size: .58rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.appointment-date-block strong { margin-top: 3px; font-family: Georgia, serif; font-size: 1rem; font-weight: 600; }
.appointment-date-block small, .appointment-doctor p { margin: 0; color: var(--muted); font-size: .69rem; }
.appointment-doctor { display: flex; gap: 11px; align-items: center; min-width: 0; }
.appointment-doctor > div { display: grid; gap: 3px; min-width: 0; }
.appointment-doctor strong { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.doctor-symbol { display: grid; flex: 0 0 36px; height: 36px; place-items: center; border-radius: 50%; color: #fff; font-size: 1.1rem; background: #b8764c; }
.queue-block { display: grid; gap: 2px; text-align: center; }
.queue-block strong { color: var(--green); font-family: Georgia, serif; font-size: 1.25rem; }
.appointment-card .status-pill { display: inline-flex; gap: 6px; align-items: center; }
.appointment-card .status-pill i { width: 5px; height: 5px; border-radius: 50%; background: #3b927d; }
.dashboard-secondary { display: grid; gap: 20px; }
.dashboard-secondary .profile-viewer { padding: 25px; }
.profile-card-heading { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 20px; }
.profile-card-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.profile-status { padding: 5px 8px; border-radius: 99px; color: #277361; font-size: .59rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: #e2f1eb; }
.dashboard-secondary .profile-identity { padding: 18px 0; border-top: 1px solid #e2ebe6; }
.profile-identity h3 { margin: 0; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 500; }
.dashboard-secondary .profile-avatar { width: 50px; height: 50px; font-size: 1.05rem; }
.dashboard-secondary .profile-facts { grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.dashboard-secondary .wide-fact { grid-column: 1 / -1; }
.care-note { position: relative; display: flex; gap: 15px; overflow: hidden; padding: 23px; border-radius: 15px; color: #d8eae4; background: #164e4a; }
.care-note::after { content: "+"; position: absolute; right: -9px; bottom: -34px; color: rgba(255,255,255,.06); font-family: Georgia, serif; font-size: 7rem; }
.care-note-mark { display: grid; flex: 0 0 35px; height: 35px; place-items: center; border-radius: 50%; color: #164e4a; font-size: 1.15rem; background: #92d2bf; }
.care-note div { position: relative; z-index: 1; }
.care-note small { color: #81c5b2; font-size: .59rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.care-note h3 { margin: 5px 0 8px; color: #fff; font-family: Georgia, serif; font-size: 1.18rem; font-weight: 500; }
.care-note p { margin: 0; color: #bad5cd; font-size: .73rem; line-height: 1.55; }

@media (max-width: 950px) { .portal-frame { display: block; } .portal-sidebar { display: none; } .portal-mobile-bar { display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; color: #d2e5df; background: #073f3d; } .portal-mobile-bar nav { display: flex; gap: 14px; } .portal-mobile-bar nav a { color: #c7dfd7; font-size: .75rem; text-decoration: none; } .portal-main { width: min(100% - 36px, 780px); padding: 38px 0 65px; } .overview-layout { grid-template-columns: 1fr; } .doctor-directory-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .portal-main { width: min(100% - 24px, 780px); padding-top: 28px; } .page-intro { align-items: flex-start; } .intro-orbit { display: none; } .page-intro h1 { font-size: 2.6rem; } .profile-facts { grid-template-columns: 1fr; } .doctor-directory-grid { grid-template-columns: 1fr; } .doctor-search button { padding: 0 12px; } .refined-list .appointment-row { grid-template-columns: 1fr auto; } .refined-list .appointment-row > .status-pill { grid-column: 1 / -1; width: fit-content; } }
@media (max-width: 1100px) { .dashboard-columns { grid-template-columns: 1fr; } .dashboard-secondary { grid-template-columns: 1fr 1fr; } .care-summary { width: calc(100% - 28px); } }
@media (max-width: 760px) { .dashboard-hero { grid-template-columns: 1fr; min-height: 0; } .hero-copy { padding: 38px 28px; } .hero-visual { position: absolute; right: -70px; bottom: -85px; width: 260px; opacity: .42; } .care-summary { grid-template-columns: 1fr; width: calc(100% - 24px); margin-top: -13px; } .dashboard-secondary { grid-template-columns: 1fr; } .appointment-card { grid-template-columns: 115px 1fr auto; } .appointment-card .status-pill { grid-column: 2 / -1; width: fit-content; } }
@media (max-width: 520px) { .dashboard-hero { border-radius: 17px; } .hero-copy { padding: 32px 22px 38px; } .hero-copy h1 { font-size: 2.55rem; } .hero-copy > p:not(.hero-date) { font-size: .82rem; } .hero-action { min-width: 0; width: 100%; } .hero-visual { display: none; } .care-summary { margin-bottom: 20px; } .summary-tile { padding: 15px; } .appointment-section { padding: 21px 17px; } .appointment-section .section-title-row { align-items: flex-end; } .appointment-section .section-title-row h2 { font-size: 1.45rem; } .appointment-card { grid-template-columns: 1fr auto; gap: 14px; } .appointment-date-block { padding: 0 0 13px; border-right: 0; border-bottom: 1px solid #e1e9e5; } .appointment-doctor { grid-column: 1 / -1; } .appointment-card .status-pill { grid-column: 1; grid-row: 3; } .queue-block { grid-column: 2; grid-row: 3; } .dashboard-secondary .profile-facts { grid-template-columns: 1fr; } .dashboard-secondary .wide-fact { grid-column: auto; } .dashboard-empty { align-items: flex-start; padding: 25px 20px; } }

/* Global toast for htmx error responses */
.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #b3261e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 1000;
  max-width: 90vw;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Identity type selector (NID / birth certificate / newborn) */
.identity-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.identity-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.identity-option:has(input:checked) {
  border-color: #2f6f4f;
  background: #eef7f1;
  font-weight: 600;
}
.identity-option input { accent-color: #2f6f4f; }

/* Parent lookup row (NID input + Find button) */
.parent-lookup-row {
  display: flex;
  gap: 8px;
}
.parent-lookup-row input { flex: 1; }
.parent-find-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2f6f4f;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.parent-find-btn:disabled { opacity: .6; cursor: not-allowed; }
.parent-result { margin-top: 8px; font-size: 14px; }
.parent-found { color: #1a7f37; }
.parent-error { color: #b3261e; }
.parent-loading { color: #57606a; }
.required-mark { color: #b3261e; }
