@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* ================================================================
   ACUITY PREMIUM OPTICS — GLOBAL STYLESHEET
   Theme variables are defined in themes.css (loaded before this)
   ================================================================ */

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Offset anchor jumps so target sections aren't hidden under the sticky navbar */
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-page, #f0f6ff);
    color: var(--text-primary, #0f172a);
    font-family: var(--font-body, 'Inter', sans-serif);
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.3s ease;
}

/* Font variables (not in themes.css since they don't change per theme) */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --radius-lg: 14px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ambient Soft Spotlights */
body::before {
    content: '';
    position: fixed;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--spot-top, rgba(2, 132, 199, 0.04)) 0%, transparent 70%);
    top: -350px;
    right: -150px;
    pointer-events: none;
    z-index: 0;
    transition: background 0.5s ease;
}

body::after {
    content: '';
    position: fixed;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--spot-bottom, rgba(14, 165, 233, 0.03)) 0%, transparent 70%);
    bottom: -350px;
    left: -150px;
    pointer-events: none;
    z-index: 0;
    transition: background 0.5s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.grid-layout-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 991px) {
    .grid-layout-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Premium Minimalist Card */
.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: var(--transition);
    position: relative;
}

.premium-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    box-shadow: var(--shadow-card), var(--shadow-premium);
    transform: translateY(-4px);
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
    background: var(--bg-navbar, rgba(248, 250, 252, 0.88));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-thin);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 14px 0;
    background: var(--bg-nav-scrolled, rgba(255, 255, 255, 0.97));
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand svg {
    stroke: var(--accent);
}

.navbar-brand span {
    font-weight: 300;
    color: var(--text-secondary);
}

.navbar-toggler {
    display: none;
    background: none;
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    padding: 7px;
    transition: var(--transition);
}

.navbar-toggler:hover {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
    }
}

.navbar-collapse {
    display: flex;
    align-items: center;
}

@media (max-width: 991px) {
    .navbar-collapse {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-page);
        border-top: 1px solid var(--border-thin);
        padding: 24px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }
    .navbar-collapse.show {
        display: block;
    }
}

.navbar-nav {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 4px;
}

@media (max-width: 991px) {
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
}

.nav-link {
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.btn-portal-login {
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    font-family: var(--font-body);
}

.btn-nav-book {
    background: transparent;
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    font-weight: 500;
    padding: 8px 22px !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    font-size: 0.86rem;
}

.btn-nav-book:hover {
    background: var(--accent);
    color: var(--text-on-accent) !important;
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding-bottom: 6px;
    margin-bottom: 24px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.08;
    margin-bottom: 24px;
    font-weight: 300;
}

.hero h1 span {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent);
}

.hero p.lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 540px;
    font-weight: 300;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 48px;
    padding-top: 30px;
    border-top: 1px solid var(--border-thin);
}

.hero-sn {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.1;
    font-family: var(--font-heading);
}

.hero-sl {
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* Hero Right Side - Premium Image Frame */
.hero-image-frame {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image-frame::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
}

.image-canvas {
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-thin);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    position: relative;
    z-index: 2;
    background: var(--bg-card);
}

.image-canvas img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(10%) contrast(105%);
    transition: var(--transition);
}

.image-canvas:hover img {
    transform: scale(1.03);
}

.hfloat {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    z-index: 10;
}

.hfloat.c1 {
    bottom: 15%;
    left: -30px;
    border-left: 3px solid var(--accent);
}

.hfloat.c2 {
    top: 15%;
    right: -30px;
    border-left: 3px solid var(--accent);
}

.hfi {
    font-size: 1.2rem;
    color: var(--accent);
    display: flex;
    align-items: center;
}

.hft {
    font-weight: 600;
    color: var(--text-primary);
}

.hfd {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

@media (max-width: 991px) {
    .hfloat { display: none; }
    .hero-image-frame { margin-top: 40px; }
}

/* ================================================================
   SECTION HEADERS
   ================================================================ */
section {
    padding: 110px 0;
    border-bottom: 1px solid var(--border-thin);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    section { padding: 70px 0; }
}

.section-hdr {
    max-width: 600px;
    margin: 0 auto 70px;
    text-align: center;
}

.section-hdr.left {
    text-align: left;
    margin: 0 0 40px 0;
}

.sec-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.sec-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.15;
}

