/* Beorga Care Pro - Responsive and unified design */

/* === New Design System (Beorga Center) === */
:root {
    --navy: #10233d;
    --gold: #a9793e;
    --light: #f8f7f4;
    --line: #ded8cf;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Inter', Arial, sans-serif;
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --accent: #f472b6;
    --text: #111827;
    --text-light: #4b5563;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --radius: 0.75rem;
    --container: 1280px;
    --gap: 1.5rem;
}

/* Language-specific fonts */
html[lang="ar"] {
    --serif: 'Cairo', 'Playfair Display', Georgia, serif;
    --sans: 'Cairo', 'Inter', Arial, sans-serif;
}

html[lang="ku"] {
    --serif: 'Beorga Kurdish', 'Tahoma', Arial, sans-serif;
    --sans: 'Beorga Kurdish', 'Tahoma', Arial, sans-serif;
}

/* === Site Header (new design) === */
.site-header {
    height: 92px;
    display: flex;
    align-items: center;
    padding: 0 6%;
    gap: 35px;
    background: #fff;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 16px #18243d12;
    direction: ltr;
}

.site-header .nav-links .mobile-actions {
    display: none;
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--navy);
    text-decoration: none;
    margin-right: auto;
}

.site-header .brand .brand-logo {
    height: 82px;
    width: auto;
    object-fit: contain;
}

.site-header .brand small {
    direction: rtl;
}

.site-header .brand .lotus {
    font-size: 42px;
    font-family: serif;
    color: var(--gold);
    line-height: .7;
    transform: rotate(180deg);
}

.site-header .brand strong {
    display: block;
    font: 700 25px var(--serif);
    letter-spacing: 3px;
}

.site-header .brand small {
    display: block;
    text-align: center;
    font: 16px var(--serif);
    letter-spacing: 1px;
}

.site-header .nav-links {
    display: flex;
    gap: 32px;
    height: 100%;
    align-items: center;
}

.site-header .nav-links a {
    height: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--navy);
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.site-header .nav-links a.active:after {
    content: '';
    position: absolute;
    bottom: 17px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gold);
}

.site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
}

.site-header .header-actions i {
    color: #aaa;
}

.site-header .header-actions .lang-current {
    font-weight: 600;
    color: var(--navy);
}

.site-header .header-actions a:not(.button) {
    color: var(--navy);
    text-decoration: none;
}

.site-header .menu-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 25px;
    color: var(--navy);
    cursor: pointer;
}

/* === Buttons (new design) === */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-radius: 7px;
    padding: 15px 22px;
    font-size: 14px;
    transition: .2s;
}

.button b {
    font-size: 20px;
    font-weight: 400;
    line-height: 10px;
}

.button .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.button.outline .btn-icon {
    filter: none;
}

.button.gold {
    background: linear-gradient(135deg, #bd9360, #8d602c);
    color: #fff;
    box-shadow: 0 5px 12px #98704530;
}

.button.gold:hover {
    transform: translateY(-2px);
}

.button.outline {
    border: 1px solid #b69b7d;
    color: #7b5c3a;
}

.button.small {
    padding: 14px 19px;
    margin-left: 14px;
}

.button.mini {
    padding: 9px 21px;
    margin-top: 12px;
    font-size: 13px;
}

/* === Hero (new design) === */
.hero {
    display: grid;
    grid-template-columns: 56% 44%;
    background: #fbfaf8;
}

.hero-visual {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.hero-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-visual:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #82604033, transparent 45%),
        repeating-linear-gradient(90deg, transparent 0 14%, #ffffff18 14.2% 14.5%);
}

.visual-mark {
    position: absolute;
    top: 100px;
    left: 11%;
    font: 100px var(--serif);
    color: #80532e;
    text-align: center;
    opacity: .9;
    z-index: 2;
}

.visual-mark small {
    display: block;
    font: 28px var(--serif);
    letter-spacing: 2px;
}

.reception-line {
    position: absolute;
    height: 90px;
    bottom: 0;
    left: 0;
    right: 48%;
    background: linear-gradient(#ded6cb, #f9f6f0);
    border-top: 8px solid #c5b8a7;
    box-shadow: 0 -12px 30px #6e523a26;
}

.hero-copy {
    padding: 62px 8% 30px 10%;
    background: radial-gradient(circle at 30% 50%, #fff, #f7f4f0);
}

.eyebrow {
    color: var(--gold);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2.5px;
    margin: 0 0 13px;
}

.hero h1 {
    font: 600 clamp(34px, 3.2vw, 50px) / 1.15 var(--serif);
    color: #111;
    margin: 0 0 18px;
}

.hero h1 em {
    font-style: normal;
    line-height: 1.4;
    display: inline-block;
}

.lead {
    font: 24px var(--serif);
    margin: 0 0 18px;
    color: #222;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.doctors-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px auto 0;
    max-width: 100%;
}

.doctors {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px;
    flex: 1;
}

.doctors::-webkit-scrollbar {
    display: none;
}

.doctors-nav {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: #fff;
    color: var(--gold);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    padding: 0 0 3px;
}

.doctors-nav:hover {
    background: var(--gold);
    color: #fff;
}

.doctors-nav:disabled {
    opacity: .35;
    cursor: default;
}

.doctor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    scroll-snap-align: start;
    flex: 0 0 calc(33.333% - 20px);
    width: calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
}

.doctor-photo {
    width: 120px;
    height: 140px;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--gold);
    border-radius: 8px;
    display: block;
}

.doctor strong,
.doctor span {
    display: block;
    font-family: var(--serif);
}

.doctor strong {
    font-size: 21px;
}

.doctor span {
    font-size: 16px;
    color: #777;
}

/* === Treatments (new design) === */
.treatments {
    padding: 26px 5% 32px;
    background: #fff;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.section-heading span {
    width: 55px;
    height: 1px;
    background: #9aa2ad;
}

.section-heading h2 {
    font: 600 27px var(--serif);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.card {
    min-height: 116px;
    padding: 20px 17px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #614051;
    border-radius: 9px;
    box-shadow: 0 4px 20px #25395812;
}

.card-icon {
    font: 46px var(--serif);
    color: #fff;
    flex-shrink: 0;
}

.card h3 {
    font: 500 20px / 1 var(--serif);
    margin: 0 0 8px;
    color: #fff;
}

.card p {
    font: 14px / 1.5 var(--serif);
    margin: 0;
    color: #e8d5e0;
}

.card > a {
    margin-left: auto;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #614051;
    text-decoration: none;
    font-size: 20px;
    flex-shrink: 0;
}

.card.featured {
    align-items: flex-start;
    background: #6d4a5c;
}

.card.featured h3 {
    font-size: 19px;
}

.card.featured .card-icon {
    font-size: 53px;
}

/* === Locations (new design) === */
.locations {
    padding: 27px 6%;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.locations-inner {
    text-align: center;
}

.locations-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.locations-header span {
    height: 1px;
    background: #9aa2ad;
    width: 160px;
}

.locations-label {
    font: 600 22px var(--serif);
    margin: 0;
    color: var(--navy);
    white-space: nowrap;
}

.locations-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid var(--gold);
    border-radius: 7px;
    color: var(--navy);
    text-decoration: none;
    font: 500 16px var(--serif);
    transition: .2s;
}

.location-btn .map-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.location-btn:hover {
    background: var(--gold);
    color: #fff;
}

/* Map tabs and embeds */
.map-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0 16px;
    flex-wrap: wrap;
}

.map-tab {
    padding: 10px 24px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    background: transparent;
    color: var(--navy);
    font: 600 15px var(--serif);
    cursor: pointer;
    transition: .2s;
}

.map-tab:hover {
    background: rgba(193, 162, 100, 0.1);
}

.map-tab.active {
    background: var(--gold);
    color: #fff;
}

.map-embed-wrap {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(110, 82, 58, 0.12);
}

.map-iframe {
    display: none;
    width: 100%;
    height: 450px;
    border: 0;
}

.map-iframe.active {
    display: block;
}

@media (max-width: 768px) {
    .map-iframe {
        height: 300px;
    }
}

/* === About (new design) === */
.about {
    text-align: center;
    padding: 75px 20px;
    background: #f8f6f2;
}

.about h2,
.contact h2 {
    font: 500 43px var(--serif);
    margin: 0 0 12px;
    color: #172a45;
}

.about > p:last-child {
    max-width: 650px;
    margin: auto;
    font: 18px / 1.6 var(--serif);
    color: #526176;
}

/* === Contact (new design) === */
.contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 55px 10%;
    background: #fff;
}

.contact h2 {
    margin: 0;
}

.contact .eyebrow {
    margin-bottom: 8px;
}

/* === Site Footer (new design) === */
.site-footer {
    background: #614051;
    color: #d8c6af;
    padding: 40px 6% 20px;
}

.site-footer .footer-contact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.site-footer .footer-col h3 {
    font: 600 24px var(--serif);
    color: #fff;
    margin: 0 0 8px;
}

.site-footer .footer-col h4 {
    font: 500 19px var(--serif);
    color: #fff;
    margin: 0 0 10px;
}

.site-footer .footer-col p {
    font: 16px / 1.6 var(--serif);
    margin: 0 0 6px;
    color: #e8d5e0;
}

.site-footer .footer-col p.footer-sub {
    font-size: 18px;
    color: #e8d5e0;
}

.site-footer .footer-col a {
    color: #fff;
    text-decoration: none;
}

.site-footer .footer-col a:hover {
    text-decoration: underline;
}

.site-footer .footer-col .contact-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-footer .footer-col .contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.site-footer .ig-handle {
    color: #000;
    font-weight: 700;
    font-size: 17px;
}

.site-footer .contact-line bdi {
    color: #000;
    font-weight: 700;
    font-size: 17px;
}

.site-footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #ffffff20;
    font: 16px var(--serif);
    color: #e8d5e0;
}

