/* Dr Nazik Clinic visual refresh. Presentation only: no interaction or layout flow changes. */
:root {
  --brand-ink: #18070d;
  --brand-burgundy: #260b15;
  --brand-plum: #35121e;
  --brand-blue: #8fd8f3;
  --brand-blue-strong: #61bfeb;
  --brand-blue-glass: rgba(101, 190, 231, .11);
  --brand-blue-line: rgba(143, 216, 243, .28);
  --brand-gold-soft: #e6cfa1;
  --brand-glass: rgba(255, 255, 255, .055);
  --brand-line: rgba(255, 255, 255, .11);
  --brand-shadow: 0 24px 70px rgba(7, 3, 8, .34);
}

html { scroll-behavior: smooth; }
body {
  background-color: var(--brand-ink);
  background-image:
    radial-gradient(ellipse at 12% 5%, rgba(68, 150, 192, .12), transparent 32rem),
    radial-gradient(ellipse at 92% 34%, rgba(105, 45, 66, .17), transparent 38rem);
  color: #fbf8f7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(97, 191, 235, .28); color: #fff; }
h1, h2, h3 { text-wrap: pretty; }
p { text-wrap: pretty; }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { transition-timing-function: cubic-bezier(.2,.75,.25,1); }
:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

/* Keep the established burgundy and gold identity; blue is a restrained glass accent. */
.header-nav {
  background: linear-gradient(180deg, rgba(24, 7, 13, .84), rgba(24, 7, 13, .46));
  border-bottom: 1px solid rgba(143, 216, 243, .10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.hero-section {
  background:
    radial-gradient(ellipse at 72% 28%, rgba(78, 160, 201, .16), transparent 32%),
    radial-gradient(circle at 18% 50%, #4a1728 0%, #260b15 58%, #18070d 100%);
}
.hero-section > div {
  max-width: 88rem;
}
.hero-section h1 {
  font-size: clamp(3rem, 5vw, 5.25rem) !important;
  letter-spacing: -.045em;
  text-shadow: 0 8px 34px rgba(0, 0, 0, .26);
}
.hero-section > div > div:first-child > div:nth-child(2) {
  color: #d8b96e !important;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem) !important;
}
.hero-section p {
  max-width: 34rem !important;
  color: rgba(255, 249, 247, .82);
  font-size: clamp(.95rem, 1.25vw, 1.05rem) !important;
  line-height: 2 !important;
}
.hero-section > div > div:last-child {
  position: relative;
  isolation: isolate;
}
.hero-section > div > div:last-child::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 11% 3% 0;
  border: 1px solid rgba(230, 207, 161, .18);
  border-radius: 48% 48% 1.5rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(143, 216, 243, .18), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(31, 10, 19, .2));
  box-shadow: 0 35px 90px rgba(7, 3, 8, .25), inset 0 1px rgba(255,255,255,.08);
}
.hero-section > div > div:last-child img {
  filter: drop-shadow(0 30px 38px rgba(3, 1, 4, .36)) !important;
}
.header-logo-container { text-decoration: none; }
.header-nav nav a:not([id]), .mobile-nav-link { transition: color .2s ease, opacity .2s ease; }
.header-nav nav a:hover:not([id]) { color: #c6eafa; }
.header-nav .gold-btn, .hero-section .gold-btn { border-radius: 999px; }
.hero-section .outline-btn { border-radius: 999px; }
.mobile-nav-link { font-size: clamp(1.1rem, 5.8vw, 1.55rem); }
.glass-card, .glass-btn, .outline-btn,
[class*="bg-white/5"], [class*="bg-white/[0.03]"] {
  border-color: var(--brand-line);
}
.glass-card {
  box-shadow: 0 18px 48px rgba(5, 2, 7, .24);
}
.package-card {
  border-radius: 1.5rem;
  border-color: rgba(230, 207, 161, .16);
  background: linear-gradient(155deg, rgba(255,255,255,.065), rgba(255,255,255,.018) 58%, rgba(22,8,14,.38));
  box-shadow: 0 22px 60px rgba(5, 2, 7, .22), inset 0 1px rgba(255,255,255,.055);
}
.package-card:hover { transform: translateY(-5px); border-color: rgba(143, 216, 243, .32); }
.package-card.featured {
  border-color: rgba(230, 207, 161, .42);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(143,216,243,.13), transparent 48%),
    linear-gradient(150deg, rgba(74,23,40,.78), rgba(24,7,13,.94));
  box-shadow: 0 28px 72px rgba(7, 3, 8, .35), inset 0 1px rgba(255,255,255,.08);
}
.badge-pill { border-radius: 999px; background: rgba(143,216,243,.055); }
#features, .features-banner {
  position: relative;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(143,216,243,.08), transparent 35rem),
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
  border-top: 1px solid rgba(143,216,243,.12);
  border-bottom: 1px solid rgba(143,216,243,.10);
}
#results {
  max-width: 90rem;
  border: 1px solid rgba(143,216,243,.10);
  border-radius: 2rem;
  background: linear-gradient(155deg, rgba(255,255,255,.035), rgba(26,8,16,.22));
  box-shadow: 0 30px 90px rgba(4, 1, 5, .16);
}
#results > div:first-child > div:first-child {
  color: #a8def2 !important;
  letter-spacing: .12em;
}
#publicResultsContainer > div {
  border: 1px solid rgba(230,207,161,.16);
  border-radius: 1.35rem;
  background: linear-gradient(155deg, rgba(255,255,255,.07), rgba(255,255,255,.02) 62%, rgba(15,5,10,.5));
  box-shadow: 0 18px 50px rgba(3,1,4,.24), inset 0 1px rgba(255,255,255,.055);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
