:root { --app-max-width:1120px; --blue:#075ce5; --blue-dark:#0646ad; --ink:#0b0c0e; --muted:#737982; --line:#dfe2e6; --cloud:#f4f5f7; --white:#fff; --green:#0057ff; --amber:#d98b12; --red:#c63846; --display:"Tajawal", Arial, sans-serif; --body:"Tajawal", Arial, sans-serif; }
* { box-sizing:border-box; }
body { margin:0; background:var(--cloud); color:var(--ink); font-family:var(--body); }
body { font-weight:400; line-height:1.5; }
button,input,select { font:inherit; }
.phone-number,input[type="tel"] { direction:ltr; unicode-bidi:isolate; text-align:left; white-space:nowrap; }
button,select { cursor:pointer; }
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible { outline:3px solid #a9c5fb; outline-offset:2px; }
[hidden] { display:none!important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

.admin-auth { min-height:100vh; display:grid; place-items:center; padding:88px 20px 70px; position:relative; background:linear-gradient(90deg,var(--blue) 0 12px,#f7f8fa 12px 100%); }
.auth-brand { position:absolute; top:14px; left:35px; display:flex; align-items:center; color:var(--ink); text-decoration:none; }
.auth-logo { display:block; width:auto; height:62px; object-fit:contain; }
.auth-panel { width:min(470px,100%); background:white; border:1px solid var(--line); padding:35px; box-shadow:0 18px 50px rgba(21,34,54,.08); }
.auth-panel-head p,.modal-head p,.section-toolbar>div>p,.panel-head p { margin:0 0 5px; color:var(--blue); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; }
.auth-panel-head h1 { margin:0; font:700 43px/1 var(--display); text-transform:uppercase; }
.auth-panel-head>span { display:block; margin:9px 0 25px; color:var(--muted); font-size:14px; font-weight:300; }
.admin-phone-row { display:grid; grid-template-columns:120px minmax(0,1fr); gap:10px; direction:ltr; }
.auth-panel, .admin-phone-row > label, .admin-phone-row input { min-width:0; max-width:100%; }
.admin-phone-row select,.admin-phone-row input { direction:ltr; text-align:left; }
html[dir="rtl"] .admin-phone-row>label { direction:rtl; text-align:right; }
.auth-panel label,.auth-panel legend { display:grid; gap:7px; color:var(--muted); font-size:10px; font-weight:700; }
.auth-panel select,.auth-panel input { height:48px; border:1px solid var(--line); background:#fff; padding:0 11px; border-radius:5px; color:var(--ink); }
.auth-panel fieldset { border:0; padding:0; margin:20px 0 0; }
.auth-panel legend { margin-bottom:7px; }
.admin-pin { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; direction:ltr; unicode-bidi:isolate; }
.admin-pin input { min-width:0; padding:0; text-align:center; font-size:21px; font-weight:700; }
.admin-pin input.filled { border-color:#a8b0bb; background:var(--cloud); }
.auth-error { min-height:17px; margin:11px 0; color:var(--red); font-size:11px; font-weight:500; }
.auth-submit { width:100%; height:49px; border:0; background:var(--blue); color:white; font-weight:700; padding:0 16px; }
.auth-submit span { float:right; }
.auth-submit:disabled { opacity:.7; cursor:wait; }
.auth-panel>a { display:block; text-align:center; margin-top:18px; color:var(--muted); font-size:11px; text-decoration:none; }
.auth-security { position:absolute; bottom:22px; margin:0; color:var(--muted); font-size:10px; }
.auth-security span { display:inline-block; width:7px; height:7px; margin-right:6px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px #dce9ff; }

.admin-shell { width:100%; max-width:var(--app-max-width); min-height:100vh; margin-inline:auto; display:grid; grid-template-columns:235px minmax(0,1fr); }
.sidebar { position:sticky; top:0; height:100vh; background:#0d1420; color:white; padding:23px 15px 17px; display:flex; flex-direction:column; z-index:20; }
.side-brand { color:white; text-decoration:none; display:grid; justify-items:center; gap:3px; padding:7px 8px 18px; border-bottom:1px solid #26303d; }
.side-logo { display:block; width:180px; max-width:100%; height:auto; padding:4px 0; background:transparent; object-fit:contain; }
.side-brand small { display:block; color:#aeb7c4; font:500 8px var(--body); letter-spacing:.13em; text-transform:uppercase; }
.side-nav { display:grid; gap:5px; margin-top:25px; }
.nav-item { width:100%; height:44px; border:0; background:transparent; color:#aeb7c4; display:grid; grid-template-columns:21px 1fr auto; gap:10px; align-items:center; text-align:left; padding:0 12px; border-radius:5px; font-size:12px; font-weight:500; }
.nav-item svg,.side-bottom svg { width:18px; fill:none; stroke:currentColor; stroke-width:1.7; }
.nav-item b { min-width:21px; height:19px; border-radius:10px; display:grid; place-items:center; padding:0 5px; background:#222c39; font-size:9px; }
.nav-item:hover { background:#172231; color:white; }
.nav-item.active { background:var(--blue); color:white; }
.nav-item.active b { background:rgba(255,255,255,.18); }
.side-bottom { margin-top:auto; display:grid; gap:3px; }
.side-bottom>a,.side-bottom>button { border:0; background:transparent; color:#919baa; text-decoration:none; display:flex; align-items:center; gap:9px; padding:10px 11px; font-size:11px; text-align:left; }
.side-bottom>a:hover,.side-bottom>button:hover { color:white; }
.admin-user { border-top:1px solid #26303d; margin-top:10px; padding:17px 8px 0; display:flex; align-items:center; gap:10px; }
.admin-user>span { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; background:#273246; color:#8db3ff; font-weight:700; }
.admin-user strong,.admin-user small { display:block; font-size:10px; }
.admin-user small { color:#778291; margin-top:2px; }

.admin-main { min-width:0; padding:0 28px 45px; }
.admin-header { height:90px; display:flex; align-items:center; gap:17px; border-bottom:1px solid var(--line); }
.admin-header>div:first-of-type { min-width:260px; }
.admin-header p { color:var(--muted); margin:0 0 3px; font-size:10px; }
.admin-header h1 { margin:0; font:700 31px/1 var(--display); text-transform:uppercase; }
.header-tools { margin-left:auto; display:flex; align-items:center; gap:12px; }
.admin-search { width:230px; height:40px; border:1px solid var(--line); background:white; display:flex; align-items:center; padding:0 12px; gap:8px; }
.admin-search svg { width:17px; fill:none; stroke:var(--muted); stroke-width:1.7; }
.admin-search input { width:100%; border:0; outline:0; font-size:11px; }
.live-pill { background:#dce9ff; color:var(--green); padding:7px 10px; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.live-pill i { display:inline-block; width:6px; height:6px; background:var(--green); border-radius:50%; margin-right:5px; animation:pulse 1.8s ease infinite; }
@keyframes pulse { 50% { box-shadow:0 0 0 5px rgba(15,87,255,.16); } }
.sidebar-toggle { display:none; width:38px; height:38px; border:0; background:white; padding:9px; }
.sidebar-toggle span { display:block; height:1px; background:var(--ink); margin:5px 0; }
.loading-bar { height:2px; overflow:hidden; margin:0 -28px; }
.loading-bar span { display:block; width:35%; height:100%; background:var(--blue); animation:load 1s ease-in-out infinite; }
.loading-bar.done { opacity:0; }
@keyframes load { from{transform:translateX(-120%)} to{transform:translateX(340%)} }

.view { display:none; padding-top:26px; }
.view.active { display:block; }
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; }
.stat-grid article { background:white; border:1px solid var(--line); padding:20px; min-height:132px; position:relative; overflow:hidden; }
.stat-grid article:first-child::after { content:""; position:absolute; right:0; top:0; bottom:0; width:5px; background:var(--blue); }
.stat-grid p { color:var(--muted); margin:0 0 16px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; }
.stat-grid strong { display:block; font:700 35px/1 var(--display); }
.stat-grid span { display:block; margin-top:12px; color:var(--muted); font-size:10px; }
.stat-grid b { color:var(--ink); }
.overview-grid { display:grid; grid-template-columns:1.7fr 1fr; gap:13px; margin-top:13px; }
.panel { background:white; border:1px solid var(--line); padding:21px; min-height:330px; }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:16px; }
.panel-head h2,.section-toolbar h2 { margin:0; font:700 25px/1 var(--display); text-transform:uppercase; }
.panel-head button { border:0; background:transparent; color:var(--blue); font-size:10px; font-weight:700; }
.compact-list { display:grid; }
.compact-booking { display:grid; grid-template-columns:84px 1fr auto auto; align-items:center; gap:14px; padding:15px 2px; border-bottom:1px solid #eef0f2; font-size:10px; }
.compact-booking strong { font-size:11px; }
.compact-booking small { display:block; color:var(--muted); margin-top:3px; }
.amount { font-weight:700; }
.status-badge { display:inline-flex; align-items:center; width:max-content; border-radius:20px; padding:5px 8px; font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.status-active,.status-confirmed { background:#dce9ff; color:var(--green); }
.status-available { background:#dce9ff; color:var(--green); }
.status-rented { background:#e7efff; color:var(--blue-dark); }
.status-pending { background:#fff1d8; color:#9a650f; }
.status-maintenance { background:#fff1d8; color:#9a650f; }
.status-completed { background:#e9eff9; color:#53677f; }
.status-cancelled,.status-unavailable { background:#f8e6e8; color:var(--red); }
.status-out_of_service,.status-inactive { background:#eef0f3; color:#646b75; }
.health-meter { padding:38px 0 25px; }
.health-meter>div { display:flex; height:24px; background:#edf0f2; }
.health-meter button { border:0; padding:0; min-width:0; border-radius:0; box-shadow:none; }
.health-meter button:first-child { background:var(--green); }
.health-meter button:nth-child(2) { background:var(--amber); }
.health-meter button:nth-child(3) { background:#a7adb5; }
.health-meter button:hover { filter:brightness(.88); }
.health-meter button:focus-visible { outline-offset:-3px; }
.fleet-health dl { margin:0; }
.fleet-health dl div { display:flex; justify-content:space-between; padding:11px 0; border-top:1px solid #eef0f2; font-size:11px; position:relative; min-height:44px; }
.fleet-health dt { display:flex; align-items:center; gap:8px; }
.fleet-health i { width:7px; height:7px; border-radius:50%; }
.fleet-health i.green { background:var(--green); }.fleet-health i.amber{background:var(--amber)}.fleet-health i.gray{background:#a7adb5}
.fleet-health dd { font-weight:700; }
.dashboard-card-link,.health-row-link { position:absolute; inset:0; width:100%; height:100%; background:transparent; border:0; border-radius:0; padding:0; }
.dashboard-card-link:hover,.health-row-link:hover { background:rgba(7,92,229,.05); }
.dashboard-card-link:focus-visible,.health-row-link:focus-visible { outline:3px solid var(--blue); outline-offset:-3px; }
.panel-head .panel-title-link { font:inherit; color:inherit; letter-spacing:inherit; text-transform:inherit; text-align:inherit; padding:0; }
a.compact-booking { color:inherit; text-decoration:none; border-radius:6px; }
a.compact-booking:hover { background:var(--blue-soft); }
a.compact-booking:focus-visible { outline-color:var(--blue); outline-offset:-3px; }

.section-toolbar { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:18px; }
.section-toolbar>div:last-child { display:flex; align-items:end; gap:9px; }
.section-toolbar label { display:grid; gap:4px; color:var(--muted); font-size:9px; text-transform:uppercase; font-weight:700; }
.section-toolbar select { height:39px; min-width:150px; border:1px solid var(--line); background:white; padding:0 10px; color:var(--ink); font-size:11px; text-transform:none; }
.primary-action { height:39px; border:0; background:var(--blue); color:white; padding:0 15px; font-size:11px; font-weight:700; }
.primary-action:hover { background:var(--blue-dark); }
.data-table-wrap { position:relative; border:1px solid var(--line); background:white; overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th { background:#f9fafb; color:var(--muted); text-align:left; padding:12px 15px; border-bottom:1px solid var(--line); font-size:9px; text-transform:uppercase; letter-spacing:.06em; }
td { padding:13px 15px; border-bottom:1px solid #eceef1; font-size:10px; vertical-align:middle; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:#fafbfc; }
.booking-row { cursor: pointer; }
.booking-row:hover, .booking-row:focus-within { background: var(--blue-soft); }
.booking-details-link { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.booking-details-link:hover { color: var(--blue-dark); text-decoration: underline; }
.booking-details-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.admin-header[hidden] { display:none!important; }
.vehicle-cell { display:flex; align-items:center; gap:11px; min-width:190px; }
.vehicle-cell img { width:57px; height:40px; object-fit:cover; background:var(--cloud); filter:grayscale(.65); }
.vehicle-cell strong,.customer-cell strong { display:block; font-size:11px; }
#fleetTableBody .vehicle-cell strong { font-size:16px; }
.vehicle-cell small,.customer-cell small { display:block; color:var(--muted); margin-top:3px; }
.stock-number { font-weight:700; }
.table-actions { display:flex; justify-content:flex-end; gap:5px; }
.icon-action { width:31px; height:31px; border:1px solid var(--line); background:white; display:grid; place-items:center; }
.icon-action:hover { border-color:#aeb5bf; }
.icon-action.danger:hover { color:var(--red); border-color:#e9b8bd; }
.icon-action svg { width:14px; fill:none; stroke:currentColor; stroke-width:1.7; }
.inline-select { border:1px solid var(--line); background:white; height:31px; padding:0 7px; font-size:9px; }
.table-empty { text-align:center; padding:65px; color:var(--muted); background:white; border:1px solid var(--line); font-size:12px; }

.vehicle-dialog { width:min(680px,calc(100% - 28px)); max-height:calc(100dvh - 28px); border:0; padding:0; overflow:hidden; box-shadow:0 30px 90px rgba(5,15,30,.28); }
.vehicle-dialog::backdrop { background:rgba(5,12,23,.55); backdrop-filter:blur(2px); }
.vehicle-dialog form { max-height:calc(100dvh - 28px); padding:28px; overflow-y:auto; box-sizing:border-box; }
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:22px; }
.modal-head h2 { margin:0; font:700 31px/1 var(--display); text-transform:uppercase; }
.modal-head button { border:0; width:34px; height:34px; background:var(--cloud); font-size:22px; }
.vehicle-image-preview { position:relative; display:grid; grid-template-columns:minmax(150px,.8fr) minmax(270px,2.2fr); min-height:148px; margin:-4px 0 18px; border:1px solid #dce3ed; border-inline-start:3px solid var(--blue); background:radial-gradient(circle at 68% 45%,#fff 0 24%,transparent 55%),linear-gradient(135deg,#f1f5fb 0%,#fafbfd 58%,#eef3fa 100%); overflow:hidden; }
.vehicle-image-preview-copy { position:relative; z-index:2; display:flex; flex-direction:column; justify-content:center; gap:6px; padding:20px; }
.vehicle-image-preview-copy span { color:var(--blue); font-size:9px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.vehicle-image-preview-copy strong { font:700 18px/1.15 var(--display); text-transform:uppercase; }
.vehicle-image-preview-frame { position:relative; min-width:0; height:148px; display:grid; place-items:center; padding:9px; overflow:hidden; background:transparent; box-sizing:border-box; }
.vehicle-image-preview-frame>img { position:absolute; inset:9px; display:block; width:calc(100% - 18px); height:calc(100% - 18px); max-width:none; object-fit:contain; object-position:center; transform:scale(1.3); transform-origin:center; }
.vehicle-image-preview-empty { display:grid; place-items:center; gap:7px; padding:16px; color:var(--muted); text-align:center; font-size:10px; }
.vehicle-image-preview-empty svg { width:31px; height:31px; fill:none; stroke:currentColor; stroke-width:1.35; stroke-linecap:round; stroke-linejoin:round; }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:13px; }
.form-grid label { display:grid; gap:5px; color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; }
.form-grid input,.form-grid select { height:41px; border:1px solid var(--line); background:white; padding:0 10px; color:var(--ink); font-size:11px; text-transform:none; }
.form-grid textarea { width:100%; min-height:80px; resize:vertical; border:1px solid var(--line); background:white; padding:10px; color:var(--ink); font:11px var(--body); text-transform:none; }
.form-grid .wide { grid-column:1/-1; }
.form-grid .check-label { display:flex; flex-direction:row; align-items:center; gap:8px; color:var(--ink); }
.check-label input { width:16px; height:16px; accent-color:var(--blue); }
.form-error { color:var(--red); min-height:15px; font-size:10px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; border-top:1px solid var(--line); padding-top:17px; }
.modal-actions>button:first-child { height:39px; border:1px solid var(--line); background:white; padding:0 16px; font-size:11px; }
.toast { position:fixed; z-index:80; right:24px; bottom:24px; background:#0d1420; color:white; padding:12px 17px; font-size:11px; transform:translateY(25px); opacity:0; pointer-events:none; transition:.25s; }
.toast.show { opacity:1; transform:translateY(0); }
.toast.error { background:var(--red); }
.inline-link { border:0; background:transparent; color:var(--blue); padding:4px 0; font-size:10px; font-weight:700; }
.not-reservable { display:block; margin-top:4px; color:var(--red); font-size:8px; }
.assignment-button { min-width:96px; border:1px dashed #bdc5d0; background:#fff; color:var(--muted); padding:7px 9px; font-size:9px; font-weight:700; }
.assignment-button.assigned { border-style:solid; border-color:#aec7ff; background:#dce9ff; color:var(--green); }
.calendar-dialog { width:min(760px,calc(100% - 28px)); }
.calendar-list { display:grid; gap:7px; max-height:280px; overflow:auto; margin-bottom:20px; }
.calendar-event { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; border:1px solid var(--line); background:#fafbfc; }
.calendar-event>div { display:grid; gap:3px; }
.calendar-event span { color:var(--blue); font-size:8px; font-weight:700; text-transform:uppercase; }
.calendar-event strong { font-size:11px; }
.calendar-event small { color:var(--muted); font-size:9px; }
.calendar-event>button { width:29px; height:29px; border:1px solid #ebc3c8; background:#fff; color:var(--red); }
.calendar-block-form { padding-top:18px; border-top:1px solid var(--line); }
.calendar-block-form h3 { margin:0 0 13px; font:700 20px var(--display); }
.calendar-block-form>.primary-action { width:100%; margin-top:12px; }
.assignment-summary { padding:12px; background:var(--cloud); color:var(--muted); font-size:11px; }
.assignment-select { display:grid; gap:7px; color:var(--muted); font-size:10px; font-weight:700; }
.assignment-select select { height:44px; border:1px solid var(--line); background:#fff; padding:0 10px; }

@media(max-width:1000px){.stat-grid{grid-template-columns:repeat(2,1fr)}.overview-grid{grid-template-columns:1fr}.admin-search{width:180px}}
@media(max-width:760px){.admin-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:0;transform:translateX(-105%);width:235px;transition:.25s}.sidebar.open{transform:translateX(0);box-shadow:20px 0 60px rgba(0,0,0,.25)}.admin-main{padding:0 14px 35px}.admin-header{height:76px}.sidebar-toggle{display:block}.admin-header>div:first-of-type{min-width:0}.admin-header p{display:none}.admin-header h1{font-size:24px}.admin-search{width:42px;padding:0 11px}.admin-search input{display:none}.live-pill{display:none}.loading-bar{margin:0 -14px}.view{padding-top:18px}.stat-grid{grid-template-columns:1fr 1fr;gap:8px}.stat-grid article{padding:15px;min-height:115px}.stat-grid strong{font-size:29px}.panel{padding:15px}.compact-booking{grid-template-columns:73px 1fr auto}.compact-booking .amount{display:none}.section-toolbar{align-items:flex-start;gap:14px}.section-toolbar>div:last-child{align-items:stretch;flex-direction:column}.vehicle-image-preview{grid-template-columns:1fr;min-height:0}.vehicle-image-preview-copy{padding:14px 16px 4px}.vehicle-image-preview-frame{height:125px}.vehicle-image-preview-frame>img{transform:scale(1.18)}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.auth-panel{padding:25px 18px}.admin-phone-row{grid-template-columns:108px 1fr}.admin-pin{gap:5px}.auth-brand{left:22px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

@media(max-width:760px) {
  .admin-header { height:auto; min-height:76px; flex-wrap:wrap; padding-block:14px; gap:12px; }
  .admin-header > div:first-of-type { flex:1; }
  .header-tools { flex-basis:100%; min-width:0; }
  .admin-search { width:100%; }
  .admin-search input { display:block; min-width:0; width:100%; }
}

/* Arabic, RTL, language controls, and keyboard navigation */
.skip-link { position:fixed; top:-60px; inset-inline-start:18px; z-index:100; padding:10px 15px; background:var(--ink); color:#fff; text-decoration:none; font-weight:700; transition:top .2s; }
.skip-link:focus { top:12px; }
.auth-language { position:absolute; top:27px; inset-inline-end:35px; border:1px solid var(--line); background:#fff; color:var(--blue); }
.language-icon-button { width:40px; height:40px; min-width:40px; padding:0; border-radius:50%; display:grid; place-items:center; }
.language-icon-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.side-language { color:#8db3ff!important; font-weight:700; justify-content:center!important; justify-self:center; }
.stat-grid span i { font-style:normal; }
[lang="ar"] body, [lang="ar"] button, [lang="ar"] input, [lang="ar"] select { font-family:var(--body); }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] .auth-brand, [lang="ar"] .side-brand, [lang="ar"] .stat-grid strong { font-family:var(--body); letter-spacing:0; text-transform:none; }
[dir="rtl"] .admin-auth { background:linear-gradient(270deg,var(--blue) 0 12px,#f7f8fa 12px 100%); }
[dir="rtl"] .auth-brand { left:auto; right:35px; }
[dir="rtl"] .auth-submit span { float:left; }
[dir="rtl"] .auth-security span { margin-right:0; margin-left:6px; }
[dir="rtl"] .nav-item, [dir="rtl"] .side-bottom>a, [dir="rtl"] .side-bottom>button { text-align:right; }
[dir="rtl"] .header-tools { margin-left:0; margin-right:auto; }
[dir="rtl"] .live-pill i { margin-right:0; margin-left:5px; }
[dir="rtl"] th { text-align:right; }
[dir="rtl"] .table-actions { justify-content:flex-start; }
[dir="rtl"] .toast { right:auto; left:24px; }

@media(max-width:760px) {
  .auth-language { top:72px; inset-inline-end:22px; }
  [dir="rtl"] .auth-brand { left:auto; right:22px; }
  [dir="rtl"] .sidebar { left:auto; right:0; transform:translateX(105%); }
  [dir="rtl"] .sidebar.open { transform:translateX(0); box-shadow:-20px 0 60px rgba(0,0,0,.25); }
}

/* Public-site promotion settings */
.settings-tabs { display:flex; gap:6px; padding:6px; margin-bottom:20px; background:#e8ebef; border:1px solid var(--line); border-radius:16px; flex-wrap:wrap; }
.settings-tabs [role="tab"] { flex:1 1 160px; min-height:46px; padding:10px 16px; border:0; border-radius:11px; background:transparent; color:#53606d; font-size:15px; font-weight:700; transition:background-color .18s,color .18s,box-shadow .18s; }
.settings-tabs [role="tab"]:hover { background:#f5f7fa; color:var(--ink); }
.settings-tabs [role="tab"][aria-selected="true"] { background:#fff; color:var(--blue-dark); box-shadow:0 2px 8px #18233814; }
.settings-tabs [role="tab"]:focus-visible,[data-settings-panel]:focus-visible { outline:3px solid #a9c5fb; outline-offset:2px; }
#settingsAccountsPanel .access-administration { margin-top:0; }
#settingsAccountsPanel .access-administration > h3 { margin:0 0 18px; font-size:20px; }
@media(prefers-reduced-motion:reduce) { .settings-tabs [role="tab"] { transition:none; } }
.promotion-settings-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr); gap:14px; }
.promotion-settings-preview,.promotion-settings-form { min-width:0; background:#fff; border:1px solid var(--line); padding:21px; }
.settings-card-head { padding-bottom:15px; margin-bottom:16px; border-bottom:1px solid var(--line); }
.settings-card-head p { margin:0 0 5px; color:var(--blue); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; }
.settings-card-head h3 { margin:0; font:700 24px/1 var(--display); text-transform:uppercase; }
.promotion-preview-frame { height:310px; overflow:hidden; background:#edf2fa; border:1px solid var(--line); }
.promotion-preview-frame img { width:100%; height:100%; display:block; object-fit:cover; }
.promotion-settings-preview>p { margin:12px 0 0; color:var(--muted); font-size:10px; line-height:1.65; }
.promotion-settings-form { display:grid; align-content:start; gap:14px; }
.promotion-settings-form>label { display:grid; gap:6px; color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; }
.promotion-settings-form input[type="text"],.promotion-settings-form input:not([type]) { width:100%; height:42px; border:1px solid var(--line); background:#fff; color:var(--ink); padding:0 10px; font-size:11px; text-transform:none; }
.promotion-upload-control { padding:13px; border:1px dashed #b9c3d1; background:#f8f9fb; }
.promotion-upload-control input { width:100%; min-width:0; color:var(--muted); font-size:10px; direction:ltr; text-align:left; text-transform:none; }
.promotion-upload-control input::file-selector-button { border:0; background:#e7efff; color:var(--blue-dark); padding:8px 10px; margin-inline-end:8px; font-weight:700; cursor:pointer; }
.promotion-upload-control small { color:var(--muted); font-size:9px; font-weight:500; line-height:1.5; text-transform:none; }
.promotion-settings-form .settings-check { display:flex; flex-direction:row; align-items:center; gap:8px; color:var(--ink); text-transform:none; }
.settings-check input { width:17px; height:17px; accent-color:var(--blue); }
.promotion-settings-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:16px; border-top:1px solid var(--line); }
.danger-action { height:39px; border:1px solid #e3b9bf; background:#fff; color:var(--red); padding:0 14px; font-size:10px; font-weight:700; }
.danger-action:hover { background:#fff5f6; }
.danger-action:disabled { opacity:.45; cursor:not-allowed; }
[lang="ar"] .settings-card-head h3 { font-family:var(--body); letter-spacing:0; text-transform:none; }

@media(max-width:960px) {
  .promotion-settings-layout { grid-template-columns:1fr; }
}

@media(max-width:760px) {
  .promotion-settings-preview,.promotion-settings-form { padding:15px; }
  .promotion-preview-frame { height:210px; }
  .promotion-settings-actions { flex-direction:column-reverse; }
  .promotion-settings-actions button { width:100%; }
}

/* Apple-inspired control system for the operations portal. */
:root {
  --control-radius:12px;
  --control-border:rgba(60,60,67,.20);
  --control-border-hover:rgba(60,60,67,.34);
  --control-fill:rgba(250,250,252,.94);
  --control-shadow:0 1px 2px rgba(15,23,42,.06),inset 0 1px 0 rgba(255,255,255,.82);
  --control-focus:rgba(7,92,229,.24);
  --action-shadow:0 1px 2px rgba(0,37,96,.18),0 6px 16px rgba(7,92,229,.18);
}

button,input,select,textarea,a { -webkit-tap-highlight-color:transparent; }

.auth-panel select,
.auth-panel input,
.section-toolbar select,
.inline-select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.assignment-select select,
.promotion-settings-form input[type="text"],
.promotion-settings-form input:not([type]) {
  border-color:var(--control-border);
  border-radius:var(--control-radius);
  background-color:var(--control-fill);
  box-shadow:var(--control-shadow);
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}

.auth-panel select:hover,
.auth-panel input:hover,
.section-toolbar select:hover,
.inline-select:hover,
.form-grid input:hover,
.form-grid select:hover,
.form-grid textarea:hover,
.assignment-select select:hover,
.promotion-settings-form input[type="text"]:hover,
.promotion-settings-form input:not([type]):hover {
  border-color:var(--control-border-hover);
  background-color:#fff;
}

.auth-panel select:focus-visible,
.auth-panel input:focus-visible,
.section-toolbar select:focus-visible,
.inline-select:focus-visible,
.form-grid input:focus-visible,
.form-grid select:focus-visible,
.form-grid textarea:focus-visible,
.assignment-select select:focus-visible,
.promotion-settings-form input[type="text"]:focus-visible,
.promotion-settings-form input:not([type]):focus-visible {
  outline:0;
  border-color:var(--blue);
  box-shadow:0 0 0 4px var(--control-focus),var(--control-shadow);
}

.admin-search {
  border-color:var(--control-border);
  border-radius:var(--control-radius);
  background:var(--control-fill);
  box-shadow:var(--control-shadow);
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.admin-search:hover { border-color:var(--control-border-hover); background:#fff; }
.admin-search:focus-within { border-color:var(--blue); box-shadow:0 0 0 4px var(--control-focus),var(--control-shadow); }

.auth-submit,
.primary-action {
  border-radius:var(--control-radius);
  background:linear-gradient(180deg,#1370f4 0%,var(--blue) 100%);
  box-shadow:var(--action-shadow);
  transition:background-color .16s ease,box-shadow .16s ease,transform .12s ease;
}
.auth-submit:hover,
.primary-action:hover { background:linear-gradient(180deg,#0d66e8 0%,var(--blue-dark) 100%); }
.auth-submit:active,
.primary-action:active { transform:scale(.98); box-shadow:0 1px 2px rgba(0,37,96,.16); }

.icon-action,
.inline-select,
.modal-head button,
.modal-actions>button:first-child,
.assignment-button,
.calendar-event>button,
.language-icon-button,
.sidebar-toggle,
.danger-action,
.promotion-upload-control input::file-selector-button {
  border-color:var(--control-border);
  border-radius:10px;
  background-color:rgba(255,255,255,.92);
  box-shadow:var(--control-shadow);
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease,transform .12s ease;
}

.language-icon-button { border-radius:50%; }
.icon-action:hover,
.modal-actions>button:first-child:hover,
.assignment-button:hover,
.language-icon-button:hover,
.sidebar-toggle:hover,
.danger-action:hover,
.promotion-upload-control input::file-selector-button:hover { border-color:var(--control-border-hover); background-color:#fff; }
.icon-action:active,
.modal-actions>button:first-child:active,
.assignment-button:active,
.language-icon-button:active,
.sidebar-toggle:active { transform:scale(.96); }

.nav-item { border-radius:10px; transition:background-color .16s ease,color .16s ease,transform .12s ease; }
.nav-item:active { transform:scale(.985); }
.nav-item.active { background:linear-gradient(180deg,#156ff3 0%,var(--blue) 100%); box-shadow:0 5px 14px rgba(7,92,229,.22); }

.panel-head button,
.inline-link,
.side-bottom>a,
.side-bottom>button {
  border-radius:8px;
  transition:background-color .16s ease,color .16s ease,transform .12s ease;
}
.panel-head button:hover,
.inline-link:hover { background:var(--blue-soft); color:var(--blue-dark); }
.side-bottom>a:hover,
.side-bottom>button:hover { background:rgba(255,255,255,.07); }
.panel-head button:active,
.inline-link:active,
.side-bottom>a:active,
.side-bottom>button:active { transform:scale(.985); }

.promotion-upload-control {
  border-radius:var(--control-radius);
  background:rgba(248,249,251,.88);
}

input[type="checkbox"],input[type="radio"] { accent-color:var(--blue); }
button:disabled,input:disabled,select:disabled,textarea:disabled { cursor:not-allowed; opacity:.48; }

@media(prefers-reduced-transparency:reduce) {
  .auth-panel select,.auth-panel input,.section-toolbar select,.form-grid input,.form-grid select,.form-grid textarea,.admin-search { background:#fff; }
}
@media(prefers-contrast:more) {
  :root { --control-border:rgba(0,0,0,.62); --control-border-hover:rgba(0,0,0,.82); }
}
.location-settings-form { margin-bottom: 24px; }
.sidebar-close, .sidebar-backdrop { display: none; }
.location-settings-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.location-settings-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.location-settings-row label { min-width: 0; }
@media (max-width: 600px) {
  .location-settings-row { grid-template-columns: minmax(0, 1fr); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .location-settings-row button { justify-self: start; }
}

/* Mobile operations: readable controls, contained tables and a dismissible drawer. */
@media (min-width: 761px) and (max-width: 1000px) {
  .admin-header > div:first-of-type { min-width: 0; flex: 1; }
  .admin-header h1 { font-size: 26px; line-height: 1.25; }
  .header-tools { min-width: 0; }
  .live-pill { display: none; }
  .customer-tools { flex-wrap: wrap; }
  .customer-tools label { flex-basis: 100%; min-width: 0; }
}
@media (max-width: 760px) {
  body.admin-nav-open { overflow: hidden; }
  .admin-main { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .sidebar { height: 100dvh; width: min(300px, calc(100vw - 56px)); overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(18px, env(safe-area-inset-bottom)); visibility: hidden; }
  .sidebar.open { visibility: visible; }
  .sidebar-close { display: grid; place-items: center; flex-shrink: 0; align-self: flex-end; width: 44px; height: 44px; color: #fff; border: 1px solid #354053; background: #182338; border-radius: 10px; font-size: 26px; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 19; border: 0; background: #0d142080; }
  .side-logo { width: 140px; }
  .side-nav { margin-block: 16px; }
  .nav-item, .side-bottom > a, .side-bottom > button { min-height: 44px; font-size: 14px; }
  .sidebar-toggle { flex-shrink: 0; width: 44px; height: 44px; }
  .admin-header h1 { font-size: clamp(22px, 6vw, 28px); line-height: 1.25; overflow-wrap: anywhere; }
  .admin-search { height: 48px; }
  .admin-search input { font-size: 16px; }
  .admin-search svg { flex-shrink: 0; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid article { border-radius: 12px; padding: 14px; }
  .stat-grid p { font-size: 12px; letter-spacing: 0; margin-bottom: 12px; }
  .stat-grid strong { font-size: clamp(24px, 6vw, 30px); overflow-wrap: anywhere; }
  .stat-grid span { font-size: 12px; }
  .panel { min-height: 0; border-radius: 12px; }
  .panel-head { gap: 12px; align-items: center; }
  .panel-head h2, .section-toolbar h2 { font-size: 22px; line-height: 1.3; }
  .panel-head button { min-height: 44px; font-size: 13px; }
  .compact-booking { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 16px; font-size: 14px; }
  .compact-booking > div { grid-column: 1 / -1; grid-row: 2; overflow-wrap: anywhere; }
  .compact-booking strong { font-size: 13px; }
  .compact-booking .amount { display: block; grid-column: 1; grid-row: 3; }
  .compact-booking .status-badge { grid-column: 2; grid-row: 1; font-size: 11px; }
  .section-toolbar { flex-direction: column; align-items: stretch; }
  .section-toolbar > div:last-child { width: 100%; gap: 12px; }
  .section-toolbar label { font-size: 13px; }
  .section-toolbar select { width: 100%; min-width: 0; }
  .primary-action, .danger-action, .section-toolbar select, .inline-select, .assignment-button, .modal-actions > button { min-height: 44px; height: auto; font-size: 14px; }
  .icon-action, .modal-head button, .calendar-event > button, .language-icon-button { width: 44px; height: 44px; min-width: 44px; flex-shrink: 0; }
  .table-actions { gap: 8px; }
  .data-table-wrap { max-width: 100%; border-radius: 12px; overscroll-behavior-x: contain; }
  th { font-size: 12px; }
  td, .vehicle-cell strong, .customer-cell strong { font-size: 14px; }
  .table-empty { padding: 28px 16px; font-size: 14px; }
  .settings-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .settings-tabs [role="tab"] { flex: 0 0 auto; font-size: 14px; }
  .settings-card-head h3, .modal-head h2 { font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
  .settings-card-head p, .promotion-settings-preview > p, .promotion-settings-form > label, .form-grid label, .auth-panel label, .auth-panel legend { font-size: 13px; letter-spacing: 0; }
  .promotion-settings-form input:not([type="checkbox"]), .form-grid input:not([type="checkbox"]), .form-grid select, .form-grid textarea, .auth-panel input, .auth-panel select { min-height: 48px; font-size: 16px; width: 100%; min-width: 0; }
  .vehicle-dialog { max-width: 100%; width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .vehicle-dialog form { max-height: calc(100dvh - 16px); padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .modal-head { gap: 12px; }
  .modal-head > div, .form-grid > label { min-width: 0; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions > button { flex: 1 1 120px; }
  .promotion-settings-actions .secondary-action { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; }
  .calendar-event > div { min-width: 0; overflow-wrap: anywhere; }
  .calendar-event strong { font-size: 14px; }
  .calendar-event small { font-size: 12px; }
  .toast, [dir="rtl"] .toast { inset-inline: 14px; bottom: max(14px, env(safe-area-inset-bottom)); font-size: 14px; }
}
