/* FINAL OVERRIDES - loaded after app.css.
   Purpose: fix unreadable button text globally, including disabled states
   and blue buttons that do not use .btn-primary.
*/

/* Base button readability */
.btn,
a.btn,
button.btn,
input.btn,
.button,
a.button,
.action-button {
  text-decoration: none !important;
}

/* Light/default buttons: dark text in normal state */
.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
a.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
button.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
input.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
.button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
.action-button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

/* When a normal button becomes blue on hover/focus/active: white text */
.btn:not(.btn-danger):hover,
a.btn:not(.btn-danger):hover,
button.btn:not(.btn-danger):hover,
input.btn:not(.btn-danger):hover,
.button:not(.btn-danger):hover,
.action-button:not(.btn-danger):hover,
.btn:not(.btn-danger):focus,
a.btn:not(.btn-danger):focus,
button.btn:not(.btn-danger):focus,
input.btn:not(.btn-danger):focus,
.button:not(.btn-danger):focus,
.action-button:not(.btn-danger):focus,
.btn:not(.btn-danger):active,
a.btn:not(.btn-danger):active,
button.btn:not(.btn-danger):active,
input.btn:not(.btn-danger):active,
.button:not(.btn-danger):active,
.action-button:not(.btn-danger):active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Primary blue buttons: white text always */
.btn-primary,
.btn.btn-primary,
a.btn-primary,
a.btn.btn-primary,
button.btn-primary,
button.btn.btn-primary,
input.btn-primary,
input.btn.btn-primary,
.btn-primary *,
.btn.btn-primary *,
a.btn-primary *,
a.btn.btn-primary *,
button.btn-primary *,
button.btn.btn-primary * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Primary hover/focus/active/visited: still white */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active,
a.btn-primary:visited,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
a.btn.btn-primary:active,
a.btn.btn-primary:visited,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Danger/red buttons: white text always */
.btn-danger,
.btn.btn-danger,
a.btn-danger,
a.btn.btn-danger,
button.btn-danger,
button.btn.btn-danger,
.btn-danger *,
.btn.btn-danger *,
a.btn-danger *,
a.btn.btn-danger *,
button.btn-danger *,
button.btn.btn-danger * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Disabled light buttons: readable dark/muted text, not white */
.btn:disabled:not(.btn-danger),
.btn[disabled]:not(.btn-danger),
button:disabled:not(.btn-danger),
button[disabled]:not(.btn-danger),
input:disabled:not(.btn-danger),
input[disabled]:not(.btn-danger),
.profile-notification-card .btn:disabled,
.profile-notification-card .btn[disabled],
.page-notification-settings .btn:disabled,
.page-notification-settings .btn[disabled],
body.page-profile .btn:disabled,
body.page-profile .btn[disabled],
body.page-notification-settings .btn:disabled,
body.page-notification-settings .btn[disabled],
body.page-notification_settings .btn:disabled,
body.page-notification_settings .btn[disabled] {
  background: #eef3fb !important;
  background-color: #eef3fb !important;
  background-image: none !important;
  border-color: #dbe5f3 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

/* Disabled button children */
.btn:disabled:not(.btn-danger) *,
.btn[disabled]:not(.btn-danger) *,
button:disabled:not(.btn-danger) *,
button[disabled]:not(.btn-danger) *,
.profile-notification-card .btn:disabled *,
.profile-notification-card .btn[disabled] *,
.page-notification-settings .btn:disabled *,
.page-notification-settings .btn[disabled] * {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* Data-specific notification buttons that are light/disabled-looking */
[data-disable-device-notifications]:not(.btn-danger),
[data-device-notification-disabled],
[data-device-notification-enabled][disabled],
[data-disable-device-notifications][disabled],
button[data-disable-device-notifications][style*="display"],
.profile-notification-card button[data-disable-device-notifications],
.page-notification-settings button[data-disable-device-notifications] {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* But if the disable button is actually visible as red danger, keep white */
.btn-danger[data-disable-device-notifications],
button.btn-danger[data-disable-device-notifications] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Logout page: the "Отказ и връщане в системата" button is blue, so it needs white text */
body.page-logout button.btn:not(.btn-danger),
body.page-logout a.btn:not(.btn-danger),
.logout-card button.btn:not(.btn-danger),
.logout-card a.btn:not(.btn-danger),
.confirmation-card button.btn:not(.btn-danger),
.confirmation-card a.btn:not(.btn-danger) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* If logout has a deliberately light secondary button, allow readable dark text */
body.page-logout .btn-light,
body.page-logout .btn-secondary,
.logout-card .btn-light,
.logout-card .btn-secondary {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

/* Notification/profile default light utility buttons */
body.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active):not(:disabled),
body.page-notification_settings .btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active):not(:disabled),
body.page-profile .btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active):not(:disabled),
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active):not(:disabled),
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active):not(:disabled) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

/* Notification/profile utility buttons hover blue -> white text */
body.page-notification-settings .btn:not(.btn-danger):hover,
body.page-notification_settings .btn:not(.btn-danger):hover,
body.page-profile .btn:not(.btn-danger):hover,
.profile-notification-card .btn:not(.btn-danger):hover,
.page-notification-settings .btn:not(.btn-danger):hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Submit buttons without class are blue actions */
form button[type="submit"]:not(.btn-danger),
form input[type="submit"]:not(.btn-danger) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Sidebar stays white */
.sidebar-link,
.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link:active,
.sidebar-link.is-active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Event badges stay white on red */
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Status badges remain readable */
.badge.success { color: #166534 !important; -webkit-text-fill-color: #166534 !important; }
.badge.warning { color: #92400e !important; -webkit-text-fill-color: #92400e !important; }
.badge.danger,
.badge.expired { color: #991b1b !important; -webkit-text-fill-color: #991b1b !important; }
.badge.muted,
.badge.default { color: #334155 !important; -webkit-text-fill-color: #334155 !important; }


/* Explicit classes added in PHP */
.btn-light-readable:not(:hover):not(:focus):not(:active),
a.btn-light-readable:not(:hover):not(:focus):not(:active),
button.btn-light-readable:not(:hover):not(:focus):not(:active) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

.btn-light-readable:hover,
.btn-light-readable:focus,
.btn-light-readable:active,
a.btn-light-readable:hover,
a.btn-light-readable:focus,
a.btn-light-readable:active,
button.btn-light-readable:hover,
button.btn-light-readable:focus,
button.btn-light-readable:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-disable-device[disabled],
.btn-disable-device:disabled,
.btn-disable-device.btn-disabled-readable {
  background: #eef3fb !important;
  background-color: #eef3fb !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  border-color: #dbe5f3 !important;
}


/* ============================================================
   REQUESTED FINAL OVERRIDE 2026-05-26
   - Disable/turn-off buttons: red text.
   - Hoverable light buttons: light gray text before hover.
   - On hover: white text.
   ============================================================ */

:root{
  --btn-muted-before-hover:#94a3b8;
  --btn-white-hover:#ffffff;
  --btn-disable-red:#dc2626;
  --btn-disable-red-bg:#fff5f5;
  --btn-disable-red-border:#fecaca;
  --btn-hover-blue:#1765ff;
}

/* 1) All buttons for disabling / turning off must have red text. */
button[data-disable-device-notifications],
button[data-disable-notifications],
button[data-disable],
button[data-turn-off],
a[data-disable-device-notifications],
a[data-disable-notifications],
.btn-disable-device,
.btn-disable,
.disable-button,
.turn-off-button,
button[name*="disable"],
button[id*="disable"],
button[class*="disable"],
a[class*="disable"],
button[name*="izkliuch"],
button[id*="izkliuch"],
button[class*="izkliuch"],
button[name*="izkl"],
button[id*="izkl"],
button[class*="izkl"],
button[title*="Изключ"],
a[title*="Изключ"],
button[aria-label*="Изключ"],
a[aria-label*="Изключ"]{
  color:var(--btn-disable-red) !important;
  -webkit-text-fill-color:var(--btn-disable-red) !important;
  background:var(--btn-disable-red-bg) !important;
  background-color:var(--btn-disable-red-bg) !important;
  border-color:var(--btn-disable-red-border) !important;
  opacity:1 !important;
}

/* Children/icons inside disable buttons are also red. */
button[data-disable-device-notifications] *,
button[data-disable-notifications] *,
button[data-disable] *,
button[data-turn-off] *,
.btn-disable-device *,
.btn-disable *,
.disable-button *,
.turn-off-button *,
button[class*="disable"] *,
a[class*="disable"] *,
button[title*="Изключ"] *,
a[title*="Изключ"] *{
  color:var(--btn-disable-red) !important;
  -webkit-text-fill-color:var(--btn-disable-red) !important;
}

/* Disabled/off buttons should stay red text even if disabled. */
button[data-disable-device-notifications]:disabled,
button[data-disable-device-notifications][disabled],
button[data-disable-notifications]:disabled,
button[data-disable-notifications][disabled],
.btn-disable-device:disabled,
.btn-disable-device[disabled],
.btn-disable:disabled,
.btn-disable[disabled],
button[class*="disable"]:disabled,
button[class*="disable"][disabled]{
  color:var(--btn-disable-red) !important;
  -webkit-text-fill-color:var(--btn-disable-red) !important;
  background:var(--btn-disable-red-bg) !important;
  background-color:var(--btn-disable-red-bg) !important;
  border-color:var(--btn-disable-red-border) !important;
  opacity:1 !important;
}

/* Danger buttons remain red-background buttons with white text, except explicit disable device controls above. */
.btn-danger:not([data-disable-device-notifications]):not(.btn-disable-device),
a.btn-danger:not([data-disable-device-notifications]):not(.btn-disable-device),
button.btn-danger:not([data-disable-device-notifications]):not(.btn-disable-device){
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* 2) Hoverable light buttons:
      before hover: light gray text;
      after hover/focus/active: white text. */
.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
a.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
button.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
input.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
.action-button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active){
  color:var(--btn-muted-before-hover) !important;
  -webkit-text-fill-color:var(--btn-muted-before-hover) !important;
}

/* Children in hoverable light buttons before hover. */
.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *,
a.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active) *,
button.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *,
.button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active) *,
.action-button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active) *{
  color:var(--btn-muted-before-hover) !important;
  -webkit-text-fill-color:var(--btn-muted-before-hover) !important;
}