.sec-title span {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent);
}

.sec-sub {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.7;
}

/* ================================================================
   ABOUT SECTION & METRICS
   ================================================================ */
.about-visual-canvas {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-thin);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    background: var(--bg-card);
}

.about-visual-canvas img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(15%);
}

.about-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}

.metric-panel {
    padding: 24px;
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    transition: var(--transition);
}

.metric-panel:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.metric-num {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--accent);
    margin-bottom: 6px;
    font-family: var(--font-heading);
}

.metric-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ================================================================
   CORE VALUES GRID
   ================================================================ */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.value-panel {
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-thin);
    background: var(--bg-card);
    transition: var(--transition);
}

.value-panel:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.value-index {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
    opacity: 0.65;
}

.value-panel h5 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.value-panel p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ================================================================
   SERVICES GRID
   ================================================================ */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.svc-panel {
    padding: 36px 28px;
}

.svc-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.svc-icon-wrapper svg {
    stroke: var(--accent);
    width: 26px;
    height: 26px;
}

.svc-panel h5 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.svc-panel p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ================================================================
   DOCTORS Roster Cards
   ================================================================ */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.doc-card {
    padding: 0;
    overflow: hidden;
}

.doc-card-header {
    height: 160px;
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, var(--accent-light) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-thin);
}

.doc-avatar-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-glow);
}

.doc-spec-label {
    position: absolute;
    bottom: 12px;
    left: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.doc-body-pad {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.doc-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.doc-title-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.doc-specs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.doc-spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-spec-item svg {
    stroke: var(--accent);
    flex-shrink: 0;
}

.doc-availability-box {
    font-size: 0.78rem;
    border: 1px solid var(--border-thin);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    background: var(--accent-light);
    flex-grow: 1;
}

.doc-actions-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 10px;
}

/* ================================================================
   BUTTON SYSTEM
   ================================================================ */
.btn-gold-fill {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.btn-gold-fill:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-gold-fill:active {
    transform: translateY(0);
}

.btn-gold-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-thin);
    padding: 11px 26px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.86rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-gold-outline:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* ================================================================
   TIMINGS BOARD
   ================================================================ */
.timings-board-layout {
    background: var(--bg-card);
    border: 1px solid var(--border-thin);
    padding: 36px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
}

.board-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-thin);
}

.board-row:last-child {
    border-bottom: none;
}

.board-day {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.board-time {
    color: var(--accent);
    font-weight: 600;
}

.board-status-beacon {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-light);
    border: 1px solid var(--border-active);
    color: var(--accent);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 30px;
}

.beacon-pulse {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: beaconPulse 2s infinite;
    flex-shrink: 0;
}

@keyframes beaconPulse {
    0% { transform: scale(0.95); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.4; }
}

/* ================================================================
   FAQ PANEL ACCORDIONS
   ================================================================ */
.faq-accordion-group {
    max-width: 760px;
    margin: 0 auto;
}

.faq-card {
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    background: var(--bg-card);
    transition: var(--transition);
    overflow: hidden;
}

.faq-header-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.96rem;
    text-align: left;
    transition: var(--transition);
}

.faq-header-trigger:hover {
    color: var(--accent);
}