#publicResultsContainer > div:hover {
  transform: translateY(-5px);
  border-color: rgba(143,216,243,.34);
  box-shadow: 0 25px 60px rgba(3,1,4,.32), 0 0 0 1px rgba(143,216,243,.06);
}
#publicResultsContainer > div > div:nth-child(2) { background: rgba(7,12,17,.38); }
#publicResultsContainer > div img { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
#publicResultsContainer > div img:hover { transform: scale(1.045); }
#packages {
  max-width: 90rem;
  border-radius: 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(143,216,243,.065), transparent 48%);
}
#packages > div:first-child > div:first-child { color: #a8def2 !important; }
.footer, footer { border-color: rgba(143,216,243,.12); }
.glass-btn:hover, .outline-btn:hover {
  border-color: var(--brand-blue-line);
  background-color: var(--brand-blue-glass);
}
.gold-btn, .maroon-btn {
  box-shadow: 0 10px 28px rgba(5, 2, 7, .22);
}
.gold-btn:hover:not(:disabled), .maroon-btn:hover:not(:disabled) {
  box-shadow: 0 14px 34px rgba(5, 2, 7, .34);
}

/* Consultation forms and chat: visual polish only; all existing controls stay in place. */
.admin-input, input:not([type="checkbox"]):not([type="radio"]),
select, textarea {
  border-color: rgba(143, 216, 243, .17);
}
.admin-input:focus, input:focus, select:focus, textarea:focus {
  border-color: rgba(143, 216, 243, .58) !important;
  box-shadow: 0 0 0 3px rgba(97, 191, 235, .10);
}
#liveChatCard, #doctorChatModal > div,
#patientInChatCallDrawer, #doctorInChatJitsiContainer,
#patientInChatJitsiContainer {
  border-color: var(--brand-blue-line);
}
#chatMessagesBox, #chatMessages {
  scrollbar-color: rgba(143, 216, 243, .35) transparent;
  scrollbar-width: thin;
}
#chatMessagesBox::-webkit-scrollbar, #chatMessages::-webkit-scrollbar { width: 7px; }
#chatMessagesBox::-webkit-scrollbar-thumb, #chatMessages::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(143, 216, 243, .32);
}
#chatSendForm, #doctorChatModal form {
  background: linear-gradient(135deg, rgba(143, 216, 243, .07), rgba(255, 255, 255, .035));
  border-color: rgba(143, 216, 243, .18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#chatInputText, #chatSendForm input, #doctorChatModal input[type="text"] {
  background: rgba(13, 29, 39, .42) !important;
  border-color: rgba(143, 216, 243, .24) !important;
}
#patientPhotoUploadBtn, #doctorTogglePhotoUploadBtn {
  color: #c9efff;
  background: rgba(58, 151, 194, .18);
  border-color: rgba(143, 216, 243, .34);
}

