:root{--surface:#fff;--surface-soft:#f3f6f2;--surface-raised:#fff;--text:#203e35;--text-muted:#66756e;--action:#004030;--stroke:#dce5df}
html[data-theme=dark]{color-scheme:dark;--surface:#101c18;--surface-soft:#15241e;--surface-raised:#1b2d25;--text:#e6f0e9;--text-muted:#a8bbb0;--action:#a0ddbf;--stroke:#344b3e;--ink:var(--text);--muted:var(--text-muted);--border:var(--stroke);--line:var(--stroke);--wash:var(--surface-soft);--bg:#0e1b17;--white:var(--surface);--burgundy:#e9a69a;--accent:#e9a69a}
.preferences-bar{padding:8px 38px;border-bottom:1px solid var(--stroke);background:var(--surface);color:var(--text);font:13px/1.5 var(--font,Arial,sans-serif)}
.preferences-controls{display:flex;gap:10px;align-items:center;justify-content:flex-end;max-width:1240px;margin-inline:auto}
.preferences-controls label,.preferences-controls button{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid var(--stroke);border-radius:7px;background:var(--surface-soft);color:var(--text);min-height:36px}
.preferences-controls select{font:inherit;color:inherit;background:transparent;border:0;max-width:150px;cursor:pointer;padding:0 4px;min-width:105px}
.preferences-controls select option{background:var(--surface);color:var(--text)}
.preferences-controls button{font:inherit;cursor:pointer;min-width:125px;justify-content:center}
.preferences-controls svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;flex-shrink:0}
.preferences-controls :focus-visible{outline:3px solid #a86a4f;outline-offset:3px}
.preferences-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.auth>.preferences-bar{padding:0 0 18px;margin-bottom:24px}.auth .preferences-controls{justify-content:space-between}.auth .preferences-controls label{display:flex;margin:0;font-size:13px}.auth .preferences-controls button{width:auto;margin:0}
body>header:not(.header){flex-wrap:wrap}body>header:not(.header)>.preferences-bar{flex-basis:100%;padding:10px 0 0;border-bottom:0}
html[dir=ltr] .sidebar{right:auto;left:0;border-left:0;border-right:1px solid var(--border)}
html[dir=ltr] .app-main{margin-right:0;margin-left:235px}
html[dir=ltr] :is(.sidebar nav button,.data-table,.data-table button.link){text-align:left}
html[dir=ltr] .sidebar-bottom button{margin-right:0;margin-left:auto}
html[dir=ltr] .hero-shade{background:linear-gradient(90deg,rgba(3,36,28,.97),rgba(4,40,31,.79) 35%,rgba(6,31,24,.16) 74%)}
html[dir=ltr] .hero-note{left:auto;right:0}
html[dir=ltr] h1,html[dir=ltr] h2{letter-spacing:normal}
html[dir=ltr] .footer-top a[dir=ltr]{text-align:left}
html[data-theme=dark] body{background:var(--bg,var(--surface));color:var(--text)}
html[data-theme=dark] :is(.header,.sidebar,.app-header,.auth,.panel,.stat,.plan-card,.location-card,.work-card,.materials-card,.welcome-panel,.date-chip,.btn.light,.service-card,.package-card,.plan-form,.plan-summary,.dialog,.passport-card,.team-setting,.schedule-order,.calendar-panel,.calendar-day-panel,.notification-card,.notice-message){background:var(--surface)!important;color:var(--text);border-color:var(--stroke)}
html[data-theme=dark] :is(input,select,textarea){background:var(--surface-soft)!important;color:var(--text)!important;border-color:var(--stroke)!important}
html[data-theme=dark] :is(footer,.planner-section,.faq,.map-panel,.data-table th,.soft-button,.tabs,.service-icon,.stat-icon,.team-avatar,.brand-dot,.avatar,.month-day,.calendar-filters,.availability-row,.notice-settings,.notification-controls){background:var(--surface-soft);color:var(--text);border-color:var(--stroke)}
html[data-theme=dark] :is(.service-card p,.section-heading>p,.kicker,.footer-top h3,.footer-top p,.footer-top a:not(.button),.business-section p,.form-grid label,.form-grid input,.form-grid select,.plan-card p,.materials-card p,.stat-top,.stat small,.soft-link,.sidebar nav button,.text-action,.data-table button.link,.card-link,.button.outline,.summary-foot,.form-note,.work-meta,.timeline-item time,.calendar-toolbar,.schedule-empty,.booking-availability,.day-zero,.month-weekdays,.panel-heading small,.notification-meta,.muted){color:var(--text-muted)}
html[data-theme=dark] :is(.sidebar nav button.active,.btn,.button,.tab.active){background:#086046;color:#fff}
html[data-theme=dark] :is(.btn.burgundy,.button.gold){background:#804238;color:#fff}
html[data-theme=dark] :is(.btn.light,.button.outline){background:var(--surface-soft);color:var(--action);border-color:var(--stroke)}
html[data-theme=dark] :is(.notice,#mode-banner,.review-notice){background:#30271f;color:#f1c6a6;border-color:#604b39}
html[data-theme=dark] .success-notice{background:#193b2b;color:#b2dfbd;border-color:#355e45}
html[data-theme=dark] .hero-note{background:var(--surface-raised);color:var(--text)}
html[data-theme=dark] .hero-note span:not(.note-icon){color:var(--text-muted)}
html[data-theme=dark] .brand img,html[data-theme=dark] .auth img,html[data-theme=dark] .footer-top img,html[data-theme=dark] body>header>a>img{background:#f7faf6;border-radius:8px;padding:6px}
html[data-theme=dark] :is(.month-day:hover,.month-day.selected,.city-choices button,.team-choices button,.booking-slot,.people-tab,.notice-tab){background:var(--surface-raised);color:var(--text);border-color:var(--stroke)}
html[data-theme=dark] .month-day.selected{outline:2px solid #78b897;outline-offset:-2px}
html[data-theme=dark] :is(.pill,.notification-category){filter:brightness(.9)}
html[data-theme=dark] :is(.panel-heading,.data-table td,.data-table th,.team-row,.timeline-item,.card-link,.footer-bottom,.detail-section){border-color:var(--stroke)}
html[data-theme=dark] .service-card:hover{background:var(--surface-raised)}
html[data-theme=dark] .package-card.accent{background:#30241f;color:var(--text)}
@media(max-width:1200px){html[dir=ltr] .app-main{margin-left:205px}}
@media(max-width:700px){.preferences-bar{padding:8px 18px}.preferences-controls{gap:8px}.preferences-controls button{min-width:116px}html[dir=ltr] .app-main{margin:0}html[dir=ltr] .sidebar{transform:translateX(-100%)}html[dir=ltr] .sidebar.open{transform:none}html[dir=ltr] .breadcrumb{margin-left:0;margin-right:auto}.app-header{height:auto;min-height:65px;flex-wrap:wrap;padding-block:10px}.header-actions{flex-wrap:wrap}.header-actions #mode-button{display:none}html[dir=ltr] .hero-note{right:auto;left:0}html[dir=ltr] .hero-shade{background:linear-gradient(90deg,rgba(3,36,28,.95),rgba(4,40,31,.54))}.preferences-controls select{max-width:135px}.preferences-controls button span{max-width:140px;white-space:normal}}

html[data-theme=dark] #modal{background:var(--surface);color:var(--text);border-color:var(--stroke)}

/* Language names retain their own writing direction inside either UI direction. */
.preferences-controls { flex-wrap: wrap; }
.preferences-controls :is(label,button) { min-width: 0; max-width: 100%; }
.preferences-controls select { text-align: start; }
.preferences-controls select option { unicode-bidi: plaintext; }
html[dir=rtl] :is(h1,h2,h3) { letter-spacing: normal; }
/* Keep identifiers and telephone numbers isolated from surrounding Arabic. */
:is(input[type=tel],input[type=email],input[type=url]) { direction: ltr; unicode-bidi: isolate; text-align: start; }
:is(bdi,[dir=ltr]) { unicode-bidi: isolate; }
