/* === DESIGN TOKENS === */
:root {
    --brand-brown: rgb(114, 53, 13);
    --brand-brown-light: rgb(164, 100, 52);
    --brand-red: rgb(254, 28, 12);
    --warm-cream: #fdf6ee;
    --warm-amber: #f5e6d3;
    --warm-orange-light: #fff4e6;
    --warm-orange-50: rgba(255, 237, 213, 0.7);
    --warm-shadow: rgba(114, 53, 13, 0.12);
    --warm-shadow-hover: rgba(114, 53, 13, 0.22);
    --font-heading: 'Lora', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', Arial, sans-serif;
    --slot-green: #16a34a;
    --slot-red: #dc2626;

    /* Muted, earthy branch-accent palette - deliberately desaturated so it
       sits next to the brown/cream/amber palette instead of clashing with
       it the way bright primary colors do. */
    --accent-terracotta: #c97b5f;
    --accent-gold: #cf9d3e;
    --accent-rose: #c98a8a;
    --accent-sage: #84976f;
    --accent-teal: #5f9b95;
    --accent-taupe: #a3886c;
    --accent-plum: #9b7a96;
    --accent-sienna: #b8633f;
}

body.bg-gray-100 {
    font-family: var(--font-body);
    background-color: transparent !important;
    background-image: url('/static/images/background.jpg') !important;
    background-size: cover; /* Scales the image to cover the entire background */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents tiling */
    background-attachment: fixed; /* Keeps the background fixed during scroll */
    min-height: 100vh; /* Ensures the body takes at least the full viewport height */    
}


.footer-text {
    clear: both;
    display: block;
    bottom: 10px; /* Slightly offset from the bottom */
    left: 0;
    width: 100%;
    text-align: center;
    color: white; /* Keep text white for visibility on background */
    background-color: transparent; /* No background color */
    padding: 10px 0; /* Minimal padding for spacing */
    font-size: 1rem; /* Adjust size as needed */
    z-index: 10; /* Ensure text is above other elements */
}