/* Admin workspace: clearer hierarchy across existing dashboard sections and controls. */
body.bg-\[\#220811\] {
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(74, 153, 193, .12), transparent 35rem),
    radial-gradient(ellipse at 95% 30%, rgba(105, 45, 66, .15), transparent 40rem);
}
.nav-tab { border: 1px solid transparent; }
.nav-tab.active {
  color: #d7f3ff;
  background: linear-gradient(135deg, rgba(97, 191, 235, .17), rgba(255, 255, 255, .055));
  border-color: rgba(143, 216, 243, .30);
  box-shadow: inset 0 1px rgba(255, 255, 255, .09);
}
.nav-tab:hover:not(.active) {
  background: rgba(143, 216, 243, .08);
  border-color: rgba(143, 216, 243, .14);
}
#adminAuthModal > div, #doctorChatModal > div,
#patientDetailsModal > div, #addConsultationModal > div {
  border: 1px solid rgba(143, 216, 243, .17);
  box-shadow: var(--brand-shadow);
}
#doctorChatModal > div { background-color: #20101a; }
#doctorChatModal header, #doctorChatModal .border-b,
#doctorChatModal .border-t {
  border-color: rgba(143, 216, 243, .15) !important;
}
#doctorLockChatBtn, #doctorTogglePhotoUploadBtn { min-width: 44px; }
#desktopTableBody tr, #mobileConsultationsList > div {
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
#desktopTableBody tr:hover { background: rgba(143, 216, 243, .045); }
body.bg-\[\#220811\] > header {
  background: rgba(24, 7, 13, .88) !important;
  border-color: rgba(143,216,243,.14) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
body.bg-\[\#220811\] > header > div:nth-child(2) {
  background: rgba(8, 6, 10, .22);
  border-color: rgba(143,216,243,.08) !important;
}
#section-dashboard > .glass-card:first-child {
  border-color: rgba(143,216,243,.22);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(143,216,243,.16), transparent 48%),
    linear-gradient(115deg, rgba(61,20,36,.92), rgba(25,8,15,.96)) !important;
}
#section-dashboard > .grid > .glass-card,
#section-dashboard > .glass-card:not(:first-child),
#section-consultations .glass-card,
#section-results > .glass-card,
#section-packages > .glass-card,
#section-payments > .glass-card,
#section-followups > .glass-card,
#section-staff > .glass-card {
  border-color: rgba(143,216,243,.13);
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02) 70%, rgba(20,7,13,.35));
  box-shadow: 0 18px 48px rgba(5,2,7,.2), inset 0 1px rgba(255,255,255,.035);
}
#section-results > .glass-card > div:first-child button,
#section-results #resultsManagerGrid > div,
#addResultModal > div {
  border-radius: 1.2rem;
}
#section-results #resultsManagerGrid > div {
  border-color: rgba(143,216,243,.15);
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.02) 72%, rgba(19,7,13,.48));
  box-shadow: 0 18px 45px rgba(4,1,5,.24), inset 0 1px rgba(255,255,255,.04);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