/* Hover/focus/active: blue background and white text. */
.btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
a.btn:not(.btn-danger):hover,
button.btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
input.btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
.button:not(.btn-danger):hover,
.action-button:not(.btn-danger):hover,
.btn:not(.btn-danger):not(:disabled):not([disabled]):focus,
a.btn:not(.btn-danger):focus,
button.btn:not(.btn-danger):not(:disabled):not([disabled]):focus,
input.btn:not(.btn-danger):not(:disabled):not([disabled]):focus,
.button:not(.btn-danger):focus,
.action-button:not(.btn-danger):focus,
.btn:not(.btn-danger):not(:disabled):not([disabled]):active,
a.btn:not(.btn-danger):active,
button.btn:not(.btn-danger):not(:disabled):not([disabled]):active,
input.btn:not(.btn-danger):not(:disabled):not([disabled]):active,
.button:not(.btn-danger):active,
.action-button:not(.btn-danger):active{
  background:var(--btn-hover-blue) !important;
  background-color:var(--btn-hover-blue) !important;
  background-image:none !important;
  border-color:var(--btn-hover-blue) !important;
  color:var(--btn-white-hover) !important;
  -webkit-text-fill-color:var(--btn-white-hover) !important;
}

/* Children on hover/focus/active. */
.btn:not(.btn-danger):not(:disabled):not([disabled]):hover *,
a.btn:not(.btn-danger):hover *,
button.btn:not(.btn-danger):not(:disabled):not([disabled]):hover *,
.button:not(.btn-danger):hover *,
.action-button:not(.btn-danger):hover *,
.btn:not(.btn-danger):not(:disabled):not([disabled]):focus *,
a.btn:not(.btn-danger):focus *,
button.btn:not(.btn-danger):not(:disabled):not([disabled]):focus *,
.button:not(.btn-danger):focus *,
.action-button:not(.btn-danger):focus *{
  color:var(--btn-white-hover) !important;
  -webkit-text-fill-color:var(--btn-white-hover) !important;
}

/* 3) My cars page explicit rules. */
body.page-my-cars .btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
body.page-my_cars .btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.my-cars-page .btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.mycars-page .btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.vehicle-card .btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.vehicles-table .btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active){
  color:var(--btn-muted-before-hover) !important;
  -webkit-text-fill-color:var(--btn-muted-before-hover) !important;
}

body.page-my-cars .btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
body.page-my_cars .btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
.my-cars-page .btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
.mycars-page .btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
.vehicle-card .btn:not(.btn-danger):not(:disabled):not([disabled]):hover,
.vehicles-table .btn:not(.btn-danger):not(:disabled):not([disabled]):hover{
  color:var(--btn-white-hover) !important;
  -webkit-text-fill-color:var(--btn-white-hover) !important;
}

/* Primary blue buttons must stay white in all states. */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited,
.btn.btn-primary,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active,
a.btn-primary:visited,
button.btn-primary,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Event badges/sidebar remain readable. */
.sidebar-link,
.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link:active,
.sidebar-link.is-active{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Status badges keep their own readable colors. */
.badge.success{color:#166534 !important;-webkit-text-fill-color:#166534 !important;}
.badge.warning{color:#92400e !important;-webkit-text-fill-color:#92400e !important;}
.badge.danger,.badge.expired{color:#991b1b !important;-webkit-text-fill-color:#991b1b !important;}
.badge.muted,.badge.default{color:#334155 !important;-webkit-text-fill-color:#334155 !important;}


/* ============================================================
   FINAL SMALL VISUAL FIX 2026-05-26
   - hoverable light text closer to white before hover
   - mobile My cars brand full text
   - View/Edit buttons white text
   ============================================================ */

:root{
  --btn-muted-before-hover:#e2e8f0; /* closer to white */
}

/* Before hover: almost-white / light gray text */
.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
a.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
button.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
input.btn:not(.btn-primary):not(.btn-danger):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active),
.action-button:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active){
  color:#e2e8f0 !important;
  -webkit-text-fill-color:#e2e8f0 !important;
}

/* View/Edit buttons must have white text */
a.btn[href*="view"],
a.btn[href*="edit"],
a.btn[href*="car_records"],
button.btn[data-action="view"],
button.btn[data-action="edit"],
.btn-view,
.btn-edit,
.btn-preview,
.btn-review,
.mycars-page .btn[href*="view"],
.mycars-page .btn[href*="edit"],
.mycars-page .btn[href*="car_records"],
.vehicle-card .btn[href*="view"],
.vehicle-card .btn[href*="edit"],
.vehicles-table .btn[href*="view"],
.vehicles-table .btn[href*="edit"]{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

a.btn[href*="view"] *,
a.btn[href*="edit"] *,
a.btn[href*="car_records"] *,
.btn-view *,
.btn-edit *,
.btn-preview *,
.btn-review *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Mobile My cars: show full brand/model text, not only first letter */
@media (max-width: 760px){
  .mycars-page,
  .my-cars-page,
  .vehicle-card,
  .vehicles-table,
  .mobile-vehicle-card{
    overflow:visible !important;
  }

  .mycars-page .vehicle-brand,
  .mycars-page .car-brand,
  .mycars-page .brand,
  .mycars-page .model,
  .mycars-page [data-label="Марка"],
  .mycars-page [data-label="Модел"],
  .vehicle-card .vehicle-brand,
  .vehicle-card .car-brand,
  .vehicle-card .brand,
  .vehicle-card .model,
  .vehicle-card [data-label="Марка"],
  .vehicle-card [data-label="Модел"],
  .vehicles-table .vehicle-brand,
  .vehicles-table .car-brand,
  .vehicles-table .brand,
  .vehicles-table .model,
  .vehicles-table [data-label="Марка"],
  .vehicles-table [data-label="Модел"],
  td[data-label="Марка"],
  td[data-label="Модел"]{
    display:block !important;
    width:auto !important;
    max-width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:normal !important;
    overflow-wrap:anywhere !important;
    letter-spacing:normal !important;
  }

  /* If mobile layout uses pseudo labels, keep the label and value separated */
  td[data-label="Марка"]::before,
  td[data-label="Модел"]::before{
    display:block !important;
    margin-bottom:4px !important;
    white-space:normal !important;
  }
}


/* FINAL FIX: "Тест Web Push" button red */
button[data-test-server-webpush],
.btn[data-test-server-webpush],
a.btn[data-test-server-webpush],
.profile-notification-card button[data-test-server-webpush],
.page-notification-settings button[data-test-server-webpush],
body.page-profile button[data-test-server-webpush],
body.page-notification-settings button[data-test-server-webpush],
body.page-notification_settings button[data-test-server-webpush]{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

button[data-test-server-webpush] *,
.btn[data-test-server-webpush] *,
.profile-notification-card button[data-test-server-webpush] *,
.page-notification-settings button[data-test-server-webpush] *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

button[data-test-server-webpush]:hover,
.btn[data-test-server-webpush]:hover,
a.btn[data-test-server-webpush]:hover,
.profile-notification-card button[data-test-server-webpush]:hover,
.page-notification-settings button[data-test-server-webpush]:hover{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  border-color:#991b1b !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* FINAL FIX: device local test + disable notifications buttons red like Test Web Push */
button[data-test-local-notification],
.btn[data-test-local-notification],
a.btn[data-test-local-notification],
button[data-disable-device-notifications],
.btn[data-disable-device-notifications],
a.btn[data-disable-device-notifications],
.btn-disable-device,
.profile-notification-card button[data-test-local-notification],
.profile-notification-card button[data-disable-device-notifications],
.page-notification-settings button[data-test-local-notification],
.page-notification-settings button[data-disable-device-notifications],
body.page-profile button[data-test-local-notification],
body.page-profile button[data-disable-device-notifications],
body.page-notification-settings button[data-test-local-notification],
body.page-notification-settings button[data-disable-device-notifications],
body.page-notification_settings button[data-test-local-notification],
body.page-notification_settings button[data-disable-device-notifications]{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}

button[data-test-local-notification] *,
.btn[data-test-local-notification] *,
button[data-disable-device-notifications] *,
.btn[data-disable-device-notifications] *,
.btn-disable-device *,
.profile-notification-card button[data-test-local-notification] *,
.profile-notification-card button[data-disable-device-notifications] *,
.page-notification-settings button[data-test-local-notification] *,
.page-notification-settings button[data-disable-device-notifications] *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

button[data-test-local-notification]:hover,
.btn[data-test-local-notification]:hover,
a.btn[data-test-local-notification]:hover,
button[data-disable-device-notifications]:hover,
.btn[data-disable-device-notifications]:hover,
a.btn[data-disable-device-notifications]:hover,
.btn-disable-device:hover,
.profile-notification-card button[data-test-local-notification]:hover,
.profile-notification-card button[data-disable-device-notifications]:hover,
.page-notification-settings button[data-test-local-notification]:hover,
.page-notification-settings button[data-disable-device-notifications]:hover{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  border-color:#991b1b !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Even if hidden/shown by JS or disabled, these red action buttons keep red visual */
button[data-test-local-notification][disabled],
button[data-disable-device-notifications][disabled],
.btn-disable-device[disabled],
button[data-test-local-notification]:disabled,
button[data-disable-device-notifications]:disabled,
.btn-disable-device:disabled{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:.75 !important;
}


/* Explicit red action class */
.btn-red-action,
button.btn-red-action,
a.btn-red-action,
.btn-red-action:hover,
button.btn-red-action:hover,
a.btn-red-action:hover,
.btn-red-action:focus,
button.btn-red-action:focus,
a.btn-red-action:focus,
.btn-red-action:active,
button.btn-red-action:active,
a.btn-red-action:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-red-action *,
button.btn-red-action *,
a.btn-red-action *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Cron jobs admin page */
.cron-command{
  white-space:pre-wrap;
  word-break:break-all;
  background:#0f172a;
  color:#e2e8f0;
  border-radius:14px;
  padding:14px;
  font-size:13px;
  line-height:1.5;
}
.cron-card label{
  font-weight:800;
  display:block;
  margin:10px 0 6px;
}


/* ============================================================
   ABSOLUTE GLOBAL BUTTON READABILITY FIX 2026-05-27
   Fixes all pages:
   - light buttons normal state: readable dark text
   - disabled light buttons: readable muted dark text
   - hover/focus/active blue buttons: white text
   - primary/danger/red buttons: white text
   This block must be LAST.
   ============================================================ */

:root{
  --avto-button-readable-dark:#1f2937;
  --avto-button-readable-muted:#475569;
  --avto-button-readable-disabled-bg:#eef3fb;
  --avto-button-readable-disabled-border:#dbe5f3;
  --avto-button-readable-blue:#1765ff;
  --avto-button-readable-blue-hover:#0d4db8;
  --avto-button-readable-white:#ffffff;
  --avto-button-readable-red:#dc2626;
  --avto-button-readable-red-hover:#b91c1c;
}

/* Reset all regular/light buttons to readable dark text in normal state */
.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
a.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:hover):not(:focus):not(:active),
button.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
input.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.button:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:hover):not(:focus):not(:active),
.action-button:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:hover):not(:focus):not(:active),
.card .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.quick-actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.form-actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.form-actions-end .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
.table-wrap .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
td .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active){
  color:var(--avto-button-readable-dark) !important;
  -webkit-text-fill-color:var(--avto-button-readable-dark) !important;
}

/* Children/icons/spans inside normal light buttons */
.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *,
a.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:hover):not(:focus):not(:active) *,
button.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *,
.card .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *,
.quick-actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *,
.actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active) *{
  color:var(--avto-button-readable-dark) !important;
  -webkit-text-fill-color:var(--avto-button-readable-dark) !important;
}

/* Disabled light buttons must stay readable, not white/invisible */
.btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
button:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
button[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
input:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
input[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.card .btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.card .btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.quick-actions .btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.quick-actions .btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.cron-card .btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
.cron-card .btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device){
  background:var(--avto-button-readable-disabled-bg) !important;
  background-color:var(--avto-button-readable-disabled-bg) !important;
  background-image:none !important;
  border-color:var(--avto-button-readable-disabled-border) !important;
  color:var(--avto-button-readable-muted) !important;
  -webkit-text-fill-color:var(--avto-button-readable-muted) !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}

/* Disabled children */
.btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
.btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
button:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
button[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
.quick-actions .btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
.quick-actions .btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
.cron-card .btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *,
.cron-card .btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device) *{
  color:var(--avto-button-readable-muted) !important;
  -webkit-text-fill-color:var(--avto-button-readable-muted) !important;
}

/* Hover/focus/active: when button becomes blue, text is always white */
.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover,
a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover,
button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover,
input.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover,
.button:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover,
.action-button:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover,
.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus,
a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):focus,
button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus,
.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):active,
a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):active,
button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):active{
  background:var(--avto-button-readable-blue) !important;
  background-color:var(--avto-button-readable-blue) !important;
  background-image:none !important;
  border-color:var(--avto-button-readable-blue) !important;
  color:var(--avto-button-readable-white) !important;
  -webkit-text-fill-color:var(--avto-button-readable-white) !important;
}