.site-header {
    background-color: rgb(254, 28, 12);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 20;
    font-family: "Calibri Light", sans-serif;
    font-weight: 300;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.site-header h1 {
    font-size: 2rem; /* Larger title (32px) */
    letter-spacing: 0.3rem; /* Increased letter spacing for all header text */
}

.site-header a {
    font-size: 1.5rem; /* Links stay at 24px */
}

/* Dropdown styling for Practitioner link */
.site-header .relative.group {
    position: relative;
}

.site-header .group-hover\:block {
    background-color: rgb(254, 28, 12); /* Match site-header */
    min-width: 150px; /* Ensure dropdown is wide enough */
}

.practitioner-heading {
    text-align: center;
    color: rgb(114, 53, 13);
    font-size: 2rem;
    background-color: transparent;
    padding: 2rem 0;
    margin: 1rem 0;
    position: relative; /* For future graphic positioning */
    z-index: 10;
}

.practitioner-heading h2 {
    font-family: Georgia, serif;
    font-size: 4rem; /* Large size to make text prominent */
    color: rgb(114, 53, 13); /* White for contrast; adjust if needed */
    line-height: 1.2; /* Adjust spacing between lines */
   /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Optional shadow for readability */

}

.welcome-heading {
    text-align: center;
    background-color: transparent;
    padding: 2rem 0;
    margin: 1rem 0;
    position: relative; /* For future graphic positioning */
    z-index: 10;
}

.welcome-heading h2 {
    font-family: Georgia, serif;
    font-size: 7rem; /* Large size to make text prominent */
    color: rgb(114, 53, 13); /* White for contrast; adjust if needed */
    line-height: 1.2; /* Adjust spacing between lines */
   /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Optional shadow for readability */
}

.welcome-logo {
    display: block;
    margin: 1rem auto 0; /* Center horizontally, add top margin */
    max-width: 100%; /* Prevent overflow */
    height: auto; /* Maintain aspect ratio */
}


.welcome-content {
    font-family: Calibri, serif;
    font-size: 1.2rem; /* Slightly larger for readability */
    color: rgb(114, 53, 13) !important; /* Brown font color */
    background-color: transparent; /* Show background image */
    text-align: center; /* Optional: center text for consistency */
}

.centered-container {
        max-width: 945px;
        margin: 0 auto;
        padding: 1rem;
    }

.boxed-table {
        border: 2px solid rgb(114, 53, 13);
        color: rgb(114, 53, 13) !important;
        border-radius: 0.5rem;
        overflow: hidden;
        background-color: #e5e7eb; /* Gray background */
    }

.container {
    max-width: 1200px;
}
nav a:hover {
    color: rgb(254, 28, 12);
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
header, main, footer {
    padding: 20px;
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease
}

nav ul li a:hover {
    text-decoration: underline;
    background-color: #ffffff; /* Tailwind bg-blue-500 for subtle contrast */
}

/* === LOCATIONS PAGE HEADER & TOOLBAR === */
.locations-page-header {
    max-width: clamp(900px, 90vw, 1400px);
    margin: 0 auto clamp(1.5rem, 2vw, 2.5rem);
    padding: 0 clamp(1rem, 2vw, 2rem);
}

.locations-title {
    font-family: var(--font-heading);
    color: var(--brand-brown);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
    text-align: center;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 4px rgba(114, 53, 13, 0.1);
}

.locations-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    background: linear-gradient(135deg, var(--warm-cream) 0%, #fffbf5 100%);
    border: 2px solid var(--warm-amber);
    border-radius: clamp(12px, 1.5vw, 18px);
    padding: clamp(0.75rem, 1.2vw, 1.25rem) clamp(1rem, 2vw, 2rem);
    box-shadow:
        0 4px 16px var(--warm-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    flex-wrap: wrap;
    position: relative;
}

/* Subtle decorative accent */
.locations-toolbar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: clamp(12px, 1.5vw, 18px);
    background: linear-gradient(145deg, transparent 30%, rgba(254, 28, 12, 0.02) 100%);
    pointer-events: none;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

.month-nav-btn {
    background: linear-gradient(135deg, var(--brand-brown), var(--brand-brown-light));
    color: white;
    border: none;
    border-radius: clamp(8px, 1vw, 10px);
    width: clamp(36px, 4vw, 44px);
    height: clamp(36px, 4vw, 44px);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(114, 53, 13, 0.25);
    font-weight: 700;
}

.month-nav-btn:hover {
    background: linear-gradient(135deg, var(--brand-brown-light), var(--brand-brown));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 53, 13, 0.35);
}

.month-nav-btn:active {
    transform: translateY(0);
}

.month-display-text {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 700;
    color: var(--brand-brown);
    min-width: clamp(140px, 20vw, 200px);
    text-align: center;
    letter-spacing: 0.02em;
}

.location-selector {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

.location-label {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--brand-brown);
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
}

.location-dropdown {
    font-family: var(--font-body);
    padding: clamp(0.5rem, 0.8vw, 0.65rem) clamp(0.75rem, 1.2vw, 1rem);
    border: 2px solid var(--warm-amber);
    border-radius: clamp(8px, 1vw, 10px);
    background: white;
    color: var(--brand-brown);
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    min-width: clamp(160px, 20vw, 220px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.location-dropdown:hover {
    border-color: var(--brand-brown-light);
    box-shadow: 0 3px 8px rgba(114, 53, 13, 0.15);
}

.location-dropdown:focus {
    outline: none;
    border-color: var(--brand-brown);
    box-shadow: 0 0 0 3px rgba(114, 53, 13, 0.15);
}

#month-display {
    margin: 10px 20px;
    font-weight: bold;
}

#prev-month, #next-month {
    padding: 5px 10px;
    margin: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#prev-month:hover, #next-month:hover {
    background-color: #0056b3;
}

#location-select {
    margin: 10px;
    padding: 5px;
}

/* === UPGRADED CLINIC CARDS === */
.clinic-box {
    font-family: var(--font-body);
    color: var(--brand-brown) !important;
    padding: 0;
    border-radius: clamp(12px, 1.5vw, 18px);
    width: clamp(18rem, 22vw, 24rem) !important;
    text-align: center;
    background: linear-gradient(145deg, var(--warm-cream) 0%, #fffbf5 45%, white 100%);
    box-shadow:
        0 8px 24px var(--warm-shadow),
        0 2px 8px rgba(114, 53, 13, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Colored rectangle header instead of a bright glowing border - the
   branch's accent color lives here, in one contained block, instead of
   washing over the whole card. Background color is set inline per-branch
   by locations.js. */
.clinic-card-header {
    padding: 0.6rem 1.1rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.clinic-card-header .clinic-branch {
    margin-bottom: 0;
    color: white;
    text-shadow: none;
    font-size: clamp(1.15em, 1.6vw, 1.4em);
}

.clinic-card-header .clinic-date {
    margin-bottom: 0;
    color: white;
    font-size: clamp(0.85em, 1.1vw, 1em);
    font-weight: 600;
    opacity: 0.95;
    white-space: nowrap;
}

.clinic-card-body {
    padding: clamp(1rem, 2vw, 1.75rem);
}

/* Collapsed by default; expands on hover (mouse) or .expanded (tap/click,
   for touch devices where :hover doesn't fire reliably). */
.clinic-extra {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
}

.clinic-box:hover .clinic-extra,
.clinic-box.expanded .clinic-extra {
    max-height: 30rem;
    opacity: 1;
    margin-top: 0.75rem;
}

.clinic-expand-hint {
    font-size: 0.75rem;
    color: var(--brand-brown-light);
    opacity: 0.75;
    margin-top: 0.5rem;
    transition: opacity 0.2s;
}

.clinic-box:hover .clinic-expand-hint,
.clinic-box.expanded .clinic-expand-hint {
    opacity: 0;
    height: 0;
    margin: 0;
}

/* Legend swatch - a small rounded rectangle, matching the card header
   treatment, instead of a bright glowing circle. */
.branch-legend-chip {
    width: 2.25rem;
    height: 1.25rem;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Decorative corner accent */
.clinic-box::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(254, 28, 12, 0.08), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.3s;
}

.clinic-box:hover::before {
    opacity: 0.5;
}

.clinic-box:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 16px 40px var(--warm-shadow-hover),
        0 6px 16px rgba(114, 53, 13, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

#clinics-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 2vw, 2rem);
    justify-content: center;
    max-width: clamp(900px, 90vw, 1400px);
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 2vw, 2rem);
}

#clinics-container .clinic-box {
    border: 1px solid transparent;
    padding: 1.25rem;
    border-radius: 12px;
    width: 20rem !important;
    text-align: center;
}

#clinics-container .clinic-box p {
    margin: 5px 0;
}

/* === CLINIC CARD INTERIOR ELEMENTS === */
.clinic-date {
    font-family: var(--font-heading);
    font-size: clamp(1.1em, 1.5vw, 1.4em);
    color: var(--brand-brown);
    margin-bottom: 0.25rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.clinic-branch {
    font-family: var(--font-heading);
    font-size: clamp(1.3em, 1.8vw, 1.6em);
    color: var(--brand-brown);
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(114, 53, 13, 0.1);
}

.clinic-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--warm-amber), transparent);
    margin: clamp(0.5rem, 1vw, 0.75rem) 0;
    opacity: 0.6;
}

.clinic-detail {
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    margin: clamp(0.25rem, 0.5vw, 0.4rem) 0;
    line-height: 1.5;
}

.clinic-label {
    font-weight: 700;
    color: var(--brand-brown);
}

