/* طبقة التطبيق فوق قالب Villareal (النسخة RTL). كل ما هو خاص بالورشة هنا. */

:root {
  --ws-ink: #2b2f36;
  --ws-muted: #7b828c;
  --ws-line: rgba(0, 0, 0, .08);
  --ws-bg: #f4f4f5;
  --ws-primary: #cd0201;      /* أحمر الشعار */
  --ws-primary-dark: #a80201;
  --ws-black: #1a1a1a;        /* أسود الشعار */
}
a { color: var(--ws-primary); }
a:hover { color: var(--ws-primary-dark); }

html, body, input, select, textarea, button, .btn {
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}
body { background: var(--ws-bg); color: var(--ws-ink); font-size: 15px; }
h1, h2, h3, h4, h5, h6 { font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif; letter-spacing: 0; }
.mono, .money { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
.text-muted { color: var(--ws-muted) !important; }
.text-success { color: #3fa65b !important; }
.text-danger { color: #d9534f !important; }
.req { color: #d9534f; }

/* ---------- الشريط العلوي ---------- */
.dashboard-wrapper { display: block; width: 100%; }
.dashboard-content { display: block; width: auto; background-image: none; }
.dashboard-navbar { background: var(--ws-black); border-bottom: 3px solid var(--ws-primary); position: sticky; top: 0; z-index: 100; }
.dashboard-navbar-bar { display: flex; align-items: center; gap: 16px; padding: 0 20px; min-height: 60px; }
.dashboard-brand { font-size: 1.2em; font-weight: 700; color: #fff; white-space: nowrap; display: block; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.dashboard-brand:hover { text-decoration: none; color: #fff; }
.dashboard-brand .logo-shape { margin: 0 0 0 12px; }
.dashboard-navbar-menu { display: flex; align-items: center; flex: 1; gap: 16px; min-width: 0; }
.dashboard-navbar-toggle { display: none; margin-right: auto; background: none; border: 0; font-size: 22px; cursor: pointer; color: #fff; }
.navbar-sections { display: flex; flex-wrap: nowrap; min-width: 0; list-style: none; margin: 0; padding: 0; gap: 2px; }
.navbar-section { position: relative; }
.navbar-section-toggle {
  background: none; border: 0; cursor: pointer; padding: 20px 12px; font-size: 14px;
  color: #d6d6d6; border-bottom: 3px solid transparent; white-space: nowrap;
}
.navbar-section-toggle:hover, .navbar-section.open .navbar-section-toggle { color: #fff; }
.navbar-section.has-active .navbar-section-toggle { color: #fff; border-bottom-color: var(--ws-primary, #cd0201); }
.navbar-dropdown {
  display: none; position: absolute; top: 100%; right: 0; min-width: 220px; list-style: none;
  margin: 0; padding: 6px 0; background: #fff; border: 1px solid var(--ws-line);
  border-radius: 0 0 4px 4px; box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.navbar-section.open .navbar-dropdown { display: block; }
.navbar-dropdown .nav-link { display: block; padding: 9px 20px; font-size: 14px; color: #666; white-space: nowrap; }
.navbar-dropdown .nav-link:hover, .navbar-dropdown .nav-link.active { color: var(--ws-primary); background: #fdf1f1; text-decoration: none; }
.navbar-dropdown .nav-link .fa { margin: 0 0 0 10px; width: 18px; text-align: center; }
.navbar-user { display: flex; align-items: center; gap: 14px; margin-right: auto; flex: none; }
.navbar-user-info { display: flex; flex-direction: column; text-align: left; line-height: 1.3; }
.navbar-user form { margin: 0; }
.dashboard-user-meta { display: block; color: #b5b5b5; }
.navbar-impersonate select { height: 34px; min-width: 150px; padding: 0 8px; font-size: 13px; }
.impersonation-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 20px; background: #7a4a00; color: #fff; font-size: 14px; }
.impersonation-banner form { margin: 0; }
.navbar-user-info, .navbar-user-info strong { color: #fff; }
.nav-link-button { background: none; border: 0; color: #d6d6d6; cursor: pointer; white-space: nowrap; }
.nav-link-button:hover { color: #fff; }

/* ---------- المحتوى ---------- */
.dashboard-content { padding: 0 20px 20px; }
.dashboard-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; overflow: visible; }
.dashboard-header h1 { float: none; padding: 20px 0; margin: 0 0 0 auto; font-size: 1.5em; }
.dashboard-header .btn { margin: 0 0 0 8px; }
.dashboard-header-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-right: auto; }
.dashboard-header-buttons .btn { margin: 0; }
.page-subtitle { color: var(--ws-muted); margin: -6px 0 20px; }
.dashboard-footnote { margin: 40px 0 0; color: var(--ws-muted); font-size: .85em; border-top: 1px solid var(--ws-line); padding-top: 14px; }
.dashboard-box { background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08); padding: 24px; margin: 0 0 24px; }
.dashboard-box-flush { padding: 0; }
.dashboard-box-title { font-size: 1.15em; font-weight: 700; margin: -24px -24px 20px; padding: 14px 24px; border-bottom: 1px solid var(--ws-line); display: flex; justify-content: space-between; align-items: center; }
.dashboard-box-flush .dashboard-box-title { margin: 0; }
.flash-messages { margin: 16px 0 0; }
.alert { border-radius: 4px; }

/* ---------- الجداول ---------- */
.table-list { margin: 0; }
.table-list th { font-size: 13px; color: var(--ws-muted); font-weight: 700; white-space: nowrap; border-top: 0; background: #fafbfc; }
.table-list td { vertical-align: middle; }
.table-list a strong { color: inherit; }
.empty-state { text-align: center; color: var(--ws-muted); padding: 40px 10px !important; }
.pagination-wrapper { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 30px; }
.pagination { margin: 0; }
.pagination-count { color: var(--ws-muted); font-size: 13px; }

/* ---------- شريط المرشّحات ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; align-items: center; }
.filter-field { min-width: 150px; }
.filter-field-grow { flex: 1 1 240px; }
.filter-field .btn { margin: 0 0 0 6px; }
.filter-field .form-control { height: 40px; }

/* ---------- النماذج ---------- */
.form-group label { font-weight: 500; font-size: 14px; }
.form-actions { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--ws-line); display: flex; gap: 10px; }
.check-label { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; cursor: pointer; }
.check-label input { width: auto; }
.has-danger .form-control { border-color: #d9534f; }
select.form-control { padding-left: 30px; }
/* ارتفاع موحّد لكل حقول النماذج (يطابق --ts-h في tomselect-theme.css)؛ حقول التاريخ والوقت أطول افتراضياً */
.form-group input.form-control, .form-group select.form-control { height: 44px; line-height: normal; box-sizing: border-box; }

/* ---------- الشارات ---------- */
.tag-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.tag-badge-default { background: #eceff2; color: #5b636d; }
.tag-badge-info { background: #e1f0fa; color: #1d6fa3; }
.tag-badge-primary { background: #fbe3e3; color: #a80201; }
.tag-badge-success { background: #def3e4; color: #2c7a45; }
.tag-badge-warning { background: #fdf0d2; color: #94650b; }
.tag-badge-danger { background: #fbe0de; color: #b0302b; }

/* ---------- بطاقات الإحصاء ---------- */
.stat-tiles { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 24px; }
.stat-tile { flex: 1 1 200px; background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08); padding: 18px 20px; display: flex; align-items: center; gap: 16px; border-right: 4px solid var(--ws-primary, #cd0201); }
.stat-tile .stat-icon { font-size: 26px; color: var(--ws-muted); width: 34px; text-align: center; }
.stat-tile .stat-value { font-size: 1.7em; font-weight: 700; line-height: 1.1; }
.stat-tile .stat-label { color: var(--ws-muted); font-size: 13px; }
.stat-tile.is-warning { border-right-color: #f0ad4e; }
.stat-tile.is-danger { border-right-color: #d9534f; }
.stat-tile.is-success { border-right-color: #5cb85c; }
a.stat-tile { color: inherit; text-decoration: none; }
a.stat-tile:hover { box-shadow: 0 2px 8px rgba(0,0,0,.14); }

/* ---------- تفاصيل (صفوف مفتاح/قيمة) ---------- */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--ws-muted); font-weight: 500; }
.kv dd { margin: 0; }

/* ---------- لوحة أوامر العمل ---------- */
/* لوحة أوامر العمل: أعمدة بلا صناديق رمادية، وبطاقة مسطّحة تُقرأ كبطاقة عمل لا كلوحة تطبيقات */
.board { display: flex; gap: 0; overflow-x: auto; padding-bottom: 0; align-items: stretch; background: #fff; border: 1px solid #dfe3e7; border-radius: 3px; }
.board-col { flex: 0 0 280px; padding: 0 12px 12px; min-height: 320px; border-inline-start: 1px solid #e6e9ec; }
.board-col:first-child { border-inline-start: 0; }
.board-col-head { display: flex; justify-content: flex-start; align-items: center; gap: 8px; position: sticky; top: 0; background: #fff; margin: 0 -12px 10px; padding: 12px 12px 8px; border-bottom: 2px solid var(--ws-ink); z-index: 1; }
.board-col-name { font-weight: 700; font-size: 14.5px; }
.board-count { min-width: 22px; padding: 0 7px; border-radius: 10px; background: #eceff1; font-size: 12px; line-height: 20px; text-align: center; color: #5b636b; font-variant-numeric: tabular-nums; }
.wo-card { display: block; padding: 9px 11px 8px; margin: 0 0 9px; color: inherit; background: #fafbfb; border: 1px solid #e2e5e8; border-radius: 2px; }
.wo-card:hover { text-decoration: none; color: inherit; background: #fff; border-color: var(--ws-ink); }
.wo-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wo-plate { display: inline-block; padding: 0 9px; border: 1.5px solid #3a3f46; border-radius: 4px; background: #fff; font-size: 14.5px; font-weight: 700; letter-spacing: .5px; line-height: 1.5; }
.wo-num { font-size: 11px; color: var(--ws-muted); }
.wo-customer { margin-top: 7px; font-weight: 600; font-size: 14px; line-height: 1.35; }
.wo-line { margin-top: 3px; font-size: 12.5px; color: #5b636b; }
.wo-line span + span::before { content: "·"; margin: 0 6px; color: #aab0b6; }
.wo-unassigned { color: #a56a00; }
.wo-foot { display: flex; justify-content: space-between; margin-top: 7px; padding-top: 6px; border-top: 1px dotted #d3d8dc; font-size: 12px; color: var(--ws-muted); }
.wo-late { font-style: normal; font-weight: 700; color: #b3261e; margin-inline-end: 6px; }
.wo-late::after { content: "·"; margin-inline-start: 6px; color: #c9a09d; }
.wo-due b { font-weight: 600; color: var(--ws-ink); }

/* ---------- شاشة الإدخال السريع ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.entry-card { background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.entry-card h3 { font-size: 1.15em; margin: 0 0 4px; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.entry-actions .btn { flex: 1 1 auto; padding: 12px 10px; font-size: 15px; }

/* ---------- الفاتورة والطباعة ---------- */
.invoice-wrapper { background: #fff; padding: 30px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.invoice-table th, .invoice-table td { text-align: right; }
.totals-box { margin-right: auto; max-width: 340px; }
.totals-box dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0; padding: 16px 20px; background: rgba(0,0,0,.03); }
.totals-box dt { font-weight: 500; }
.totals-box dd { margin: 0; text-align: left; }
.totals-box .grand { font-size: 1.2em; font-weight: 700; }

/* ---------- الصفحات العامة (للعميل) ---------- */
.public-body { background: var(--ws-bg); }
.public-header { background: #fff; border-bottom: 1px solid var(--ws-line); padding: 14px 0; }
.public-header .container { display: flex; align-items: center; justify-content: space-between; }
.public-brand { font-weight: 700; font-size: 1.25em; color: var(--ws-ink); display: flex; align-items: center; gap: 12px; }
.public-brand:hover { text-decoration: none; color: var(--ws-ink); }
.public-branch { color: var(--ws-muted); font-size: 14px; }
.public-main { padding: 30px 0 50px; min-height: 60vh; }
.public-container { max-width: 760px; }
.public-card { background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.1); padding: 26px; margin: 0 0 20px; }
.public-footer { text-align: center; color: var(--ws-muted); font-size: 13px; padding: 20px 0 30px; }
.public-actions { display: flex; gap: 12px; margin-top: 20px; }
.public-actions .btn { flex: 1; padding: 14px; font-size: 16px; }

/* ---------- الدخول ---------- */
.login-body { background: #fff; }
.login-split { display: flex; min-height: 100vh; }
.login-panel { flex: 0 0 440px; max-width: 100%; padding: 60px 50px; display: flex; flex-direction: column; justify-content: center; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 28px; text-align: center; }
.login-company { color: var(--ws-muted); font-size: .95em; }
.login-panel .form-control { height: 46px; transition: border-color .15s, box-shadow .15s; }
.login-panel .form-control:focus { border-color: var(--ws-primary); box-shadow: 0 0 0 3px rgba(205,2,1,.15); }
.login-panel .btn-primary { height: 48px; font-size: 1.05em; font-weight: 700; }
.password-wrap { position: relative; }
.password-wrap .form-control { padding-left: 44px; }
.password-toggle { position: absolute; left: 4px; top: 0; height: 46px; width: 40px; background: none; border: 0; color: var(--ws-muted); cursor: pointer; }
.password-toggle:hover { color: var(--ws-primary); }
.login-panel h2 { font-size: 1.2em; margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--ws-line); }
.login-aside { flex: 1; background: linear-gradient(135deg, #e00504 0%, #cd0201 45%, #8f0100 100%); color: #fff; display: flex; align-items: center; padding: 60px; }
.login-aside-content { max-width: 520px; }
.login-aside h1 { color: #fff; font-weight: 500; font-size: 2em; line-height: 1.5; margin: 18px 0; }
.login-aside p { color: rgba(255,255,255,.85); font-size: 1.1em; }
.login-features { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.login-features li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.9); }
.login-features .fa { width: 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 50%; background: #1a1a1a; color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.login-chip { background: rgba(26,26,26,.55); border-radius: 14px; padding: 5px 14px; font-size: 13px; }
@media (max-width: 860px) { .login-aside { display: none; } .login-panel { flex-basis: 100%; padding: 40px 24px; } }

/* ---------- متفرقات ---------- */
.inline-form { display: inline; }
.btn-xs { padding: 3px 9px; font-size: 12px; }
.section-gap { margin-top: 24px; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--ws-line); margin: 0 0 20px; }
.tabs-line a { padding: 10px 16px; color: var(--ws-muted); border-bottom: 3px solid transparent; }
.tabs-line a.active, .tabs-line a:hover { color: var(--ws-ink); border-bottom-color: var(--ws-primary, #cd0201); text-decoration: none; }

@media (max-width: 991px) {
  .dashboard-navbar-bar { flex-wrap: wrap; padding: 0 12px; }
  .dashboard-navbar-toggle { display: block; }
  .dashboard-navbar-menu { display: none; flex-direction: column; align-items: stretch; flex-basis: 100%; padding-bottom: 12px; }
  .dashboard-navbar.menu-open .dashboard-navbar-menu { display: flex; }
  .navbar-sections { flex-direction: column; }
  .navbar-section-toggle { width: 100%; text-align: right; padding: 12px; }
  .navbar-dropdown { position: static; box-shadow: none; border: 0; padding-right: 12px; }
  .navbar-user { margin-right: 0; justify-content: space-between; border-top: 1px solid var(--ws-line); padding-top: 10px; }
  .dashboard-content { padding: 0 12px 12px; }
  .kv { grid-template-columns: 110px 1fr; }
}

@media print {
  .dashboard-navbar, .dashboard-header, .filter-bar, .no-print, .flash-messages, .dashboard-footnote { display: none !important; }
  .dashboard-content { padding: 0 !important; background: #fff !important; }
  body { background: #fff; }
  .invoice-wrapper, .dashboard-box { box-shadow: none; }
}

/* الفرع المثبَّت لمستخدم مربوط بفرع (forms.base.bind_branch_field) */
.branch-locked { padding: 7px 10px; background: #f3f6f8; border: 1px solid #e1e7eb; border-radius: 4px; margin-bottom: 12px; display: inline-block; min-width: 180px; }
.form-group .branch-locked { display: block; margin-bottom: 0; }

/* مبلغ بالريال العُماني: رقم لاتيني LTR مع لاحقة «ر.ع» ثابتة على الجانب الأيسر */
.omr-wrap { position: relative; }
.omr-wrap input[data-omr] { direction: ltr; text-align: right; padding-left: 46px; font-variant-numeric: tabular-nums; }
.omr-wrap .omr-unit { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ws-muted, #7b8794); font-size: 13px; pointer-events: none; }
/* شعار مركز الاتحاد الفني */
.brand-logo { height: 44px; width: auto; vertical-align: middle; margin-inline-end: 10px; background: #fff; border-radius: 6px; }
.login-brand .brand-logo { height: 170px; display: block; margin: 0 auto; background: transparent; }
.public-brand .brand-logo { height: 40px; }

/* منع لون التعبئة التلقائية الأزرق للمتصفح */
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset; -webkit-text-fill-color: var(--ws-ink);
}

/* تبويبات عامة: <ul class="ws-tabs" data-tabs> + .ws-tab-pane#id */
.ws-tabs { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 20px; padding: 0; border-bottom: 1px solid rgba(128,128,128,.3); }
.ws-tabs a { display: block; padding: 10px 18px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: inherit; opacity: .75; font-weight: 600; text-decoration: none; }
.ws-tabs a:hover { opacity: 1; }
.ws-tabs a.active { opacity: 1; border-bottom-color: #c00; }
.ws-tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 10px; background: rgba(128,128,128,.25); font-size: 12px; text-align: center; }
.ws-tab-pane { display: none; }
.ws-tab-pane.active { display: block; }

/* ---- مالك جديد داخل نموذج المركبة */
#owner-quick { margin: 4px 0 14px; padding: 14px; border: 1px dashed var(--ws-line); border-radius: 6px; }
#owner-quick[hidden] { display: none; }
#owner-quick h3 { font-size: 1.05em; margin: 0 0 10px; }

/* ---- مربعات صور المركبة (نموذج المركبة) */
.vehicle-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vehicle-photo-slot { position: relative; aspect-ratio: 1 / 1; margin: 0; border: 2px dashed var(--ws-line); border-radius: 6px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; overflow: hidden; color: #888; font-size: .85em; }
.vehicle-photo-slot:hover { border-color: #999; }
.vehicle-photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vehicle-photo-slot img[hidden], .vehicle-photo-hint[hidden] { display: none; }
.vehicle-photo-hint .fa { font-size: 1.8em; margin-bottom: 6px; }
.vehicle-photos.is-reading .vehicle-photo-slot { opacity: .6; pointer-events: none; }
.vehicle-photo-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); }
.vehicle-photo-modal[hidden] { display: none; }
.vehicle-photo-modal-box { min-width: 260px; padding: 28px 36px; border-radius: 8px; background: var(--ws-card, #2a2a2a); border: 1px solid var(--ws-line); text-align: center; }
.vehicle-photo-modal-box .fa { font-size: 2.2em; margin-bottom: 12px; }
.vehicle-photo-status { margin-top: 12px; min-height: 1.4em; }
.ai-filled { box-shadow: 0 0 0 2px rgba(40,167,69,.45); }

/* ---- شبكة نماذج الإدخال: صف مرن فلا تنزلق الحقول تحت أطول حقل (مثل رابط «مالك جديد») فتترك فراغاً */
#entity-form .row { display: flex; flex-wrap: wrap; }
#entity-form .row::before, #entity-form .row::after { display: none; }
#entity-form .row > [class*="col-"] { float: none; }
/* زر «مالك جديد» على سطر العنوان (يسار) فلا يزيد ارتفاع الحقل ويبقى الصف متساوياً */
.form-group:has(> .btn-xs[data-owner-new]) { position: relative; }
.form-group > .btn-xs[data-owner-new] { position: absolute; top: -4px; left: 0; }

/* عدّاد عنصر القائمة (مثلاً عدد الإشعارات الدائنة) */
.nav-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-inline-start: 6px; border-radius: 10px; background: #a80201; color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }

/* مسار التنقّل (breadcrumb) فوق عنوان الصفحة */
.ws-breadcrumb { display: flex; flex-wrap: wrap; gap: 0; background: transparent; padding: 0; margin: 14px 0 6px; font-size: 13px; }
.ws-breadcrumb .breadcrumb-item { float: none; color: var(--ws-muted); }
.ws-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: "\2039"; padding: 0 8px; color: var(--ws-muted); }
.ws-breadcrumb .breadcrumb-item a { color: var(--ws-muted); }
.ws-breadcrumb .breadcrumb-item a:hover { color: var(--ws-primary-dark); }
.ws-breadcrumb .breadcrumb-item.active { color: inherit; font-weight: 600; }

/* خانات الاختيار: بطاقات بمفتاح تشغيل، مجمّعة في شبكة واحدة */
.opt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.opt-tiles:not(:has(.opt-tile)) { display: none; }
.opt-tile { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid #d5d9de; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; user-select: none; }
.opt-tile[hidden] { display: none; }
.opt-tile:hover { border-color: #a80201; }
.opt-tile input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.opt-switch { flex: none; position: relative; width: 40px; height: 22px; border-radius: 999px; background: #c7ccd3; transition: background .15s; }
.opt-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: inset-inline-start .15s; }
.opt-tile input:checked + .opt-switch { background: #a80201; }
.opt-tile input:checked + .opt-switch::after { inset-inline-start: 21px; }
.opt-tile:has(input:checked) { border-color: #a80201; background: #fdf3f3; }
.opt-tile input:focus-visible + .opt-switch { outline: 2px solid #a80201; outline-offset: 2px; }
.opt-text { display: flex; flex-direction: column; gap: 2px; font-weight: 500; }
.opt-text small { font-weight: 400; color: #6b7280; }

/* شريط التنقّل: اسم منشأة طويل لا يُنزل الأقسام إلى سطر ثانٍ؛ نضيّق المسافات تدريجياً */
.dashboard-brand .brand-logo { flex: none; }
@media (max-width: 2100px) {
  .dashboard-navbar-bar { gap: 10px; padding: 0 14px; }
  .navbar-section-toggle { padding: 20px 8px; font-size: 13.5px; }
  .dashboard-brand { font-size: 1.05em; }
}
@media (max-width: 1700px) {
  .dashboard-brand { max-width: 300px; }
}
@media (max-width: 1450px) {
  .dashboard-brand { max-width: 190px; }
  .navbar-user-info { display: none; }
}