#section-results #resultsManagerGrid > div:hover {
  transform: translateY(-4px);
  border-color: rgba(143,216,243,.36);
  box-shadow: 0 24px 54px rgba(4,1,5,.3);
}
#section-results #resultsManagerGrid img {
  border-radius: .9rem;
  border-color: rgba(143,216,243,.18);
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}
#section-results #resultsManagerGrid > div > div:first-child button {
  padding: .45rem .7rem;
  border: 1px solid rgba(255,126,142,.22);
  border-radius: 999px;
  background: rgba(116,25,43,.22);
}
#resultsManagerGrid > div > div:nth-child(2) > div:first-child img { border-color: rgba(255,255,255,.12); }
#resultsManagerGrid > div > div:nth-child(2) > div:last-child img { border-color: rgba(143,216,243,.34); }
#adminAuthModal > div {
  border-color: rgba(143,216,243,.20);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(143,216,243,.12), transparent 55%),
    linear-gradient(150deg, #28111c, #19080f) !important;
}
#doctorChatModal > div {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(97,191,235,.10), transparent 46%),
    #20101a !important;
}
#doctorChatModal #doctorChatMessages,
#chatMessagesBox {
  background: linear-gradient(180deg, rgba(30,17,27,.85), rgba(10,9,14,.9)) !important;
}
#doctorChatModal #doctorChatPatientTitle { color: #fff7ef; }
#doctorChatModal #doctorChatPatientSubtitle { color: #a8def2 !important; }
#doctorChatModal #doctorLockChatBtn { border-color: rgba(143,216,243,.24); }
#resultsManagerGrid:empty { display: none; }
.modal-container {
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  border-color: rgba(143,216,243,.2);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(143,216,243,.1), transparent 50%),
    linear-gradient(155deg, #2b111d, #19080f) !important;
  box-shadow: 0 35px 100px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.06);
}
.modal-overlay { padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
#patientChatModal > div {
  border: 1px solid rgba(143,216,243,.2);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(97,191,235,.1), transparent 46%),
    #20101a !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
}
#jitsiCallModal, #doctorInChatCallDrawer, #patientInChatCallDrawer {
  border-color: rgba(143,216,243,.22) !important;
}