.clinic-link {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.clinic-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.clinic-time {
    font-family: var(--font-heading);
    font-size: clamp(1.1em, 1.4vw, 1.3em);
    margin: 0.6em 0;
    color: var(--brand-brown);
    font-weight: 600;
    padding: clamp(4px, 0.6vw, 8px) clamp(8px, 1vw, 12px);
    background: rgba(114, 53, 13, 0.05);
    border-radius: 6px;
    display: inline-block;
}

.clinic-slots {
    font-size: clamp(1.2em, 1.6vw, 1.4em);
    margin: 0.75em 0;
    font-weight: 700;
    padding: clamp(4px, 0.6vw, 8px) clamp(8px, 1vw, 14px);
    border-radius: 8px;
    display: inline-block;
}

.slots-available {
    color: var(--slot-green);
    background: rgba(22, 163, 74, 0.08);
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
}

.slots-full {
    color: var(--slot-red);
    background: rgba(220, 38, 38, 0.08);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
}

.clinic-action-btn {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    font-weight: 600;
    padding: clamp(0.5rem, 0.8vw, 0.65rem) clamp(1rem, 1.5vw, 1.4rem);
    border: none;
    border-radius: clamp(6px, 0.8vw, 10px);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    margin: clamp(0.2rem, 0.4vw, 0.3rem);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.clinic-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.clinic-action-btn:active {
    transform: translateY(0);
}

.clinic-add-btn {
    background: linear-gradient(135deg, var(--slot-green), #15803d);
    color: white;
}

.clinic-add-btn:hover {
    background: linear-gradient(135deg, #15803d, #166534);
}

.clinic-view-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.clinic-view-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* === CALENDAR VIEW === */
.calendar-container {
    max-width: clamp(700px, 85vw, 1400px);
    min-width: 700px !important;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

/* Helpful hint for calendar interaction */
.calendar-hint {
    background: linear-gradient(135deg, #fff4e6 0%, #fffbf5 100%);
    border: 2px solid var(--warm-amber);
    border-radius: clamp(8px, 1vw, 12px);
    padding: clamp(0.6rem, 1vw, 1rem) clamp(1rem, 1.5vw, 1.5rem);
    margin-bottom: clamp(0.75rem, 1vw, 1.25rem);
    text-align: center;
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--brand-brown);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(114, 53, 13, 0.1);
    animation: fadeInDown 0.4s ease-out, gentlePulse 2s ease-in-out 0.5s 3;
    position: relative;
}

.calendar-hint::before {
    content: '👆';
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    margin-right: 0.5rem;
    display: inline-block;
    animation: pointDown 1.5s ease-in-out infinite;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes pointDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.calendar-hint.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
    grid-auto-rows: 1fr;
    gap: 6px;
    min-width: 650px !important;
    min-height: 500px !important;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(145deg, var(--warm-amber) 0%, #eddcc5 100%);
    border-radius: clamp(12px, 1.5vw, 20px);
    padding: 8px;
    box-shadow:
        0 8px 24px var(--warm-shadow),
        0 2px 8px rgba(114, 53, 13, 0.08);
    position: relative;
}

/* Decorative accent corner */
.calendar-grid::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(40px, 6vw, 80px);
    height: clamp(40px, 6vw, 80px);
    background: radial-gradient(circle at top right, rgba(254, 28, 12, 0.15), transparent 70%);
    border-radius: 0 clamp(12px, 1.5vw, 20px) 0 0;
    pointer-events: none;
}

.calendar-header-cell {
    background: linear-gradient(180deg, var(--brand-brown) 0%, var(--brand-brown-light) 100%);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(0.75rem, 1.2vw, 1.1rem);
    text-align: center;
    padding: clamp(0.5rem, 1vw, 1rem) 0.25rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-header-cell:first-child { border-radius: clamp(8px, 1vw, 12px) 0 0 0; }
.calendar-header-cell:nth-child(7) { border-radius: 0 clamp(8px, 1vw, 12px) 0 0; }

/* Weekend header styling */
.calendar-header-cell:nth-child(6),
.calendar-header-cell:nth-child(7) {
    background: linear-gradient(180deg, rgba(114, 53, 13, 0.85) 0%, rgba(164, 100, 52, 0.85) 100%);
    opacity: 0.9;
}

.calendar-day {
    background: white;
    aspect-ratio: 1;
    min-width: 80px;
    padding: 0.5rem;
    border-radius: clamp(4px, 0.5vw, 8px);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Day/Evening time icon */
.calendar-time-icon {
    position: absolute;
    top: clamp(4px, 0.5vw, 6px);
    left: clamp(4px, 0.5vw, 6px);
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    line-height: 1;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    cursor: help;
    transition: transform 0.2s ease;
}

.calendar-day.has-clinic:hover .calendar-time-icon {
    transform: scale(1.15);
}

/* Evening icon (moon) - cool blue-grey tone */
.calendar-time-icon.evening-icon {
    filter:
        drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1))
        hue-rotate(180deg)
        saturate(0.4)
        brightness(0.9);
}

/* Weekend day cells (Sat=6, Sun=7 in each row) */
.calendar-day:nth-child(7n+6),
.calendar-day:nth-child(7n+7) {
    background: linear-gradient(135deg, #fef8f0 0%, #fdf4e8 100%);
}

.calendar-day.empty:nth-child(7n+6),
.calendar-day.empty:nth-child(7n+7) {
    background: linear-gradient(135deg, rgba(253, 237, 213, 0.4), rgba(251, 230, 200, 0.6));
}

.calendar-day-number {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.6vw, 1.6rem);
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 0.25rem;
    align-self: flex-end;
    line-height: 1;
}

.calendar-day.empty {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.3), rgba(255, 248, 240, 0.5));
    opacity: 0.5;
}

.calendar-day.empty .calendar-day-number {
    color: #d1d5db;
    font-weight: 600;
}

.calendar-day.has-clinic {
    background: linear-gradient(145deg, var(--warm-cream) 0%, #fff8f0 50%, white 100%);
    cursor: pointer;
    border: clamp(2px, 0.25vw, 3px) solid var(--brand-brown);
    box-shadow:
        0 2px 8px rgba(114, 53, 13, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.calendar-day.has-clinic .calendar-day-number {
    color: var(--brand-brown);
    font-weight: 800;
}

.calendar-day.has-clinic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--brand-brown), transparent);
    opacity: 0.3;
    border-radius: clamp(4px, 0.5vw, 8px) clamp(4px, 0.5vw, 8px) 0 0;
}

.calendar-day.has-clinic:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 12px 28px var(--warm-shadow-hover),
        0 4px 12px rgba(114, 53, 13, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    z-index: 2;
    border-color: var(--brand-brown-light);
}

.calendar-day.has-clinic:active {
    transform: translateY(-2px) scale(1.01);
}

.calendar-day.today {
    box-shadow:
        inset 0 0 0 clamp(2px, 0.3vw, 3px) var(--brand-red),
        0 0 0 clamp(1px, 0.15vw, 2px) rgba(254, 28, 12, 0.3),
        0 2px 8px rgba(114, 53, 13, 0.12);
    animation: pulse-today 2s ease-in-out infinite;
}

@keyframes pulse-today {
    0%, 100% { box-shadow: inset 0 0 0 clamp(2px, 0.3vw, 3px) var(--brand-red), 0 0 0 clamp(1px, 0.15vw, 2px) rgba(254, 28, 12, 0.3), 0 2px 8px rgba(114, 53, 13, 0.12); }
    50% { box-shadow: inset 0 0 0 clamp(2px, 0.3vw, 3px) var(--brand-red), 0 0 0 clamp(2px, 0.3vw, 4px) rgba(254, 28, 12, 0.5), 0 4px 12px rgba(114, 53, 13, 0.18); }
}

.calendar-day.today .calendar-day-number {
    color: var(--brand-red);
    font-weight: 700;
}

.calendar-clinic-indicator {
    width: clamp(8px, 1.2vw, 14px);
    height: clamp(8px, 1.2vw, 14px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-brown-light), var(--brand-brown));
    margin: 2px auto;
    box-shadow: 0 2px 4px rgba(114, 53, 13, 0.3);
}

.calendar-clinic-time {
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 1.2vw, 1.1rem);
    font-weight: 700;
    color: var(--brand-brown);
    text-align: center;
    line-height: 1.3;
    margin-top: 0.25rem;
    padding: clamp(3px, 0.4vw, 6px) clamp(6px, 0.8vw, 10px);
    background: rgba(114, 53, 13, 0.08);
    border-radius: clamp(4px, 0.5vw, 6px);
}

.calendar-clinic-slots {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1.1vw, 1rem);
    font-weight: 800;
    text-align: center;
    margin-top: clamp(3px, 0.5vw, 8px);
    padding: clamp(2px, 0.3vw, 4px) clamp(6px, 0.8vw, 10px);
    border-radius: clamp(4px, 0.5vw, 6px);
}

