/* V8.2 — theme contrast hardening for orders/notifications + Arabic status UI */
:root{
  --v82-text:var(--v81-text,#0a1118);
  --v82-muted:var(--v81-muted,#50616e);
  --v82-surface:var(--v81-surface,#fff);
  --v82-soft:var(--v81-soft,#f4f7f8);
  --v82-line:var(--v81-line,#dce4e8);
  --v82-gold:var(--v81-gold,#d5a021);
  --v82-code:#eef3f6;
}
[data-bs-theme="dark"]{
  --v82-text:#f5f9fc;
  --v82-muted:#bfd0d8;
  --v82-surface:#10232e;
  --v82-soft:#0b1b24;
  --v82-line:#2d4855;
  --v82-code:#162f3b;
}

/* --------------------------------------------------------------------------
   Admin store orders: remove legacy fixed light surfaces in dark mode.
   -------------------------------------------------------------------------- */
body.v82-ui .admin-order-card{
  background:var(--v82-surface)!important;
  color:var(--v82-text)!important;
  border-color:var(--v82-line)!important;
  box-shadow:0 10px 30px color-mix(in srgb,#06131b 10%,transparent)!important;
}
body.v82-ui .admin-order-card>header,
body.v82-ui .admin-order-card>footer{
  background:var(--v82-soft)!important;
  color:var(--v82-text)!important;
  border-color:var(--v82-line)!important;
}
body.v82-ui .admin-order-card :where(h1,h2,h3,strong,b,label){
  color:var(--v82-text)!important;
}
body.v82-ui .admin-order-card :where(p,small,.text-muted,.order-parties span){
  color:var(--v82-muted)!important;
}
body.v82-ui .admin-order-card .order-parties>div,
body.v82-ui .admin-order-card .fulfillment-address,
body.v82-ui .admin-order-card .tracking-panel{
  background:var(--v82-soft)!important;
  color:var(--v82-text)!important;
  border:1px solid var(--v82-line)!important;
}
body.v82-ui .admin-order-card .fulfillment-address span,
body.v82-ui .admin-order-card .tracking-panel :where(b,a){
  color:var(--v82-text)!important;
}
body.v82-ui .admin-order-card .tracking-panel code{
  background:var(--v82-code)!important;
  color:var(--v82-text)!important;
  border:1px solid var(--v82-line)!important;
  border-radius:8px;
  padding:.22rem .45rem;
}
body.v82-ui .admin-order-card :where(.form-control,.form-select){
  background:var(--v82-surface)!important;
  color:var(--v82-text)!important;
  -webkit-text-fill-color:var(--v82-text)!important;
  border-color:var(--v82-line)!important;
  caret-color:var(--v82-text)!important;
}
body.v82-ui .admin-order-card :where(.form-control,.form-select)::placeholder{
  color:var(--v82-muted)!important;
  opacity:.82;
}
body.v82-ui .order-status-badge-v82,
body.v82-ui .fulfillment-status-badge-v82{
  background:color-mix(in srgb,var(--v82-gold) 11%,var(--v82-surface))!important;
  color:var(--v82-text)!important;
  border:1px solid color-mix(in srgb,var(--v82-gold) 42%,var(--v82-line))!important;
  font-weight:800;
}

/* Bootstrap light badges are often unreadable after switching to dark mode. */
[data-bs-theme="dark"] body.v82-ui .badge.text-bg-light{
  background:#1a3440!important;
  color:#f5f9fc!important;
  border-color:#385462!important;
  -webkit-text-fill-color:#f5f9fc!important;
}
[data-bs-theme="light"] body.v82-ui .badge.text-bg-light{
  background:#f4f7f8!important;
  color:#101820!important;
  border-color:#d8e1e6!important;
  -webkit-text-fill-color:#101820!important;
}

/* --------------------------------------------------------------------------
   Notifications: explicit readable colors in both themes.
   -------------------------------------------------------------------------- */
html[data-bs-theme="light"] body.v82-ui .notif-dropdown-v69{
  background:#fff!important;
  color:#0a1118!important;
  border-color:#d8e1e6!important;
  box-shadow:0 22px 55px rgba(11,38,61,.17)!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-dropdown-v69::before{
  background:#fff!important;
  border-color:#d8e1e6!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-header-v69{
  background:#fff!important;
  border-color:#e0e7eb!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-header-v69 h3,
html[data-bs-theme="light"] body.v82-ui .notif-copy-v69 strong,
html[data-bs-theme="light"] body.v82-ui .notif-copy-v69>span{
  color:#0a1118!important;
  -webkit-text-fill-color:#0a1118!important;
  opacity:1!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-copy-v69 small{
  color:#536570!important;
  -webkit-text-fill-color:#536570!important;
  opacity:1!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-header-v69 button,
html[data-bs-theme="light"] body.v82-ui .notif-footer-v69 a{
  color:#075e9c!important;
  -webkit-text-fill-color:#075e9c!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-item-v69{
  color:#0a1118!important;
  background:#fff!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-item-v69.unread{
  background:#edf6ff!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-item-v69:hover{
  background:#f1f5f7!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-item-v69.unread:hover{
  background:#e2f0ff!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-footer-v69{
  background:#f5f8fa!important;
  border-color:#e0e7eb!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-empty-v69 strong{
  color:#0a1118!important;
  -webkit-text-fill-color:#0a1118!important;
}
html[data-bs-theme="light"] body.v82-ui .notif-empty-v69 p,
html[data-bs-theme="light"] body.v82-ui .notif-loading-v69{
  color:#536570!important;
  -webkit-text-fill-color:#536570!important;
}

html[data-bs-theme="dark"] body.v82-ui .notif-dropdown-v69{
  background:#0e202a!important;
  color:#f5f9fc!important;
  border-color:#314d5a!important;
  box-shadow:0 24px 64px rgba(0,0,0,.46)!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-dropdown-v69::before{
  background:#0e202a!important;
  border-color:#314d5a!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-header-v69{
  background:#0e202a!important;
  border-color:#294653!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-header-v69 h3,
html[data-bs-theme="dark"] body.v82-ui .notif-copy-v69 strong,
html[data-bs-theme="dark"] body.v82-ui .notif-copy-v69>span{
  color:#f5f9fc!important;
  -webkit-text-fill-color:#f5f9fc!important;
  opacity:1!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-copy-v69 small{
  color:#bfd0d8!important;
  -webkit-text-fill-color:#bfd0d8!important;
  opacity:1!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-header-v69 button,
html[data-bs-theme="dark"] body.v82-ui .notif-footer-v69 a{
  color:#8ecbff!important;
  -webkit-text-fill-color:#8ecbff!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-item-v69{
  color:#f5f9fc!important;
  background:#0e202a!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-item-v69.unread{
  background:#133047!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-item-v69:hover{
  background:#17313d!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-item-v69.unread:hover{
  background:#173b56!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-footer-v69{
  background:#0a1820!important;
  border-color:#294653!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-empty-v69 strong{
  color:#f5f9fc!important;
  -webkit-text-fill-color:#f5f9fc!important;
}
html[data-bs-theme="dark"] body.v82-ui .notif-empty-v69 p,
html[data-bs-theme="dark"] body.v82-ui .notif-loading-v69{
  color:#bfd0d8!important;
  -webkit-text-fill-color:#bfd0d8!important;
}

/* Make the icon bubbles remain legible without inheriting the dropdown text color. */
body.v82-ui .notif-avatar-icon-v69.warning{color:#825500!important;-webkit-text-fill-color:#825500!important}
body.v82-ui .notif-avatar-icon-v69.success{color:#126b45!important;-webkit-text-fill-color:#126b45!important}
body.v82-ui .notif-avatar-icon-v69:not(.warning):not(.success){color:#0c69aa!important;-webkit-text-fill-color:#0c69aa!important}

/* Tables and status-heavy back-office screens should never lose text on theme change. */
body.v82-ui .admin-shell :where(.table,.table td,.table th){color:var(--v82-text)}
[data-bs-theme="dark"] body.v82-ui .admin-shell .table{
  --bs-table-color:var(--v82-text);
  --bs-table-bg:transparent;
  --bs-table-border-color:var(--v82-line);
  --bs-table-striped-color:var(--v82-text);
  --bs-table-hover-color:var(--v82-text);
  --bs-table-hover-bg:color-mix(in srgb,#fff 4%,transparent);
}

@media(max-width:575.98px){
  body.v82-ui .admin-order-card>header,
  body.v82-ui .admin-order-card>footer{padding:.85rem}
  body.v82-ui .admin-order-body{padding:.9rem}
}