/* Hover/focus/active children */
.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover *,
a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover *,
button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover *,
.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus *,
a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):focus *,
button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus *{
  color:var(--avto-button-readable-white) !important;
  -webkit-text-fill-color:var(--avto-button-readable-white) !important;
}

/* Primary blue buttons always white */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited,
a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active,
a.btn-primary:visited,
button.btn-primary,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:active,
.btn-primary *,
a.btn-primary *,
button.btn-primary *{
  color:var(--avto-button-readable-white) !important;
  -webkit-text-fill-color:var(--avto-button-readable-white) !important;
}

/* Red action / danger buttons always white */
.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger:visited,
.btn-red-action,
.btn-red-action:hover,
.btn-red-action:focus,
.btn-red-action:active,
button.btn-red-action,
button.btn-red-action:hover,
button.btn-red-action:focus,
button.btn-red-action:active,
a.btn-red-action,
a.btn-red-action:hover,
a.btn-red-action:focus,
a.btn-red-action:active,
button[data-test-server-webpush],
button[data-test-local-notification],
button[data-disable-device-notifications],
.btn-disable-device{
  color:var(--avto-button-readable-white) !important;
  -webkit-text-fill-color:var(--avto-button-readable-white) !important;
}

.btn-danger *,
.btn-red-action *,
button.btn-red-action *,
a.btn-red-action *,
button[data-test-server-webpush] *,
button[data-test-local-notification] *,
button[data-disable-device-notifications] *,
.btn-disable-device *{
  color:var(--avto-button-readable-white) !important;
  -webkit-text-fill-color:var(--avto-button-readable-white) !important;
}

/* Specific cron page fix: 'Ръчен тест' and similar buttons */
.cron-card .quick-actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
body.page-admin-cron-jobs .quick-actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
body.page-admin_cron_jobs .quick-actions .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active){
  color:var(--avto-button-readable-dark) !important;
  -webkit-text-fill-color:var(--avto-button-readable-dark) !important;
}

.cron-card .quick-actions .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover,
body.page-admin-cron-jobs .quick-actions .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover,
body.page-admin_cron_jobs .quick-actions .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover{
  color:var(--avto-button-readable-white) !important;
  -webkit-text-fill-color:var(--avto-button-readable-white) !important;
}

/* Sidebar and badges stay readable */
.sidebar-link,
.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link:active,
.sidebar-link.is-active{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Status badges */
.badge.success{color:#166534 !important;-webkit-text-fill-color:#166534 !important;}
.badge.warning{color:#92400e !important;-webkit-text-fill-color:#92400e !important;}
.badge.danger,.badge.expired{color:#991b1b !important;-webkit-text-fill-color:#991b1b !important;}
.badge.muted,.badge.default{color:#334155 !important;-webkit-text-fill-color:#334155 !important;}


/* Explicit manual test buttons */
.btn-manual-test:not(:hover):not(:focus):not(:active){
  color:#1f2937 !important;
  -webkit-text-fill-color:#1f2937 !important;
}
.btn-manual-test:hover,
.btn-manual-test:focus,
.btn-manual-test:active{
  background:#1765ff !important;
  background-color:#1765ff !important;
  border-color:#1765ff !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Badge diagnostics page */
#badgeDiagOut{
  white-space:pre-wrap;
  word-break:break-word;
  background:#0f172a;
  color:#e2e8f0;
  border-radius:14px;
  padding:14px;
}


/* ============================================================
   HARD FIX ALL BUTTON TEXT COLORS 2026-05-27
   Applied in app.css + final_overrides.css + final_button_colors.css.
   ============================================================ */

:root{
  --hard-blue:#1765ff;
  --hard-blue-2:#2563eb;
  --hard-blue-hover:#0d4db8;
  --hard-white:#ffffff;
  --hard-dark:#111827;
  --hard-muted:#475569;
  --hard-disabled-bg:#eef3fb;
  --hard-disabled-border:#dbe5f3;
}

/* Primary/action blue buttons: always white text */
html body .btn-primary,
html body .btn-primary:link,
html body .btn-primary:visited,
html body .btn-primary:hover,
html body .btn-primary:focus,
html body .btn-primary:active,
html body a.btn-primary,
html body a.btn-primary:link,
html body a.btn-primary:visited,
html body a.btn-primary:hover,
html body a.btn-primary:focus,
html body a.btn-primary:active,
html body button.btn-primary,
html body button.btn-primary:hover,
html body button.btn-primary:focus,
html body button.btn-primary:active,
html body input.btn-primary,
html body input.btn-primary:hover,
html body input.btn-primary:focus,
html body input.btn-primary:active,
html body .btn-primary *,
html body a.btn-primary *,
html body button.btn-primary *{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Known blue action buttons in car tables/cards/client/admin pages */
html body .mycars-page .btn,
html body .my-cars-page .btn,
html body .vehicle-card .btn,
html body .vehicles-table .btn,
html body table .btn-primary,
html body table a.btn-primary,
html body table button.btn-primary,
html body .table-wrap .btn-primary,
html body .table-wrap a.btn-primary,
html body .table-wrap button.btn-primary,
html body .quick-actions .btn-primary,
html body .actions .btn-primary,
html body .form-actions .btn-primary,
html body .form-actions-end .btn-primary,
html body .admin-card .btn-primary,
html body .tools-card .btn-primary,
html body .page-hero .btn-primary,
html body .logout-card .btn-primary,
html body .confirmation-card .btn-primary,
html body a.btn[href*="view"],
html body a.btn[href*="edit"],
html body a.btn[href*="car_records"],
html body a.btn[href*="car_records.php"],
html body a.btn[href*="edit_car"],
html body a.btn[href*="view_car"],
html body a.btn[href*="dashboard.php"]{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

html body .mycars-page .btn *,
html body .my-cars-page .btn *,
html body .vehicle-card .btn *,
html body .vehicles-table .btn *,
html body table .btn-primary *,
html body .table-wrap .btn-primary *,
html body .quick-actions .btn-primary *,
html body .actions .btn-primary *,
html body .admin-card .btn-primary *,
html body .tools-card .btn-primary *,
html body .page-hero .btn-primary *,
html body .logout-card .btn-primary *,
html body .confirmation-card .btn-primary *,
html body a.btn[href*="view"] *,
html body a.btn[href*="edit"] *,
html body a.btn[href*="car_records"] *{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Any button with explicit blue inline style: white text */
html body .btn[style*="1765ff"],
html body button[style*="1765ff"],
html body a[style*="1765ff"],
html body input[style*="1765ff"],
html body .btn[style*="2563eb"],
html body button[style*="2563eb"],
html body a[style*="2563eb"],
html body input[style*="2563eb"],
html body .btn[style*="0055"],
html body button[style*="0055"],
html body a[style*="0055"]{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Hover/focus/active: if a button turns blue, text must be white */
html body .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover,
html body a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover,
html body button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover,
html body input.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover,
html body .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus,
html body a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):focus,
html body button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus,
html body .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):active,
html body a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):active,
html body button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):active{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

html body .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover *,
html body a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):hover *,
html body button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):hover *,
html body .btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus *,
html body a.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):focus *,
html body button.btn:not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):focus *{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Light buttons normal: dark readable, except problem blue/action contexts above */
html body .btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active),
html body a.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:hover):not(:focus):not(:active),
html body button.btn:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device):not(:disabled):not([disabled]):not(:hover):not(:focus):not(:active){
  color:var(--hard-dark) !important;
  -webkit-text-fill-color:var(--hard-dark) !important;
}