.calendar-clinic-slots.available {
    color: var(--slot-green);
    background: rgba(22, 163, 74, 0.08);
}

.calendar-clinic-slots.full {
    color: var(--slot-red);
    background: rgba(220, 38, 38, 0.08);
}

.calendar-multi-indicator {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(2px, 0.4vw, 4px);
    justify-content: center;
    margin-top: clamp(2px, 0.4vw, 4px);
}

/* === CLINIC DETAIL MODAL === */
#clinic-detail-modal {
    z-index: 9999 !important;
}

.clinic-detail-modal-inner {
    background: linear-gradient(145deg, var(--warm-cream) 0%, #fffbf5 40%, white 100%) !important;
    border: 3px solid var(--warm-amber);
    border-radius: clamp(16px, 2vw, 24px) !important;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.25),
        0 8px 24px rgba(114, 53, 13, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: clamp(400px, 50vw, 600px) !important;
    position: relative;
    overflow: hidden;
}

/* Decorative accent */
.clinic-detail-modal-inner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(60px, 10vw, 100px);
    height: clamp(60px, 10vw, 100px);
    background: radial-gradient(circle at top right, rgba(254, 28, 12, 0.12), transparent 70%);
    border-radius: 0 clamp(16px, 2vw, 24px) 0 50%;
    pointer-events: none;
}

.clinic-detail-header {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 700;
    color: var(--brand-brown);
    margin-bottom: 0.3rem;
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(114, 53, 13, 0.1);
    position: relative;
}

.clinic-detail-date {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--brand-brown-light);
    text-align: center;
    margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
    font-weight: 600;
}

.clinic-detail-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clinic-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: clamp(0.5rem, 0.8vw, 0.7rem) clamp(0.3rem, 0.6vw, 0.5rem);
    border-bottom: 1px solid rgba(245, 230, 211, 0.5);
    transition: background 0.2s;
}

.clinic-detail-row:hover {
    background: rgba(253, 246, 238, 0.4);
}

.clinic-detail-label {
    font-weight: 700;
    color: var(--brand-brown);
    font-size: clamp(0.85rem, 1.1vw, 1rem);
}

.clinic-detail-value {
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: #374151;
    text-align: right;
    font-weight: 500;
}

.clinic-detail-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* === WARM MODAL STYLING (Add Client & View/Edit Clients) === */
#add-client-modal,
#modify-view-modal {
    z-index: 9999 !important;
}

#add-client-modal > div,
#modify-view-modal > div {
    background: linear-gradient(135deg, var(--warm-cream) 0%, white 100%) !important;
    border: 2px solid var(--warm-amber);
    border-radius: 16px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    font-family: var(--font-body);
}

#add-client-modal h2,
#modify-view-modal h2 {
    font-family: var(--font-heading);
    color: var(--brand-brown);
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 2px solid var(--warm-amber);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

#add-client-modal label,
#modify-view-modal label {
    color: var(--brand-brown);
    font-weight: 600;
    font-size: 0.9rem;
}

#add-client-modal input[type="text"],
#add-client-modal input[type="tel"],
#add-client-modal input[type="time"] {
    border: 2px solid var(--warm-amber) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.75rem !important;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

#add-client-modal input:focus {
    outline: none;
    border-color: var(--brand-brown) !important;
    box-shadow: 0 0 0 3px rgba(114, 53, 13, 0.15);
}