/* === RTL adjustments for new design === */
[dir="rtl"] .site-header .brand {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .button.small {
    margin-left: 0;
    margin-right: 14px;
}

[dir="rtl"] .card > a {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .doctors-slider {
    margin: 25px auto 0;
}

[dir="rtl"] .doctors-nav {
    transform: scaleX(-1);
}

/* === Responsive (new design) === */
@media (max-width: 1000px) {
    .site-header .nav-links {
        gap: 15px;
    }
    .hero-copy {
        padding-left: 7%;
    }
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .site-header {
        height: 75px;
        padding: 0 5%;
        gap: 15px;
    }
    .site-header .brand {
        gap: 8px;
    }
    .site-header .brand .brand-logo {
        height: 52px;
    }
    .site-header .brand strong {
        font-size: 15px;
        letter-spacing: 1px;
    }
    .site-header .brand small {
        font-size: 11px;
    }
    .site-header .menu-toggle {
        display: block;
        margin-left: auto;
    }
    .site-header .nav-links {
        display: none;
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        height: auto;
        padding: 15px 7%;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        box-shadow: 0 10px 20px #0001;
        direction: ltr;
    }
    .site-header .nav-links.open {
        display: flex;
    }
    [dir="rtl"] .site-header .nav-links {
        align-items: flex-end;
        text-align: right;
        direction: rtl;
    }
    [dir="rtl"] .site-header .nav-links .mobile-actions {
        align-items: flex-end;
        text-align: right;
    }
    [dir="rtl"] .site-header .nav-links .mobile-actions .lang-switcher {
        flex-direction: row-reverse;
    }
    .site-header .nav-links a {
        height: 42px;
        width: 100%;
    }
    [dir="rtl"] .site-header .nav-links a {
        text-align: right;
    }
    .site-header .nav-links a.active:after {
        bottom: 0;
    }
    .site-header .header-actions {
        display: none;
    }
    .site-header .nav-links .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 15px;
        border-top: 1px solid #eee;
        margin-top: 10px;
    }
    .site-header .nav-links .mobile-actions .button {
        color: #fff;
    }
    .site-header .nav-links .mobile-actions .button.outline {
        color: #7b5c3a;
    }
    .site-header .nav-links .mobile-actions .lang-switcher {
        display: flex;
        gap: 4px;
        align-items: center;
        font-size: 14px;
    }
    .site-header .nav-links .mobile-actions .lang-switcher a,
    .site-header .nav-links .mobile-actions .lang-switcher span {
        color: var(--navy);
        text-decoration: none;
        font-weight: 500;
        padding: 5px 10px;
        border-radius: 5px;
        border: 1px solid #ddd;
        text-align: center;
    }
    .site-header .nav-links .mobile-actions .lang-switcher a:hover {
        background: #f0f0f0;
    }
    .site-header .nav-links .mobile-actions .lang-switcher .lang-current {
        font-weight: 700;
        background: var(--gold);
        color: #fff;
        border-color: var(--gold);
    }
    .site-header .nav-links .mobile-actions .lang-switcher i {
        display: none;
    }
    .hero {
        display: block;
    }
    .legal-page {
        min-height: calc(100vh - 75px);
    }
    .hero-visual {
        height: auto;
    }
    .hero-visual img {
        position: static;
        height: auto;
        max-height: 320px;
        width: 100%;
        object-fit: cover;
    }
    .visual-mark {
        top: 45px;
        font-size: 65px;
    }
    .visual-mark small {
        font-size: 19px;
    }
    .reception-line {
        height: 45px;
    }
    .hero-copy {
        padding: 38px 7%;
    }
    .hero h1 {
        font-size: 45px;
    }
    .lead {
        font-size: 20px;
    }
    .doctors {
        gap: 20px;
    }
    .doctors-nav {
        display: none;
    }
    .doctor {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
        min-width: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    .doctor-photo {
        width: 100%;
        max-width: 120px;
        height: auto;
        aspect-ratio: 120 / 140;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .section-heading {
        gap: 12px;
    }
    .section-heading h2 {
        font-size: 22px;
        font-weight: 600;
    }
    .locations-header span {
        width: 50px;
    }
    .locations p {
        font-size: 16px;
    }
    .contact {
        display: block;
        text-align: center;
    }
    .contact .button {
        margin-top: 20px;
    }
    .site-footer .footer-contact {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .site-footer .footer-bottom {
        display: block;
        text-align: center;
        line-height: 2.2;
    }
    .footer-links {
        justify-content: center;
        margin-top: 10px;
    }
}

/* === Dark theme adjustments for new design === */
html[data-theme="dark"] .site-header {
    background: #1e293b;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

html[data-theme="dark"] .site-header .brand,
html[data-theme="dark"] .site-header .nav-links a,
html[data-theme="dark"] .site-header .header-actions .lang-current,
html[data-theme="dark"] .site-header .header-actions a:not(.button) {
    color: #e2e8f0;
}

html[data-theme="dark"] .site-header .nav-links {
    background: #1e293b;
}

html[data-theme="dark"] .hero {
    background: #0f172a;
}

html[data-theme="dark"] .hero-copy {
    background: radial-gradient(circle at 30% 50%, #1e293b, #0f172a);
}

html[data-theme="dark"] .hero h1 {
    color: #f1f5f9;
}

html[data-theme="dark"] .lead {
    color: #cbd5e1;
}

html[data-theme="dark"] .doctor span {
    color: #94a3b8;
}

html[data-theme="dark"] .treatments {
    background: #1e293b;
}

html[data-theme="dark"] .card {
    background: #4a3340;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

html[data-theme="dark"] .card.featured {
    background: #553c49;
}

html[data-theme="dark"] .card h3 {
    color: #f1f5f9;
}

html[data-theme="dark"] .card p {
    color: #94a3b8;
}

html[data-theme="dark"] .about {
    background: #0f172a;
}

html[data-theme="dark"] .about h2,
html[data-theme="dark"] .contact h2 {
    color: #f1f5f9;
}

html[data-theme="dark"] .about > p:last-child {
    color: #94a3b8;
}

html[data-theme="dark"] .contact {
    background: #1e293b;
}

html[data-theme="dark"] .locations {
    border-color: #334155;
}

html[data-theme="dark"] .locations span {
    background: #475569;
}

html[data-theme="dark"] .site-footer {
    background: #4a3340;
}

html[data-theme="dark"] .site-footer .footer-col h3 {
    color: #f1f5f9;
}

html[data-theme="dark"] .site-footer .footer-col p {
    color: #94a3b8;
}

html[data-theme="dark"] .site-footer .footer-bottom {
    border-color: #334155;
}

/* === End new design === */

/* === Cookie Consent === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navy);
    color: #e8e0d4;
    padding: 20px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.cookie-banner-text {
    font: 13px / 1.5 var(--serif);
    margin: 0;
    max-width: 700px;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal-content h2 {
    font: 600 24px var(--serif);
    margin: 0 0 10px;
    color: var(--navy);
}

.cookie-modal-intro {
    font: 14px / 1.5 var(--serif);
    color: #666;
    margin: 0 0 20px;
}

.cookie-category {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.cookie-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-cat-header strong {
    font: 500 16px var(--serif);
    color: var(--navy);
}

.cookie-toggle-on {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.cookie-category p {
    font: 13px / 1.5 var(--serif);
    color: #666;
    margin: 0;
}

.cookie-cat-sub {
    margin-bottom: 12px !important;
}

.cookie-sub-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 10px 0;
}

.cookie-sub-item > div strong {
    font: 500 14px var(--serif);
    color: var(--navy);
    display: block;
    margin-bottom: 4px;
}

.cookie-sub-item > div p {
    font: 12px / 1.4 var(--serif);
    color: #888;
    margin: 0;
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: .3s;
}

.cookie-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}

.cookie-switch input:checked + .cookie-slider {
    background: var(--gold);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(20px);
}

.cookie-modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

#cookie-settings-link {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

#cookie-settings-link:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* === Legal Page === */
.legal-page {
    padding: 60px 6%;
    background: #f8f6f2;
    min-height: calc(100vh - 92px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    text-decoration: none;
    font: 600 16px var(--serif);
    margin-bottom: 20px;
    padding: 8px 16px;
    border: 1px solid var(--gold);
    border-radius: 7px;
    transition: .2s;
}

.back-link:hover {
    background: var(--gold);
    color: #fff;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.team-card {
    text-align: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px #25395812;
}

.team-photo {
    width: 140px;
    height: 160px;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--gold);
    border-radius: 10px;
    display: block;
    margin: 0 auto 14px;
}

.team-card h3 {
    font: 600 18px var(--serif);
    margin: 0 0 6px;
    color: var(--navy);
}

.team-card p {
    font: 14px / 1.5 var(--serif);
    margin: 0;
    color: #526176;
    text-align: justify;
    text-align-last: center;
}

.doc-rating {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef1f5;
}

.doc-stars {
    display: inline-flex;
    gap: 4px;
    direction: ltr;
}

.doc-star {
    background: none;
    border: none;
    font-size: 26px;
    color: transparent;
    -webkit-text-stroke: 1.3px var(--gold, #c9a227);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color .15s ease, transform .15s ease, text-shadow .15s ease;
}

.doc-star:hover {
    transform: scale(1.2);
}

.doc-star.voted {
    color: var(--gold, #c9a227);
    text-shadow: 0 1px 4px rgba(201, 162, 39, .4);
}

.doc-stars:hover .doc-star {
    color: var(--gold, #c9a227);
    text-shadow: 0 1px 4px rgba(201, 162, 39, .4);
}

.doc-stars:hover .doc-star:hover ~ .doc-star {
    color: transparent;
    text-shadow: none;
}

.doc-rating-info {
    display: block;
    font: 600 13px var(--serif);
    color: var(--navy, #253958);
    margin-top: 6px;
    letter-spacing: .3px;
}

.doc-rating-info .doc-avg-star {
    color: var(--gold, #c9a227);
}

.doc-rated-msg {
    display: block;
    font: 12px var(--serif);
    color: #2e8b57;
    margin-top: 4px;
}

.media-group {
    margin-top: 32px;
}

.media-group-title {
    font: 600 20px var(--serif);
    color: var(--navy);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.media-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px #25395812;
    overflow: hidden;
}

.media-card img,
.media-card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #0d1520;
}

.media-card-title {
    font: 14px var(--serif);
    color: #526176;
    text-align: center;
    padding: 10px 12px;
    margin: 0;
}

/* Prevent the anchor (height:100%) from leaving a white gap under the video */
.media-card .media-open {
    height: auto;
}

.media-card-info {
    padding: 10px 12px;
    text-align: center;
}

.media-card-service {
    display: inline-block;
    font: 600 11px var(--serif);
    color: #a9793e;
    background: rgba(169, 121, 62, .1);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 5px;
}

.media-card-info .media-card-title {
    padding: 0;
}

/* Homepage media marquee — auto-scrolling strip before #about */
.media-marquee-section {
    padding: 28px 0;
    background: var(--bg, #f6f8fb);
    overflow: hidden;
}

.media-marquee {
    overflow: hidden;
    position: relative;
    /* fade edges */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.media-marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: mediaMarquee 110s linear infinite;
}

.media-marquee:hover .media-marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    position: relative;
    flex: 0 0 auto;
    width: 220px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    background: #0d1520;
    box-shadow: 0 4px 16px #25395814;
    display: block;
}

.marquee-item img,
.marquee-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.marquee-item .media-play-badge {
    font-size: 1.4rem;
}

.marquee-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 14px 10px 8px;
    font-size: 0.75rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(13, 21, 32, .75));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

@keyframes mediaMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .media-marquee-track {
        animation: none;
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    .marquee-item {
        width: 160px;
        height: 110px;
    }
}

/* Admin media manager */
.media-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.media-admin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px #25395812;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.media-admin-card.is-off {
    opacity: .55;
}

.media-admin-preview {
    position: relative;
    height: 160px;
    background: #0d1520;
}

.media-admin-preview img,
.media-admin-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-type-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    background: rgba(16, 35, 61, .75);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
}

.media-off-badge {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    background: rgba(200, 30, 30, .85);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
}

.media-admin-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.media-admin-form input[type="text"],
.media-admin-form input[type="number"],
.media-admin-form select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #dbe2ec;
    border-radius: 8px;
    font: 13px var(--serif);
    background: #fff;
    color: var(--navy);
}

.media-admin-form input:focus,
.media-admin-form select:focus {
    outline: none;
    border-color: var(--gold);
}

.media-admin-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.media-admin-row input[type="number"] {
    width: 80px;
    flex-shrink: 0;
}

.media-admin-row .btn {
    flex: 1;
}

.media-admin-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px;
}

.media-admin-actions form {
    flex: 1;
}

.media-admin-actions .btn {
    width: 100%;
}

/* Media lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 18, 32, .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    transform: scale(.92);
    transition: transform .25s ease;
}

.lightbox.open .lightbox-content {
    transform: scale(1);
}

.lightbox-content img,
.lightbox-content video {
    max-width: 92vw;
    max-height: 86vh;
    border-radius: 14px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .65);
    display: block;
    background: #000;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    inset-inline-end: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
    transform: rotate(90deg);
}

/* Story-style lightbox nav + counter */
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, .28);
}

.lightbox-prev { inset-inline-start: 14px; }
.lightbox-next { inset-inline-end: 14px; }

.lightbox.single .lightbox-nav,
.lightbox.single .lightbox-counter {
    display: none;
}

.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .8);
    font-size: .85rem;
    letter-spacing: .5px;
}

.lightbox-caption {
    margin-top: 12px;
    color: rgba(255, 255, 255, .85);
    font-size: .9rem;
    text-align: center;
    max-width: 92vw;
}

@media (max-width: 640px) {
    .lightbox {
        padding: 8px;
    }
    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 26px;
    }
    .lightbox-prev { inset-inline-start: 6px; }
    .lightbox-next { inset-inline-end: 6px; }
}

.media-open {
    display: block;
    position: relative;
    height: 100%;
}

.media-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(169, 121, 62, .92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-inline-start: 4px;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
    transition: transform .2s ease;
}

.media-open:hover .media-play-badge {
    transform: translate(-50%, -50%) scale(1.12);
}

.legal-page[dir="rtl"] .legal-container {
    text-align: right;
}

.legal-page[dir="ltr"] .legal-container {
    text-align: left;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
}

.legal-container h1 {
    font: 600 32px var(--serif);
    color: var(--navy);
    margin: 0 0 10px;
}

.legal-stand {
    font: 14px var(--serif);
    color: #888;
    margin: 0 0 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.legal-container h2 {
    font: 600 22px var(--serif);
    color: var(--navy);
    margin: 25px 0 10px;
}

.legal-page[dir="rtl"] .legal-container h2,
.legal-page[dir="rtl"] .legal-container h1 {
    text-align: right;
}

.legal-page[dir="ltr"] .legal-container h2,
.legal-page[dir="ltr"] .legal-container h1 {
    text-align: left;
}

.legal-container p {
    font: 15px / 1.7 var(--serif);
    color: #444;
    margin: 0 0 10px;
    text-align: justify;
}

.legal-page[dir="rtl"] .legal-container p {
    text-align: justify;
    direction: rtl;
    font-size: 17px;
    line-height: 1.9;
}

.legal-page[dir="rtl"] .legal-container h1 {
    font-size: 34px;
}

.legal-page[dir="rtl"] .legal-container h2 {
    font-size: 24px;
}

.legal-page[dir="rtl"] .legal-container h3 {
    font-size: 19px;
    color: var(--navy);
    margin: 15px 0 8px;
}

.legal-page[dir="rtl"] .legal-stand {
    font-size: 15px;
}

.legal-page[dir="ltr"] .legal-container p {
    text-align: justify;
    direction: ltr;
}

/* Legal page dark theme */
html[data-theme="dark"] .legal-page {
    background: #0f172a;
}

html[data-theme="dark"] .legal-container h1,
html[data-theme="dark"] .legal-container h2 {
    color: #f1f5f9;
}

html[data-theme="dark"] .legal-container p {
    color: #94a3b8;
}

html[data-theme="dark"] .legal-stand {
    color: #64748b;
    border-color: #334155;
}

/* Contact list with icons in legal pages */
.contact-list p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.contact-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
}

.contact-list a {
    color: var(--gold);
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

/* Contact Page */
.contact-page {
    min-height: calc(100vh - 92px);
    background: linear-gradient(135deg, #f8f6f3 0%, #f0ebe5 100%);
    padding: 40px 20px 60px;
}

.contact-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-page-wrap > h1 {
    font: 600 clamp(28px, 3vw, 40px) var(--serif);
    color: var(--navy);
    margin: 0 0 8px;
}

.contact-eyebrow-text {
    color: var(--gold);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    margin: 0 0 30px;
}

.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 30px;
    align-items: start;
}

.contact-info-card,
.contact-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(110, 82, 58, 0.08);
}

.contact-info-card h2,
.contact-form-card h2 {
    font: 600 22px var(--serif);
    color: var(--navy);
    margin: 0 0 16px;
}

.contact-form-sub {
    font: 14px / 1.5 var(--sans);
    color: #6b7280;
    margin: 0 0 24px;
}

.contact-form .form-field {
    margin-bottom: 20px;
}

.contact-form .form-field label {
    display: block;
    font: 600 14px var(--sans);
    color: var(--navy);
    margin-bottom: 6px;
}

.contact-form .form-field input,
.contact-form .form-field textarea {
    width: 100%;
    border: 2px solid #e5e0d8;
    border-radius: 10px;
    padding: 12px 16px;
    font: 15px var(--sans);
    color: #333;
    background: #fafaf8;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.contact-form .form-field input:focus,
.contact-form .form-field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(193, 162, 100, 0.15);
}

.contact-form .form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .button.gold {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.contact-page[dir="rtl"] .contact-info-card,
.contact-page[dir="rtl"] .contact-form-card {
    text-align: right;
}

@media (max-width: 768px) {
    .contact-page-grid {
        grid-template-columns: 1fr;
    }
    .contact-info-card,
    .contact-form-card {
        padding: 24px 20px;
    }
}

/* Cookie dark theme */
html[data-theme="dark"] .cookie-banner {
    background: #0f172a;
}

html[data-theme="dark"] .cookie-modal-content {
    background: #1e293b;
}

html[data-theme="dark"] .cookie-modal-content h2,
html[data-theme="dark"] .cookie-cat-header strong,
html[data-theme="dark"] .cookie-sub-item > div strong {
    color: #f1f5f9;
}

html[data-theme="dark"] .cookie-modal-intro,
html[data-theme="dark"] .cookie-category p,
html[data-theme="dark"] .cookie-sub-item > div p {
    color: #94a3b8;
}

html[data-theme="dark"] .cookie-category {
    border-color: #334155;
}

/* Cookie responsive */
@media (max-width: 700px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 15px 5%;
    }
    .cookie-banner-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    .cookie-modal-content {
        padding: 20px;
    }
}

/* Dark theme */
html[data-theme="dark"] {
    --primary: #2dd4bf;
    --primary-dark: #14b8a6;
    --primary-light: #134e4a;
    --accent: #f472b6;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --bg: #0f172a;
    --white: #1e293b;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] body {
    background-color: var(--bg);
    color: var(--text);
}

html[data-theme="dark"] .main-header,
html[data-theme="dark"] .tab-table-card,
html[data-theme="dark"] .tab-form-card,
html[data-theme="dark"] .dashboard-header {
    background: var(--white);
    border-color: var(--border);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #334155;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] .data-table th {
    background: #1e293b;
    color: var(--text);
}

html[data-theme="dark"] .data-table tr:nth-child(even) {
    background: #1e293b;
}

html[data-theme="dark"] .data-table tr:hover {
    background: #334155;
}

html[data-theme="dark"] .btn-secondary {
    background: #334155;
    color: var(--text);
}

html[data-theme="dark"] .lang-switcher select {
    background: #334155;
    color: var(--text);
}

html[data-theme="dark"] .svc-duration-row {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

html[data-theme="dark"] .svc-duration-input-wrap {
    background: #0f172a;
    border-color: #475569;
}

html[data-theme="dark"] .svc-duration-stepper button {
    background: #475569;
    color: #cbd5e1;
}

html[data-theme="dark"] .time-picker-display {
    background: #334155;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] .tp-dialog,
html[data-theme="dark"] .tp-overlay {
    background: var(--white);
    color: var(--text);
}

html[data-theme="dark"] .tp-dialog .dp-day {
    color: var(--text);
}

html[data-theme="dark"] .tp-dialog .dp-day:hover {
    background: var(--primary-light);
}

html[data-theme="dark"] .form-errors {
    background: #7f1d1d;
    color: #fecaca;
}

html[data-theme="dark"] .form-success {
    background: #14532d;
    color: #bbf7d0;
}

html[data-theme="dark"] a {
    color: var(--primary);
}

/* Density: compact */
html[data-density="compact"] body {
    line-height: 1.4;
}
html[data-density="compact"] .form-group {
    margin-bottom: 0.5rem;
}
html[data-density="compact"] .tab-form-card,
html[data-density="compact"] .tab-table-card {
    padding: 0.75rem;
}
html[data-density="compact"] .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}
html[data-density="compact"] input,
html[data-density="compact"] select,
html[data-density="compact"] textarea {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

/* Font size */
html[data-font="small"] { font-size: 14px; }
html[data-font="medium"] { font-size: 16px; }
html[data-font="large"] { font-size: 18px; }

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-x: clip;
}

[dir="rtl"] body {
    font-family: var(--sans);
}

/* Use the selected language's local font for native form controls as well. */
button, input, select, textarea { font-family: inherit; }
html[lang="ku"] .eyebrow,
html[lang="ku"] .site-header .brand small,
html[lang="ku"] .section-heading h2,
html[lang="ku"] .button,
html[lang="ar"] .eyebrow,
html[lang="ar"] .site-header .brand small,
html[lang="ar"] .section-heading h2,
html[lang="ar"] .button { letter-spacing: normal; }
html[lang="ku"] .site-header .nav-links,
html[lang="ar"] .site-header .nav-links { direction: rtl; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
}

.logo-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    border-radius: 50%;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.main-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

.main-nav a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.lang-switcher select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    min-width: 7rem;
}

/* Hero (old styles removed - using new design above) */
.hero-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.hero-decoration-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.hero-decoration-2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
}