/* One responsive system, tuned for compact phones, tablets, and desktop screens. */
@media (max-width: 767px) {
  .header-nav { padding: .65rem 0; }
  .header-nav > div { padding-inline: 1rem; min-height: 3.5rem; }
  .header-logo-container {
    transform: scale(.88);
    transform-origin: right center;
    margin-right: -.35rem;
  }
  .header-logo-container > div:first-child { font-size: 1.8rem !important; }
  .header-nav .mobile-only { gap: .45rem; }
  .header-nav .mobile-only > button:first-child {
    min-height: 40px;
    padding: .45rem .7rem;
    background: rgba(143, 216, 243, .08);
    border-color: rgba(143, 216, 243, .25);
  }
  .header-nav .mobile-only > button:last-child { min-width: 42px; min-height: 42px; }

  .hero-section {
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 1.25rem;
  }
  #results {
    width: calc(100% - 1.25rem);
    padding-inline: 1rem !important;
    border-radius: 1.25rem;
  }
  #results h2 { font-size: clamp(1.4rem, 7vw, 2rem) !important; line-height: 1.45; }
  #packages { padding-inline: 1rem !important; border-radius: 1.25rem; }
  #packages h2 { font-size: clamp(1.35rem, 6.5vw, 1.85rem) !important; line-height: 1.45; }
  #publicResultsContainer { gap: 1rem !important; }
  #publicResultsContainer > div { border-radius: 1.15rem; }
  .features-banner { padding: 2.5rem 1rem !important; }
  .features-banner h2 { font-size: 1.35rem !important; line-height: 1.55; }
  .package-card { padding: 1.2rem !important; }
  #floatingChatBtn { border-color: rgba(143,216,243,.33) !important; }
  #resultsManagerGrid { gap: .85rem !important; }
  #section-results #resultsManagerGrid > div { padding: .85rem !important; }
  #section-results #resultsManagerGrid > div > div:nth-child(2) { gap: .55rem !important; }
  #section-results #resultsManagerGrid img { aspect-ratio: 1 / 1; }
  .hero-section > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    gap: .5rem !important;
    padding-inline: 1rem;
  }
  .hero-section > div > div:first-child {
    order: 2;
    width: 100% !important;
    padding-top: 1rem !important;
    text-align: center !important;
  }
  .hero-section > div > div:first-child > :not([hidden]) ~ :not([hidden]) {
    margin-top: .7rem !important;
  }
  .hero-section h1 {
    font-size: clamp(2rem, 8vw, 2.45rem) !important;
    line-height: 1.18 !important;
    margin-bottom: .25rem !important;
  }
  .hero-section > div > div:first-child > div:nth-child(2) {
    font-size: clamp(1rem, 4vw, 1.2rem) !important;
    margin-bottom: .8rem !important;
  }
  .hero-section p {
    max-width: 34rem !important;
    font-size: .9rem !important;
    line-height: 1.9 !important;
    margin-top: .65rem !important;
  }
  .hero-section > div > div:last-child {
    order: 1;
    align-self: center !important;
    justify-content: center !important;
    align-items: flex-end !important;
    width: 100% !important;
    max-width: 25rem;
    height: clamp(230px, 37svh, 315px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 1.5rem 1.5rem .5rem .5rem;
    background: radial-gradient(ellipse at 50% 35%, rgba(143,216,243,.12), rgba(255,255,255,.025) 55%, transparent 76%);
  }
  .hero-section > div > div:last-child img {
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center bottom !important;
  }
  .hero-section .separator { margin-inline: auto; }
  .hero-section > div > div:first-child > div[style*="max-width: 280px"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .65rem !important;
    max-width: 31rem !important;
    margin-inline: auto !important;
  }
  .hero-section > div > div:first-child > div[style*="max-width: 280px"] > * {
    min-height: 48px;
    padding: .75rem .65rem !important;
    font-size: .82rem !important;
    line-height: 1.45;
  }
  .hero-section > div > div:first-child > div:last-child { margin-bottom: .75rem !important; }
  .features-banner, main section { scroll-margin-top: 5rem; }
  .modal-container {
    width: calc(100vw - 1.25rem) !important;
    max-height: calc(100dvh - 1.25rem) !important;
    padding: 1.1rem !important;
    border-radius: 1.25rem !important;
  }
  #patientChatModal { padding: 0 !important; }
  #patientChatModal > div {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #patientChatModal > div > div:first-child { padding: .75rem !important; }
  #patientChatModal #patientChatMessages { padding: .85rem !important; }
  #floatingChatBtn {
    right: max(1rem, env(safe-area-inset-right)) !important;
    bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
    min-width: 3.5rem !important;
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
    border-width: 1px !important;
    border-radius: 50% !important;
    background: rgba(29, 18, 28, .92) !important;
    color: #dff5ff !important;
    border-color: rgba(143,216,243,.42) !important;
    box-shadow: 0 10px 28px rgba(10, 4, 10, .46), inset 0 1px rgba(255,255,255,.12) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  #floatingChatBtn > span { display: none !important; }
  #floatingChatBtn > svg { width: 1.35rem !important; height: 1.35rem !important; }

  body.bg-\[\#220811\] > header { position: sticky; top: 0; }
  body.bg-\[\#220811\] > header > div:first-child {
    min-height: 3.8rem;
    padding-inline: 1rem;
  }
  body.bg-\[\#220811\] > header > div:nth-child(2) { padding-inline: .65rem; }
  .nav-tab { padding: .6rem .75rem; font-size: .72rem; }
  body.bg-\[\#220811\] > header + main {
    padding: 1.1rem 1rem 2rem !important;
    gap: 1.1rem !important;
  }
  #section-dashboard, #section-consultations, #section-colors,
  #section-results, #section-packages, #section-payments,
  #section-followups, #section-staff { gap: 1rem !important; }
  body.bg-\[\#220811\] > header + main > section[class*="space-y"] > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem !important;
  }
  #section-dashboard .glass-card, #section-consultations .glass-card {
    border-radius: 1.2rem;
  }
  #section-consultations .glass-card { padding: 1rem !important; }
  #doctorChatModal { padding: 0 !important; }
  #doctorChatModal > div {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #doctorChatModal > div > div:first-child { padding: .65rem !important; gap: .55rem !important; }
  #doctorChatModal > div > div:first-child > div:nth-child(2) { gap: .4rem !important; }
  #doctorChatModal > div > div:nth-last-child(2) { padding: .65rem !important; }
  #doctorChatMessages { padding: .85rem !important; }
  #doctorPrescriptionDrawer { max-height: 38dvh; overflow-y: auto; }
  #liveChatCard {
    height: min(76dvh, 760px) !important;
    min-height: 390px;
    border-radius: 1.25rem !important;
  }
  #chatMessagesBox { padding: .85rem !important; }
  #chatSendForm { padding: .65rem !important; padding-bottom: max(.65rem, env(safe-area-inset-bottom)) !important; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .hero-section {
    min-height: clamp(680px, 88svh, 900px);
    padding-top: 6rem;
    padding-bottom: 2rem;
  }
  #results, #packages { width: calc(100% - 3rem); }
  #publicResultsContainer { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #section-results #resultsManagerGrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hero-section > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(270px, .82fr);
    align-items: center !important;
    gap: clamp(1.5rem, 4vw, 3.5rem) !important;
    height: auto !important;
    padding-inline: clamp(1.5rem, 4vw, 3rem);
  }
  .hero-section > div > div:first-child {
    width: 100% !important;
    padding-top: 0 !important;
    text-align: right !important;
  }
  .hero-section > div > div:last-child {
    width: 100% !important;
    height: clamp(390px, 58svh, 620px) !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: end !important;
  }
  .hero-section > div > div:last-child img {
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: bottom center !important;
  }
  .hero-section h1 { font-size: clamp(2.4rem, 5vw, 3.4rem) !important; }
  .hero-section p { font-size: clamp(.9rem, 1.4vw, 1rem) !important; max-width: 34rem !important; }
  #floatingChatBtn { right: 1.25rem !important; bottom: 1.25rem !important; }
  body.bg-\[\#220811\] > header + main { padding-inline: 1.5rem !important; }
  #doctorChatModal > div { width: min(94vw, 780px) !important; height: 90dvh !important; }
}