#add-client-modal button[type="submit"] {
    background-color: var(--slot-green) !important;
    border-radius: 8px !important;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

#add-client-modal button[type="submit"]:hover {
    background-color: #15803d !important;
    transform: scale(1.02);
}

#cancel-client-btn {
    border-radius: 8px !important;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

#cancel-client-btn:hover {
    transform: scale(1.02);
}

#modify-view-modal > div {
    min-width: 600px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
}

#modify-view-modal table {
    border-collapse: collapse;
    width: 100%;
}

#modify-view-modal thead tr {
    background: var(--warm-amber) !important;
}

#modify-view-modal th {
    color: var(--brand-brown) !important;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

#modify-view-modal td {
    font-family: var(--font-body);
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

#modify-view-modal tbody tr:nth-child(even) {
    background-color: var(--warm-orange-50);
}

#modify-view-modal tbody tr:hover {
    background-color: var(--warm-amber);
}

#close-modify-view-btn {
    background-color: var(--brand-brown) !important;
    border-radius: 8px !important;
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.2s, transform 0.1s;
}

#close-modify-view-btn:hover {
    background-color: var(--brand-brown-light) !important;
    transform: scale(1.02);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    flex-shrink: 0;
}

#autocomplete-dropdown {
    position: absolute;
    background-color: white;
    border: 1px solid #d1d5db; /* Tailwind gray-300 */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 200px;
    max-height: 200px;
    overflow-y: auto;
    top: 100%; /* Position below the input */
    left: 0;
    margin-top: 2px;
}

#autocomplete-dropdown div {
    padding: 8px;
    cursor: pointer;
}

#autocomplete-dropdown div:hover {
    background-color: #f3f4f6; /* Tailwind gray-100 */
}


.practitioner-toggle {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}

.practitioner-toggle:hover {
    background-color: #0056b3;
}

#login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#login-modal.hidden {
    display: none;
}

#login-modal.opacity-100 {
    opacity: 1;
}

#login-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#login-modal input {
    border: 1px solid #ccc;
    padding: 8px;
    margin-bottom: 10px;
    width: 100%;
    border-radius: 4px;
}

#login-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#login-modal button {
    background-color: #2563eb; /* Tailwind bg-blue-600 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
}

#login-modal button:hover {
    background-color: #1d4ed8; /* Tailwind bg-blue-700 */
}

#login-modal button[type="button"] {
    background-color: #6b7280; /* Tailwind bg-gray-500 */
}

#login-modal button[type="button"]:hover {
    background-color: #4b5563; /* Tailwind bg-gray-600 */
}


.login-prompt {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}

.login-prompt:hover {
    background-color: #0056b3;
}

/* Modal styles */
#login-modal, #create-clinic-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#login-modal.hidden, #create-clinic-modal.hidden {
    display: none;
}

#login-modal.opacity-100, #create-clinic-modal.opacity-100 {
    opacity: 1;
}

#login-modal .modal-content, #create-clinic-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#login-modal input, #create-clinic-modal input, #create-clinic-modal select {
    border: 1px solid #ccc;
    padding: 8px;
    margin-bottom: 10px;
    width: 100%;
    border-radius: 4px;
}

#login-modal label, #create-clinic-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#login-modal button, #create-clinic-modal button {
    background-color: #2563eb; /* Tailwind bg-blue-600 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
}

#login-modal button:hover, #create-clinic-modal button:hover {
    background-color: #1d4ed8; /* Tailwind bg-blue-700 */
}

#login-modal button[type="button"], #create-clinic-modal button[type="button"] {
    background-color: #6b7280; /* Tailwind bg-gray-500 */
}

#login-modal button[type="button"]:hover, #create-clinic-modal button[type="button"]:hover {
    background-color: #4b5563; /* Tailwind bg-gray-600 */
}

/* Clinic table styles */
#clinics-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

#clinics-table th, #clinics-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#clinics-table th {
    background-color: #e5e7eb; /* Tailwind bg-gray-200 */
    font-weight: bold;
}

#clinics-table .delete-clinic-btn {
    background-color: #dc2626; /* Tailwind bg-red-600 */
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#clinics-table .delete-clinic-btn:hover {
    background-color: #b91c1c; /* Tailwind bg-red-700 */
}

#clinics-table .edit-clinic-btn {
    background-color: #2563eb; /* Tailwind bg-blue-600 */
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px; /* Space between edit and delete buttons */
}

#clinics-table .edit-clinic-btn:hover {
    background-color: #1d4ed8; /* Tailwind bg-blue-700 */
}

#edit-clinic-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#edit-clinic-modal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#edit-clinic-modal input,
#edit-clinic-modal select {
    border: 1px solid #ccc;
    padding: 8px;
    margin-bottom: 10px;
    width: 100%;
    border-radius: 4px;
}

#edit-clinic-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#edit-clinic-modal button[type="submit"] {
    background-color: #16a34a; /* Tailwind bg-green-600 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#edit-clinic-modal button[type="submit"]:hover {
    background-color: #15803d; /* Tailwind bg-green-700 */
}

#edit-clinic-modal button[type="button"] {
    background-color: #6b7280; /* Tailwind bg-gray-500 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#edit-clinic-modal button[type="button"]:hover {
    background-color: #4b5563; /* Tailwind bg-gray-600 */
}

div#client-lookup {
    display: none; /* Hidden by default for non-authenticated users */
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* Left-justify label and search-container */
    gap: 5px; /* Tighter gap for closer alignment */
    margin-bottom: 10px;
    overflow: visible;
}

#client-lookup label {
    font-weight: bold;
    color: #1f2937; /* Tailwind gray-800 */
    text-align: left; /* Ensure left alignment */
    margin: 0; /* Reset margins */
    padding: 0; /* Reset padding */
    flex-shrink: 0; /* Prevent label from shrinking */
}