.faq-indicator-icon {
    font-size: 1.2rem;
    color: var(--accent);
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-body-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-body-content p {
    padding: 0 24px 22px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

.faq-card.active {
    border-color: var(--border-active);
    background: var(--accent-light);
}

.faq-card.active .faq-indicator-icon {
    transform: rotate(45deg);
}

.faq-card.active .faq-body-content {
    display: block;
    max-height: 300px;
}

/* ================================================================
   CONTACT LIST CARDS
   ================================================================ */
.contact-item-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.contact-item-panel:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.contact-icon-box {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-info-desc h6 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.contact-info-desc p, .contact-info-desc a {
    font-size: 0.84rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.contact-info-desc a:hover {
    color: var(--accent);
}

.contact-map-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-thin);
    height: 320px;
    box-shadow: var(--shadow-premium);
}

.contact-map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
    background-color: var(--footer-bg, #0f1f35);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 80px 0 0;
    transition: background-color 0.4s ease;
}

.footer-top-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
}

@media (max-width: 768px) {
    .footer-top-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-brand-column h5 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--footer-head, #ffffff);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand-column h5 svg {
    stroke: var(--accent);
}

.footer-brand-column p {
    font-size: 0.88rem;
    color: var(--footer-text, rgba(255,255,255,0.55));
    max-width: 460px;
    line-height: 1.7;
}

.footer-links-column h6 {
    color: var(--footer-head, #ffffff);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.footer-links-column ul {
    list-style: none;
}

.footer-links-column ul li {
    margin-bottom: 10px;
}

.footer-links-column ul li a {
    color: var(--footer-text, rgba(255,255,255,0.55));
    font-size: 0.86rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links-column ul li a:hover {
    color: var(--accent);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 22px 0;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--footer-text, rgba(255,255,255,0.4));
}

@media (max-width: 575px) {
    .footer-bottom-flex {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ================================================================
   MODAL OVERLAYS
   ================================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.50);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-glass-frame {
    width: 100%;
    max-width: 540px;
    background: var(--bg-card-hover, rgba(255, 255, 255, 0.98));
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-glass-frame {
    transform: scale(1) translateY(0);
}

.modal-close-trigger {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    z-index: 100;
}

.modal-close-trigger:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-banner {
    padding: 28px 30px;
    border-bottom: 1px solid var(--border-thin);
    background: var(--accent-light);
}

.modal-banner h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
}

.modal-banner p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.modal-body-pad {
    padding: 28px 30px;
    max-height: 65vh;
    overflow-y: auto;
}

/* ================================================================
   FORMS
   ================================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.form-control {
    width: 100%;
    background: var(--bg-input, #ffffff);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-sm);
    padding: 11px 15px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.select-control {
    background-color: var(--bg-input, #ffffff);
    cursor: pointer;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 575px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

/* Time Slot grid */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.slot-btn {
    padding: 10px 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-thin);
    background: var(--bg-input, transparent);
    color: var(--text-secondary);
    text-align: center;
    transition: var(--transition);
    font-family: var(--font-body);
}

.slot-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.slot-btn.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-glow);
    font-weight: 600;
}

.slot-btn:disabled {
    background: var(--border-thin);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Submission action button */
.btn-submit {
    width: 100%;
    margin-top: 10px;
}

/* Portal Login Modal - Premium Redesign */
.login-modal-frame {
    display: flex;
    width: 100%;
    max-width: 820px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
}

.modal-overlay.active .login-modal-frame {
    transform: scale(1) translateY(0);
}

/* Left panel: Branding & Features */
.login-panel-left {
    flex: 1;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    padding: 48px 40px;
    color: var(--text-on-accent);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Soft decorative glow for a premium feel */
.login-panel-left::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
    top: -140px;
    right: -120px;
    pointer-events: none;
}

.login-panel-left > * {
    position: relative;
    z-index: 1;
}

.login-close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-accent);
    cursor: pointer;
    transition: var(--transition);
}

.login-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.login-brand-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-brand-mark svg {
    stroke: currentColor;
}

.login-panel-headline {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.25;
    color: var(--text-on-accent);
}

.login-panel-sub {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 32px;
    opacity: 0.85;
}

.login-feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}

.login-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Right panel: Form */
.login-panel-right {
    flex: 1.1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-card);
}

.login-form-header {
    margin-bottom: 28px;
}

.login-form-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-align: left;
}

.login-form-header p {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.login-role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.login-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--bg-page);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.login-role-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
}

.login-role-card.active {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 1px var(--accent);
}

.lrc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.25s ease;
}

.login-role-card:hover .lrc-icon,
.login-role-card.active .lrc-icon {
    color: var(--accent);
}

.lrc-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-primary);
}

.login-form-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.login-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 0.88rem;
    background: var(--bg-input);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition);
}

.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.login-eye-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.login-eye-toggle:hover {
    color: var(--accent);
}

.login-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.login-submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.login-submit-btn svg {
    stroke: currentColor;
}

.login-disclaimer {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 24px;
    text-align: center;
}

/* Responsive adjustments for Login Modal */