@media (min-width: 1200px) {
  .desktop-only { display: flex !important; }
  .mobile-only { display: none !important; }
  .hero-section { min-height: min(900px, 100svh); }
  .hero-section > div { gap: clamp(2rem, 5vw, 5rem) !important; }
  .hero-section > div > div:first-child { padding-top: clamp(3rem, 8vh, 7.5rem) !important; }
  #section-results #resultsManagerGrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  body.bg-\[\#220811\] > header + main { padding-inline: clamp(1.5rem, 4vw, 4rem) !important; }
}

/* Respect reduced-motion settings and retain the original responsive layouts. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Chat and patient profile refinement. Visual styling only; all existing actions and IDs stay intact. */
#patientChatModal > div,
#liveChatCard,
#doctorChatModal > div {
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .06);
}
#patientChatModal > div > div:first-child,
#liveChatCard > div:first-child,
#doctorChatModal > div > div:first-child {
  background: linear-gradient(125deg, rgba(58, 22, 38, .97), rgba(23, 15, 25, .96)) !important;
  border-color: rgba(143, 216, 243, .16) !important;
}
#patientChatMessages,
#chatMessagesBox,
#doctorChatMessages {
  min-height: 0;
  overscroll-behavior: contain;
  scroll-padding-block: 1rem;
}
#patientChatMessages > *,
#chatMessagesBox > *,
#doctorChatMessages > * { overflow-wrap: anywhere; }
#chatSendForm,
#doctorChatModal form {
  gap: .65rem !important;
  padding: .8rem !important;
  padding-bottom: max(.8rem, env(safe-area-inset-bottom)) !important;
}
#chatInputText,
#chatSendForm input,
#doctorChatModal #doctorChatInput,
#patientChatModal #patientChatInput {
  min-height: 48px !important;
  border-radius: 1rem !important;
  padding-inline: 1rem !important;
  color: #fff !important;
  background: rgba(10, 23, 31, .58) !important;
  border: 1px solid rgba(143, 216, 243, .24) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