#client-search-input {
    border: 1px solid #ccc;
    padding: 8px;
    width: 250px;
    border-radius: 4px;
    font-size: 14px;
    color: #1f2937; /* Tailwind gray-800 */
}

#client-search-input::placeholder {
    color: #9ca3af; /* Tailwind gray-400 */
    font-style: italic;
}

#clear-search-btn {
    background-color: #6b7280; /* Tailwind gray-500 */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

#clear-search-btn:hover {
    background-color: #4b5563; /* Tailwind gray-600 */
}

#search-client-btn {
    background-color: #2563eb; /* Tailwind blue-600 */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}

#search-client-btn:hover {
    background-color: #1d4ed8; /* Tailwind blue-700 */
}



#client-lookup-results {
    position: absolute;
    top: calc(100% + 0.5rem); /* Position just below search container */
    left: 0;
    width: 100%;
    max-width: 800px; /* Match table width to UI */
    background-color: white;
    border: 1px solid #d1d5db; /* Tailwind gray-300 */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 900; /* Below autocomplete but above other content */
}

#client-lookup-results table {
    width: 100%;
    border-collapse: collapse;
}

#client-lookup-results th,
#client-lookup-results td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#client-lookup-results th {
    background-color: #f3f4f6; /* Tailwind gray-100 */
    font-weight: bold;
}

#client-lookup-results tbody tr:nth-child(even) {
    background-color: #f9fafb; /* Tailwind gray-50 */
}

#practitioners-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

#practitioners-table th, #practitioners-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

#practitioners-table th {
    background-color: #e5e7eb; /* Tailwind bg-gray-200 */
    font-weight: bold;
}

#practitioners-table .delete-practitioner-btn {
    background-color: #dc2626; /* Tailwind bg-red-600 */
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#practitioners-table .delete-practitioner-btn:hover {
    background-color: #b91c1c; /* Tailwind bg-red-700 */
}

#add-practitioner-btn {
    background-color: #16a34a; /* Tailwind bg-green-600 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#add-practitioner-btn:hover {
    background-color: #15803d; /* Tailwind bg-green-700 */
}

#add-practitioner-modal button[type="submit"] {
    background-color: #16a34a; /* Tailwind bg-green-600 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#add-practitioner-modal button[type="submit"]:hover {
    background-color: #15803d; /* Tailwind bg-green-700 */
}

#add-practitioner-modal button[type="button"] {
    background-color: #6b7280; /* Tailwind bg-gray-500 */
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#add-practitioner-modal button[type="button"]:hover {
    background-color: #4b5563; /* Tailwind bg-gray-600 */
}

/* === ENTRANCE ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-grid {
    animation: fadeInUp 0.4s ease-out;
}

.clinic-box {
    animation: fadeInUp 0.3s ease-out backwards;
}

.clinic-box:nth-child(1) { animation-delay: 0.05s; }
.clinic-box:nth-child(2) { animation-delay: 0.1s; }
.clinic-box:nth-child(3) { animation-delay: 0.15s; }
.clinic-box:nth-child(4) { animation-delay: 0.2s; }
.clinic-box:nth-child(5) { animation-delay: 0.25s; }
.clinic-box:nth-child(6) { animation-delay: 0.3s; }

.locations-toolbar {
    animation: fadeInUp 0.3s ease-out;
}

/* === RESPONSIVE MEDIA QUERIES === */

/* Tablet and below */
@media (max-width: 768px) {
    .locations-toolbar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    /* Modals: full width on mobile */
    .clinic-detail-modal-inner {
        margin: 1rem;
        max-width: calc(100vw - 2rem) !important;
    }

    #add-client-modal > div,
    #modify-view-modal > div {
        margin: 1rem;
        max-width: calc(100vw - 2rem) !important;
        min-width: unset !important;
    }

    /* Client lookup: stack vertically */
    div#client-lookup {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-container {
        width: 100%;
    }

    #client-search-input {
        width: 100%;
    }

    /* Calendar: adjust for smaller screens */
    .calendar-grid {
        min-width: 100% !important;
        min-height: 380px !important;
        grid-auto-rows: 1fr;
        gap: 4px;
        padding: 6px;
    }

    .calendar-day {
        aspect-ratio: 1;
        padding: 0.35rem;
    }

    .calendar-container {
        min-width: 100% !important;
        padding: 0 0.5rem;
    }

    .calendar-day-number {
        font-size: 0.9rem;
    }

    .calendar-clinic-time {
        font-size: 0.65rem;
        padding: 2px 4px;
    }

    .calendar-clinic-slots {
        font-size: 0.6rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .site-header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .site-header h1 {
        font-size: 1.3rem;
        letter-spacing: 0.1rem;
    }

    .site-header a {
        font-size: 1rem;
    }

    nav ul {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .clinic-detail-actions {
        flex-direction: column;
    }

    .clinic-detail-actions .clinic-action-btn {
        width: 100%;
    }

    /* Disable stagger animation on small screens for faster load */
    .clinic-box {
        animation-delay: 0s !important;
    }
}

/* === SESSION EXPIRED OVERLAY === */
#session-expired-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.session-expired-box {
    background: linear-gradient(135deg, white 0%, var(--warm-cream) 100%);
    border: 3px solid var(--warm-amber);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.25),
        0 8px 24px var(--warm-shadow);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.session-expired-box h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-brown);
    margin: 0 0 1rem 0;
}

.session-expired-box p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.session-expired-box button {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--brand-brown) 0%, var(--brand-brown-light) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--warm-shadow);
}

.session-expired-box button:hover {
    background: linear-gradient(135deg, var(--brand-brown-light) 0%, var(--brand-brown) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--warm-shadow-hover);
}

/* ============================================
   ADMIN PAGE STYLES
   ============================================ */