.hero-trust span {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 999px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Sections */
section {
    padding: 3rem 0;
}

section h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap);
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin: 0 0 0.5rem;
    color: var(--primary-dark);
}

.feature-card p {
    margin: 0;
    color: var(--text-light);
}

/* Services */
.services {
    background: var(--white);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.service-tag {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-align: center;
}

.service-tag:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Why us */
.why-us {
    background: var(--bg);
}

/* Branches */
.branches {
    background: var(--white);
}

.branches-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.branch-card {
    min-width: 200px;
    padding: 1.25rem 1.5rem;
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.branch-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.branch-card strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.branch-card span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
}

.branch-highlight {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* Contact CTA */
.contact-cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    text-align: center;
}

.contact-cta h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.contact-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* Auth forms */
.auth-section {
    padding: 3rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-section h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--bg);
    color: var(--text);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234b5563' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

[dir="rtl"] .form-group select {
    background-position: left 0.75rem center;
    padding-right: 1rem;
    padding-left: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.form-errors p {
    margin: 0;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.form-success p {
    margin: 0 0 0.5rem;
    color: #065f46;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Dashboard stubs */
.dashboard {
    padding: 2rem 0;
}

.dashboard h1 {
    margin-bottom: 1rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gap);
    margin-top: 1.5rem;
}

.dashboard-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.dashboard-card p {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    margin: 0;
}

/* Admin links */
.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.admin-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.admin-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: var(--primary-dark);
}

.admin-link-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.admin-link-icon {
    font-size: 2rem;
}

/* Branches admin */
.branches-admin {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .branches-admin {
        grid-template-columns: 360px 1fr;
    }
}

.branch-form-card,
.branches-table-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.branch-form-card h3,
.branches-table-card h3 {
    margin: 0 0 1rem;
    color: var(--primary-dark);
}

.branch-form-card .auth-form {
    max-width: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

.form-section-title {
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 700;
}

.form-section-title:first-child {
    margin-top: 0;
}

.current-admin-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.current-admin-box p {
    margin: 0;
    font-size: 0.9rem;
}

.text-muted {
    color: var(--text-light);
}

select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--white);
}

/* Branch edit layout */
.branch-edit-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Staff admin layout */
.staff-admin {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-top: 1.5rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.7rem 1.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--bg);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding-top: 1.5rem;
}