/* Tablet & below: stack panels, condense the branding so the form leads */
@media (max-width: 768px) {
    .login-modal-frame {
        flex-direction: column;
        max-width: 460px;
        max-height: 92vh;
        overflow-y: auto;
    }

    .login-panel-left {
        padding: 24px 28px;
    }

    .login-panel-left::before {
        display: none;
    }

    .login-close-btn {
        top: 14px;
        right: 14px;
        left: auto;
    }

    .login-brand-mark {
        margin-bottom: 12px;
    }

    .login-panel-headline {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    /* The marketing copy/features are decorative on small screens —
       hide them so the credentials form is immediately reachable. */
    .login-panel-sub,
    .login-feature-list {
        display: none;
    }

    .login-panel-right {
        padding: 26px 28px 30px;
    }
}

/* Phones: full-width, larger touch targets, no input zoom on iOS */
@media (max-width: 480px) {
    .login-modal-frame {
        max-width: 100%;
        border-radius: var(--radius-md);
    }

    .login-role-card {
        padding: 12px 6px;
    }

    .login-input {
        padding: 14px 14px 14px 42px;
        font-size: 16px; /* >=16px prevents iOS auto-zoom on focus */
    }

    .login-submit-btn {
        padding: 14px;
        font-size: 0.95rem;
    }

    .login-disclaimer {
        margin-top: 18px;
    }
}

/* ================================================================
   TOAST NOTIFICATION
   ================================================================ */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover, rgba(255, 255, 255, 0.98));
    border: 1px solid var(--border-thin);
    color: var(--text-primary);
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    font-family: var(--font-body);
    max-width: 320px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-left: 3px solid #10b981; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid var(--accent); }

/* ================================================================
   THEME SWITCHER UI (shown in admin settings panel)
   ================================================================ */
.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.theme-swatch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border-thin);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-card);
    position: relative;
}

.theme-swatch:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.theme-swatch-active {
    border-color: var(--accent) !important;
    background: var(--accent-light) !important;
    box-shadow: var(--shadow-card);
}

.theme-swatch-preview {
    position: relative;
    width: 44px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ts-bg {
    position: absolute;
    inset: 0;
}

.ts-card {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 3px;
}

.ts-accent {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.theme-swatch-info {
    flex-grow: 1;
    min-width: 0;
}

.theme-swatch-name {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-swatch-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

.theme-swatch-check {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 700;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-swatch-active .theme-swatch-check {
    opacity: 1;
}

/* ================================================================
   ACCESSIBILITY & UX ENHANCEMENTS (shared across all pages)
   ================================================================ */

/* Visible keyboard-focus ring for all interactive elements.
   Only shows for keyboard users (:focus-visible), not on mouse click. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.nav-link:focus-visible,
.theme-swatch:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Respect users who prefer reduced motion — disable heavy transitions/animations */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ================================================================
   BACK-TO-TOP BUTTON (public site)
   ================================================================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-thin);
    background: var(--accent);
    color: var(--text-on-accent, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-glow, 0 4px 20px rgba(0,0,0,0.15));
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover, var(--accent));
    transform: translateY(-2px);
}

@media (max-width: 575px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

/* ================================================================
   CONNECTION STATUS BANNER (offline / back-online)
   ================================================================ */
.conn-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 10px 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--success, #10b981);
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.conn-banner.show {
    transform: translateY(0);
}

.conn-banner.offline {
    background: var(--danger, #ef4444);
}

/* ================================================================
   LOADING AFFORDANCES — skeleton shimmer + spinner (smoothness)
   ================================================================ */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--border-thin, rgba(128, 128, 128, 0.12));
    border-radius: var(--radius-sm);
    color: transparent !important;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent
    );
    animation: skeleton-sweep 1.3s infinite;
}

@keyframes skeleton-sweep {
    100% { transform: translateX(100%); }
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    border: 2px solid var(--border-thin, rgba(128, 128, 128, 0.25));
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinner-rotate 0.7s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* ================================================================
   SMOOTHER THEMED SCROLLBARS
   ================================================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-glow, rgba(128, 128, 128, 0.4)) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-thin, rgba(128, 128, 128, 0.25));
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--accent-glow, rgba(128, 128, 128, 0.5));
    background-clip: content-box;
}

/* ================================================================
   SPECIALIST INFO DIALOG
   ================================================================ */
.specialist-modal-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}

.specialist-modal-head .doc-avatar-initials {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Override the card's absolutely-positioned label for use inside the dialog */
.specialist-modal-head .doc-spec-label {
    position: static;
    display: inline-block;
    margin-top: 6px;
    color: var(--accent);
}