/* Re-assert white for blue/action contexts after normal rule */
html body .mycars-page .btn,
html body .my-cars-page .btn,
html body .vehicle-card .btn,
html body .vehicles-table .btn,
html body a.btn[href*="view"],
html body a.btn[href*="edit"],
html body a.btn[href*="car_records"],
html body .logout-card .btn-primary,
html body .confirmation-card .btn-primary{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Disabled light buttons */
html body .btn:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
html body .btn[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
html body button:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
html body button[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
html body input:disabled:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device),
html body input[disabled]:not(.btn-primary):not(.btn-danger):not(.btn-red-action):not(.btn-disable-device){
  background:var(--hard-disabled-bg) !important;
  background-color:var(--hard-disabled-bg) !important;
  border-color:var(--hard-disabled-border) !important;
  color:var(--hard-muted) !important;
  -webkit-text-fill-color:var(--hard-muted) !important;
  opacity:1 !important;
}

/* Red/danger/test/disable buttons */
html body .btn-danger,
html body .btn-danger *,
html body .btn-red-action,
html body .btn-red-action *,
html body .btn-disable-device,
html body .btn-disable-device *,
html body button[data-test-server-webpush],
html body button[data-test-server-webpush] *,
html body button[data-test-local-notification],
html body button[data-test-local-notification] *,
html body button[data-disable-device-notifications],
html body button[data-disable-device-notifications] *{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Logout confirmation explicit */
html body .logout-card button,
html body .logout-card a.btn,
html body .confirmation-card button,
html body .confirmation-card a.btn{
  color:var(--hard-white) !important;
  -webkit-text-fill-color:var(--hard-white) !important;
}

/* Sidebar and badges */
html body .sidebar-link,
html body .sidebar-link:hover,
html body .sidebar-link:focus,
html body .sidebar-link:active,
html body .sidebar-link.is-active{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .sidebar-count.event-badge,
html body .topbar-count.event-badge,
html body #topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Mobile same rules */
@media (max-width:760px){
  html body .btn-primary,
  html body .btn-primary *,
  html body .mycars-page .btn,
  html body .mycars-page .btn *,
  html body .vehicle-card .btn,
  html body .vehicle-card .btn *,
  html body .vehicles-table .btn,
  html body .vehicles-table .btn *,
  html body a.btn[href*="view"],
  html body a.btn[href*="edit"],
  html body a.btn[href*="car_records"]{
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }
}


/* Runtime button text fix backup CSS */
.btn-primary,
.btn-primary *,
a.btn-primary,
a.btn-primary *,
button.btn-primary,
button.btn-primary *,
.btn-danger,
.btn-danger *,
.btn-red-action,
.btn-red-action *,
.btn-disable-device,
.btn-disable-device *,
button[data-test-server-webpush],
button[data-test-server-webpush] *,
button[data-test-local-notification],
button[data-test-local-notification] *,
button[data-disable-device-notifications],
button[data-disable-device-notifications] *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.mycars-page .btn,
.mycars-page .btn *,
.vehicle-card .btn,
.vehicle-card .btn *,
.vehicles-table .btn,
.vehicles-table .btn *,
a.btn[href*="view"],
a.btn[href*="view"] *,
a.btn[href*="edit"],
a.btn[href*="edit"] *,
a.btn[href*="car_records"],
a.btn[href*="car_records"] *,
.logout-card .btn-primary,
.logout-card .btn-primary *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* FINAL LOGOUT BUTTON FIX 2026-05-27 */
html body .logout-card .logout-cancel-btn,
html body .logout-card .logout-cancel-btn:link,
html body .logout-card .logout-cancel-btn:visited,
html body .logout-card .logout-cancel-btn:hover,
html body .logout-card .logout-cancel-btn:focus,
html body .logout-card .logout-cancel-btn:active,
html body button.logout-cancel-btn,
html body button.logout-cancel-btn:hover,
html body button.logout-cancel-btn:focus,
html body button.logout-cancel-btn:active,
html body a.logout-cancel-btn,
html body a.logout-cancel-btn:hover,
html body a.logout-cancel-btn:focus,
html body a.logout-cancel-btn:active{
  background:#1765ff !important;
  background-color:#1765ff !important;
  border-color:#1765ff !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

html body .logout-card .logout-cancel-btn *,
html body button.logout-cancel-btn *,
html body a.logout-cancel-btn *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* FINAL LOGOUT CONFIRM DISABLED READABLE FIX 2026-05-27 */
html body .logout-card .logout-confirm-btn:disabled,
html body .logout-card .logout-confirm-btn[disabled],
html body button.logout-confirm-btn:disabled,
html body button.logout-confirm-btn[disabled]{
  background:#eef3fb !important;
  background-color:#eef3fb !important;
  border-color:#dbe5f3 !important;
  color:#475569 !important;
  -webkit-text-fill-color:#475569 !important;
  opacity:1 !important;
}

html body .logout-card .logout-confirm-btn:not(:disabled):not([disabled]),
html body button.logout-confirm-btn:not(:disabled):not([disabled]){
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}


/* Mobile/desktop cars live search */
.cars-live-search-info{
  margin-top:8px;
  font-size:13px;
  font-weight:700;
}
[data-live-search-hidden="true"]{
  display:none !important;
}
@media (max-width:760px){
  input[data-car-search="1"],
  input[data-cars-search="1"]{
    width:100% !important;
    max-width:100% !important;
  }
}


/* HARD live search hide */
.avto-search-hidden,
[data-live-search-hidden="true"]{
  display:none !important;
}


/* Car brand icon badges */
.car-brand-badge-cell{
  text-align:center !important;
  vertical-align:middle !important;
}
.car-brand-icon{
  width:32px;
  height:32px;
  min-width:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.2px;
  line-height:1;
  background:#eef4ff;
  color:#174ea6;
  border:1px solid #d8e6ff;
  box-shadow:0 2px 8px rgba(15, 23, 42, .06);
  text-transform:uppercase;
}
.car-brand-icon-vw{background:#e9f2ff;color:#0b4ea2;border-color:#cfe2ff;}
.car-brand-icon-kia{background:#fff1f2;color:#b91c1c;border-color:#fecdd3;font-size:10px;}
.car-brand-icon-toyota{background:#fff7ed;color:#c2410c;border-color:#fed7aa;}
.car-brand-icon-peugeot{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;}
.car-brand-icon-ford{background:#e0f2fe;color:#0369a1;border-color:#bae6fd;}
.car-brand-icon-yamaha{background:#fef2f2;color:#991b1b;border-color:#fecaca;}
.car-brand-icon-mercedes{background:#f8fafc;color:#0f172a;border-color:#cbd5e1;font-size:9px;}
.car-brand-icon-bmw{background:#e0f2fe;color:#075985;border-color:#bae6fd;font-size:9px;}
.car-brand-icon-audi{background:#f1f5f9;color:#334155;border-color:#cbd5e1;}
.car-brand-icon-opel{background:#fefce8;color:#a16207;border-color:#fde68a;}
.car-brand-icon-renault{background:#fef9c3;color:#854d0e;border-color:#fde047;}
.car-brand-icon-nissan{background:#f8fafc;color:#475569;border-color:#cbd5e1;}
.car-brand-icon-hyundai{background:#eff6ff;color:#1e40af;border-color:#bfdbfe;}
.car-brand-icon-skoda{background:#ecfdf5;color:#047857;border-color:#bbf7d0;}
.car-brand-icon-fiat{background:#fff1f2;color:#be123c;border-color:#fecdd3;font-size:9px;}
.car-brand-icon-citroen{background:#fff7ed;color:#ea580c;border-color:#fed7aa;}
.car-brand-icon-mazda{background:#f8fafc;color:#111827;border-color:#cbd5e1;}
.car-brand-icon-honda{background:#fef2f2;color:#b91c1c;border-color:#fecaca;}
.car-brand-icon-suzuki{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;}
.car-brand-icon-iveco{background:#ecfeff;color:#0e7490;border-color:#a5f3fc;font-size:9px;}
.car-brand-icon-man{background:#f1f5f9;color:#0f172a;border-color:#cbd5e1;font-size:9px;}
.car-brand-icon-dacia{background:#f0fdf4;color:#15803d;border-color:#bbf7d0;}
.car-brand-icon-seat{background:#f8fafc;color:#334155;border-color:#cbd5e1;}
.car-brand-icon-volvo{background:#e0f2fe;color:#075985;border-color:#bae6fd;}
.car-brand-icon-mitsubishi{background:#fef2f2;color:#dc2626;border-color:#fecaca;font-size:9px;}

@media (max-width:760px){
  .car-brand-icon{
    width:30px;
    height:30px;
    min-width:30px;
    font-size:10px;
  }
}


/* Brand logo badges */
.vehicle-brand .brand-logo-box,
.card-brand-logo-wrap .brand-logo-box{
  width:34px;
  height:34px;
  min-width:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#ffffff;
  border:1px solid #dbe4f0;
  box-shadow:0 2px 8px rgba(15,23,42,.06);
  overflow:hidden;
}
.brand-logo-img{
  width:28px;
  height:28px;
  object-fit:contain;
  display:block;
}
.brand-logo-fallback{
  background:#eef4ff;
  color:#1e4fd6;
}
.brand-logo-fallback-text{
  font-size:13px;
  font-weight:800;
  line-height:1;
}
.car-card-top{
  display:flex;
  align-items:center;
  gap:10px;
}
.car-card-top-text{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.card-brand-logo-wrap{display:inline-flex;flex:0 0 auto;}
@media (max-width: 760px){
  .vehicle-brand .brand-logo-box,
  .card-brand-logo-wrap .brand-logo-box{width:32px;height:32px;min-width:32px;}
  .brand-logo-img{width:26px;height:26px;}
}


/* Readable local brand logos */
.vehicle-brand{
  width:78px !important;
  min-width:78px !important;
  text-align:center !important;
  vertical-align:middle !important;
}
.vehicle-brand .brand-logo-box,
.card-brand-logo-wrap .brand-logo-box{
  width:64px !important;
  height:34px !important;
  min-width:64px !important;
  max-width:64px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:12px !important;
  background:#ffffff !important;
  border:1px solid #dbe4f0 !important;
  box-shadow:0 2px 8px rgba(15,23,42,.08) !important;
  overflow:hidden !important;
}
.brand-logo-img{
  width:60px !important;
  height:30px !important;
  object-fit:contain !important;
  display:block !important;
}
.brand-logo-fallback{
  background:#eef4ff !important;
  color:#1e4fd6 !important;
}
.brand-logo-fallback-text{
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1 !important;
}
.card-brand-logo-wrap{
  display:inline-flex !important;
  flex:0 0 auto !important;
}
.car-card-top{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}
.car-card-top-text{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
}
@media (max-width:760px){
  .vehicle-brand{
    width:72px !important;
    min-width:72px !important;
  }
  .vehicle-brand .brand-logo-box,
  .card-brand-logo-wrap .brand-logo-box{
    width:60px !important;
    height:32px !important;
    min-width:60px !important;
    max-width:60px !important;
  }
  .brand-logo-img{
    width:56px !important;
    height:28px !important;
  }
}


/* Push repair clear requests button */
html body .push-clear-requests-btn:disabled,
html body .push-clear-requests-btn[disabled]{
  background:#eef3fb !important;
  background-color:#eef3fb !important;
  border-color:#dbe5f3 !important;
  color:#475569 !important;
  -webkit-text-fill-color:#475569 !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}
html body .push-clear-requests-btn:not(:disabled):not([disabled]){
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .push-clear-requests-btn:not(:disabled):not([disabled]):hover{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Push repair cleanup danger button */
html body button.btn-danger,
html body a.btn-danger,
html body .btn-danger{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Push repair visible cleanup broken keys button */
html body .push-cleanup-broken-btn,
html body .push-cleanup-broken-btn:hover,
html body .push-cleanup-broken-btn:focus,
html body .push-cleanup-broken-btn:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* FINAL FIX: push repair admin cleanup button + mobile repair page buttons */
html body .push-cleanup-broken-btn,
html body button.push-cleanup-broken-btn,
html body .push-cleanup-broken-btn:link,
html body .push-cleanup-broken-btn:visited,
html body .push-cleanup-broken-btn:hover,
html body .push-cleanup-broken-btn:focus,
html body .push-cleanup-broken-btn:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border:1px solid #b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  text-decoration:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  outline:none !important;
  box-shadow:0 8px 18px rgba(220,38,38,.18) !important;
}
html body .push-cleanup-broken-btn *,
html body button.push-cleanup-broken-btn *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .push-cleanup-broken-btn:hover,
html body .push-cleanup-broken-btn:focus{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  border-color:#991b1b !important;
}

html body.push-repair-page,
html body .push-repair-page{
  overflow-x:hidden !important;
}
html body.push-repair-page .card,
html body.push-repair-page .repair-card,
html body.push-repair-page main,
html body.push-repair-page section{
  max-width:calc(100vw - 28px) !important;
  box-sizing:border-box !important;
}
html body.push-repair-page a,
html body.push-repair-page button,
html body.push-repair-page .btn,
html body.push-repair-page .push-repair-primary-btn,
html body.push-repair-page .push-repair-nav-btn{
  box-sizing:border-box !important;
  max-width:100% !important;
  width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  text-align:center !important;
  line-height:1.25 !important;
}
html body.push-repair-page .push-repair-primary-btn,
html body.push-repair-page button.push-repair-primary-btn{
  background:#1765ff !important;
  background-color:#1765ff !important;
  border-color:#1765ff !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body.push-repair-page .push-repair-nav-btn,
html body.push-repair-page a.push-repair-nav-btn{
  background:#ffffff !important;
  background-color:#ffffff !important;
  border:1px solid #dbe5f3 !important;
  color:#1455c8 !important;
  -webkit-text-fill-color:#1455c8 !important;
}
@media (max-width:760px){
  html body.push-repair-page{
    padding-left:10px !important;
    padding-right:10px !important;
  }
  html body.push-repair-page .card,
  html body.push-repair-page .repair-card,
  html body.push-repair-page main,
  html body.push-repair-page section{
    width:100% !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding-left:18px !important;
    padding-right:18px !important;
  }
  html body.push-repair-page a,
  html body.push-repair-page button,
  html body.push-repair-page .btn{
    min-height:54px !important;
    font-size:16px !important;
    padding:14px 16px !important;
  }
}


/* Final push cleanup button */
html body .push-cleanup-broken-btn,
html body .push-cleanup-broken-btn:hover,
html body .push-cleanup-broken-btn:focus,
html body .push-cleanup-broken-btn:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  user-select:none !important;
  -webkit-user-select:none !important;
}


/* Endpoint hash repair button */
html body a.btn-danger,
html body a.btn-danger:hover,
html body a.btn-danger:focus,
html body a.btn-danger:active{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Endpoint_hash repair button hard color fix */
html body .endpoint-hash-repair-btn,
html body a.endpoint-hash-repair-btn,
html body button.endpoint-hash-repair-btn,
html body .endpoint-hash-repair-btn:link,
html body .endpoint-hash-repair-btn:visited,
html body .endpoint-hash-repair-btn:hover,
html body .endpoint-hash-repair-btn:focus,
html body .endpoint-hash-repair-btn:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border:1px solid #b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  text-decoration:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  box-shadow:0 8px 18px rgba(220,38,38,.16) !important;
}
html body .endpoint-hash-repair-btn:hover,
html body .endpoint-hash-repair-btn:focus{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  border-color:#991b1b !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .endpoint-hash-repair-btn *,
html body a.endpoint-hash-repair-btn *,
html body button.endpoint-hash-repair-btn *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Missing auth_token cleanup button */
html body .cleanup-auth-token-btn,
html body .cleanup-auth-token-btn:hover,
html body .cleanup-auth-token-btn:focus,
html body .cleanup-auth-token-btn:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  text-decoration:none !important;
}
html body .cleanup-auth-token-btn:hover,
html body .cleanup-auth-token-btn:focus{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Clean missing auth_token standalone button */
html body .cleanup-auth-token-btn,
html body a.cleanup-auth-token-btn,
html body button.cleanup-auth-token-btn,
html body .cleanup-auth-token-btn:hover,
html body .cleanup-auth-token-btn:focus,
html body .cleanup-auth-token-btn:active{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  background-image:none !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  text-decoration:none !important;
}
html body .cleanup-auth-token-btn:hover,
html body .cleanup-auth-token-btn:focus{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Push diagnostics corrected table */
#pushDiagFreshStatsCard .stat-card{
  background:#fff;
  border:1px solid #dbe5f2;
  border-radius:18px;
  padding:18px;
}
#pushDiagFreshStatsCard .stat-title{
  font-weight:800;
  color:#13264b;
}
#pushDiagFreshStatsCard .stat-value{
  font-size:34px;
  font-weight:900;
  color:#1d5bd8;
}
#pushDiagCorrectBreakdown .table-wrap{
  overflow:auto;
}
#pushDiagCorrectBreakdown table{
  width:100%;
  border-collapse:collapse;
}
#pushDiagCorrectBreakdown th,
#pushDiagCorrectBreakdown td{
  padding:12px;
  border-bottom:1px solid #e3ebf5;
  vertical-align:middle;
}


/* Admin push repair: hide misleading old auth_token column via JS and fix VAPID badge client fallback colors */
#pushDiagCorrectBreakdown th,
#pushDiagCorrectBreakdown td{
  display:table-cell;
}
html body .badge.success{
  background-color:#dcfce7 !important;
  color:#166534 !important;
  -webkit-text-fill-color:#166534 !important;
}
html body .badge.danger{
  background-color:#fee2e2 !important;
  color:#991b1b !important;
  -webkit-text-fill-color:#991b1b !important;
}


/* Visual admin tool pages */
.admin-tool-card .grid,
.card .grid.cards-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.admin-tool-card .stat,
.card .stat-card{
  background:#fff;
  border:1px solid #dbe5f2;
  border-radius:18px;
  padding:18px;
}
.admin-tool-card .n,
.card .stat-value{
  font-size:34px;
  font-weight:900;
  color:#1d5bd8;
}
.admin-tool-card pre{
  white-space:pre-wrap;
  background:#0f172a;
  color:#e5e7eb;
  padding:14px;
  border-radius:14px;
  overflow:auto;
}


/* Safe VAPID status elements */
#vapidStatusBadge.success{
  background-color:#dcfce7 !important;
  color:#166534 !important;
  -webkit-text-fill-color:#166534 !important;
}
#vapidStatusBadge.danger{
  background-color:#fee2e2 !important;
  color:#991b1b !important;
  -webkit-text-fill-color:#991b1b !important;
}


/* Push diagnostics JSON refresh note */
.push-json-refresh-note{
  margin-top:12px;
  font-size:13px;
  color:#64748b !important;
}
[data-json-refreshed="1"]{
  outline:1px solid rgba(34,197,94,.18);
}


/* Admin Push Repair - safe action buttons layout, no hiding */
.push-actions-safe-section{
  overflow:visible !important;
}
.push-actions-safe-section form,
.push-actions-safe-section .push-action-inline-form{
  display:inline-flex !important;
  margin:6px 6px 6px 0 !important;
  vertical-align:middle !important;
}
.push-actions-safe-section a.btn,
.push-actions-safe-section button.btn,
.push-actions-safe-section button,
.push-actions-safe-section input[type="submit"],
.push-action-visible-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:42px !important;
  padding:11px 16px !important;
  border-radius:13px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  margin:6px 6px 6px 0 !important;
  white-space:normal !important;
  text-align:center !important;
  opacity:1 !important;
  visibility:visible !important;
  text-decoration:none !important;
}
.push-actions-safe-section .push-action-old-hidden{
  display:inline-flex !important;
  visibility:visible !important;
}
html body .push-action-visible-primary{
  background:#2563eb !important;
  background-color:#2563eb !important;
  border-color:#1d4ed8 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .push-action-visible-primary:hover,
html body .push-action-visible-primary:focus{
  background:#1d4ed8 !important;
  background-color:#1d4ed8 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .push-action-visible-danger{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .push-action-visible-danger:hover,
html body .push-action-visible-danger:focus{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .push-action-visible-neutral{
  background:#f8fafc !important;
  background-color:#f8fafc !important;
  border:1px solid #dbe5f2 !important;
  color:#10254a !important;
  -webkit-text-fill-color:#10254a !important;
}
html body .push-action-visible-neutral:hover,
html body .push-action-visible-neutral:focus{
  background:#eaf2ff !important;
  background-color:#eaf2ff !important;
  color:#10254a !important;
  -webkit-text-fill-color:#10254a !important;
}
@media (max-width: 760px){
  .push-actions-safe-section form,
  .push-actions-safe-section a.btn,
  .push-actions-safe-section button.btn,
  .push-actions-safe-section button,
  .push-actions-safe-section input[type="submit"],
  .push-action-visible-btn{
    width:100% !important;
    margin:5px 0 !important;
  }
}


/* GLOBAL FIX: disabled/light buttons must stay readable */
html body button:disabled,
html body button[disabled],
html body .btn:disabled,
html body .btn[disabled],
html body input[type="submit"]:disabled,
html body input[type="button"]:disabled,
html body input[type="reset"]:disabled,
html body .btn.disabled,
html body .disabled.btn,
html body a.btn.disabled,
html body a.btn[aria-disabled="true"]{
  background:#f1f5f9 !important;
  background-color:#f1f5f9 !important;
  background-image:none !important;
  border-color:#dbe5f2 !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  opacity:1 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
  text-shadow:none !important;
}

/* Disabled delete/danger buttons: readable red text, not white on pale background */
html body button:disabled.btn-danger,
html body button[disabled].btn-danger,
html body .btn-danger:disabled,
html body .btn-danger[disabled],
html body .btn-danger.disabled,
html body .danger:disabled,
html body .danger[disabled],
html body .btn-delete:disabled,
html body .btn-delete[disabled],
html body .delete-btn:disabled,
html body .delete-btn[disabled],
html body button:disabled[name*="delete"],
html body button[disabled][name*="delete"],
html body button:disabled[class*="delete"],
html body button[disabled][class*="delete"],
html body a.btn.disabled.btn-danger{
  background:#fee2e2 !important;
  background-color:#fee2e2 !important;
  background-image:none !important;
  border-color:#fecaca !important;
  color:#991b1b !important;
  -webkit-text-fill-color:#991b1b !important;
  opacity:1 !important;
}

/* Bulgarian delete text fallback, applied by runtime class */
html body .btn-disabled-delete-readable,
html body .btn-disabled-delete-readable:disabled,
html body .btn-disabled-delete-readable[disabled]{
  background:#fee2e2 !important;
  background-color:#fee2e2 !important;
  border-color:#fecaca !important;
  color:#991b1b !important;
  -webkit-text-fill-color:#991b1b !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}

/* Active blue buttons must stay white */
html body .btn-primary:not(:disabled):not([disabled]),
html body .btn-blue:not(:disabled):not([disabled]),
html body .primary:not(:disabled):not([disabled]),
html body button.btn-primary:not(:disabled):not([disabled]),
html body a.btn-primary:not(.disabled):not([aria-disabled="true"]){
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* car_records.php: delete button is always burgundy/red */
html body.car-records-page button.car-record-delete-btn,
html body.car-records-page a.car-record-delete-btn,
html body.car-records-page input.car-record-delete-btn,
html body button.car-record-delete-btn,
html body a.car-record-delete-btn,
html body input.car-record-delete-btn{
  background:#7f1d1d !important;
  background-color:#7f1d1d !important;
  background-image:none !important;
  border-color:#7f1d1d !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  box-shadow:none !important;
  text-shadow:none !important;
}

html body.car-records-page button.car-record-delete-btn:hover,
html body.car-records-page a.car-record-delete-btn:hover,
html body.car-records-page input.car-record-delete-btn:hover,
html body button.car-record-delete-btn:hover,
html body a.car-record-delete-btn:hover,
html body input.car-record-delete-btn:hover,
html body.car-records-page button.car-record-delete-btn:focus,
html body.car-records-page a.car-record-delete-btn:focus,
html body.car-records-page input.car-record-delete-btn:focus,
html body button.car-record-delete-btn:focus,
html body a.car-record-delete-btn:focus,
html body input.car-record-delete-btn:focus{
  background:#991b1b !important;
  background-color:#991b1b !important;
  border-color:#7f1d1d !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Even disabled delete buttons in car_records must remain burgundy, not pale */
html body.car-records-page button.car-record-delete-btn:disabled,
html body.car-records-page button.car-record-delete-btn[disabled],
html body.car-records-page a.car-record-delete-btn.disabled,
html body.car-records-page a.car-record-delete-btn[aria-disabled="true"],
html body.car-records-page input.car-record-delete-btn:disabled,
html body.car-records-page input.car-record-delete-btn[disabled],
html body button.car-record-delete-btn:disabled,
html body button.car-record-delete-btn[disabled],
html body a.car-record-delete-btn.disabled,
html body a.car-record-delete-btn[aria-disabled="true"],
html body input.car-record-delete-btn:disabled,
html body input.car-record-delete-btn[disabled]{
  background:#7f1d1d !important;
  background-color:#7f1d1d !important;
  background-image:none !important;
  border-color:#7f1d1d !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}


/* ADMIN TOOL PAGES FIX: remove decorative circle/badge overlay from tool stat cards */
html body .admin-tool-card .stat,
html body .admin-tool-card .admin-tool-stat,
html body .admin-tool-page-card .stat,
html body .admin-tool-page-card .admin-tool-stat,
html body .admin-tool-stat{
  position:relative !important;
  overflow:hidden !important;
  display:block !important;
  min-height:112px !important;
  padding:20px 22px !important;
  background:#ffffff !important;
  border:1px solid #dbe5f2 !important;
  border-radius:18px !important;
}

/* Kill global decorative pseudo-elements that overlap numbers/text */
html body .admin-tool-card .stat::before,
html body .admin-tool-card .stat::after,
html body .admin-tool-card .admin-tool-stat::before,
html body .admin-tool-card .admin-tool-stat::after,
html body .admin-tool-page-card .stat::before,
html body .admin-tool-page-card .stat::after,
html body .admin-tool-page-card .admin-tool-stat::before,
html body .admin-tool-page-card .admin-tool-stat::after,
html body .admin-tool-stat::before,
html body .admin-tool-stat::after{
  content:none !important;
  display:none !important;
  opacity:0 !important;
  visibility:hidden !important;
  width:0 !important;
  height:0 !important;
}

/* Hide empty decorative circles/icons only inside admin tool stat cards */
html body .admin-tool-card .stat > .icon,
html body .admin-tool-card .stat > .stat-icon,
html body .admin-tool-card .stat > .circle,
html body .admin-tool-card .stat > .avatar,
html body .admin-tool-card .stat > .badge-icon,
html body .admin-tool-card .admin-tool-stat > .icon,
html body .admin-tool-card .admin-tool-stat > .stat-icon,
html body .admin-tool-card .admin-tool-stat > .circle,
html body .admin-tool-card .admin-tool-stat > .avatar,
html body .admin-tool-card .admin-tool-stat > .badge-icon{
  display:none !important;
}

/* Tool stat text layout */
html body .admin-tool-stat-label,
html body .admin-tool-card .stat .muted,
html body .admin-tool-card .stat .admin-tool-stat-label,
html body .admin-tool-page-card .stat .muted{
  display:block !important;
  position:relative !important;
  z-index:2 !important;
  color:#667899 !important;
  font-size:14px !important;
  line-height:1.35 !important;
  margin:0 0 12px 0 !important;
  padding:0 !important;
  text-align:left !important;
  white-space:normal !important;
}

html body .admin-tool-stat-value,
html body .admin-tool-card .stat .n,
html body .admin-tool-card .stat .admin-tool-stat-value,
html body .admin-tool-page-card .stat .n{
  display:block !important;
  position:relative !important;
  z-index:2 !important;
  color:#1d5bd8 !important;
  -webkit-text-fill-color:#1d5bd8 !important;
  font-size:34px !important;
  font-weight:900 !important;
  line-height:1.05 !important;
  margin:0 0 8px 0 !important;
  padding:0 !important;
  text-align:left !important;
  transform:none !important;
}

html body .admin-tool-stat-pill,
html body .admin-tool-card .stat .pill,
html body .admin-tool-page-card .stat .pill{
  position:relative !important;
  z-index:2 !important;
  display:inline-block !important;
  margin-top:4px !important;
}

/* Prevent old dashboard icon circle if represented as first empty child */
html body .admin-tool-card .stat > *:empty,
html body .admin-tool-page-card .stat > *:empty{
  display:none !important;
}


/* 20260527 Mobile auth/login header softening */
@media (max-width: 760px){
  body.auth-login-mobile-soft,
  body.auth-logout-clean-password{
    background:#f3f7fc !important;
  }

  body.auth-login-mobile-soft .sidebar,
  body.auth-login-mobile-soft aside,
  body.auth-login-mobile-soft .app-sidebar{
    min-height:auto !important;
    height:auto !important;
    max-height:210px !important;
    padding:20px 18px !important;
    border-radius:0 0 26px 26px !important;
    box-shadow:0 10px 26px rgba(15, 45, 95, .18) !important;
    margin-bottom:18px !important;
  }

  body.auth-login-mobile-soft .sidebar nav,
  body.auth-login-mobile-soft aside nav,
  body.auth-login-mobile-soft .sidebar .menu,
  body.auth-login-mobile-soft .app-sidebar .menu{
    display:none !important;
  }

  body.auth-login-mobile-soft .sidebar .logo,
  body.auth-login-mobile-soft aside .logo,
  body.auth-login-mobile-soft .app-logo,
  body.auth-login-mobile-soft .brand{
    transform:scale(.86) !important;
    transform-origin:left center !important;
    margin-bottom:10px !important;
  }

  body.auth-login-mobile-soft .sidebar footer,
  body.auth-login-mobile-soft .sidebar .sidebar-footer,
  body.auth-login-mobile-soft aside footer,
  body.auth-login-mobile-soft .help-link{
    font-size:13px !important;
    opacity:.95 !important;
  }

  body.auth-login-mobile-soft .login-card,
  body.auth-login-mobile-soft .auth-card,
  body.auth-login-mobile-soft form.login-form,
  body.auth-login-mobile-soft main .card{
    margin-top:14px !important;
    border-radius:26px !important;
    box-shadow:0 14px 34px rgba(15,45,95,.10) !important;
  }

  body.auth-login-mobile-soft h1{
    font-size:32px !important;
    line-height:1.15 !important;
  }

  body.auth-login-mobile-soft input,
  body.auth-logout-clean-password input{
    font-size:16px !important;
  }
}

/* 20260527 Device notification toggle buttons */
html body .notification-disable-btn,
html body button.notification-disable-btn,
html body a.notification-disable-btn{
  background:#dc2626 !important;
  background-color:#dc2626 !important;
  border-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}
html body .notification-disable-btn:hover,
html body button.notification-disable-btn:hover,
html body a.notification-disable-btn:hover{
  background:#b91c1c !important;
  background-color:#b91c1c !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
html body .notification-device-toggle-fixed.btn-primary{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* 20260527 HARD MOBILE LOGIN COMPACT OVERRIDE */
@media (max-width: 760px){
  body.login-mobile-compact .sidebar,
  body.login-mobile-compact aside,
  body.login-mobile-compact .app-sidebar,
  body.login-mobile-compact .left-sidebar,
  body.login-mobile-compact .auth-sidebar{
    width:100% !important;
    min-height:86px !important;
    height:86px !important;
    max-height:86px !important;
    padding:14px 18px !important;
    margin:0 0 14px 0 !important;
    border-radius:0 0 22px 22px !important;
    overflow:hidden !important;
  }

  body.login-mobile-compact .sidebar nav,
  body.login-mobile-compact aside nav,
  body.login-mobile-compact .app-sidebar nav,
  body.login-mobile-compact .sidebar-footer,
  body.login-mobile-compact .sidebar footer,
  body.login-mobile-compact aside footer,
  body.login-mobile-compact .help-link,
  body.login-mobile-compact .copyright{
    display:none !important;
  }

  body.login-mobile-compact main,
  body.login-mobile-compact .main,
  body.login-mobile-compact .content,
  body.login-mobile-compact .page-content,
  body.login-mobile-compact .auth-content{
    margin:0 !important;
    padding:10px 14px 24px 14px !important;
  }

  body.login-mobile-compact .login-card,
  body.login-mobile-compact .auth-card,
  body.login-mobile-compact main > .card{
    margin-top:0 !important;
    border-radius:26px !important;
    padding:26px 22px !important;
  }
}


/* 20260527 final login compact + no-password-suggest */
input.no-browser-password-suggest{
  -webkit-text-security: disc;
}
@media (max-width: 760px){
  body.login-mobile-compact .sidebar,
  body.login-mobile-compact aside,
  body.login-mobile-compact .app-sidebar,
  body.login-mobile-compact .left-sidebar,
  body.login-mobile-compact .auth-sidebar{
    min-height:72px !important;
    height:72px !important;
    max-height:72px !important;
    overflow:hidden !important;
    border-radius:0 0 18px 18px !important;
  }
  body.login-mobile-compact .sidebar nav,
  body.login-mobile-compact aside nav,
  body.login-mobile-compact .sidebar-footer,
  body.login-mobile-compact aside footer,
  body.login-mobile-compact .help-link,
  body.login-mobile-compact .copyright,
  body.login-mobile-compact .support-link{
    display:none !important;
  }
}


/* 20260527 masked visible auth fields + mobile login hide bar */
.masked-password-field{
  -webkit-text-security: disc !important;
  text-security: disc !important;
}
@media (max-width: 760px){
  body.login-mobile-compact .sidebar,
  body.login-mobile-compact aside,
  body.login-mobile-compact .app-sidebar,
  body.login-mobile-compact .left-sidebar,
  body.login-mobile-compact .auth-sidebar,
  body.login-mobile-compact .mobile-sidebar{
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    visibility:hidden !important;
    overflow:hidden !important;
  }
  body.login-mobile-compact main,
  body.login-mobile-compact .main,
  body.login-mobile-compact .content,
  body.login-mobile-compact .auth-content,
  body.login-mobile-compact .page-content{
    margin:0 !important;
    padding-top:18px !important;
  }
}


/* 20260527 final auth brand panel hidden on mobile login */
@media (max-width: 760px){
  body.login-mobile-compact .auth-brand-panel{
    display:none !important;
    width:0 !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    overflow:hidden !important;
    visibility:hidden !important;
  }
  body.login-mobile-compact .auth-layout{
    display:block !important;
  }
  body.login-mobile-compact .auth-stage{
    width:100% !important;
    padding:18px 14px 24px 14px !important;
  }
}


/* 20260528 PWA install notice */
.pwa-install-notice{
  position:fixed !important;
  left:14px !important;
  right:14px !important;
  bottom:14px !important;
  z-index:99999 !important;
  background:#ffffff !important;
  border:1px solid #dbe5f2 !important;
  border-radius:18px !important;
  box-shadow:0 16px 42px rgba(15,45,95,.20) !important;
  padding:16px !important;
  color:#10254a !important;
}
.pwa-install-title{
  font-weight:900 !important;
  font-size:15px !important;
  margin-bottom:6px !important;
}
.pwa-install-text{
  font-size:14px !important;
  color:#52647f !important;
  line-height:1.35 !important;
}
.pwa-install-actions{
  display:flex !important;
  gap:8px !important;
  margin-top:12px !important;
}
.pwa-install-actions button{
  flex:1 !important;
  border:0 !important;
  border-radius:12px !important;
  padding:11px 12px !important;
  font-weight:800 !important;
}
#pwaInstallBtn{
  background:#2563eb !important;
  color:#fff !important;
}
#pwaInstallClose{
  background:#eef2f7 !important;
  color:#10254a !important;
}
@media (min-width: 780px){
  .pwa-install-notice{
    max-width:440px !important;
    left:auto !important;
  }
}


/* 20260528 PWA install notice with never-show option */
.pwa-install-notice{
  position:fixed !important;
  left:14px !important;
  right:14px !important;
  bottom:14px !important;
  z-index:99999 !important;
  background:#ffffff !important;
  border:1px solid #dbe5f2 !important;
  border-radius:18px !important;
  box-shadow:0 16px 42px rgba(15,45,95,.20) !important;
  padding:16px !important;
  color:#10254a !important;
}
.pwa-install-title{
  font-weight:900 !important;
  font-size:15px !important;
  margin-bottom:6px !important;
}
.pwa-install-text,
.pwa-install-hint{
  font-size:14px !important;
  color:#52647f !important;
  line-height:1.35 !important;
  margin-top:6px !important;
}
.pwa-install-hint{
  background:#f3f7fc !important;
  border:1px solid #dbe5f2 !important;
  border-radius:12px !important;
  padding:10px !important;
}
.pwa-install-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
  margin-top:12px !important;
}
.pwa-install-actions button{
  border:0 !important;
  border-radius:12px !important;
  padding:11px 12px !important;
  font-weight:800 !important;
}
#pwaInstallBtn{
  grid-column:1 / -1 !important;
  background:#2563eb !important;
  color:#fff !important;
}
#pwaInstallClose{
  background:#eef2f7 !important;
  color:#10254a !important;
}
#pwaInstallNever{
  background:#fee2e2 !important;
  color:#991b1b !important;
}
.pwa-install-settings-card{
  margin-top:18px !important;
}
.pwa-install-settings-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
}
.pwa-install-settings-actions .btn{
  min-height:44px !important;
}
@media (min-width: 780px){
  .pwa-install-notice{
    max-width:460px !important;
    left:auto !important;
  }
}
@media (max-width: 760px){
  .pwa-install-settings-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
}


/* 20260528 iPhone push check card */
.iphone-push-check-card{
  margin-top:18px !important;
}
.iphone-push-check-card .pwa-install-settings-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
}
@media (max-width: 760px){
  .iphone-push-check-card .pwa-install-settings-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
  .iphone-push-check-card .btn{
    width:100% !important;
    text-align:center !important;
  }
}


/* 20260601 iPhone push check user-friendly mode */
.iphone-check-page .iphone-help-box{
  margin-top:18px !important;
  background:#f8fafc !important;
  border:1px solid #dbe5f2 !important;
  border-radius:18px !important;
  padding:16px !important;
}
.iphone-check-page .iphone-help-box h2{
  margin-top:0 !important;
}
.iphone-check-page .iphone-help-box ol{
  padding-left:22px !important;
  line-height:1.55 !important;
}
.iphone-check-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  margin-top:18px !important;
}
.iphone-check-actions .btn{
  min-height:44px !important;
}
.iphone-check-actions .btn.disabled,
.iphone-check-actions button:disabled{
  opacity:.65 !important;
  cursor:not-allowed !important;
  background:#94a3b8 !important;
  color:#fff !important;
}
.iphone-debug-details{
  margin-top:18px !important;
}
.iphone-debug-details summary{
  cursor:pointer !important;
  font-weight:800 !important;
  color:#10254a !important;
}
.iphone-debug-details pre{
  white-space:pre-wrap !important;
  background:#0f172a !important;
  color:#e5e7eb !important;
  padding:14px !important;
  border-radius:12px !important;
  overflow:auto !important;
  max-height:360px !important;
}
@media (max-width: 760px){
  .iphone-check-page{
    padding:18px !important;
  }
  .iphone-check-page h1{
    font-size:28px !important;
    line-height:1.15 !important;
  }
  .iphone-check-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  .iphone-check-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
  .iphone-check-actions .btn{
    width:100% !important;
    text-align:center !important;
  }
}


/* 20260601 admin iOS health robust table */
.table-wrap table td small{
  color:#64748b !important;
}
.stat-card strong{
  font-size:28px;
}


/* 20260601 admin push test center */
.push-test-form{
  max-width:720px !important;
}
.push-test-form select,
.push-test-form input{
  width:100% !important;
}
@media (max-width:760px){
  .push-test-form .btn{
    width:100% !important;
  }
}


/* 20260601 push tests in notifications admin only */
.admin-push-test-menu-card,
.iphone-push-check-card{
  margin-top:18px !important;
}
.admin-push-test-actions,
.iphone-push-check-card .pwa-install-settings-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
}
@media (max-width:760px){
  .admin-push-test-actions,
  .iphone-push-check-card .pwa-install-settings-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
  .admin-push-test-actions .btn,
  .iphone-push-check-card .btn{
    width:100% !important;
    text-align:center !important;
  }
}


/* 20260601 mobile PWA install banner buttons visibility fix */
@media (max-width: 760px){
  .pwa-install-banner,
  .pwa-install-prompt,
  .install-app-banner,
  .add-to-home-banner,
  #pwaInstallBanner,
  #installAppBanner,
  #addToHomeBanner{
    left:12px !important;
    right:12px !important;
    bottom:calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    width:auto !important;
    max-width:calc(100vw - 24px) !important;
    box-sizing:border-box !important;
    padding:14px !important;
    border-radius:18px !important;
    overflow:visible !important;
    z-index:9998 !important;
  }

  .pwa-install-banner .banner-actions,
  .pwa-install-banner .pwa-install-actions,
  .pwa-install-banner .actions,
  .pwa-install-prompt .banner-actions,
  .pwa-install-prompt .pwa-install-actions,
  .pwa-install-prompt .actions,
  .install-app-banner .banner-actions,
  .install-app-banner .pwa-install-actions,
  .install-app-banner .actions,
  .add-to-home-banner .banner-actions,
  .add-to-home-banner .pwa-install-actions,
  .add-to-home-banner .actions,
  #pwaInstallBanner .banner-actions,
  #pwaInstallBanner .pwa-install-actions,
  #pwaInstallBanner .actions,
  #installAppBanner .banner-actions,
  #installAppBanner .pwa-install-actions,
  #installAppBanner .actions,
  #addToHomeBanner .banner-actions,
  #addToHomeBanner .pwa-install-actions,
  #addToHomeBanner .actions{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) !important;
    gap:10px !important;
    width:100% !important;
    min-width:0 !important;
    flex:1 1 100% !important;
  }

  .pwa-install-banner button,
  .pwa-install-banner .btn,
  .pwa-install-banner a,
  .pwa-install-prompt button,
  .pwa-install-prompt .btn,
  .pwa-install-prompt a,
  .install-app-banner button,
  .install-app-banner .btn,
  .install-app-banner a,
  .add-to-home-banner button,
  .add-to-home-banner .btn,
  .add-to-home-banner a,
  #pwaInstallBanner button,
  #pwaInstallBanner .btn,
  #pwaInstallBanner a,
  #installAppBanner button,
  #installAppBanner .btn,
  #installAppBanner a,
  #addToHomeBanner button,
  #addToHomeBanner .btn,
  #addToHomeBanner a{
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    justify-content:center !important;
    text-align:center !important;
    padding-left:12px !important;
    padding-right:12px !important;
    font-size:16px !important;
    line-height:1.15 !important;
    min-height:48px !important;
  }

  .pwa-install-banner .banner-content,
  .pwa-install-banner .content,
  .pwa-install-prompt .banner-content,
  .pwa-install-prompt .content,
  .install-app-banner .banner-content,
  .install-app-banner .content,
  .add-to-home-banner .banner-content,
  .add-to-home-banner .content,
  #pwaInstallBanner .banner-content,
  #pwaInstallBanner .content,
  #installAppBanner .banner-content,
  #installAppBanner .content,
  #addToHomeBanner .banner-content,
  #addToHomeBanner .content{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    width:100% !important;
    min-width:0 !important;
  }

  .pwa-install-banner h3,
  .pwa-install-banner strong,
  .pwa-install-prompt h3,
  .pwa-install-prompt strong,
  .install-app-banner h3,
  .install-app-banner strong,
  .add-to-home-banner h3,
  .add-to-home-banner strong,
  #pwaInstallBanner h3,
  #pwaInstallBanner strong,
  #installAppBanner h3,
  #installAppBanner strong,
  #addToHomeBanner h3,
  #addToHomeBanner strong{
    font-size:18px !important;
    line-height:1.15 !important;
  }

  .pwa-install-banner p,
  .pwa-install-prompt p,
  .install-app-banner p,
  .add-to-home-banner p,
  #pwaInstallBanner p,
  #installAppBanner p,
  #addToHomeBanner p{
    font-size:15px !important;
    line-height:1.25 !important;
    margin-bottom:0 !important;
  }

  body.has-pwa-install-banner{
    padding-bottom:150px !important;
  }
}

@media (max-width: 390px){
  .pwa-install-banner .banner-actions,
  .pwa-install-banner .pwa-install-actions,
  .pwa-install-banner .actions,
  .pwa-install-prompt .banner-actions,
  .pwa-install-prompt .pwa-install-actions,
  .pwa-install-prompt .actions,
  .install-app-banner .banner-actions,
  .install-app-banner .pwa-install-actions,
  .install-app-banner .actions,
  .add-to-home-banner .banner-actions,
  .add-to-home-banner .pwa-install-actions,
  .add-to-home-banner .actions,
  #pwaInstallBanner .banner-actions,
  #pwaInstallBanner .pwa-install-actions,
  #pwaInstallBanner .actions,
  #installAppBanner .banner-actions,
  #installAppBanner .pwa-install-actions,
  #installAppBanner .actions,
  #addToHomeBanner .banner-actions,
  #addToHomeBanner .pwa-install-actions,
  #addToHomeBanner .actions{
    grid-template-columns:1fr !important;
  }
}


/* 20260601 admin global logout all devices */
.admin-global-logout-card{
  margin-top:18px !important;
}
.btn-danger,
button.btn-danger,
a.btn-danger{
  background:#b91c1c !important;
  color:#fff !important;
  border-color:#991b1b !important;
}
.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover{
  background:#991b1b !important;
  color:#fff !important;
}
@media (max-width:760px){
  .admin-global-logout-card .admin-push-test-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
  .admin-global-logout-card .btn{
    width:100% !important;
    text-align:center !important;
  }
}


/* 20260601 PWA banner loop fix safety */
@media (max-width: 760px){
  body.has-pwa-install-banner{
    padding-bottom:150px !important;
  }
}


/* 20260601 AVTO notification guard modal */
.avto-notification-guard-modal{
  position:fixed !important;
  inset:0 !important;
  z-index:10050 !important;
  background:rgba(15,23,42,.42) !important;
  padding:18px !important;
  overflow:auto !important;
}
.avto-notification-guard-box{
  max-width:680px !important;
  margin:70px auto 20px auto !important;
  background:#fff !important;
  border:1px solid #dbe5f2 !important;
  border-radius:24px !important;
  box-shadow:0 24px 70px rgba(15,45,95,.24) !important;
  padding:22px 58px 22px 22px !important;
  display:flex !important;
  gap:16px !important;
  align-items:flex-start !important;
  position:relative !important;
}
.avto-notification-guard-icon{
  width:58px !important;
  min-width:58px !important;
  height:58px !important;
  border-radius:18px !important;
  background:#eff6ff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:34px !important;
}
.avto-notification-guard-content h2{
  margin:0 0 8px 0 !important;
  color:#10254a !important;
  font-size:26px !important;
  line-height:1.15 !important;
}
.avto-notification-guard-content p{
  margin:0 0 14px 0 !important;
  color:#475569 !important;
  line-height:1.45 !important;
}
.avto-notification-guard-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
}
.avto-notification-guard-close{
  position:absolute !important;
  right:14px !important;
  top:12px !important;
  width:36px !important;
  height:36px !important;
  border-radius:12px !important;
  border:1px solid #dbe5f2 !important;
  background:#fff !important;
  color:#10254a !important;
  font-size:24px !important;
  line-height:1 !important;
  cursor:pointer !important;
}
.avto-notification-guard-close:hover{
  background:#f1f5f9 !important;
}
.avto-notification-guard-status{
  margin-top:12px !important;
  font-weight:800 !important;
  color:#64748b !important;
}
.avto-notification-guard-status.is-ok{
  color:#15803d !important;
}
.avto-notification-guard-status.is-bad{
  color:#b91c1c !important;
}
.avto-notification-guard-actions button:disabled{
  opacity:.6 !important;
  cursor:not-allowed !important;
}
@media (max-width:760px){
  .avto-notification-guard-modal{
    padding:12px !important;
  }
  .avto-notification-guard-box{
    margin:40px auto 20px auto !important;
    display:block !important;
    padding:20px !important;
    border-radius:22px !important;
  }
  .avto-notification-guard-icon{
    margin-bottom:12px !important;
  }
  .avto-notification-guard-content h2{
    font-size:24px !important;
    padding-right:38px !important;
  }
  .avto-notification-guard-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
  .avto-notification-guard-actions .btn,
  .avto-notification-guard-actions button{
    width:100% !important;
    text-align:center !important;
  }
}


/* 20260601 admin logout all visible and notified */
.admin-logout-all-direct-card{
  border:2px solid #fecaca !important;
  background:#fff7f7 !important;
  margin-bottom:18px !important;
}
.admin-logout-all-direct-card h2,
.admin-logout-all-main-card h1{
  color:#7f1d1d !important;
}
.admin-logout-all-big-btn{
  font-size:16px !important;
  font-weight:900 !important;
  min-height:48px !important;
  padding:14px 18px !important;
}
.btn-danger,
button.btn-danger,
a.btn-danger{
  background:#b91c1c !important;
  color:#fff !important;
  border-color:#991b1b !important;
}
.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover{
  background:#991b1b !important;
  color:#fff !important;
}
@media (max-width:760px){
  .admin-logout-all-direct-card .btn,
  .admin-logout-all-main-card .btn{
    width:100% !important;
    margin-bottom:8px !important;
    text-align:center !important;
  }
}


/* 20260601 maintenance force logout logic */
.admin-maintenance-direct-card,
.admin-maintenance-card{
  border:2px solid #fed7aa !important;
  background:#fff7ed !important;
  margin-bottom:18px !important;
}
.maintenance-card{
  max-width:760px !important;
  margin:40px auto !important;
  text-align:center !important;
}
.maintenance-icon{
  width:78px !important;
  height:78px !important;
  border-radius:24px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#fff7ed !important;
  font-size:42px !important;
  margin:0 auto 18px auto !important;
}
.maintenance-card h1{
  color:#10254a !important;
}
@media (max-width:760px){
  .admin-maintenance-direct-card .btn,
  .admin-maintenance-card .btn,
  .maintenance-card .btn{
    width:100% !important;
    text-align:center !important;
    margin-bottom:8px !important;
  }
}