.tab-content.active {
    display: block;
}

.tab-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .tab-grid {
        grid-template-columns: 360px 1fr;
    }
}

.tab-form-card,
.tab-table-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Full-width table card for appointments list */
.tab-table-fullwidth {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.tab-form-card h3,
.tab-table-card h3 {
    margin: 0 0 1rem;
    color: var(--primary-dark);
}

.tab-form-card .auth-form {
    max-width: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* Role assign form */
.role-assign-form {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.role-assign-form:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Permissions accordion */
.perm-accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.perm-accordion summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.perm-staff-name {
    font-weight: 700;
}

.perm-staff-meta {
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.perm-accordion summary:hover {
    background: #eef2ff;
}

.perm-accordion[open] summary {
    border-bottom: 1px solid var(--border);
}

.perm-accordion .auth-form {
    padding: 1rem;
    max-width: none;
    box-shadow: none;
    border: none;
}

/* Quick presets bar */
.perm-presets {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.perm-presets-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    margin-left: 0.25rem;
}

.btn-preset {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-preset:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Permission groups */
.perm-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .perm-groups {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .perm-groups {
        grid-template-columns: repeat(4, 1fr);
    }
}

.perm-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem;
    background: var(--white);
}

.perm-group-title {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.perm-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* Role dropdown in permissions table */
.role-select {
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--white);
}

.role-select.role-super_admin { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.role-select.role-branch_admin { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.role-select.role-secretary { background: #ede9fe; border-color: #8b5cf6; color: #6d28d9; }
.role-select.role-doctor { background: #d1fae5; border-color: #10b981; color: #065f46; }
.role-select.role-cosmetician { background: #fce7f3; border-color: #ec4899; color: #9d174d; }
.role-select.role-accounting { background: #e0e7ff; border-color: #6366f1; color: #3730a3; }
.role-select.role-staff { background: #f1f5f9; border-color: #94a3b8; color: #475569; }

/* Info list */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    background: var(--bg);
    line-height: 1.5;
}

/* Audit log */
.audit-filters {
    margin-top: 1.5rem;
}

.audit-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}

.audit-filter-form .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.audit-table-card {
    margin-top: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.audit-table {
    font-size: 0.82rem;
    min-width: 900px;
}

.audit-table th,
.audit-table td {
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
}

.audit-table td.audit-value-old,
.audit-table td.audit-value-new {
    white-space: normal;
    max-width: 200px;
    word-break: break-word;
    font-family: monospace;
    font-size: 0.78rem;
}

.audit-table td.audit-value-old {
    color: #b91c1c;
    background: #fef2f2;
}

.audit-table td.audit-value-new {
    color: #065f46;
    background: #ecfdf5;
}

.audit-time {
    font-size: 0.78rem;
    color: var(--text-light);
}

.audit-ip {
    font-size: 0.75rem;
    color: var(--text-light);
}

.audit-action-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.audit-action-insert { background: #d1fae5; color: #065f46; }
.audit-action-update { background: #dbeafe; color: #1e40af; }
.audit-action-delete { background: #fee2e2; color: #991b1b; }
.audit-action-toggle { background: #fef3c7; color: #92400e; }

.audit-pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.audit-page-info {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Appointment status badges */
.appt-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.appt-status-pending { background: #fef3c7; color: #92400e; }
.appt-status-confirmed { background: #dbeafe; color: #1e40af; }
.appt-status-completed { background: #d1fae5; color: #065f46; }
.appt-status-cancelled { background: #fee2e2; color: #991b1b; }
.appt-status-no_show { background: #ffedd5; color: #9a3412; }

.appt-pay-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.appt-pay-direct { background: #e0e7ff; color: #3730a3; }
.appt-pay-transfer { background: #f0fdf4; color: #166534; }
.appt-pay-on_arrival { background: #fef9c3; color: #854d0e; }

.slot-check-result {
    margin: 0.5rem 0;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.6;
    display: none;
}

.slot-check-result:not(:empty) {
    display: block;
}

.slot-check-result.slot-conflict {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.slot-check-result.slot-available {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #065f46;
}

/* WhatsApp Management */
.wa-status-bar {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}

.wa-status-loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
}

.wa-qr-section {
    text-align: center;
    padding: 1rem;
}

.wa-qr-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.wa-connected-info {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.wa-connected-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wa-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    height: 600px;
}

@media (min-width: 768px) {
    .wa-layout {
        grid-template-columns: 320px 1fr;
    }
}

.wa-chat-list {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[dir="rtl"] .wa-chat-list {
    border-right: none;
    border-left: 1px solid var(--border);
}

.wa-chat-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.wa-chat-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.wa-chats-container {
    flex: 1;
    overflow-y: auto;
}

.wa-chat-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.wa-chat-item:hover {
    background: var(--bg);
}

.wa-chat-item.active {
    background: #e0e7ff;
}

.wa-chat-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-right: 0.75rem;
    overflow: hidden;
}

.wa-chat-item-avatar-img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

[dir="rtl"] .wa-chat-item-avatar {
    margin-right: 0;
    margin-left: 0.75rem;
}

.wa-chat-item-content {
    flex: 1;
    overflow: hidden;
}

.wa-chat-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat-item-preview {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat-item-time {
    font-size: 0.7rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.wa-unread {
    display: inline-block;
    background: #22c55e;
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.25rem;
}

.wa-chat-view {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wa-no-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.wa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    gap: 0.75rem;
}

.wa-chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.wa-chat-header-avatar-img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.wa-chat-header-info {
    flex: 1;
    overflow: hidden;
}

.wa-chat-header-info h3 {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat-actions {
    display: flex;
    gap: 0.25rem;
}

.wa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wa-msg-in, .wa-msg-out {
    display: flex;
}

.wa-msg-in {
    justify-content: flex-start;
}

.wa-msg-out {
    justify-content: flex-end;
}

.wa-msg-bubble {
    max-width: 70%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
}

.wa-msg-in .wa-msg-bubble {
    background: var(--bg);
    border: 1px solid var(--border);
}

.wa-msg-out .wa-msg-bubble {
    background: #dbeafe;
}

.wa-msg-text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.wa-msg-time {
    font-size: 0.65rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 2px;
}

.wa-msg-media {
    margin-bottom: 4px;
}

.wa-msg-media img,
.wa-msg-media video {
    display: block;
    max-width: 100%;
}

.wa-msg-media audio {
    height: 35px;
}

.wa-compose {
    border-top: 1px solid var(--border);
    padding: 0.75rem;
}

.wa-quick-replies {
    margin-bottom: 0.5rem;
}

.wa-quick-replies select {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.wa-compose-input {
    display: flex;
    gap: 0.5rem;
}

.wa-compose-input textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    resize: none;
}

/* WhatsApp Booking Layout (3 columns) */
.wa-booking-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    height: 600px;
}

@media (min-width: 768px) {
    .wa-booking-layout {
        grid-template-columns: 250px 1fr;
    }
}

@media (min-width: 1200px) {
    .wa-booking-layout {
        grid-template-columns: 250px 1fr 300px;
    }
}

.wa-chat-panel {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[dir="rtl"] .wa-chat-panel {
    border-right: none;
    border-left: 1px solid var(--border);
}

.wa-messages-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wa-booking-panel {
    border-left: 1px solid var(--border);
    padding: 1rem;
    overflow-y: auto;
    display: none;
}

[dir="rtl"] .wa-booking-panel {
    border-left: none;
    border-right: 1px solid var(--border);
}

@media (min-width: 1200px) {
    .wa-booking-panel {
        display: block;
    }
}

@media (min-width: 1024px) {
    .branch-edit-layout {
        grid-template-columns: 480px 1fr;
    }

    .staff-admin {
        grid-template-columns: 360px 1fr;
    }
}

.staff-form-card,
.staff-table-card,
.staff-permissions-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.staff-form-card h3,
.staff-table-card h3,
.staff-permissions-card h3 {
    margin: 0 0 1rem;
    color: var(--primary-dark);
}

.staff-form-card .auth-form {
    max-width: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.role-super_admin { background: #fef3c7; color: #92400e; }
.role-branch_admin { background: #dbeafe; color: #1e40af; }
.role-branch_admin_assistant { background: #e0e7ff; color: #3730a3; }
.role-doctor { background: #d1fae5; color: #065f46; }
.role-secretary { background: #fce7f3; color: #9d174d; }
.role-cosmetician { background: #fae8ff; color: #86198f; }
.role-accounting { background: #ffedd5; color: #9a3412; }
.role-staff { background: #f1f5f9; color: #475569; }

/* Reset password row */
.staff-reset-row,
.staff-edit-row {
    background: var(--bg);
}

.staff-reset-row td,
.staff-edit-row td {
    padding: 0.75rem 1rem;
}

.staff-edit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .staff-edit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.reset-password-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.reset-password-row input {
    flex: 1;
    max-width: 300px;
}

.btn-warning {
    background: #f59e0b;
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
    color: var(--white);
}

/* Staff edit layout */
.staff-edit-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 1024px) {
    .staff-edit-layout {
        grid-template-columns: 400px 1fr;
    }
}

/* Permissions grid */
.permissions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .permissions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}

.permission-checkbox:hover {
    background: var(--bg);
}

.permission-checkbox input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.permission-checkbox span {
    font-size: 0.9rem;
}

.branch-services-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.branch-services-card h3 {
    margin: 0 0 1rem;
    color: var(--primary-dark);
}

.services-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.services-card-head h3 {
    margin: 0;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.services-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
}

.service-add-form .auth-form {
    max-width: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

.service-add-form {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Inline edit form for services */
.service-edit-row {
    background: var(--bg);
}

.service-edit-row td {
    padding: 1rem;
}

.inline-edit-form {
    max-width: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

.form-row-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .form-row-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Compact 4-language grid used in branch edit form */
.lang-grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
    .lang-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 2-column pair grid (phones, emails, work hours) */
.pair-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 480px) {
    .pair-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-actions-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: start;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
}

.data-table tbody tr:hover {
    background: var(--bg);
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: #dc2626;
    color: var(--white);
}

.btn-danger:hover {
    background: #b91c1c;
    color: var(--white);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Success message */
.form-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.form-success p {
    margin: 0;
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Footer */
.main-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.main-footer p {
    margin: 0;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

/* Mobile header: not sticky and more compact */
@media (max-width: 639px) {
    .main-header {
        position: relative;
        top: auto;
    }

    .main-header .container {
        justify-content: center;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .main-nav {
        justify-content: center;
        width: 100%;
        gap: 0.5rem;
    }

    .main-nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .lang-switcher select {
        padding: 0.4rem 0.75rem;
        min-width: auto;
    }
}

/* Responsive adjustments - same elements, adapted layout */
@media (min-width: 640px) {
    .hero h1 {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) {
    .main-header .container {
        flex-wrap: nowrap;
    }

    .main-nav {
        gap: 1rem;
    }

    .hero {
        padding: 6rem 0;
    }

    .hero h1 {
        font-size: 3.25rem;
    }

    .hero-subtitle {
        font-size: 1.35rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    section {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 4rem;
    }
}

/* ============ WhatsApp Admin Panel ============ */

.wa-status-bar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.wa-status-loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: wa-spin 0.8s linear infinite;
}

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

.wa-qr-section {
    text-align: center;
    padding: 1.5rem;
}

.wa-qr-section h3 {
    margin-bottom: 0.5rem;
}

.wa-qr-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.wa-qr-container img {
    border: 2px solid var(--border);
    border-radius: 0.5rem;
}

.wa-connected-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wa-connected-dot {
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wa-layout {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 280px);
    min-height: 500px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.wa-chat-list {
    width: 320px;
    min-width: 280px;
    border-inline-end: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wa-chat-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.wa-chat-search input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--bg);
}

.wa-chats-container {
    flex: 1;
    overflow-y: auto;
}

.wa-chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.wa-chat-item:hover {
    background: var(--bg);
}

.wa-chat-item.active {
    background: var(--primary-light);
}

.wa-chat-item-avatar,
.wa-chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.wa-chat-item-content {
    flex: 1;
    overflow: hidden;
}

.wa-chat-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat-item-preview {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-from-me {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.75rem;
}

.wa-chat-item-time {
    font-size: 0.75rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.wa-unread {
    background: #22c55e;
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    margin-inline-start: 0.25rem;
}

.wa-chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.wa-no-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    gap: 0.5rem;
}

#wa-chat-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.wa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    flex-shrink: 0;
    gap: 0.75rem;
}

.wa-chat-header-info {
    flex: 1;
    min-width: 0;
}

.wa-chat-header-info h3 {
    margin: 0;
    font-size: 1rem;
}

.wa-chat-actions {
    display: flex;
    gap: 0.4rem;
}

.wa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d1c7bd' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 0;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.wa-msg-out, .wa-msg-in {
    display: flex;
    margin-bottom: 0.3rem;
}

.wa-msg-out {
    justify-content: flex-end;
}

.wa-msg-in {
    justify-content: flex-start;
}

.wa-msg-bubble {
    max-width: 70%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wa-msg-out .wa-msg-bubble {
    background: #d9fdd3;
    border-bottom-right-radius: 0.25rem;
}

.wa-msg-in .wa-msg-bubble {
    background: var(--white);
    border-bottom-left-radius: 0.25rem;
}

.wa-msg-text {
    font-size: 0.9rem;
    white-space: pre-wrap;
    line-height: 1.4;
}

.wa-msg-time {
    font-size: 0.65rem;
    color: var(--text-light);
    text-align: end;
    margin-top: 0.2rem;
}

.wa-msg-out .wa-msg-time {
    color: #667781;
}

.wa-compose {
    border-top: 1px solid var(--border);
    padding: 0.5rem;
    background: var(--white);
    flex-shrink: 0;
}

.wa-quick-replies {
    margin-bottom: 0.4rem;
}

.wa-quick-replies select {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font-size: 0.85rem;
    background: var(--bg);
}

.wa-compose-input {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.wa-compose-input textarea {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    resize: none;
    font-family: inherit;
}

.wa-compose-input textarea:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .wa-layout {
        flex-direction: column;
        height: calc(100vh - 240px);
    }

    .wa-chat-list {
        width: 100%;
        min-width: unset;
        max-height: 200px;
    }

    .wa-chat-list.hidden-mobile {
        display: none;
    }

    .wa-chat-view.hidden-mobile {
        display: none;
    }

    .wa-msg-bubble {
        max-width: 85%;
    }
}

.wa-msg-media {
    cursor: pointer;
    text-decoration: underline;
    color: var(--primary);
    white-space: normal;
}

.wa-msg-media audio,
.wa-msg-media video {
    max-width: 100%;
    border-radius: 0.4rem;
}

.wa-msg-media img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.wa-audio-player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem;
    width: 100%;
    min-width: 260px;
    max-width: 420px;
    border-radius: 1.25rem;
    background: rgba(0, 168, 132, 0.12);
}

.wa-audio-play {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-audio-play:focus {
    outline: none;
}

.wa-audio-wave-wrap {
    flex: 1;
    position: relative;
    height: 40px;
    cursor: pointer;
    border-radius: 0.4rem;
    overflow: hidden;
    background: rgba(0, 168, 132, 0.08);
}

.wa-audio-waveform {
    width: 100%;
    height: 100%;
    display: block;
}

.wa-audio-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: rgba(0, 168, 132, 0.25);
    border-radius: 0.4rem;
    pointer-events: none;
    transition: width 0.1s linear;
}

.wa-audio-time {
    font-size: 0.72rem;
    color: #3b6e5a;
    min-width: 62px;
    text-align: right;
    font-weight: 500;
}

.wa-audio-elem {
    display: none;
}

/* ============ Public Booking Page ============ */

.booking-page {
    padding: 3rem 1rem;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.booking-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    max-width: 100%;
    width: 100%;
}

.booking-card h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 0 0.5rem;
    text-align: center;
}

.booking-subtitle {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.booking-form {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}

.booking-form .form-group {
    margin-bottom: 1.25rem;
}

.booking-form .form-group-full,
.booking-form .form-row,
.booking-form > .btn {
    grid-column: 1 / -1;
}

.booking-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.booking-form .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.booking-back {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* Tablet */
@media (max-width: 768px) {
    .booking-card {
        padding: 2rem 1.5rem;
    }

    .booking-form {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .booking-page {
        padding: 1.5rem 0.75rem;
    }

    .booking-card {
        padding: 1.5rem 1rem;
        border-radius: 0.5rem;
    }

    .booking-card h1 {
        font-size: 1.5rem;
    }

    .booking-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .booking-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .booking-form .form-row .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem 0.85rem;
        font-size: 16px;
    }
}

/* ============ Premium Dialog Time Picker ============ */

.time-picker-display {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font: inherit;
    color: var(--text-light);
    cursor: pointer;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    user-select: none;
}

.time-picker-display:hover {
    border-color: var(--primary);
    background: var(--white);
}

.time-picker-display.tp-has-value {
    color: var(--primary-dark);
    font-weight: 600;
    background: var(--white);
    border-color: var(--primary);
}

.time-picker-display.tp-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f3f4f6;
}

.tp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.tp-overlay.tp-open {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.tp-dialog {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    width: 600px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.tp-dialog.tp-open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.tp-title {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
}

.tp-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.tp-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.tp-nav-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}

.tp-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tp-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.tp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.6rem;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 480px;
}

.tp-slot {
    padding: 0.85rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: 0.6rem;
    background: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    color: var(--text);
}

.tp-available {
    border-color: var(--primary-light);
    color: var(--primary-dark);
    background: #f0fdfa;
}

.tp-available:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px -2px rgba(13, 148, 136, 0.25);
}

.tp-selected {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.tp-booked {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
    cursor: not-allowed;
    opacity: 0.7;
    text-decoration: line-through;
}

.tp-passed {
    border-color: var(--border);
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
}

.tp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
    justify-content: center;
}

.tp-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.tp-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    border: 2px solid;
}

.tp-dot.tp-available {
    border-color: var(--primary);
    background: #f0fdfa;
}

.tp-dot.tp-booked {
    border-color: #dc2626;
    background: #fef2f2;
}

.tp-dot.tp-passed {
    border-color: #9ca3af;
    background: #f3f4f6;
}

@media (max-width: 480px) {
    .tp-dialog {
        width: 100%;
        max-width: calc(100vw - 1rem);
        border-radius: 0.75rem;
    }

    .tp-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
        padding: 1rem;
    }

    .tp-slot {
        padding: 0.7rem 0.3rem;
        font-size: 0.9rem;
    }

    .tp-legend {
        gap: 0.75rem;
        padding: 0.6rem 1rem 1rem;
    }
}

/* ============ Dialog Date Picker Calendar ============ */

.dp-dialog {
    width: 420px;
}

.dp-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.dp-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.dp-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.dp-day-row,
.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.dp-day-name {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 0.4rem 0;
}

.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.dp-empty {
    display: block;
}

.dp-day {
    padding: 0.6rem 0;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    color: var(--text);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.dp-day-num {
    line-height: 1;
}

.dp-count-badge {
    position: absolute;
    bottom: 0.15rem;
    right: 0.2rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 1rem;
    height: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
    line-height: 1;
}

.dp-available:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px -2px rgba(13, 148, 136, 0.25);
}

.dp-selected {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.dp-selected .dp-count-badge {
    background: var(--white);
    color: var(--primary);
}

.dp-past .dp-count-badge {
    background: #9ca3af;
}

.wa-notify-check {
    margin-top: 0.5rem;
}

.wa-notify-check .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.wa-notify-check .checkbox-label:hover {
    background: #dcfce7;
}

.wa-notify-check input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.dp-past {
    border-color: var(--border);
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
}

@media (max-width: 480px) {
    .dp-dialog {
        width: 100%;
        max-width: calc(100vw - 1rem);
    }

    .dp-day {
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }
}

.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem !important;
    transition: background 0.15s;
}

.sortable-th:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sortable-th::after {
    content: '⇅';
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.3;
}

.sortable-th.sort-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--primary);
}

.sortable-th.sort-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--primary);
}

/* Service duration settings */
.svc-duration-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.svc-duration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    transition: all 0.2s ease;
}

.svc-duration-row:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.svc-duration-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.svc-duration-name .svc-inactive-badge {
    font-size: 0.65rem;
    background: #fef3c7;
    color: #92400e;
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    border: 1px solid #fde68a;
}

.svc-duration-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    transition: border-color 0.2s;
}

.svc-duration-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.svc-duration-input-wrap input[type="number"] {
    width: 60px;
    border: none;
    outline: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

.svc-duration-input-wrap input[type="number"]::-webkit-inner-spin-button,
.svc-duration-input-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.svc-duration-input-wrap .svc-min-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.svc-price-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.75rem;
    transition: border-color 0.2s;
}

.svc-price-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.svc-price-input-wrap input[type="number"] {
    width: 70px;
    border: none;
    outline: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #059669;
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

.svc-price-input-wrap input[type="number"]::-webkit-inner-spin-button,
.svc-price-input-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.svc-price-label {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 700;
}

.svc-duration-stepper {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.svc-duration-stepper button {
    border: none;
    background: #f1f5f9;
    color: #64748b;
    width: 20px;
    height: 16px;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.svc-duration-stepper button:hover {
    background: var(--primary);
    color: #fff;
}

.settings-section-title {
    margin: 1.2rem 0 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    color: #334155;
}

/* Overdue appointment rows */
.data-table tr.appt-overdue {
    background: #fef2f2 !important;
}

.data-table tr.appt-overdue td {
    color: #991b1b;
}

.data-table tr.appt-overdue .appt-status-badge {
    border-color: #dc2626;
    background: #fee2e2;
    color: #991b1b;
}

html[data-theme="dark"] .data-table tr.appt-overdue {
    background: #450a0a !important;
}

html[data-theme="dark"] .data-table tr.appt-overdue td {
    color: #fca5a5;
}

html[data-theme="dark"] .data-table tr.appt-overdue .appt-status-badge {
    background: #7f1d1d;
    color: #fecaca;
    border-color: #991b1b;
}

/* External booking badge */
.appt-external-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 1rem;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    white-space: nowrap;
}

html[data-theme="dark"] .appt-external-badge {
    background: #0c4a6e;
    color: #bae6fd;
    border-color: #0369a1;
}

/* ===== Phone duplicate linking ===== */
.appt-dup {
    position: relative;
}

/* Colored left border as "thread" */
.appt-dup-blue    { box-shadow: inset 4px 0 0 #3b82f6; }
.appt-dup-green   { box-shadow: inset 4px 0 0 #22c55e; }
.appt-dup-purple  { box-shadow: inset 4px 0 0 #8b5cf6; }
.appt-dup-orange  { box-shadow: inset 4px 0 0 #f97316; }
.appt-dup-pink    { box-shadow: inset 4px 0 0 #ec4899; }
.appt-dup-teal    { box-shadow: inset 4px 0 0 #14b8a6; }
.appt-dup-indigo  { box-shadow: inset 4px 0 0 #6366f1; }
.appt-dup-red     { box-shadow: inset 4px 0 0 #ef4444; }
.appt-dup-amber   { box-shadow: inset 4px 0 0 #f59e0b; }
.appt-dup-cyan    { box-shadow: inset 4px 0 0 #06b6d4; }

/* Overdue + dup: keep red background but add left border via outline */
tr.appt-overdue.appt-dup {
    border-left: 4px solid;
}
tr.appt-overdue.appt-dup-blue    { border-left-color: #3b82f6; }
tr.appt-overdue.appt-dup-green   { border-left-color: #22c55e; }
tr.appt-overdue.appt-dup-purple  { border-left-color: #8b5cf6; }
tr.appt-overdue.appt-dup-orange  { border-left-color: #f97316; }
tr.appt-overdue.appt-dup-pink    { border-left-color: #ec4899; }
tr.appt-overdue.appt-dup-teal    { border-left-color: #14b8a6; }
tr.appt-overdue.appt-dup-indigo  { border-left-color: #6366f1; }
tr.appt-overdue.appt-dup-red     { border-left-color: #ef4444; }
tr.appt-overdue.appt-dup-amber   { border-left-color: #f59e0b; }
tr.appt-overdue.appt-dup-cyan    { border-left-color: #06b6d4; }

/* Phone link text colored */
.appt-phone-link { font-weight: 600; }
.appt-link-blue    { color: #3b82f6; }
.appt-link-green   { color: #22c55e; }
.appt-link-purple  { color: #8b5cf6; }
.appt-link-orange  { color: #f97316; }
.appt-link-pink    { color: #ec4899; }
.appt-link-teal    { color: #14b8a6; }
.appt-link-indigo  { color: #6366f1; }
.appt-link-red     { color: #ef4444; }
.appt-link-amber   { color: #f59e0b; }
.appt-link-cyan    { color: #06b6d4; }

html[data-theme="dark"] .appt-link-blue    { color: #60a5fa; }
html[data-theme="dark"] .appt-link-green   { color: #4ade80; }
html[data-theme="dark"] .appt-link-purple  { color: #a78bfa; }
html[data-theme="dark"] .appt-link-orange  { color: #fb923c; }
html[data-theme="dark"] .appt-link-pink    { color: #f472b6; }
html[data-theme="dark"] .appt-link-teal    { color: #2dd4bf; }
html[data-theme="dark"] .appt-link-indigo  { color: #818cf8; }
html[data-theme="dark"] .appt-link-red     { color: #f87171; }
html[data-theme="dark"] .appt-link-amber   { color: #fbbf24; }
html[data-theme="dark"] .appt-link-cyan    { color: #22d3ee; }

/* Count badge */
.appt-dup-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    margin-left: 0.3rem;
    color: #fff;
    vertical-align: middle;
}
.appt-dup-badge.appt-dup-blue    { background: #3b82f6; }
.appt-dup-badge.appt-dup-green   { background: #22c55e; }
.appt-dup-badge.appt-dup-purple  { background: #8b5cf6; }
.appt-dup-badge.appt-dup-orange  { background: #f97316; }
.appt-dup-badge.appt-dup-pink    { background: #ec4899; }
.appt-dup-badge.appt-dup-teal    { background: #14b8a6; }
.appt-dup-badge.appt-dup-indigo  { background: #6366f1; }
.appt-dup-badge.appt-dup-red     { background: #ef4444; }
.appt-dup-badge.appt-dup-amber   { background: #f59e0b; }
.appt-dup-badge.appt-dup-cyan    { background: #06b6d4; }

/* Notes cell in appointments table */
.appt-notes-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    color: #64748b;
}

/* Actions cell in appointments table */
.data-table .actions-cell {
    min-width: 240px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* ============ Reminder Badge & Dialog ============ */
.reminder-badge-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.reminder-badge-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(99,102,241,0.2);
    transform: scale(1.05);
}

.reminder-badge-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.reminder-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    animation: reminder-pulse 2s ease-in-out infinite;
}

@keyframes reminder-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.reminder-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
    animation: reminder-fade-in 0.2s ease;
}

@keyframes reminder-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reminder-dialog-box {
    background: var(--white);
    border-radius: 0.75rem;
    width: 600px;
    max-width: calc(100vw - 2rem);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: reminder-slide-in 0.25s ease;
}

@keyframes reminder-slide-in {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.reminder-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.75rem 0.75rem 0 0;
}

.reminder-dialog-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-dark);
}

.reminder-dialog-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.15s;
}

.reminder-dialog-close:hover {
    background: #f1f5f9;
    color: #ef4444;
}

.reminder-dialog-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.15s;
}

.reminder-item:hover {
    border-color: var(--primary);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.reminder-item.reminder-item-sent {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.reminder-item-info {
    flex: 1;
    min-width: 0;
}

.reminder-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.reminder-item-date {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.reminder-item-service {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.reminder-item-phone {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.1rem;
}

.reminder-item-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.reminder-send-btn {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.reminder-send-btn:hover {
    background: #1da851;
    transform: scale(1.03);
}

.reminder-send-btn.sent {
    background: #22c55e;
    cursor: default;
}

.reminder-manual-btn {
    background: #64748b;
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.reminder-manual-btn:hover {
    background: #475569;
    transform: scale(1.03);
}

.reminder-manual-btn.sent {
    background: #22c55e;
    cursor: default;
}

.reminder-send-btn.no-phone {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.reminder-view-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.4rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.reminder-view-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============ Reminder Messages Popover ============ */
.reminder-msg-popover {
    width: 320px;
    max-width: calc(100vw - 2rem);
    max-height: 400px;
    background: #fff;
    border-radius: 0.6rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 10001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reminder-msg-popover-loading {
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.reminder-msg-popover-empty {
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.reminder-msg-popover-header {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.reminder-msg-popover-list {
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
}

.reminder-msg-out {
    background: #d1fae5;
    color: #065f46;
    border-radius: 0.5rem 0.5rem 0.1rem 0.5rem;
    padding: 0.35rem 0.6rem;
    margin: 0.3rem 0;
    margin-left: 2rem;
    font-size: 0.8rem;
    word-wrap: break-word;
}

.reminder-msg-in {
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 0.5rem 0.5rem 0.5rem 0.1rem;
    padding: 0.35rem 0.6rem;
    margin: 0.3rem 0;
    margin-right: 2rem;
    font-size: 0.8rem;
    word-wrap: break-word;
}

.reminder-msg-body {
    line-height: 1.4;
}

.reminder-msg-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.15rem;
    text-align: right;
}

.reminder-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}

.reminder-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.reminder-summary {
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 500;
    text-align: center;
}

/* ============ WhatsApp Language Pills ============ */
.wa-lang-pills {
    display: inline-flex;
    gap: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
}

.wa-lang-pills input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.wa-lang-pills label {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    user-select: none;
}

.wa-lang-pills label:last-child {
    border-right: none;
}

.wa-lang-pills label:hover {
    background: #f1f5f9;
    color: #475569;
}

.wa-lang-pills input[type="radio"]:checked + label {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.wa-lang-pills input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============ Reminder Toast & Read Status ============ */
.reminder-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #059669;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reminder-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.reminder-toast-error {
    background: #ef4444;
}

.reminder-sent-badge {
    display: inline-block;
    background: #dcfce7;
    color: #059669;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.reminder-read-status {
    margin-top: 0.3rem;
    font-size: 0.75rem;
}

.reminder-read-yes {
    color: #059669;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.reminder-read-delivered {
    color: #3b82f6;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.reminder-read-pending {
    color: #94a3b8;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============ Appointments Export Bar ============ */
.appt-export-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