/* Admin Page Header */
.admin-page-header {
    background: linear-gradient(135deg, var(--warm-cream) 0%, var(--warm-amber) 100%);
    border-radius: clamp(12px, 1.5vw, 20px);
    padding: clamp(1.5rem, 3vw, 3rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    box-shadow:
        0 clamp(4px, 0.5vw, 8px) clamp(12px, 1.5vw, 20px) var(--warm-shadow),
        0 clamp(2px, 0.3vw, 4px) clamp(6px, 0.8vw, 10px) var(--warm-shadow);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.admin-page-header::before,
.admin-page-header::after {
    content: '';
    position: absolute;
    width: clamp(40px, 5vw, 70px);
    height: clamp(40px, 5vw, 70px);
    border: clamp(2px, 0.3vw, 3px) solid var(--brand-brown);
    opacity: 0.15;
    pointer-events: none;
}

.admin-page-header::before {
    top: clamp(8px, 1vw, 15px);
    left: clamp(8px, 1vw, 15px);
    border-right: none;
    border-bottom: none;
    border-radius: clamp(4px, 0.5vw, 8px) 0 0 0;
}

.admin-page-header::after {
    bottom: clamp(8px, 1vw, 15px);
    right: clamp(8px, 1vw, 15px);
    border-left: none;
    border-top: none;
    border-radius: 0 0 clamp(4px, 0.5vw, 8px) 0;
}

.admin-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--brand-brown);
    margin: 0 0 clamp(0.5rem, 1vw, 0.75rem) 0;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(114, 53, 13, 0.1);
}

.admin-subtitle {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--brand-brown-light);
    margin: 0 0 clamp(1.5rem, 2.5vw, 2rem) 0;
    line-height: 1.5;
    font-weight: 400;
}

/* Admin Toolbar */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 2vw, 1.5rem);
    padding-top: clamp(1rem, 1.5vw, 1.5rem);
    border-top: 2px solid rgba(114, 53, 13, 0.1);
}

/* Admin Sections */
.admin-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 246, 238, 0.9) 100%);
    border-radius: clamp(12px, 1.5vw, 18px);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: clamp(2rem, 3vw, 3rem);
    box-shadow:
        0 clamp(4px, 0.5vw, 6px) clamp(12px, 1.5vw, 18px) var(--warm-shadow),
        0 clamp(2px, 0.3vw, 3px) clamp(6px, 0.8vw, 9px) var(--warm-shadow);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.admin-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(3px, 0.4vw, 5px);
    background: linear-gradient(90deg, var(--brand-brown) 0%, var(--brand-brown-light) 50%, var(--warm-amber) 100%);
    opacity: 0.6;
}

.practitioners-section {
    animation-delay: 0.1s;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
    padding-bottom: clamp(1rem, 1.5vw, 1.5rem);
    border-bottom: 2px solid rgba(114, 53, 13, 0.1);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: var(--brand-brown);
    margin: 0;
    letter-spacing: 0.01em;
}

/* Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: clamp(8px, 1vw, 12px);
    overflow: hidden;
    box-shadow:
        0 clamp(2px, 0.3vw, 4px) clamp(8px, 1vw, 12px) var(--warm-shadow);
    margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
    font-size: clamp(0.9rem, 1.3vw, 1rem);
}

.admin-table-header {
    background: linear-gradient(180deg, var(--brand-brown) 0%, var(--brand-brown-light) 100%);
    color: white;
    text-align: left;
}

.admin-table-header th {
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(0.5rem, 1vw, 1rem);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.2vw, 0.95rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none;
}

.admin-table tbody tr {
    background: white;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #fefefe 0%, #fdfaf7 100%);
}

.admin-table tbody tr:hover {
    background: linear-gradient(135deg, var(--warm-orange-light) 0%, var(--warm-cream) 100%);
    transform: translateX(clamp(2px, 0.3vw, 4px));
    box-shadow:
        clamp(-2px, -0.3vw, -4px) 0 clamp(6px, 0.8vw, 10px) var(--warm-shadow);
}

.admin-table tbody td {
    padding: clamp(0.65rem, 1.2vw, 0.9rem) clamp(0.5rem, 1vw, 1rem);
    border-top: 1px solid rgba(114, 53, 13, 0.08);
    border-bottom: 1px solid rgba(114, 53, 13, 0.08);
    color: #333;
}

.admin-table tbody td:first-child {
    border-left: 1px solid rgba(114, 53, 13, 0.08);
    border-radius: clamp(4px, 0.5vw, 6px) 0 0 clamp(4px, 0.5vw, 6px);
}

.admin-table tbody td:last-child {
    border-right: 1px solid rgba(114, 53, 13, 0.08);
    border-radius: 0 clamp(4px, 0.5vw, 6px) clamp(4px, 0.5vw, 6px) 0;
}

/* Admin Button Styles */
.admin-primary-btn,
.admin-secondary-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    padding: clamp(0.7rem, 1.2vw, 0.9rem) clamp(1.5rem, 2.5vw, 2rem);
    border-radius: clamp(6px, 0.8vw, 10px);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 clamp(2px, 0.3vw, 4px) clamp(6px, 0.8vw, 10px) var(--warm-shadow);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.admin-primary-btn {
    background: linear-gradient(135deg, var(--brand-brown) 0%, var(--brand-brown-light) 100%);
    color: white;
}

.admin-primary-btn:hover {
    background: linear-gradient(135deg, var(--brand-brown-light) 0%, var(--brand-brown) 100%);
    transform: translateY(clamp(-1px, -0.15vw, -2px));
    box-shadow:
        0 clamp(4px, 0.6vw, 8px) clamp(12px, 1.5vw, 18px) var(--warm-shadow-hover);
}

.admin-secondary-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.admin-secondary-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    transform: translateY(clamp(-1px, -0.15vw, -2px));
    box-shadow:
        0 clamp(4px, 0.6vw, 8px) clamp(12px, 1.5vw, 18px) rgba(22, 163, 74, 0.3);
}

/* Action Buttons in Table */
.admin-table .edit-clinic-btn,
.admin-table .edit-practitioner-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.8rem, 1.2vw, 1rem);
    border-radius: clamp(4px, 0.5vw, 6px);
    border: none;
    font-size: clamp(0.8rem, 1.1vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: clamp(0.3rem, 0.5vw, 0.5rem);
}