#chatSendForm button[type="submit"],
#doctorChatModal form button[type="submit"],
#patientChatModal form button[type="submit"] {
  min-width: 48px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 1rem !important;
  flex: 0 0 48px !important;
}
#patientProfileModal .modal-container {
  border-radius: 1.65rem;
}
#patientProfileModal .modal-container > div:first-child {
  align-items: center;
  padding-bottom: 1rem;
  border-color: rgba(143,216,243,.18);
}
#patientProfileModal .modal-container > div:first-child h2 {
  letter-spacing: -.025em;
}
#patientLoginView > button,
#patientLoginView form button,
#patientDashboardView > div:first-child,
#patientConsultationsList > div {
  border-radius: 1.15rem;
}
#patientDashboardView > div:first-child {
  background: radial-gradient(ellipse at 100% 0%, rgba(143,216,243,.12), transparent 58%), linear-gradient(120deg, rgba(230,207,161,.10), rgba(255,255,255,.025)) !important;
  border-color: rgba(230,207,161,.25) !important;
  gap: 1rem;
}
#patientConsultationsList > div {
  background: linear-gradient(150deg, rgba(255,255,255,.065), rgba(255,255,255,.02) 66%, rgba(11,5,10,.32));
  border-color: rgba(143,216,243,.14);
  box-shadow: 0 14px 38px rgba(0,0,0,.19);
}

@media (max-width: 767px) {
  #doctorChatModal > div > div:first-child > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem !important;
    padding-top: .6rem;
    overflow: visible !important;
  }
  #doctorChatModal > div > div:first-child > div:nth-child(2) > button {
    min-width: 0 !important;
    width: 100%;
    min-height: 42px !important;
    padding: .5rem .55rem !important;
    border-radius: .9rem !important;
    white-space: normal;
    line-height: 1.35;
    font-size: .7rem !important;
  }
  #doctorChatModal > div > div:first-child > div:nth-child(2) > button:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(72%, 16rem);
  }
  #doctorChatModal #doctorChatInput,
  #patientChatModal #patientChatInput,
  #chatSendForm input { font-size: 16px !important; }
  #patientProfileModal { padding: max(.55rem, env(safe-area-inset-top)) .55rem max(.55rem, env(safe-area-inset-bottom)) !important; }
  #patientProfileModal .modal-container {
    width: 100% !important;
    max-height: calc(100dvh - 1.1rem) !important;
    padding: 1rem !important;
    border-radius: 1.25rem !important;
  }
  #patientProfileModal .modal-container > div:first-child { gap: .65rem; margin-bottom: 1rem; }
  #patientProfileModal .modal-container > div:first-child h2 { font-size: 1rem; }
  #patientProfileModal .modal-container > div:first-child p { max-width: 17rem; line-height: 1.65; }
  #patientDashboardView > div:first-child { align-items: flex-start; flex-direction: column; }
  #patientDashboardView > div:first-child > button { align-self: flex-start; }
  #patientConsultationsList > div { padding: 1rem !important; }
  #patientConsultationsList > div > div:first-child { align-items: flex-start; gap: .65rem; }
  #patientConsultationsList > div > div:first-child > span:last-child { max-width: 52%; text-align: center; line-height: 1.45; }
  #patientConsultationsList .grid-cols-3 { grid-template-columns: 1fr !important; text-align: right; }
  #patientChatModal form { padding: .7rem !important; padding-bottom: max(.7rem, env(safe-area-inset-bottom)) !important; }
}
