body { font-family: Tahoma, Arial, sans-serif; background: #f5f6f8; color: #222; }
.brand-logo { height: 22px; width: auto; }
/* اسم الشركة يطلع بس بالشاشات العريضة، عشان القائمة ما تطلع برا الشاشة */
.navbar-pioneers .brand-name { display: none; }
@media (min-width: 1700px) { .navbar-pioneers .brand-name { display: inline; } }
.navbar-pioneers .navbar-nav { flex-wrap: nowrap; }
.navbar-pioneers .navbar-brand span { font-size: .95rem; opacity: .85; border-inline-start: 1px solid rgba(255,255,255,.3); padding-inline-start: .6rem; }
.card { border: 0; box-shadow: 0 1px 6px rgba(20, 30, 50, .08); }
.card-header { font-weight: 600; }
.table th { white-space: nowrap; }
.table td.num, .table th.num { text-align: left; direction: ltr; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat-card .value { font-size: clamp(1.15rem, 1.5vw, 1.6rem); font-weight: 700; direction: ltr; text-align: right; white-space: nowrap; }
.stat-card .label { font-size: .9rem; opacity: .9; }
.btn-group form { display: inline; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.page-head h1, .page-head h2 { font-size: 1.5rem; margin: 0; }
.items-table input, .items-table select { min-width: 70px; }
.items-table td { vertical-align: middle; }
/* التقويم */
.dp-pop { position: absolute; z-index: 2000; width: 268px; background: #fff; border: 1px solid #ced4da; border-radius: 10px;
          box-shadow: 0 8px 24px rgba(20,30,50,.18); padding: 10px; direction: rtl; font-size: 14px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head b { font-weight: 600; }
.dp-head button { border: 0; background: #f1f3f5; width: 32px; height: 32px; border-radius: 8px; font-size: 18px; line-height: 1; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-dow { font-size: 12px; color: #6c757d; padding: 4px 0; }
.dp-grid button { border: 0; background: none; height: 32px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.dp-grid button:hover { background: #E8EAF4; }
.dp-grid button.today { outline: 1px solid #111C5E; }
.dp-grid button.sel { background: #111C5E; color: #fff; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.dp-foot button { border: 0; background: none; color: #111C5E; font-size: 13px; padding: 4px 6px; }
.ltr-date { direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* اللون الأزرق المعتمد (نفس الموقع) لكل الأزرار والروابط */
:root {
  --bs-primary: #111C5E; --bs-primary-rgb: 17, 28, 94;
  --bs-link-color: #1F2E8A; --bs-link-color-rgb: 31, 46, 138; --bs-link-hover-color: #111C5E; --bs-link-hover-color-rgb: 17, 28, 94;
  --bs-primary-text-emphasis: #0B1442; --bs-primary-bg-subtle: #E8EAF4; --bs-primary-border-subtle: #B9BEDA;
}
.btn-primary { --bs-btn-bg: #111C5E; --bs-btn-border-color: #111C5E; --bs-btn-hover-bg: #0B1442; --bs-btn-hover-border-color: #0B1442;
  --bs-btn-active-bg: #0B1442; --bs-btn-active-border-color: #0B1442; --bs-btn-disabled-bg: #111C5E; --bs-btn-disabled-border-color: #111C5E;
  --bs-btn-focus-shadow-rgb: 17, 28, 94; }
.btn-outline-primary { --bs-btn-color: #111C5E; --bs-btn-border-color: #111C5E; --bs-btn-hover-bg: #111C5E; --bs-btn-hover-border-color: #111C5E;
  --bs-btn-active-bg: #111C5E; --bs-btn-active-border-color: #111C5E; --bs-btn-disabled-color: #111C5E; --bs-btn-disabled-border-color: #111C5E;
  --bs-btn-focus-shadow-rgb: 17, 28, 94; }
.btn-link { --bs-btn-color: #1F2E8A; --bs-btn-hover-color: #111C5E; }
.form-control:focus, .form-select:focus { border-color: #7A82B8; box-shadow: 0 0 0 .25rem rgba(17, 28, 94, .2); }
.form-check-input:checked { background-color: #111C5E; border-color: #111C5E; }
.form-check-input:focus { border-color: #7A82B8; box-shadow: 0 0 0 .25rem rgba(17, 28, 94, .2); }
.page-link { color: #111C5E; }
.active > .page-link, .page-link.active { background-color: #111C5E; border-color: #111C5E; }
.nav-pills .nav-link.active { background-color: #111C5E; }
.dropdown-item.active, .dropdown-item:active { background-color: #111C5E; }
.list-group-item.active { background-color: #111C5E; border-color: #111C5E; }
.table-primary { --bs-table-bg: #E8EAF4; --bs-table-border-color: #C9CDE3; --bs-table-color: #0B1442; }
.alert-primary { --bs-alert-bg: #E8EAF4; --bs-alert-border-color: #C9CDE3; --bs-alert-color: #0B1442; }
.navbar-pioneers { background: #111C5E; }
.navbar-pioneers .nav-link.active, .navbar-pioneers .nav-link:hover { color: #F5B700 !important; }
.btn-navy { background: #111C5E; border-color: #111C5E; color: #fff; }
.btn-navy:hover { background: #0B1442; color: #fff; }
.bell-count { position: absolute; top: 2px; inset-inline-start: 18px; font-size: .65rem; }
.bell-menu { width: min(360px, 92vw); }
.bell-list { max-height: 60vh; overflow: auto; }
.bell-item { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid #f0f1f4; }
.bell-item:hover { background: #f5f7fb; }
.bell-item.unread { background: #fffaea; }
.bell-item i { font-size: 1.2rem; }
.bell-item .t { font-size: .88rem; font-weight: 600; line-height: 1.4; }
.bell-item .b, .bell-item .w { font-size: .78rem; color: #6c757d; }
/* الموزع: أزرار كبيرة للجوال */
.status-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-pick { position: relative; }
.status-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; bottom: 0; left: 50%; pointer-events: none; z-index: -1; }
.status-pick label { border: 2px solid #dee2e6; border-radius: 14px; padding: 14px 4px; font-size: .95rem; text-align: center; font-weight: 600; cursor: pointer; }
.status-pick label i { display: block; font-size: 1.8rem; margin-bottom: 4px; }
.status-pick input:checked + label.ok { border-color: #198754; background: #e8f5ee; color: #146c43; }
.status-pick input:checked + label.vis { border-color: #111C5E; background: #E8EAF4; color: #111C5E; }
.status-pick input:checked + label.no { border-color: #dc3545; background: #fbe9eb; color: #b02a37; }
.age { font-variant-numeric: tabular-nums; font-weight: 600; }

.pct-bar { width: 50px; height: 6px; background: #E8EAF4; border-radius: 3px; overflow: hidden; display: inline-block; }
.pct-bar i { display: block; height: 100%; background: #111C5E; }

/* ---------------- التقارير */
.report-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: .75rem; }
.report-bar .grp { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.report-bar .lbl { font-size: .8rem; color: #6c757d; margin-inline-end: .25rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem 1rem; align-items: end; }
.filter-grid .span-2 { grid-column: span 2; }
@media (max-width: 575px) { .filter-grid { grid-template-columns: 1fr 1fr; } .filter-grid .span-2 { grid-column: 1 / -1; } }
.report-table { font-size: .9rem; }
.report-table th, .report-table td { text-align: center; vertical-align: middle; padding: .45rem .6rem; }
.report-table thead th { white-space: normal; font-size: .8rem; line-height: 1.3; background: #F3F4F9; color: #111C5E; }
.report-table .c-num { width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table thead .c-num { min-width: 70px; max-width: 110px; white-space: normal; }
.report-table .c-text { width: 1%; white-space: nowrap; }
.report-table .c-wide { min-width: 260px; text-align: center; }
.report-table tfoot td { text-align: center; }
.report-table .pct-bar { vertical-align: middle; }

/* ---------------- إدارة صور الموقع */
.brand-thumb { width: 120px; height: 56px; border-radius: 10px; background: #fff; border: 1px solid #e3e6ef; border-bottom: 4px solid var(--c);
               display: grid; place-items: center; padding: 6px 10px; }
.brand-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.img-slot { height: 170px; border: 1px dashed #c9cde3; border-radius: 10px; background: #f6f7fb; display: grid; place-items: center; overflow: hidden; }
.img-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.img-slot.logo-slot { background: #fff; border: 1px solid #e3e6ef; border-bottom: 5px solid var(--c); padding: 16px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.item-card { border: 1px solid #e3e6ef; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.item-card.off { opacity: .55; }
.item-card.add { border-style: dashed; background: #f8fbf8; }
.item-card .img-slot { height: 150px; }
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.g-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid #e3e6ef; }

.geo-box { font-size: .85rem; padding: 8px 12px; border-radius: 10px; background: #f1f3f8; color: #555; }
.geo-box.ok { background: #e8f5ee; color: #146c43; }
.geo-box.off { background: #fff4e5; color: #8a5300; }
.daily-table th, .daily-table td { text-align: center; vertical-align: middle; }
.daily-table thead th { background: #F3F4F9; color: #111C5E; font-size: .82rem; white-space: nowrap; }
.daily-table .n { width: 1%; }
.daily-table .notes { min-width: 200px; white-space: pre-line; }
.print-only { display: none; }

.clr-table th, .clr-table td { text-align: center; vertical-align: middle; }
.clr-table thead th { background: #F3F4F9; color: #111C5E; font-size: .82rem; white-space: nowrap; }
.clr-prog { display: inline-block; width: 60px; height: 6px; background: #E8EAF4; border-radius: 3px; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.clr-prog i { display: block; height: 100%; background: #198754; }
.clr-steps { display: grid; gap: 12px; margin-bottom: 16px; }
.clr-step { display: flex; gap: 14px; background: #fff; border: 1px solid #e3e6ef; border-radius: 14px; padding: 14px; }
.clr-step .num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #E8EAF4; color: #111C5E; }
.clr-step.ok .num { background: #198754; color: #fff; }
.clr-step.ok { border-color: #b7dfc8; }
.clr-step .body { flex: 1; min-width: 0; }
.clr-step h3 { font-size: 1rem; font-weight: 700; margin: 4px 0 6px; }
.clr-upload { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.clr-upload input[type=file] { max-width: 260px; }
.clr-upload input[name=note] { max-width: 220px; }
.clr-branch { border-top: 1px dashed #e3e6ef; padding: 10px 0; }
.clr-branch:first-of-type { border-top: 0; }
.doc-thumb { display: inline-block; margin: 6px 0 0 6px; }
.doc-thumb img { height: 90px; border-radius: 8px; border: 1px solid #e3e6ef; }
.doc-pdf { height: 120px; display: grid; place-items: center; background: #f6f7fb; border-radius: 8px; }

@media print {
  .print-only { display: block; }
  .daily-card { break-inside: avoid; }
  .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
.navbar .nav-link { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399px) {
  .navbar-brand span, .navbar-brand { font-size: 1rem; }
  .navbar-expand-xl .navbar-nav .nav-link { padding-left: .45rem; padding-right: .45rem; font-size: .92rem; }
}

/* ------------------------------------------------ الجرد */
.inv-list { background: #fff; border: 1px solid #dee2e6; border-radius: .5rem; }
.inv-row { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, 96px) repeat(3, 92px); gap: .5rem; align-items: center;
           padding: .5rem .75rem; border-top: 1px solid #eef0f4; }
.inv-row.inv-head { border-top: 0; background: #f6f7fb; font-size: .85rem; font-weight: 600; color: #5a6178; text-align: center; }
.inv-row.inv-head > div:first-child { text-align: start; }
.inv-row label { margin: 0; }
.inv-row label span, .inv-num span { display: none; }
.inv-row input.n { text-align: center; direction: ltr; }
.inv-num { text-align: center; direction: ltr; }
.inv-row.short { background: #fff4f4; } .inv-row.short .diff { color: #dc3545; }
.inv-row.over { background: #f2fbf5; } .inv-row.over .diff { color: #198754; }
.inv-row.ok .diff { color: #198754; }
.inv-row.bad input.n { border-color: #dc3545; }
.inv-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.95); padding: .75rem 0; display: flex; gap: .5rem; flex-wrap: wrap;
               border-top: 1px solid #eef0f4; margin-top: .75rem; z-index: 5; }
.inv-group + .inv-group { border-top: 3px solid #e3e7f1; }
.inv-report td, .inv-report th { white-space: nowrap; }
.inv-report td.text-start { white-space: normal; min-width: 240px; }
@media (max-width: 991.98px) {
  .inv-row { grid-template-columns: repeat(3, 1fr); }
  .inv-row.inv-head { display: none; }
  .inv-name { grid-column: 1 / -1; }
  .inv-row label span, .inv-num span { display: block; font-size: .75rem; color: #6c757d; text-align: center; }
}