.admin-table .edit-clinic-btn:hover,
.admin-table .edit-practitioner-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.admin-table .delete-clinic-btn,
.admin-table .delete-practitioner-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.8rem, 1.2vw, 1rem);
    border-radius: clamp(4px, 0.5vw, 6px);
    border: none;
    font-size: clamp(0.8rem, 1.1vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-table .delete-clinic-btn:hover,
.admin-table .delete-practitioner-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Modal Improvements for Admin */
#create-clinic-modal,
#edit-clinic-modal,
#add-practitioner-modal,
#edit-practitioner-modal,
#admin-password-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(clamp(3px, 0.5vw, 5px));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: clamp(1rem, 2vw, 2rem);
    animation: fadeIn 0.3s ease-out;
}

#create-clinic-modal.hidden,
#edit-clinic-modal.hidden,
#add-practitioner-modal.hidden,
#edit-practitioner-modal.hidden,
#admin-password-modal.hidden {
    display: none;
}

#create-clinic-modal .modal-content,
#edit-clinic-modal .modal-content,
#add-practitioner-modal > div,
#edit-practitioner-modal > div,
#admin-password-modal > div {
    background: linear-gradient(135deg, white 0%, var(--warm-cream) 100%);
    border-radius: clamp(12px, 1.5vw, 20px);
    padding: clamp(1rem, 2vw, 1.75rem);
    max-width: clamp(400px, 90vw, 600px);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 clamp(8px, 1vw, 15px) clamp(30px, 4vw, 50px) rgba(0, 0, 0, 0.2),
        0 clamp(4px, 0.5vw, 8px) clamp(15px, 2vw, 25px) var(--warm-shadow);
    position: relative;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#create-clinic-modal h2,
#edit-clinic-modal h2,
#add-practitioner-modal h2,
#edit-practitioner-modal h3,
#admin-password-modal h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    font-weight: 700;
    color: var(--brand-brown);
    margin: 0 0 clamp(1.5rem, 2.5vw, 2rem) 0;
    letter-spacing: 0.01em;
}

/* Form Elements in Modals */
#create-clinic-modal label,
#edit-clinic-modal label,
#add-practitioner-modal label,
#edit-practitioner-modal label,
#admin-password-modal label {
    display: block;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: var(--brand-brown);
    margin-bottom: clamp(0.4rem, 0.6vw, 0.5rem);
    letter-spacing: 0.01em;
}

#create-clinic-modal input,
#create-clinic-modal select,
#edit-clinic-modal input,
#edit-clinic-modal select,
#add-practitioner-modal input,
#add-practitioner-modal select,
#edit-practitioner-modal input,
#edit-practitioner-modal select,
#admin-password-modal input,
#admin-password-modal select {
    width: 100%;
    padding: clamp(0.6rem, 1vw, 0.75rem);
    border: 2px solid rgba(114, 53, 13, 0.15);
    border-radius: clamp(6px, 0.8vw, 8px);
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-family: var(--font-body);
    margin-bottom: clamp(1rem, 1.5vw, 1.25rem);
    transition: all 0.25s ease;
    background: white;
}

#create-clinic-modal input:focus,
#create-clinic-modal select:focus,
#edit-clinic-modal input:focus,
#edit-clinic-modal select:focus,
#add-practitioner-modal input:focus,
#add-practitioner-modal select:focus,
#edit-practitioner-modal input:focus,
#edit-practitioner-modal select:focus,
#admin-password-modal input:focus,
#admin-password-modal select:focus {
    outline: none;
    border-color: var(--brand-brown);
    box-shadow: 0 0 0 3px var(--warm-orange-50);
}

/* Modal Buttons */
#create-clinic-modal button,
#edit-clinic-modal button,
#add-practitioner-modal button,
#edit-practitioner-modal button,
#admin-password-modal button {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    padding: clamp(0.6rem, 1vw, 0.75rem) clamp(1.2rem, 2vw, 1.5rem);
    border-radius: clamp(6px, 0.8vw, 8px);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: clamp(0.5rem, 0.8vw, 0.75rem);
    letter-spacing: 0.01em;
}

#create-clinic-modal button[type="submit"],
#edit-clinic-modal button[type="submit"],
#add-practitioner-modal button[type="submit"],
#edit-practitioner-modal button[type="submit"],
#admin-password-modal button[type="submit"] {
    background: linear-gradient(135deg, var(--brand-brown) 0%, var(--brand-brown-light) 100%);
    color: white;
}

#create-clinic-modal button[type="submit"]:hover,
#edit-clinic-modal button[type="submit"]:hover,
#add-practitioner-modal button[type="submit"]:hover,
#edit-practitioner-modal button[type="submit"]:hover,
#admin-password-modal button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--brand-brown-light) 0%, var(--brand-brown) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--warm-shadow-hover);
}

#create-clinic-modal button[type="button"],
#edit-clinic-modal button[type="button"],
#add-practitioner-modal button[type="button"],
#edit-practitioner-modal button[type="button"],
#admin-password-modal button[type="button"] {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

#create-clinic-modal button[type="button"]:hover,
#edit-clinic-modal button[type="button"]:hover,
#add-practitioner-modal button[type="button"]:hover,
#edit-practitioner-modal button[type="button"]:hover,
#admin-password-modal button[type="button"]:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(75, 85, 99, 0.3);
}

/* Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Adjustments for Admin */
@media (max-width: 768px) {
    .admin-toolbar,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border-radius: 8px;
        overflow: hidden;
    }

    .admin-table tbody td {
        display: block;
        text-align: right;
        padding: 0.75rem;
        border: none;
        border-bottom: 1px solid rgba(114, 53, 13, 0.08);
    }

    .admin-table tbody td:first-child {
        border-radius: 8px 8px 0 0;
    }

    .admin-table tbody td:last-child {
        border-radius: 0 0 8px 8px;
        border-bottom: none;
    }

    .admin-table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--brand-brown);
    }
}
