:root{--bg:#f3f6fb;--card:#fff;--text:#162033;--muted:#667085;--line:#d9e2ef;--primary:#1f5eff;--primary2:#0f3fb5;--success:#0f8a4b;--warning:#b76b00;--danger:#bd1e2d;--shadow:0 16px 40px rgba(20,40,80,.10);--radius:18px}*{box-sizing:border-box}body{margin:0;font-family:Arial,"Segoe UI",sans-serif;background:linear-gradient(135deg,#eef4ff,#f7fafc 45%,#eef7f1);color:var(--text)}.topbar{position:sticky;top:0;z-index:5;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{display:flex;align-items:center;gap:12px;min-width:250px}.logo{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#e8efff;font-size:23px}.brand-title{font-weight:800;font-size:18px}.brand-subtitle{font-size:12px;color:var(--muted);margin-top:2px}.nav{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.nav a,.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;border:0;border-radius:12px;padding:10px 13px;background:#edf2ff;color:#14316d;font-weight:700;cursor:pointer;font-size:14px}.nav a:hover,.btn:hover{background:#dfe8ff}.btn-primary,input[type=submit],button[type=submit]{background:var(--primary);color:#fff}.btn-primary:hover,input[type=submit]:hover,button[type=submit]:hover{background:var(--primary2)}.btn-danger{background:#feecef;color:#9d1020}.page{width:min(1180px,calc(100% - 28px));margin:24px auto}.hero{display:grid;grid-template-columns:1.3fr .7fr;gap:18px;margin-bottom:18px}.card{background:var(--card);border:1px solid rgba(217,226,239,.9);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px}.card h1,.card h2,.card h3{margin-top:0}.muted{color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.stat{padding:18px;border-radius:16px;background:#f7f9ff;border:1px solid var(--line)}.stat b{font-size:30px;display:block;margin-top:8px}.form{display:grid;gap:14px}.form-row{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}label{font-weight:700;font-size:14px}input,select,textarea{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:11px 12px;background:#fff;color:var(--text);font-size:15px}input:focus,select:focus,textarea:focus{outline:3px solid rgba(31,94,255,.12);border-color:var(--primary)}input[type=submit],button[type=submit]{border:0;border-radius:12px;padding:12px 14px;font-weight:800;cursor:pointer}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:#fff}table{width:100%;border-collapse:collapse;min-width:760px}th,td{padding:12px 13px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;background:#f6f8fc;color:#475467}tr:hover td{background:#fbfdff}.badge{display:inline-flex;padding:5px 10px;border-radius:999px;font-weight:800;font-size:12px}.badge.success{background:#e8f7ee;color:var(--success)}.badge.warning{background:#fff3df;color:var(--warning)}.badge.danger{background:#fde9ec;color:var(--danger)}.badge.muted{background:#eef2f6;color:#475467}.alert{border-radius:14px;padding:13px 14px;margin:12px 0;font-weight:700}.alert.success{background:#e8f7ee;color:var(--success)}.alert.warning{background:#fff3df;color:var(--warning)}.alert.danger{background:#fde9ec;color:var(--danger)}.quick-actions{display:flex;flex-wrap:wrap;gap:10px}.footer{text-align:center;color:var(--muted);padding:24px}.actions{display:flex;gap:8px;flex-wrap:wrap}.searchbox{display:flex;gap:10px}.searchbox input{text-transform:uppercase}.small{font-size:12px;color:var(--muted)}@media(max-width:900px){.topbar{align-items:flex-start;flex-direction:column}.nav{justify-content:flex-start}.hero,.grid,.grid-2,.form-row{grid-template-columns:1fr}.page{width:min(100% - 18px,1180px);margin-top:12px}.card{padding:16px}.nav a{font-size:13px;padding:9px 10px}table{min-width:680px}}@media(max-width:560px){.brand-subtitle{display:none}.searchbox{flex-direction:column}.quick-actions .btn{width:100%}.nav{width:100%;display:grid;grid-template-columns:1fr 1fr}.nav a{max-width:none}.topbar{padding:12px}.table-wrap{margin-left:-6px;margin-right:-6px;border-radius:12px}}
.login-wrap{display:grid;place-items:center;min-height:calc(100vh - 170px)}.login-card{width:min(520px,100%)}.public-hero{display:grid;place-items:center;margin:34px 0}.public-search-card{width:min(820px,100%);text-align:center}.public-search-card h1{font-size:clamp(28px,5vw,48px);line-height:1.05}.big-search{max-width:640px;margin:22px auto 8px}.big-search input{font-size:20px;text-align:center;font-weight:800;letter-spacing:.04em}.mini-stats{grid-template-columns:repeat(2,1fr)}@media(max-width:900px){.mini-stats{grid-template-columns:1fr}.public-search-card{text-align:left}.big-search input{text-align:left}}

.installment-public-box{margin-top:18px;padding:18px;border-radius:16px;background:#fbfcff;border:1px solid var(--line)}.installment-public-box h3{margin:0 0 12px}.installment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.installment-list .installment-item:only-child{grid-column:1/-1}.installment-item{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff}.installment-item strong{display:block}.installment-item .small{display:block;margin-top:3px}.installment-item .badge{white-space:nowrap}@media(max-width:760px){.installment-list{grid-template-columns:1fr}.installment-item{align-items:flex-start;flex-direction:column}.installment-item .badge{width:100%;justify-content:center;white-space:normal}}

.record-mini{margin:4px 0;padding:6px 8px;border-radius:10px;background:#f7f9ff;border:1px solid var(--line);display:flex;gap:8px;align-items:center;justify-content:space-between}.small a{color:var(--primary);font-weight:700}.login-card a{color:var(--primary);font-weight:700}

.public-action-box{margin-top:16px;display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:center}.public-action-box .alert{margin:0;width:100%}@media(max-width:560px){.public-action-box{align-items:stretch}.public-action-box .btn{width:100%}}
.record-installments-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:420px}.record-installment-card{border:1px solid var(--line);background:#fff;border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:7px}.installment-pay-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.installment-pay-form input[type=text]{min-width:160px;flex:1;padding:8px 9px;border:1px solid var(--line);border-radius:10px}.btn-small{padding:7px 10px;font-size:13px}.record-installment-card form{margin:0}@media(max-width:760px){.record-installments-grid{grid-template-columns:1fr;min-width:0}.installment-pay-form{display:block}.installment-pay-form input[type=text],.installment-pay-form button{width:100%;margin-top:6px}}
.radio-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.radio-card{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px;cursor:pointer}.radio-card input{width:auto;margin-top:3px}.radio-card small{display:block;color:var(--muted);font-weight:400;margin-top:3px}.tax-summary{display:flex;gap:10px;flex-wrap:wrap;align-items:center}@media(max-width:760px){.radio-grid{grid-template-columns:1fr}}
.tax-filter-form{margin:14px 0 4px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fbfcff}.pagination-block{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:14px}.pagination-form{margin:0}.pagination-info{font-weight:800;color:var(--muted)}button[disabled],.btn[disabled]{opacity:.45;cursor:not-allowed}@media(max-width:560px){.pagination-block{align-items:stretch}.pagination-form,.pagination-form button,.pagination-info{width:100%;text-align:center}}

.settings-details{border:1px solid #d9e2ef;border-radius:12px;padding:12px 14px;margin:10px 0;background:#fbfdff}
.settings-details summary{cursor:pointer;font-weight:700;color:#1d3557;margin-bottom:8px}
.settings-details textarea{width:100%;min-height:120px;resize:vertical;font-family:Consolas,monospace}

.grace-warning{display:block;margin-top:7px;padding:8px 10px;border-radius:10px;background:#fde9ec;color:#9d1020;border:1px solid #f5b9c0;font-size:12px;font-weight:800;line-height:1.35}


.dashboard-hero{display:grid;grid-template-columns:1.25fr .75fr;gap:18px;margin-bottom:18px}.dashboard-welcome h1{font-size:clamp(28px,4vw,44px);line-height:1.05;margin-bottom:8px}.dashboard-title-row{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.eyebrow{margin:0 0 6px;color:var(--primary);font-weight:900;text-transform:uppercase;letter-spacing:.06em;font-size:12px}.dashboard-date{white-space:nowrap;border:1px solid var(--line);background:#f7f9ff;border-radius:14px;padding:10px 12px;font-weight:900;color:#344054}.dashboard-search{margin:18px 0 12px;max-width:720px}.dashboard-search input{text-transform:uppercase;font-weight:900;letter-spacing:.04em}.dashboard-actions{margin-top:10px}.dashboard-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.dashboard-stat-grid .stat{min-height:118px}.dashboard-stat-grid .stat span{font-size:13px;color:var(--muted);font-weight:900;text-transform:uppercase;letter-spacing:.04em}.dashboard-stat-grid .stat b{font-size:26px;line-height:1.15}.dashboard-stat-grid .stat small{color:var(--muted);font-weight:700}.stat-primary{background:#edf2ff}.stat-danger{background:#fde9ec;border-color:#f5b9c0}.dashboard-grid-main{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.dashboard-panel{min-width:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.panel-heading h2{margin:0}.panel-heading a{font-weight:900;color:var(--primary);text-decoration:none}.panel-heading.tight{margin-top:8px}.empty-state{padding:18px;border:1px dashed var(--line);border-radius:16px;background:#fbfcff;color:var(--muted);font-weight:700}.event-list{display:grid;gap:10px}.event-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:16px;background:#fbfcff;padding:12px}.event-row strong,.event-row span{display:block}.event-row span{margin-top:3px}.event-meta{display:flex;align-items:flex-end;gap:8px;flex-direction:column;text-align:right;min-width:120px}.event-list.compact .event-row{align-items:flex-start}.car-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.car-card{border:1px solid var(--line);border-radius:16px;background:#fbfcff;padding:13px}.car-card-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.car-card-top strong{font-size:18px}.car-card-top span{color:var(--muted);font-weight:700;text-align:right}.car-mini-status{display:grid;gap:4px;margin-top:10px;color:#475467;font-size:13px}.car-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.missing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.missing-item{border-radius:16px;padding:14px;border:1px solid var(--line);background:#f7f9ff;text-align:center}.missing-item b{display:block;font-size:28px}.missing-item span{font-weight:900;color:var(--muted)}.missing-item.warn{background:#fff3df;border-color:#ffd7a3}.missing-item.ok{background:#e8f7ee;border-color:#bfe6ce}.soft-line{border:0;border-top:1px solid var(--line);margin:18px 0}.tax-mini-list{display:grid;gap:8px}.tax-mini-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--line);background:#fbfcff;border-radius:14px;padding:10px}.tax-mini-row span{display:block;color:var(--muted);font-size:12px;margin-top:2px}@media(max-width:980px){.dashboard-hero,.dashboard-grid-main{grid-template-columns:1fr}.dashboard-stat-grid{grid-template-columns:repeat(4,1fr)}}@media(max-width:760px){.dashboard-title-row,.event-row,.car-card-top{flex-direction:column;align-items:flex-start}.dashboard-date{white-space:normal}.dashboard-stat-grid,.car-card-grid,.missing-grid{grid-template-columns:1fr}.event-meta{align-items:flex-start;text-align:left;width:100%}.event-meta .badge,.event-meta .btn{width:100%;justify-content:center}.dashboard-search{flex-direction:column}.dashboard-actions .btn{width:100%}}



/* Mobile perfection pack */
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{overflow-x:hidden}
a,button,input,select,textarea{touch-action:manipulation}
input,select,textarea,.btn,.nav a{min-height:44px}
.btn,.nav a{padding:11px 14px}
input,select,textarea{font-size:16px}
.card,.stat,.car-card,.event-row,.tax-mini-row,.missing-item{min-width:0}
.table-wrap{-webkit-overflow-scrolling:touch}
.nav-toggle{display:none;border:0;background:#edf2ff;color:#14316d;border-radius:12px;padding:11px 14px;font-weight:800;cursor:pointer;min-height:44px}
.topbar-right{display:flex;align-items:center;gap:12px;justify-content:flex-end;min-width:0;flex:1}
@media(max-width:900px){
  .topbar{position:sticky;top:0;padding:12px 14px;z-index:50}
  .topbar-right{width:100%;display:block}
  .nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:100%;margin-top:8px}
  .nav{display:none;width:100%;margin-top:10px;grid-template-columns:1fr 1fr;gap:8px}
  .nav.nav-open{display:grid}
  .nav a{width:100%;min-width:0;text-align:center}
}
@media(max-width:560px){
  .nav{grid-template-columns:1fr}
  .brand{min-width:0;align-items:flex-start}
  .brand-title{font-size:17px;line-height:1.15}
  .brand-subtitle{display:block;font-size:11px;line-height:1.25}
  .logo{width:40px;height:40px;font-size:20px;border-radius:12px}
  .page{width:calc(100% - 12px);margin:10px auto 18px}
  .card{padding:14px;border-radius:16px}
  .card h1{font-size:24px}
  .card h2{font-size:20px}
  .card h3{font-size:17px}
  .quick-actions,.actions,.car-card-actions,.installment-pay-form,.tax-summary{display:grid;grid-template-columns:1fr;gap:8px}
  .quick-actions .btn,.actions .btn,.car-card-actions .btn,.installment-pay-form .btn,.installment-pay-form button,.installment-pay-form input,.tax-summary .btn{width:100%}
  .dashboard-title-row,.panel-heading{flex-direction:column;align-items:flex-start}
  .dashboard-date{white-space:normal;width:100%}
  .dashboard-hero,.dashboard-grid-main,.dashboard-stat-grid,.car-card-grid,.missing-grid,.event-grid,.admin-grid{grid-template-columns:1fr !important}
  .event-row,.tax-mini-row{align-items:flex-start;gap:10px}
  .event-meta{width:100%;align-items:flex-start}
  .public-search-card h1,.dashboard-welcome h1{font-size:24px}
  .big-search input,.dashboard-search input{text-align:left;font-size:18px}
  .login-wrap{min-height:auto;padding-top:10px}
  .table-wrap{margin:0;border-radius:14px;border:0;background:transparent;overflow:visible}
  table.table-mobile-ready, .table-mobile-ready thead, .table-mobile-ready tbody, .table-mobile-ready th, .table-mobile-ready td, .table-mobile-ready tr{display:block}
  .table-mobile-ready thead{display:none}
  .table-mobile-ready{min-width:0 !important;border-collapse:separate;border-spacing:0 10px}
  .table-mobile-ready tbody{display:block}
  .table-mobile-ready tr{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:8px 10px}
  .table-mobile-ready td{border:0;border-bottom:1px solid #eef2f6;padding:10px 0 10px 108px;position:relative;min-height:38px;background:transparent !important;white-space:normal}
  .table-mobile-ready td:last-child{border-bottom:0;padding-bottom:4px}
  .table-mobile-ready td::before{content:attr(data-label);position:absolute;left:0;top:10px;width:94px;font-size:11px;line-height:1.25;text-transform:uppercase;letter-spacing:.04em;color:#667085;font-weight:900}
  .table-mobile-ready td.actions,.table-mobile-ready td:last-child{padding-left:0}
  .table-mobile-ready td.actions::before,.table-mobile-ready td:last-child::before{position:static;display:block;width:auto;margin-bottom:8px}
  .table-mobile-ready td.actions .btn,.table-mobile-ready td:last-child .btn{width:100%}
}

.inline-post-form{display:inline-flex;margin:0}.inline-post-form button{width:auto}.actions .inline-post-form,.quick-actions .inline-post-form,.car-card-actions .inline-post-form{display:inline-flex}@media(max-width:560px){.inline-post-form,.inline-post-form button{width:100%}.actions .inline-post-form,.quick-actions .inline-post-form,.car-card-actions .inline-post-form{display:flex;width:100%}}

.is-standalone-pwa .topbar{padding-top:max(12px,env(safe-area-inset-top))}
[data-pwa-notification-box]{border-color:#bcd0ff;background:linear-gradient(180deg,#fff,#f6f9ff)}

@supports (padding: max(0px)) {
  body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}
}
[data-ios-only][style*="display: none"]{display:none}


/* Mobile-only PWA install banner */
.pwa-install-banner{display:none}
@media(max-width:760px){
  .pwa-install-banner-visible{
    position:fixed;
    left:10px;
    right:10px;
    bottom:max(10px,env(safe-area-inset-bottom));
    z-index:80;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:12px;
    background:#ffffff;
    border:1px solid #bcd0ff;
    border-radius:18px;
    box-shadow:0 18px 44px rgba(20,40,80,.22);
  }
  .pwa-install-banner strong{
    display:block;
    font-size:14px;
    line-height:1.2;
  }
  .pwa-install-banner span{
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:12px;
    line-height:1.25;
  }
  .pwa-install-actions{
    display:grid;
    gap:6px;
    min-width:96px;
  }
  .pwa-install-actions .btn{
    width:100%;
    padding:9px 10px;
    min-height:38px;
    font-size:13px;
  }
  body:not(.is-standalone-pwa){padding-bottom:92px}
}

.checkline{display:flex;align-items:center;gap:10px;font-weight:800;border:1px solid var(--line);background:#fbfcff;border-radius:14px;padding:12px;cursor:pointer}
.checkline input{width:auto;min-height:auto}

.dashboard-installment-filter{margin:10px 0 14px;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fbfcff}
.dashboard-installment-filter .searchbox{align-items:end}
@media(max-width:760px){.dashboard-installment-filter .searchbox{display:grid;grid-template-columns:1fr}.dashboard-installment-filter button{width:100%}}

.device-notification-box{border:1px solid var(--line);background:#fbfcff;border-radius:16px;padding:14px;margin-top:12px}
[data-device-notification-status]{font-weight:800}

.inline-admin-access-form{display:grid;grid-template-columns:minmax(160px,1fr) auto;gap:8px;align-items:center;margin:0}
.inline-admin-access-form input{min-width:160px}
@media(max-width:760px){.inline-admin-access-form{grid-template-columns:1fr}.inline-admin-access-form button,.inline-admin-access-form input{width:100%}}

.admin-notification-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.admin-notification-actions .inline-post-form{display:inline-flex;margin:0}
.admin-notification-actions button{height:44px;white-space:nowrap}
@media(max-width:760px){
  .admin-notification-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .admin-notification-actions .inline-post-form,.admin-notification-actions button{width:100%}
}

[data-pwa-ack-panel]{margin-top:10px}
[data-pwa-ack-panel] .event-row{border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff}

.dashboard-notification-setup{margin:18px 0;border-color:#bcd0ff;background:linear-gradient(180deg,#fff,#f6f9ff)}
.dashboard-notification-setup .panel-heading{align-items:flex-start}
.dashboard-ack-short{margin-top:12px}
.dashboard-ack-short h3{margin:0 0 8px}
.dashboard-notification-setup [data-pwa-ack-panel] .event-list{margin-top:8px}
.dashboard-notification-setup [data-pwa-ack-panel] .event-row{background:#fff}
@media(max-width:760px){
  .dashboard-notification-setup{margin:12px 0}
  .dashboard-notification-setup .quick-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .dashboard-notification-setup .quick-actions .btn,
  .dashboard-notification-setup .quick-actions button{width:100%}
}


/* Align car card action buttons */
.car-card-grid{align-items:stretch}
.car-card{display:flex;flex-direction:column;height:100%}
.car-card-top{min-height:58px}
.car-mini-status{flex:1}
.car-card-actions{margin-top:auto;display:flex;align-items:center;gap:8px}
.car-card-actions .inline-post-form{display:flex}
.car-card-actions .btn,
.car-card-actions button{min-height:40px;display:inline-flex;align-items:center;justify-content:center}
@media(max-width:560px){
  .car-card-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .car-card-actions .inline-post-form,
  .car-card-actions .btn,
  .car-card-actions button{width:100%}
}


/* Extra spacing between car status text and action buttons */
.car-mini-status{margin-bottom:14px}
.car-card-actions{padding-top:10px;border-top:1px solid rgba(148,163,184,.22)}
@media(max-width:560px){
  .car-mini-status{margin-bottom:12px}
  .car-card-actions{padding-top:10px}
}


/* Tighter spacing between car model and status lines */
.car-card-top{margin-bottom:6px}
.car-card-top strong{margin-bottom:2px}
.car-mini-status{margin-top:4px;gap:3px}
.car-mini-status span{line-height:1.28}


/* Position nearest events above cars */
.dashboard-events-above-cars{margin-top:18px}
.dashboard-events-above-cars .dashboard-panel{min-height:auto}
@media(max-width:760px){
  .dashboard-events-above-cars{margin-top:12px}
}


/* Priority active notifications block */
.dashboard-notification-priority{
  position:relative;
  margin:18px 0 18px;
  border:2px solid #f97316;
  background:
    radial-gradient(circle at top right, rgba(249,115,22,.16), transparent 34%),
    linear-gradient(180deg,#fff7ed,#ffffff);
  box-shadow:0 18px 44px rgba(249,115,22,.18);
}
.dashboard-notification-priority::before{
  content:"ВАЖНО";
  position:absolute;
  top:-12px;
  right:18px;
  background:#f97316;
  color:#fff;
  font-weight:900;
  font-size:12px;
  letter-spacing:.08em;
  padding:5px 10px;
  border-radius:999px;
  box-shadow:0 8px 22px rgba(249,115,22,.25);
}
.dashboard-notification-priority h2{
  color:#9a3412;
  font-size:24px;
}
.dashboard-notification-priority .panel-heading > span.badge{
  background:#fff;
  border:1px solid #fed7aa;
  color:#9a3412;
}
.dashboard-notification-priority .quick-actions{
  padding:12px;
  background:rgba(255,255,255,.7);
  border:1px solid #fed7aa;
  border-radius:16px;
}
.dashboard-notification-priority [data-pwa-ack-panel]{
  padding:12px;
  background:#fff;
  border:1px dashed #fb923c;
  border-radius:16px;
}
.dashboard-notification-priority [data-pwa-ack-panel] .empty-state{
  background:#fff7ed;
  border-color:#fed7aa;
}
.dashboard-notification-priority [data-pwa-ack-panel] .event-row{
  border-color:#fdba74;
  box-shadow:0 10px 28px rgba(249,115,22,.10);
}
@media(max-width:760px){
  .dashboard-notification-priority{margin:12px 0 16px}
  .dashboard-notification-priority::before{right:12px}
  .dashboard-notification-priority h2{font-size:21px}
}


/* Conditional active notifications top block */
.dashboard-notification-hidden{display:none !important}
.notification-device-settings{
  margin-top:12px;
  border-top:1px solid #fed7aa;
  padding-top:10px;
}
.notification-device-settings summary{
  cursor:pointer;
  font-weight:900;
  color:#9a3412;
  list-style:none;
}
.notification-device-settings summary::-webkit-details-marker{display:none}
.notification-device-settings summary::after{
  content:" +";
  font-weight:900;
}
.notification-device-settings[open] summary::after{
  content:" –";
}
.dashboard-notification-priority [data-pwa-ack-panel] .event-row{
  animation:notifyPulse .8s ease-out 1;
}
@keyframes notifyPulse{
  from{transform:translateY(-4px);box-shadow:0 0 0 4px rgba(249,115,22,.25)}
  to{transform:translateY(0);box-shadow:0 10px 28px rgba(249,115,22,.10)}
}


/* Global back button */
.global-back-wrap{
  width:min(1180px,calc(100% - 32px));
  margin:12px auto 0;
  display:flex;
  justify-content:flex-start;
}
.global-back-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:10px 14px;
  border:1px solid #d7deea;
  border-radius:999px;
  background:#ffffff;
  color:#14316d;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(20,40,80,.08);
}
.global-back-btn span:first-child{
  font-size:20px;
  line-height:1;
}
.global-back-btn:hover{
  background:#edf2ff;
}
.is-standalone-pwa .global-back-wrap{
  position:sticky;
  top:70px;
  z-index:40;
}
@media(max-width:760px){
  .global-back-wrap{
    width:calc(100% - 16px);
    margin:8px auto 0;
  }
  .global-back-btn{
    width:auto;
    min-height:44px;
    padding:10px 14px;
  }
}


/* Mobile-only reliable back button */
.global-back-wrap,.global-back-btn{display:none!important}
.mobile-back-btn{display:none}
@media(max-width:900px){
  .mobile-back-btn{
    position:fixed;
    left:12px;
    bottom:max(14px,env(safe-area-inset-bottom));
    z-index:120;
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:48px;
    padding:12px 16px;
    border:2px solid #ffffff;
    border-radius:999px;
    background:#14316d;
    color:#ffffff;
    font-weight:900;
    text-decoration:none;
    box-shadow:0 16px 38px rgba(20,49,109,.35);
  }
  .mobile-back-btn span:first-child{
    font-size:24px;
    line-height:1;
  }
  .mobile-back-btn:active{
    transform:translateY(1px);
  }
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
}


/* Final dashboard order fixes */
.dashboard-events-above-cars-full{
  margin:18px 0 0;
}
.dashboard-events-above-cars-full .dashboard-panel{
  width:100%;
  min-height:auto;
}
.dashboard-events-above-cars-full + .dashboard-grid-main{
  margin-top:18px;
}
.dashboard-notification-hidden{
  display:none !important;
}
@media(max-width:900px){
  .mobile-back-btn{
    display:inline-flex !important;
    opacity:1 !important;
    visibility:visible !important;
  }
}
@media(min-width:901px){
  .mobile-back-btn{
    display:none !important;
  }
}


/* Force nearest events before installments */
.dashboard-events-before-installments{
  margin:18px 0;
}
.dashboard-events-before-installments .dashboard-panel{
  width:100%;
  min-height:auto;
}
.dashboard-events-before-installments + .dashboard-grid-main{
  margin-top:0;
}
@media(max-width:760px){
  .dashboard-events-before-installments{margin:12px 0}
}


/* Installments moved into missing section */
.missing-installments-box{
  margin:0 0 16px;
  padding:14px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#fbfcff;
}
.missing-installments-box .panel-heading{
  margin-bottom:10px;
}
.missing-installments-box h3{
  margin:0;
  font-size:18px;
}
.missing-installments-box .dashboard-installment-filter{
  margin:8px 0 12px;
}
@media(max-width:760px){
  .missing-installments-box{
    padding:12px;
    margin-bottom:14px;
  }
}


/* Close button for installments box */
.missing-installments-box .panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.btn-light{
  background:#ffffff;
  color:#475467;
  border:1px solid #d0d5dd;
}
.btn-light:hover{
  background:#f2f4f7;
}
@media(max-width:560px){
  .missing-installments-box .panel-heading{
    align-items:flex-start;
  }
  .missing-installments-box .panel-heading .btn{
    width:auto;
    min-width:96px;
  }
}


/* Fixed close button for installments */
.missing-installments-box .btn-light{
  flex:0 0 auto;
  white-space:nowrap;
}


/* GO installment result area */
.installments-go-result{
  margin-top:12px;
}
.installments-go-result[style*="display:none"]{
  margin-top:0;
}


/* Force hide GO installment result after close */
.installments-go-result.is-closed{
  display:none !important;
}


/* Better scroll restore target spacing */
[data-scroll-anchor],
.card,
section{
  scroll-margin-top:96px;
}
@media(max-width:900px){
  [data-scroll-anchor],
  .card,
  section{
    scroll-margin-top:82px;
  }
}


/* Stable anchor target for GO installments */
#installmentsGoBox{
  scroll-margin-top:110px;
}
@media(max-width:900px){
  #installmentsGoBox{
    scroll-margin-top:92px;
  }
}


/* FINAL MOBILE UX PACK 2026 */
html{
  -webkit-text-size-adjust:100%;
}
body{
  overflow-x:hidden;
}
*{
  box-sizing:border-box;
}
img,svg,video{
  max-width:100%;
}
input,select,textarea,button{
  font-size:16px;
}
input,select,textarea{
  max-width:100%;
}
button,.btn,a.btn,input[type="submit"]{
  touch-action:manipulation;
}
.page{
  max-width:1180px;
}

/* Better global touch targets */
@media(max-width:900px){
  body{
    background:#f3f6fb;
  }

  .topbar{
    position:sticky;
    top:0;
    z-index:100;
    padding:10px 12px;
    gap:8px;
    box-shadow:0 10px 28px rgba(20,40,80,.10);
  }

  .brand{
    min-width:0;
    gap:9px;
  }

  .brand-title{
    font-size:16px;
    line-height:1.15;
    white-space:normal;
  }

  .brand-subtitle{
    display:block;
    font-size:11px;
    line-height:1.15;
  }

  .logo{
    width:38px;
    height:38px;
    min-width:38px;
    border-radius:12px;
    font-size:19px;
  }

  .nav-toggle{
    display:inline-flex !important;
    width:100%;
    justify-content:center;
    align-items:center;
    min-height:44px;
    border-radius:14px;
    font-weight:900;
  }

  .nav{
    display:none;
    width:100%;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:8px;
  }

  .nav.nav-open{
    display:grid;
  }

  .nav a{
    width:100%;
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    border-radius:12px;
    padding:10px 8px;
    font-size:13px;
  }

  .topbar-right{
    flex:1;
    min-width:120px;
  }

  .page{
    width:calc(100% - 14px);
    margin:10px auto 20px;
    padding-bottom:84px;
  }

  .card{
    border-radius:18px;
    padding:14px;
    margin-bottom:12px;
  }

  .card h1{
    font-size:24px;
    line-height:1.15;
  }

  .card h2{
    font-size:20px;
    line-height:1.2;
  }

  .card h3{
    font-size:17px;
    line-height:1.2;
  }

  .muted,.small{
    line-height:1.35;
  }

  .quick-actions,
  .dashboard-actions,
  .actions,
  .car-card-actions,
  .admin-notification-actions{
    display:grid !important;
    grid-template-columns:1fr;
    gap:8px;
  }

  .quick-actions .btn,
  .quick-actions button,
  .dashboard-actions .btn,
  .actions .btn,
  .actions button,
  .car-card-actions .btn,
  .car-card-actions button,
  .admin-notification-actions button{
    width:100%;
    min-height:44px;
    justify-content:center;
  }

  .searchbox{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .searchbox input,
  .searchbox select,
  .searchbox button{
    width:100%;
    min-height:46px;
  }

  .form{
    display:grid;
    gap:10px;
  }

  .form .grid,
  .form-grid,
  .admin-grid,
  .dashboard-grid-main,
  .dashboard-hero,
  .dashboard-stat-grid,
  .car-card-grid,
  .missing-grid{
    grid-template-columns:1fr !important;
  }

  .dashboard-title-row,
  .panel-heading{
    flex-direction:column;
    align-items:flex-start !important;
    gap:8px;
  }

  .panel-heading .badge,
  .panel-heading a,
  .panel-heading button{
    align-self:flex-start;
  }

  .dashboard-date{
    width:100%;
    white-space:normal;
  }

  .dashboard-search{
    margin-top:12px;
  }

  .stat{
    min-height:84px;
  }

  .dashboard-notification-priority{
    margin-top:10px;
  }

  .dashboard-notification-priority::before{
    top:-10px;
    right:12px;
    font-size:11px;
  }

  .notification-device-settings .quick-actions{
    padding-top:8px;
  }

  .dashboard-events-before-installments,
  .dashboard-events-above-cars-full{
    margin:12px 0;
  }

  .event-list,
  .tax-mini-list{
    display:grid;
    gap:9px;
  }

  .event-row,
  .tax-mini-row{
    display:grid !important;
    grid-template-columns:1fr;
    gap:8px;
    align-items:start;
    padding:12px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
  }

  .event-row strong,
  .tax-mini-row strong{
    font-size:15px;
    line-height:1.25;
  }

  .event-row span,
  .tax-mini-row span{
    line-height:1.25;
  }

  .event-meta{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
    align-items:start;
  }

  .event-meta .badge,
  .event-meta .btn,
  .event-meta button{
    width:100%;
    justify-content:center;
    text-align:center;
  }

  .missing-installments-box{
    padding:12px;
    border-radius:16px;
  }

  .missing-installments-box .panel-heading{
    display:grid;
    grid-template-columns:1fr;
  }

  .missing-installments-box .panel-heading .btn,
  .missing-installments-box .panel-heading button{
    width:100%;
  }

  .dashboard-installment-filter{
    padding:10px;
  }

  .installments-go-result{
    margin-top:10px;
  }

  .car-card{
    padding:13px;
    border-radius:17px;
  }

  .car-card-top{
    min-height:unset;
    margin-bottom:4px;
  }

  .car-card-top strong{
    font-size:20px;
    line-height:1.1;
  }

  .car-card-top span{
    font-size:14px;
    line-height:1.2;
  }

  .car-mini-status{
    margin-top:5px;
    margin-bottom:12px;
    gap:3px;
  }

  .car-mini-status span{
    font-size:13px;
    line-height:1.28;
  }

  .car-card-actions{
    padding-top:10px;
    border-top:1px solid rgba(148,163,184,.24);
  }

  /* Tables become mobile cards */
  .table-wrap{
    overflow:visible;
    border:0;
    background:transparent;
  }

  table.table-mobile-ready,
  .table-mobile-ready thead,
  .table-mobile-ready tbody,
  .table-mobile-ready th,
  .table-mobile-ready td,
  .table-mobile-ready tr{
    display:block;
  }

  .table-mobile-ready{
    width:100%;
    min-width:0 !important;
    border-collapse:separate;
    border-spacing:0 10px;
  }

  .table-mobile-ready thead{
    display:none;
  }

  .table-mobile-ready tr{
    margin-bottom:10px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    box-shadow:0 10px 24px rgba(20,40,80,.07);
    overflow:hidden;
  }

  .table-mobile-ready td{
    position:relative;
    min-height:40px;
    border:0 !important;
    border-bottom:1px solid #edf1f7 !important;
    padding:10px 10px 10px 116px !important;
    white-space:normal !important;
    word-break:break-word;
    background:transparent !important;
  }

  .table-mobile-ready td:last-child{
    border-bottom:0 !important;
  }

  .table-mobile-ready td::before{
    content:attr(data-label);
    position:absolute;
    left:10px;
    top:10px;
    width:96px;
    color:#667085;
    font-size:11px;
    line-height:1.2;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
  }

  .table-mobile-ready td.actions,
  .table-mobile-ready td:last-child{
    padding-left:10px !important;
  }

  .table-mobile-ready td.actions::before,
  .table-mobile-ready td:last-child::before{
    position:static;
    display:block;
    width:auto;
    margin-bottom:7px;
  }

  .table-mobile-ready td .btn,
  .table-mobile-ready td button,
  .table-mobile-ready td .inline-post-form{
    width:100%;
  }

  .inline-post-form{
    width:100%;
  }

  /* Mobile back button is prominent and above install banner */
  .mobile-back-btn{
    display:inline-flex !important;
    position:fixed !important;
    left:12px !important;
    bottom:max(14px, env(safe-area-inset-bottom)) !important;
    z-index:160 !important;
    min-height:50px !important;
    padding:12px 16px !important;
    background:#0b1838 !important;
    color:#fff !important;
    border:2px solid #fff !important;
    border-radius:999px !important;
    font-weight:900 !important;
    box-shadow:0 18px 44px rgba(11,24,56,.38) !important;
  }

  .pwa-install-banner-visible{
    bottom:max(74px, calc(env(safe-area-inset-bottom) + 74px)) !important;
  }
}

@media(max-width:520px){
  .nav.nav-open{
    grid-template-columns:1fr;
  }

  .page{
    width:calc(100% - 10px);
  }

  .card{
    padding:12px;
    border-radius:16px;
  }

  .dashboard-stat-grid{
    gap:8px;
  }

  .stat{
    padding:12px;
  }

  .stat b{
    font-size:24px;
  }

  .public-search-card h1,
  .dashboard-welcome h1{
    font-size:23px;
  }

  .big-search input,
  .dashboard-search input{
    text-align:left;
    font-size:18px;
  }

  .table-mobile-ready td{
    padding-left:104px !important;
  }

  .table-mobile-ready td::before{
    width:88px;
  }
}

/* Desktop must not show mobile back */
@media(min-width:901px){
  .mobile-back-btn{
    display:none !important;
  }
}


/* MOBILE 1:1 DESKTOP LAYOUT OVERRIDE */
@media(max-width:900px){
  html,body{
    overflow-x:auto !important;
  }

  body{
    min-width:1180px;
    padding-bottom:0 !important;
  }

  .page{
    width:1180px !important;
    max-width:1180px !important;
    margin:18px auto 40px !important;
    padding-bottom:40px !important;
  }

  .topbar{
    position:sticky;
    top:0;
    z-index:100;
    width:1180px;
    max-width:1180px;
    margin:0 auto;
    flex-wrap:nowrap !important;
    padding:14px 18px !important;
  }

  .brand{
    min-width:auto !important;
  }

  .brand-title{
    white-space:nowrap !important;
    font-size:18px !important;
  }

  .brand-subtitle{
    display:block !important;
  }

  .logo{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
  }

  .nav-toggle{
    display:none !important;
  }

  .nav{
    display:flex !important;
    width:auto !important;
    grid-template-columns:none !important;
    gap:8px !important;
    margin-top:0 !important;
  }

  .nav a{
    width:auto !important;
    min-height:auto !important;
    display:inline-flex !important;
    padding:8px 10px !important;
    font-size:14px !important;
    white-space:nowrap !important;
  }

  .card{
    padding:20px !important;
    border-radius:22px !important;
    margin-bottom:18px !important;
  }

  .card h1{
    font-size:34px !important;
  }

  .card h2{
    font-size:24px !important;
  }

  .card h3{
    font-size:19px !important;
  }

  .dashboard-hero{
    display:grid !important;
    grid-template-columns:1.4fr .9fr !important;
    gap:18px !important;
  }

  .dashboard-title-row,
  .panel-heading{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
  }

  .dashboard-stat-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .dashboard-grid-main{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:18px !important;
  }

  .dashboard-events-before-installments,
  .dashboard-events-above-cars-full,
  .dashboard-events-above-cars{
    display:block !important;
    margin:18px 0 !important;
  }

  .dashboard-events-before-installments .dashboard-panel,
  .dashboard-events-above-cars-full .dashboard-panel,
  .dashboard-events-above-cars .dashboard-panel{
    width:100% !important;
  }

  .quick-actions,
  .dashboard-actions,
  .actions,
  .car-card-actions,
  .admin-notification-actions{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:10px !important;
    flex-wrap:wrap !important;
  }

  .quick-actions .btn,
  .quick-actions button,
  .dashboard-actions .btn,
  .actions .btn,
  .actions button,
  .car-card-actions .btn,
  .car-card-actions button,
  .admin-notification-actions button{
    width:auto !important;
    min-height:40px !important;
  }

  .searchbox{
    display:flex !important;
    grid-template-columns:none !important;
    align-items:center !important;
    gap:10px !important;
  }

  .searchbox input,
  .searchbox select{
    width:auto !important;
    flex:1 1 auto !important;
    min-height:42px !important;
  }

  .searchbox button{
    width:auto !important;
    min-height:42px !important;
    flex:0 0 auto !important;
  }

  .form .grid,
  .form-grid,
  .admin-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:14px !important;
  }

  .car-card-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:14px !important;
  }

  .missing-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .event-row,
  .tax-mini-row{
    display:flex !important;
    grid-template-columns:none !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    padding:12px 0 !important;
    border:0 !important;
    border-bottom:1px solid var(--line) !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  .event-meta{
    width:auto !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:8px !important;
  }

  .event-meta .badge,
  .event-meta .btn,
  .event-meta button{
    width:auto !important;
  }

  .missing-installments-box .panel-heading{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
  }

  .missing-installments-box .panel-heading .btn,
  .missing-installments-box .panel-heading button{
    width:auto !important;
  }

  .dashboard-installment-filter .searchbox{
    display:flex !important;
  }

  .car-card{
    padding:16px !important;
    border-radius:18px !important;
  }

  .car-card-top{
    min-height:58px !important;
  }

  .car-card-top strong{
    font-size:20px !important;
  }

  .car-card-actions{
    display:flex !important;
    flex-direction:row !important;
    gap:8px !important;
  }

  .car-card-actions .inline-post-form{
    width:auto !important;
  }

  .car-card-actions .btn,
  .car-card-actions button{
    width:auto !important;
  }

  .table-wrap{
    overflow-x:auto !important;
    border:1px solid var(--line) !important;
    background:#fff !important;
  }

  table,
  table.table-mobile-ready,
  .table-mobile-ready thead,
  .table-mobile-ready tbody,
  .table-mobile-ready th,
  .table-mobile-ready td,
  .table-mobile-ready tr{
    display:revert !important;
  }

  table,
  .table-mobile-ready{
    width:100% !important;
    min-width:900px !important;
    border-collapse:collapse !important;
    border-spacing:0 !important;
  }

  .table-mobile-ready thead{
    display:table-header-group !important;
  }

  .table-mobile-ready tr{
    display:table-row !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:transparent !important;
    overflow:visible !important;
  }

  .table-mobile-ready th,
  .table-mobile-ready td{
    display:table-cell !important;
    position:static !important;
    padding:10px !important;
    border-bottom:1px solid var(--line) !important;
    white-space:normal !important;
  }

  .table-mobile-ready td::before{
    display:none !important;
    content:none !important;
  }

  .inline-post-form{
    width:auto !important;
  }

  .mobile-back-btn{
    display:inline-flex !important;
    position:fixed !important;
    left:16px !important;
    bottom:16px !important;
    z-index:160 !important;
  }

  .pwa-install-banner-visible{
    left:16px !important;
    right:auto !important;
    width:420px !important;
    bottom:78px !important;
  }
}

/* On very small screens keep same desktop canvas, user scrolls horizontally */
@media(max-width:520px){
  body{
    min-width:1180px !important;
  }
  .page,
  .topbar{
    width:1180px !important;
    max-width:1180px !important;
  }
}


/* FINAL RESPONSIVE MOBILE + TABLET FIX 2026
   Overrides the previous 1:1 desktop mobile mode. */
@media(max-width:1100px){
  html,body{
    overflow-x:hidden !important;
  }

  body{
    min-width:0 !important;
  }

  .page,
  .topbar{
    width:min(100% - 20px, 980px) !important;
    max-width:980px !important;
    min-width:0 !important;
  }

  .topbar{
    position:sticky !important;
    top:0 !important;
    z-index:100 !important;
    margin:0 auto !important;
    flex-wrap:wrap !important;
    gap:10px !important;
    padding:12px !important;
  }

  .brand{
    min-width:0 !important;
  }

  .brand-title{
    white-space:normal !important;
    line-height:1.15 !important;
  }

  .nav-toggle{
    display:inline-flex !important;
    min-height:42px !important;
    border-radius:12px !important;
    font-weight:900 !important;
  }

  .nav{
    display:none !important;
    width:100% !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    margin-top:8px !important;
  }

  .nav.nav-open{
    display:grid !important;
  }

  .nav a{
    width:100% !important;
    min-height:40px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    white-space:normal !important;
    padding:9px 8px !important;
  }

  .card{
    padding:16px !important;
    border-radius:18px !important;
  }

  .dashboard-hero{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  .dashboard-stat-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .dashboard-grid-main{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  .car-card-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .missing-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .dashboard-title-row,
  .panel-heading{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    flex-wrap:wrap !important;
  }

  .searchbox{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:8px !important;
    align-items:end !important;
  }

  .dashboard-search{
    grid-template-columns:1fr auto !important;
  }

  .quick-actions,
  .dashboard-actions,
  .actions,
  .admin-notification-actions{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:8px !important;
  }

  .quick-actions .btn,
  .quick-actions button,
  .dashboard-actions .btn,
  .actions .btn,
  .actions button{
    width:auto !important;
    min-height:42px !important;
  }

  .event-row,
  .tax-mini-row{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:10px !important;
    align-items:center !important;
    padding:10px 0 !important;
    border-bottom:1px solid var(--line) !important;
  }

  .event-meta{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:flex-end !important;
    gap:7px !important;
  }

  .table-wrap{
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  table{
    min-width:760px !important;
  }

  .mobile-back-btn{
    display:inline-flex !important;
    position:fixed !important;
    left:12px !important;
    bottom:max(12px, env(safe-area-inset-bottom)) !important;
    z-index:160 !important;
  }
}

@media(max-width:760px){
  .page,
  .topbar{
    width:calc(100% - 12px) !important;
    max-width:none !important;
  }

  .topbar{
    padding:10px !important;
  }

  .brand-title{
    font-size:16px !important;
  }

  .brand-subtitle{
    font-size:11px !important;
  }

  .logo{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
  }

  .nav{
    grid-template-columns:1fr 1fr !important;
  }

  .page{
    margin:10px auto 24px !important;
    padding-bottom:78px !important;
  }

  .card{
    padding:13px !important;
    border-radius:16px !important;
    margin-bottom:12px !important;
  }

  .card h1{
    font-size:24px !important;
    line-height:1.15 !important;
  }

  .card h2{
    font-size:20px !important;
    line-height:1.2 !important;
  }

  .dashboard-stat-grid,
  .car-card-grid,
  .missing-grid{
    grid-template-columns:1fr !important;
  }

  .dashboard-title-row,
  .panel-heading{
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .searchbox,
  .dashboard-search,
  .dashboard-installment-filter .searchbox{
    grid-template-columns:1fr !important;
  }

  .searchbox input,
  .searchbox select,
  .searchbox button{
    width:100% !important;
    min-height:46px !important;
  }

  .quick-actions,
  .dashboard-actions,
  .actions,
  .admin-notification-actions,
  .car-card-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .quick-actions .btn,
  .quick-actions button,
  .dashboard-actions .btn,
  .actions .btn,
  .actions button,
  .car-card-actions .btn,
  .car-card-actions button{
    width:100% !important;
    justify-content:center !important;
  }

  .event-row,
  .tax-mini-row{
    grid-template-columns:1fr !important;
    padding:12px !important;
    border:1px solid var(--line) !important;
    border-radius:14px !important;
    background:#fff !important;
  }

  .event-meta{
    justify-content:stretch !important;
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .event-meta .badge,
  .event-meta .btn,
  .event-meta button{
    width:100% !important;
    justify-content:center !important;
    text-align:center !important;
  }

  .missing-installments-box{
    padding:12px !important;
  }

  .car-card-top{
    min-height:0 !important;
  }

  .car-card-actions{
    margin-top:12px !important;
  }

  table{
    min-width:720px !important;
  }

  .pwa-install-banner-visible{
    left:10px !important;
    right:10px !important;
    width:auto !important;
    bottom:max(72px, calc(env(safe-area-inset-bottom) + 72px)) !important;
  }
}

@media(max-width:420px){
  .nav{
    grid-template-columns:1fr !important;
  }

  .brand-subtitle{
    display:none !important;
  }

  .card h1{
    font-size:22px !important;
  }
}

/* Cancel previous desktop-canvas mobile mode */
@media(max-width:900px){
  body{
    min-width:0 !important;
  }
  .mobile-desktop-mode body{
    min-width:0 !important;
  }
}


/* Mobile: nearest events above dashboard counters */
.dashboard-events-mobile-priority{
  margin:18px 0;
}
.dashboard-events-mobile-priority .dashboard-panel{
  width:100%;
  min-height:auto;
}
@media(max-width:1100px){
  .dashboard-hero{
    display:flex !important;
    flex-direction:column !important;
  }
  .dashboard-events-mobile-priority{
    order:2;
    margin:10px 0 0 !important;
  }
  .dashboard-stat-grid{
    order:3;
  }
  .dashboard-welcome{
    order:1;
  }
}
@media(min-width:1101px){
  .dashboard-events-mobile-priority{
    margin:18px 0;
  }
}


/* Mobile/tablet: counters must be the first visible dashboard block */
@media(max-width:1100px){
  .dashboard-hero{
    display:flex !important;
    flex-direction:column !important;
  }

  .dashboard-stat-grid{
    order:1 !important;
    margin:0 0 12px !important;
  }

  .dashboard-welcome{
    order:2 !important;
  }

  .dashboard-events-mobile-priority{
    order:3 !important;
    margin:12px 0 0 !important;
  }
}

@media(max-width:760px){
  .dashboard-stat-grid{
    order:1 !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  .dashboard-stat-grid .stat{
    min-height:78px !important;
    padding:10px !important;
  }

  .dashboard-stat-grid .stat span{
    font-size:12px !important;
  }

  .dashboard-stat-grid .stat b{
    font-size:22px !important;
    line-height:1.1 !important;
  }

  .dashboard-stat-grid .stat small{
    font-size:11px !important;
    line-height:1.15 !important;
  }
}

@media(max-width:420px){
  .dashboard-stat-grid{
    grid-template-columns:1fr 1fr !important;
  }
}


/* Counters structurally above Work Dashboard */
.dashboard-hero > .dashboard-stat-grid{
  grid-column:1 / -1;
  margin-bottom:0;
}
.dashboard-hero > .dashboard-welcome{
  grid-column:1 / -1;
}
@media(max-width:1100px){
  .dashboard-hero > .dashboard-stat-grid{
    order:1 !important;
    width:100% !important;
    margin:0 0 12px !important;
  }
  .dashboard-hero > .dashboard-welcome{
    order:2 !important;
  }
  .dashboard-hero > .dashboard-events-mobile-priority{
    order:3 !important;
  }
}


/* Nearest events same width as Work Dashboard */
.dashboard-events-mobile-priority,
.dashboard-events-before-installments,
.dashboard-events-above-cars-full,
.dashboard-events-above-cars{
  max-width:100%;
}

@media(min-width:1101px){
  .dashboard-hero{
    align-items:start;
  }

  .dashboard-hero > .dashboard-welcome,
  .dashboard-hero > .dashboard-events-mobile-priority{
    grid-column:1 / 2 !important;
    width:100% !important;
  }

  .dashboard-hero > .dashboard-stat-grid{
    grid-column:1 / -1 !important;
  }

  .dashboard-events-mobile-priority{
    margin:18px 0 0 !important;
  }
}

@media(max-width:1100px){
  .dashboard-events-mobile-priority{
    width:100% !important;
  }
}


/* Work Dashboard and Nearest Events full container width */
@media(min-width:1101px){
  .dashboard-hero{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:18px !important;
  }

  .dashboard-hero > .dashboard-stat-grid{
    grid-column:1 / -1 !important;
  }

  .dashboard-hero > .dashboard-welcome{
    grid-column:1 / -1 !important;
    width:100% !important;
  }

  .dashboard-hero > .dashboard-events-mobile-priority{
    grid-column:1 / -1 !important;
    width:100% !important;
    margin:18px 0 0 !important;
  }

  .dashboard-events-mobile-priority .dashboard-panel{
    width:100% !important;
  }
}

@media(max-width:1100px){
  .dashboard-hero > .dashboard-welcome,
  .dashboard-hero > .dashboard-events-mobile-priority{
    width:100% !important;
  }
}


/* Work Dashboard and Nearest Events side by side like Cars/Missing */
@media(min-width:1101px){
  .dashboard-hero{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:18px !important;
    align-items:start !important;
  }

  .dashboard-hero > .dashboard-stat-grid{
    grid-column:1 / -1 !important;
    width:100% !important;
  }

  .dashboard-hero > .dashboard-welcome{
    grid-column:1 / 2 !important;
    width:100% !important;
    height:100% !important;
  }

  .dashboard-hero > .dashboard-events-mobile-priority{
    grid-column:2 / 3 !important;
    width:100% !important;
    margin:0 !important;
    height:100% !important;
  }

  .dashboard-events-mobile-priority .dashboard-panel{
    width:100% !important;
    height:100% !important;
    margin:0 !important;
  }
}

@media(max-width:1100px){
  .dashboard-hero{
    display:flex !important;
    flex-direction:column !important;
  }

  .dashboard-hero > .dashboard-stat-grid{
    order:1 !important;
  }

  .dashboard-hero > .dashboard-welcome{
    order:2 !important;
    width:100% !important;
  }

  .dashboard-hero > .dashboard-events-mobile-priority{
    order:3 !important;
    width:100% !important;
    margin-top:12px !important;
  }
}


/* Dashboard counters inline layout */
.dashboard-stat-grid .stat{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  min-height:58px !important;
  padding:12px 14px !important;
  text-align:left !important;
}

.dashboard-stat-grid .stat span{
  display:inline-flex !important;
  align-items:center !important;
  margin:0 !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  color:inherit !important;
  white-space:nowrap !important;
}

.dashboard-stat-grid .stat span::after{
  content:"|";
  display:inline-block;
  margin-left:10px;
  color:rgba(100,116,139,.65);
  font-weight:900;
}

.dashboard-stat-grid .stat b{
  display:inline-block !important;
  margin:0 !important;
  font-size:24px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

.dashboard-stat-grid .stat small{
  display:inline-block !important;
  margin:0 !important;
  font-size:13px !important;
  line-height:1.15 !important;
  color:var(--muted);
  white-space:nowrap !important;
}

@media(max-width:760px){
  .dashboard-stat-grid{
    grid-template-columns:1fr !important;
  }

  .dashboard-stat-grid .stat{
    min-height:50px !important;
    padding:10px 12px !important;
    gap:8px !important;
    overflow:hidden;
  }

  .dashboard-stat-grid .stat span{
    font-size:13px !important;
  }

  .dashboard-stat-grid .stat span::after{
    margin-left:8px;
  }

  .dashboard-stat-grid .stat b{
    font-size:21px !important;
  }

  .dashboard-stat-grid .stat small{
    font-size:12px !important;
    white-space:normal !important;
  }
}

@media(max-width:420px){
  .dashboard-stat-grid .stat{
    gap:7px !important;
  }

  .dashboard-stat-grid .stat span{
    min-width:84px;
  }

  .dashboard-stat-grid .stat b{
    min-width:42px;
    text-align:left;
  }
}


/* FINAL POLISHED MOBILE + TABLET DESIGN 2026 */
html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}
body{
  overflow-x:hidden;
}
*{
  box-sizing:border-box;
}
input,select,textarea,button{
  font-size:16px;
}
button,.btn,a.btn{
  touch-action:manipulation;
}

/* Tablet */
@media(max-width:1100px){
  body{
    min-width:0 !important;
    background:#f3f6fb;
  }

  .topbar{
    position:sticky !important;
    top:0;
    z-index:100;
    width:calc(100% - 20px) !important;
    max-width:980px !important;
    margin:0 auto !important;
    padding:12px !important;
    border-radius:0 0 18px 18px;
    box-shadow:0 10px 28px rgba(20,40,80,.10);
    flex-wrap:wrap !important;
    gap:10px !important;
  }

  .brand{
    min-width:0 !important;
    flex:1 1 auto;
  }

  .brand-title{
    font-size:17px !important;
    line-height:1.15 !important;
    white-space:normal !important;
  }

  .brand-subtitle{
    font-size:11px !important;
    line-height:1.15 !important;
  }

  .logo{
    width:40px !important;
    height:40px !important;
    min-width:40px !important;
    border-radius:13px !important;
  }

  .nav-toggle{
    display:inline-flex !important;
    min-height:42px !important;
    padding:9px 12px !important;
    border-radius:13px !important;
    font-weight:900 !important;
  }

  .nav{
    display:none !important;
    width:100% !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:8px !important;
    margin-top:6px !important;
  }

  .nav.nav-open{
    display:grid !important;
  }

  .nav a{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:42px !important;
    width:100% !important;
    padding:9px 8px !important;
    border-radius:12px !important;
    text-align:center !important;
    white-space:normal !important;
    line-height:1.15 !important;
  }

  .page{
    width:calc(100% - 20px) !important;
    max-width:980px !important;
    min-width:0 !important;
    margin:12px auto 28px !important;
    padding-bottom:78px !important;
  }

  .card{
    padding:16px !important;
    border-radius:18px !important;
    margin-bottom:14px !important;
  }

  .dashboard-hero{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
  }

  .dashboard-stat-grid{
    order:1 !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    margin:0 !important;
  }

  .dashboard-welcome{
    order:2 !important;
    width:100% !important;
  }

  .dashboard-events-mobile-priority{
    order:3 !important;
    width:100% !important;
    margin:0 !important;
  }

  .dashboard-grid-main{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }

  .car-card-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }

  .missing-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .dashboard-title-row,
  .panel-heading{
    display:flex !important;
    flex-direction:row !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:10px !important;
    flex-wrap:wrap !important;
  }

  .dashboard-welcome h1,
  .public-search-card h1{
    font-size:28px !important;
    line-height:1.15 !important;
  }

  .card h2{
    font-size:22px !important;
    line-height:1.2 !important;
  }

  .card h3{
    font-size:18px !important;
    line-height:1.2 !important;
  }

  .dashboard-stat-grid .stat{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:9px !important;
    min-height:56px !important;
    padding:11px 12px !important;
    overflow:hidden;
  }

  .dashboard-stat-grid .stat span{
    font-size:13px !important;
    white-space:nowrap !important;
    min-width:auto !important;
  }

  .dashboard-stat-grid .stat b{
    font-size:22px !important;
    white-space:nowrap !important;
  }

  .dashboard-stat-grid .stat small{
    font-size:12px !important;
    white-space:normal !important;
  }

  .searchbox{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:8px !important;
    align-items:end !important;
  }

  .searchbox input,
  .searchbox select{
    min-height:46px !important;
    width:100% !important;
  }

  .searchbox button{
    min-height:46px !important;
    white-space:nowrap;
  }

  .quick-actions,
  .dashboard-actions,
  .actions,
  .admin-notification-actions{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:8px !important;
  }

  .btn,
  button,
  input[type="submit"]{
    min-height:42px;
  }

  .event-list,
  .tax-mini-list{
    display:grid;
    gap:9px;
  }

  .event-row,
  .tax-mini-row{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:10px !important;
    align-items:center !important;
    padding:11px 0 !important;
    border-bottom:1px solid var(--line) !important;
  }

  .event-meta{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:flex-end !important;
    gap:7px !important;
  }

  .car-card{
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
    padding:14px !important;
    border-radius:17px !important;
  }

  .car-card-top{
    min-height:52px !important;
    margin-bottom:4px !important;
  }

  .car-card-top strong{
    font-size:19px !important;
    line-height:1.1 !important;
  }

  .car-card-top span{
    font-size:13px !important;
    line-height:1.2 !important;
  }

  .car-mini-status{
    margin-top:4px !important;
    margin-bottom:12px !important;
    gap:3px !important;
  }

  .car-mini-status span{
    font-size:13px !important;
    line-height:1.25 !important;
  }

  .car-card-actions{
    margin-top:auto !important;
    padding-top:10px !important;
    border-top:1px solid rgba(148,163,184,.24) !important;
    display:flex !important;
    gap:8px !important;
    flex-wrap:wrap !important;
  }

  .missing-installments-box{
    padding:13px !important;
    border-radius:16px !important;
  }

  .dashboard-installment-filter{
    padding:11px !important;
  }

  .installments-go-result{
    margin-top:10px !important;
  }

  .table-wrap{
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
    border-radius:14px !important;
  }

  table{
    min-width:760px !important;
  }

  .mobile-back-btn{
    display:inline-flex !important;
    position:fixed !important;
    left:12px !important;
    bottom:max(12px, env(safe-area-inset-bottom)) !important;
    z-index:180 !important;
    min-height:48px !important;
    padding:12px 15px !important;
    border-radius:999px !important;
    background:#0b1838 !important;
    color:#fff !important;
    border:2px solid #fff !important;
    box-shadow:0 18px 44px rgba(11,24,56,.38) !important;
    font-weight:900 !important;
  }
}

/* Phone */
@media(max-width:760px){
  .topbar,
  .page{
    width:calc(100% - 12px) !important;
    max-width:none !important;
  }

  .topbar{
    padding:10px !important;
  }

  .brand-title{
    font-size:16px !important;
  }

  .brand-subtitle{
    display:none !important;
  }

  .nav{
    grid-template-columns:1fr 1fr !important;
  }

  .page{
    margin:10px auto 24px !important;
  }

  .card{
    padding:13px !important;
    border-radius:16px !important;
    margin-bottom:12px !important;
  }

  .dashboard-stat-grid{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .dashboard-stat-grid .stat{
    min-height:50px !important;
    padding:10px 12px !important;
  }

  .dashboard-stat-grid .stat span{
    min-width:92px !important;
    font-size:13px !important;
  }

  .dashboard-stat-grid .stat span::after{
    margin-left:8px !important;
  }

  .dashboard-stat-grid .stat b{
    min-width:48px;
    font-size:21px !important;
  }

  .dashboard-stat-grid .stat small{
    font-size:12px !important;
  }

  .dashboard-welcome h1,
  .public-search-card h1{
    font-size:23px !important;
  }

  .card h2{
    font-size:20px !important;
  }

  .dashboard-title-row,
  .panel-heading{
    flex-direction:column !important;
    align-items:flex-start !important;
  }

  .dashboard-date{
    width:100% !important;
  }

  .searchbox,
  .dashboard-search,
  .dashboard-installment-filter .searchbox{
    grid-template-columns:1fr !important;
  }

  .searchbox button,
  .searchbox input,
  .searchbox select{
    width:100% !important;
  }

  .quick-actions,
  .dashboard-actions,
  .actions,
  .admin-notification-actions,
  .car-card-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .quick-actions .btn,
  .quick-actions button,
  .dashboard-actions .btn,
  .actions .btn,
  .actions button,
  .car-card-actions .btn,
  .car-card-actions button{
    width:100% !important;
    justify-content:center !important;
  }

  .car-card-grid,
  .missing-grid{
    grid-template-columns:1fr !important;
  }

  .event-row,
  .tax-mini-row{
    grid-template-columns:1fr !important;
    padding:12px !important;
    border:1px solid var(--line) !important;
    border-radius:14px !important;
    background:#fff !important;
  }

  .event-meta{
    display:grid !important;
    grid-template-columns:1fr !important;
    justify-content:stretch !important;
  }

  .event-meta .badge,
  .event-meta .btn,
  .event-meta button{
    width:100% !important;
    justify-content:center !important;
    text-align:center !important;
  }

  .car-card-top{
    min-height:0 !important;
  }

  table{
    min-width:720px !important;
  }

  .pwa-install-banner-visible{
    left:10px !important;
    right:10px !important;
    width:auto !important;
    bottom:max(72px, calc(env(safe-area-inset-bottom) + 72px)) !important;
  }
}

@media(max-width:420px){
  .nav{
    grid-template-columns:1fr !important;
  }

  .dashboard-stat-grid .stat{
    gap:7px !important;
  }

  .dashboard-stat-grid .stat span{
    min-width:86px !important;
  }

  .dashboard-stat-grid .stat b{
    min-width:44px !important;
  }
}


/* Full cars list mobile cards with actions under each car */
.cars-mobile-list{
  display:none;
}

@media(max-width:760px){
  .cars-table-desktop{
    display:none !important;
  }

  .cars-mobile-list{
    display:grid;
    gap:12px;
  }

  .cars-mobile-item{
    display:grid;
    gap:10px;
    padding:13px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    box-shadow:0 10px 24px rgba(20,40,80,.07);
  }

  .cars-mobile-head{
    display:grid;
    gap:3px;
    padding-bottom:8px;
    border-bottom:1px solid #edf1f7;
  }

  .cars-mobile-head strong{
    font-size:20px;
    line-height:1.1;
    color:#14316d;
  }

  .cars-mobile-head span{
    font-size:14px;
    line-height:1.2;
    color:#344054;
  }

  .cars-mobile-head small{
    color:var(--muted);
    font-size:12px;
  }

  .cars-mobile-status{
    display:grid;
    gap:6px;
  }

  .cars-mobile-status div{
    display:grid;
    grid-template-columns:82px 1fr;
    align-items:center;
    gap:8px;
    min-height:30px;
    padding:6px 8px;
    border-radius:10px;
    background:#f8fafc;
  }

  .cars-mobile-status b{
    font-size:12px;
    color:#667085;
    text-transform:uppercase;
    letter-spacing:.04em;
  }

  .cars-mobile-status span{
    font-weight:800;
    color:#1d2939;
  }

  .cars-mobile-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding-top:9px;
    border-top:1px solid #edf1f7;
  }

  .cars-mobile-actions .inline-post-form,
  .cars-mobile-actions .btn,
  .cars-mobile-actions button{
    width:100% !important;
  }

  .cars-mobile-actions .btn,
  .cars-mobile-actions button{
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
}

@media(max-width:420px){
  .cars-mobile-actions{
    grid-template-columns:1fr;
  }
}


/* Merge full car list into My Cars */
.heading-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.car-card-filter{
  width:100%;
  margin:0 0 14px;
}
@media(max-width:760px){
  .heading-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .heading-actions .badge,
  .heading-actions a{
    width:100%;
    text-align:center;
    justify-content:center;
  }
  .car-card-filter{
    margin-bottom:12px;
    min-height:46px;
  }
}


/* Fix mobile menu and visible notification settings */
.dashboard-device-notification-settings{
  display:block;
  border-color:#bcd0ff;
  background:linear-gradient(180deg,#ffffff,#f6f9ff);
}

@media(min-width:1101px){
  .dashboard-device-notification-settings{
    display:none;
  }
}

@media(max-width:1100px){
  .nav-toggle{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    cursor:pointer !important;
    user-select:none !important;
    position:relative;
    z-index:130;
  }

  #siteNav.nav{
    display:none !important;
  }

  #siteNav.nav.nav-open{
    display:grid !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
    position:relative;
    z-index:129;
  }

  .dashboard-device-notification-settings .quick-actions{
    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .dashboard-device-notification-settings .quick-actions .btn,
  .dashboard-device-notification-settings .quick-actions button{
    width:100% !important;
    justify-content:center !important;
  }
}

@media(max-width:760px){
  .dashboard-device-notification-settings .quick-actions{
    grid-template-columns:1fr !important;
  }
}


/* Push status informative UI */
.push-state-box{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  margin:8px 0 10px;
  border:1px solid #dbe4f0;
  border-radius:12px;
  background:#fff;
  font-weight:800;
}
.push-state-box strong.success,
[data-push-state-label].success{color:#0f8a4b}
.push-state-box strong.danger,
[data-push-state-label].danger{color:#bd1e2d}
[data-device-notification-status].success,
[data-pwa-notification-status].success{color:#0f8a4b;font-weight:800}
[data-device-notification-status].danger,
[data-pwa-notification-status].danger{color:#bd1e2d;font-weight:800}
[data-device-notification-status].warning,
[data-pwa-notification-status].warning{color:#9a5b00;font-weight:800}


/* iPhone push clear status */
.iphone-push-help{
  margin:10px 0;
  line-height:1.35;
}
[data-push-state-label].warning{color:#9a5b00}
[data-push-state-label].danger{color:#bd1e2d}
[data-push-state-label].success{color:#0f8a4b}


/* Mobile fix for notification time range fields in profile */
.notification-time-range-row,
.notification-time-range-row > *,
.notification-time-field,
.notification-time-field input[type="time"]{
  min-width:0;
  max-width:100%;
}
.notification-time-field input[type="time"]{
  width:100%;
  box-sizing:border-box;
  display:block;
}
@media(max-width:760px){
  .notification-time-range-row{
    display:grid;
    grid-template-columns:1fr !important;
    gap:12px;
    width:100%;
  }
  .notification-time-field{
    width:100%;
  }
  .notification-time-field input[type="time"]{
    width:100%;
    min-height:46px;
    font-size:16px;
  }
}


/* FINAL HARD FIX: profile notification time range mobile overflow */
.card,
.form,
.notification-time-range-wrap,
.notification-time-range-wrap *,
.notification-time-field,
.notification-time-input{
  box-sizing:border-box !important;
}
.notification-time-range-wrap{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:14px !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
}
.notification-time-range-wrap .notification-time-field{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  overflow:hidden !important;
}
.notification-time-range-wrap label{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  margin-bottom:6px !important;
}
.notification-time-range-wrap input[type="time"],
.notification-time-input{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  height:48px !important;
  line-height:48px !important;
  padding:10px 12px !important;
  font-size:16px !important;
  border-radius:12px !important;
  -webkit-appearance:none !important;
  appearance:none !important;
}
@media(max-width:900px){
  .notification-time-range-wrap{
    grid-template-columns:1fr !important;
  }
}
@media(max-width:560px){
  .card .notification-time-range-wrap{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }
  .card .notification-time-range-wrap .notification-time-field{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 0 12px 0 !important;
  }
  .card .notification-time-range-wrap input[type="time"],
  .card .notification-time-input{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }
}



/* ============================================================
   DESIGN 1:1 OVERRIDES — premium blue/white UI
   ============================================================ */
:root{
  --app-bg:#f3f6fb;
  --app-sidebar:#0d4db8;
  --app-sidebar-2:#0b3f98;
  --app-sidebar-hover:rgba(255,255,255,.12);
  --app-card:#ffffff;
  --app-border:#e3e8f2;
  --app-text:#1e2b4a;
  --app-muted:#74819a;
  --app-primary:#1765ff;
  --app-primary-2:#0f56e6;
  --app-success:#15a34a;
  --app-warning:#ea8f10;
  --app-danger:#dc2626;
  --app-radius:18px;
  --app-shadow:0 8px 28px rgba(31, 54, 88, .08);
}
html,body{min-height:100%}
body.app-authenticated{background:var(--app-bg); color:var(--app-text); font-family:Arial, "Segoe UI", sans-serif;}
body.app-authenticated .footer{display:none}
body.app-authenticated .app-shell{display:flex; min-height:100vh;}
body.app-authenticated .app-sidebar{width:296px; background:linear-gradient(180deg,var(--app-sidebar) 0%, var(--app-sidebar-2) 100%); color:#fff; padding:28px 16px 22px; display:flex; flex-direction:column; position:fixed; left:0; top:0; bottom:0; overflow:auto; z-index:30; box-shadow:inset -1px 0 0 rgba(255,255,255,.08)}
body.app-authenticated .sidebar-brand{display:flex; align-items:center; gap:14px; margin:10px 6px 28px}
body.app-authenticated .sidebar-brand-icon{width:42px; height:42px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.16); font-size:22px}
body.app-authenticated .sidebar-brand-text{font-size:24px; font-weight:800; letter-spacing:.02em}
body.app-authenticated .sidebar-nav, body.app-authenticated .sidebar-help{display:grid; gap:10px}
body.app-authenticated .sidebar-separator{height:1px; background:rgba(255,255,255,.16); margin:16px 0 18px}
body.app-authenticated .sidebar-link{display:flex; align-items:center; gap:14px; color:#fff; text-decoration:none; font-weight:700; font-size:18px; padding:14px 16px; border-radius:14px; transition:.18s ease; opacity:.96}
body.app-authenticated .sidebar-link:hover{background:var(--app-sidebar-hover); color:#fff; transform:translateX(2px)}
body.app-authenticated .sidebar-link.is-active{background:linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.10)); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
body.app-authenticated .sidebar-icon{display:inline-flex; width:28px; justify-content:center; font-size:21px}
body.app-authenticated .sidebar-footer{margin-top:auto; padding:24px 10px 4px; color:rgba(255,255,255,.92)}
body.app-authenticated .sidebar-support{font-size:16px; margin-bottom:18px; display:flex; align-items:center; gap:10px}
body.app-authenticated .sidebar-support:before{content:"?"; width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; border:2px solid rgba(255,255,255,.78); font-weight:700}
body.app-authenticated .sidebar-copy{font-size:13px; opacity:.9; line-height:1.45}

body.app-authenticated .app-content{margin-left:296px; width:calc(100% - 296px); min-width:0;}
body.app-authenticated .app-topbar{height:86px; display:flex; align-items:center; justify-content:space-between; padding:0 30px; background:#fff; border-bottom:1px solid var(--app-border); box-shadow:0 2px 12px rgba(30, 42, 64, .04); position:sticky; top:0; z-index:20}
body.app-authenticated .app-topbar-left{display:flex; align-items:center; gap:16px; min-width:0}
body.app-authenticated .app-page-title{font-size:17px; font-weight:800; color:var(--app-text)}
body.app-authenticated .app-page-subtitle{font-size:13px; color:var(--app-muted); margin-top:3px}
body.app-authenticated .app-topbar-right{display:flex; align-items:center; gap:12px}
body.app-authenticated .topbar-icon-btn{width:42px; height:42px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:#f3f7ff; color:#38517f; text-decoration:none; border:1px solid #e0e8f6; font-size:19px}
body.app-authenticated .topbar-user-box{display:flex; align-items:center; gap:12px; padding:6px 10px; border-radius:999px}
body.app-authenticated .topbar-avatar{width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#eef4ff; color:#17489f; font-weight:800; font-size:18px; border:1px solid #dce7fb}
body.app-authenticated .topbar-user-meta strong{display:block; font-size:16px; color:var(--app-text)}
body.app-authenticated .topbar-user-meta span{display:block; font-size:12px; color:var(--app-muted); margin-top:2px}
body.app-authenticated .topbar-logout{display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border-radius:14px; background:#f5f7fb; color:#223559; text-decoration:none; font-weight:700; border:1px solid var(--app-border)}
body.app-authenticated .sidebar-toggle{display:none; width:42px; height:42px; border:none; border-radius:12px; background:#f3f7ff; color:#17489f; font-size:21px; cursor:pointer}
body.app-authenticated .sidebar-overlay{display:none}
body.app-authenticated .page{width:100%; max-width:none; margin:0; padding:24px 28px 32px}
body.app-authenticated .mobile-back-btn{display:none; margin:0 28px 10px; text-decoration:none; color:#1765ff; font-weight:700}

body.app-authenticated .card,
body.app-authenticated .dashboard-panel,
body.app-authenticated .public-action-box,
body.app-authenticated .device-notification-box,
body.app-authenticated .dashboard-notification-priority,
body.app-authenticated details.settings-details,
body.app-authenticated .push-state-box,
body.app-authenticated .dashboard-installment-filter{background:var(--app-card); border:1px solid var(--app-border); box-shadow:var(--app-shadow); border-radius:20px}
body.app-authenticated .card{padding:24px 26px}
body.app-authenticated h1{font-size:28px; margin:0 0 8px; color:#1d2c4d}
body.app-authenticated h2{font-size:20px; margin:0 0 10px; color:#1d2c4d}
body.app-authenticated h3{font-size:18px; color:#223457}
body.app-authenticated .muted, body.app-authenticated .small{color:var(--app-muted)}
body.app-authenticated .small{font-size:13px; line-height:1.5}
body.app-authenticated label{display:block; margin-bottom:10px; color:#233454; font-size:15px; font-weight:700}
body.app-authenticated input,
body.app-authenticated select,
body.app-authenticated textarea{min-height:54px; border:1px solid #d7dfea; border-radius:14px; padding:14px 16px; background:#fff; color:#1f2f4e; font-size:16px; box-shadow:none}
body.app-authenticated textarea{min-height:120px}
body.app-authenticated input:focus,
body.app-authenticated select:focus,
body.app-authenticated textarea:focus{border-color:#2d6dff; outline:0; box-shadow:0 0 0 3px rgba(23,101,255,.12)}
body.app-authenticated .btn,
body.app-authenticated button,
body.app-authenticated input[type=submit]{min-height:46px; padding:0 18px; border-radius:14px; font-weight:700; font-size:15px; border:1px solid transparent; box-shadow:none}
body.app-authenticated .btn,
body.app-authenticated button:not(.sidebar-toggle):not([data-sidebar-toggle]),
body.app-authenticated input[type=submit]{background:#f5f8ff; color:#23406e; border-color:#dce5f3}
body.app-authenticated .btn-primary,
body.app-authenticated button[type=submit],
body.app-authenticated input[type=submit]{background:linear-gradient(180deg, #1f6fff, #1559eb); color:#fff; border-color:#1559eb}
body.app-authenticated .btn-primary:hover,
body.app-authenticated button[type=submit]:hover,
body.app-authenticated input[type=submit]:hover{background:linear-gradient(180deg, #1a66f4, #104fd7)}
body.app-authenticated .btn-danger{background:#fff5f5; color:#bf2b2b; border-color:#f3c7c7}
body.app-authenticated .form{display:grid; gap:18px}
body.app-authenticated .form-row{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px}

body.app-authenticated .dashboard-hero{display:grid; gap:22px}
body.app-authenticated .dashboard-stat-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px}
body.app-authenticated .stat{background:#fff; border:1px solid var(--app-border); box-shadow:var(--app-shadow); border-radius:18px; padding:24px 24px 22px; position:relative; overflow:hidden}
body.app-authenticated .stat::before{content:""; width:56px; height:56px; border-radius:50%; position:absolute; left:22px; top:22px; background:#edf3ff}
body.app-authenticated .stat span{display:block; margin-left:92px; color:#1f2f4e; font-weight:700; font-size:16px}
body.app-authenticated .stat b{display:block; margin-left:92px; font-size:58px; line-height:1; margin-top:8px; color:#1c4fd0}
body.app-authenticated .stat small{display:block; margin-left:92px; margin-top:8px; color:var(--app-muted); font-size:14px}
body.app-authenticated .stat-primary::before{background:#e8efff}
body.app-authenticated .stat-danger::before{background:#fce9ea}
body.app-authenticated .dashboard-welcome{padding:0; overflow:hidden}
body.app-authenticated .dashboard-title-row{display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:26px 28px 18px}
body.app-authenticated .dashboard-title-row .eyebrow{display:none}
body.app-authenticated .dashboard-title-row h1{margin:0 0 6px; font-size:24px}
body.app-authenticated .dashboard-title-row .dashboard-date{font-weight:700; color:var(--app-muted); font-size:15px}
body.app-authenticated .dashboard-search{padding:0 28px 16px}
body.app-authenticated .dashboard-search input{font-size:16px; text-transform:uppercase}
body.app-authenticated .dashboard-actions{padding:0 28px 28px}
body.app-authenticated .dashboard-actions .btn{background:#f6f8ff}
body.app-authenticated .dashboard-events-mobile-priority .dashboard-panel,
body.app-authenticated .dashboard-notification-setup,
body.app-authenticated .dashboard-device-notification-settings{margin-top:0}
body.app-authenticated .panel-heading{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px}
body.app-authenticated .panel-heading a{color:var(--app-primary); text-decoration:none; font-weight:700}
body.app-authenticated .event-list{display:grid; gap:0}
body.app-authenticated .event-row{display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; padding:18px 0; border-bottom:1px solid #edf1f6}
body.app-authenticated .event-row:last-child{border-bottom:none}
body.app-authenticated .event-row strong{display:block; font-size:16px; color:#223457; margin-bottom:5px}
body.app-authenticated .event-row span{display:block; color:#65728c}
body.app-authenticated .event-meta{display:flex; align-items:center; gap:14px; flex-wrap:wrap; justify-content:flex-end}
body.app-authenticated .badge{display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 14px; border-radius:999px; font-size:13px; font-weight:700}
body.app-authenticated .badge.success{background:#e7f7ee; color:#148343}
body.app-authenticated .badge.warning{background:#fff3dd; color:#b56c00}
body.app-authenticated .badge.danger{background:#fde8e7; color:#c6342b}
body.app-authenticated .badge.muted{background:#eef2f7; color:#60708b}

body.app-authenticated .table-wrap{border:1px solid var(--app-border); border-radius:20px; box-shadow:var(--app-shadow); overflow:auto}
body.app-authenticated table{background:#fff; min-width:760px}
body.app-authenticated th{font-size:14px; text-transform:none; background:#fbfcfe; color:#65728c; padding:16px 18px; font-weight:700}
body.app-authenticated td{padding:16px 18px; color:#263659}
body.app-authenticated tr:hover td{background:#fcfdff}

body.app-authenticated .alert{border-radius:16px; padding:14px 16px; font-size:14px; font-weight:700; border:1px solid transparent}
body.app-authenticated .alert.success{background:#effbf4; color:#118241; border-color:#ccefdc}
body.app-authenticated .alert.warning{background:#fff7e8; color:#a86a07; border-color:#f5dfb5}
body.app-authenticated .alert.danger{background:#fff1f1; color:#bf2b2b; border-color:#f2cccc}
body.app-authenticated .push-state-box{padding:14px 16px; margin-bottom:14px; background:#fbfcff}
body.app-authenticated .settings-details{padding:14px 16px; margin:14px 0}
body.app-authenticated .settings-details summary{cursor:pointer; font-weight:700; color:#223457}
body.app-authenticated .notification-time-range-wrap{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px}
body.app-authenticated .notification-time-input{min-width:0}
body.app-authenticated hr.soft-line{border:none; border-top:1px solid #e9edf5; margin:22px 0}
body.app-authenticated .searchbox{display:flex; gap:12px; align-items:center}
body.app-authenticated .searchbox .btn, body.app-authenticated .searchbox button{white-space:nowrap}
body.app-authenticated .quick-actions{display:flex; flex-wrap:wrap; gap:10px}

body.page-add-car .card:first-child,
body.page-add-insurance .card:first-child,
body.page-add-inspection .card:first-child,
body.page-add-vignet .card:first-child,
body.page-add-tax .card:first-child{padding-top:16px}
body.page-add-car .card:first-child > h1,
body.page-add-insurance .card:first-child > h1,
body.page-add-inspection .card:first-child > h1,
body.page-add-vignet .card:first-child > h1,
body.page-add-tax .card:first-child > h1{font-size:24px; margin-bottom:10px}

/* Public/login */
body.app-public{background:#f3f6fb; color:var(--app-text)}
body.app-public .footer{display:none}
.public-topbar{height:80px; display:flex; align-items:center; justify-content:space-between; padding:0 28px; background:#fff; border-bottom:1px solid var(--app-border)}
.public-brand{display:flex; align-items:center; gap:10px; color:var(--app-text); text-decoration:none; font-weight:800; font-size:22px}
.public-brand-icon{width:38px; height:38px; border-radius:12px; background:#eef4ff; display:flex; align-items:center; justify-content:center}
.public-nav{display:flex; gap:10px}
.public-nav a{display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border-radius:14px; text-decoration:none; color:#223457; background:#f5f8ff; border:1px solid var(--app-border); font-weight:700}
body.app-public .page{width:100%; max-width:none; margin:0; padding:0}
body.page-login main.page{padding:0}
.auth-layout{display:grid; grid-template-columns:320px minmax(0,1fr); min-height:100vh}
.auth-brand-panel{background:linear-gradient(180deg,var(--app-sidebar) 0%, var(--app-sidebar-2) 100%); color:#fff; padding:28px 24px 22px; display:flex; flex-direction:column}
.auth-brand-head{display:flex; align-items:center; gap:14px; font-weight:800; font-size:24px}
.auth-brand-icon{width:44px; height:44px; border-radius:14px; background:rgba(255,255,255,.16); display:flex; align-items:center; justify-content:center; font-size:24px}
.auth-brand-foot{margin-top:auto}
.auth-help-link{display:flex; align-items:center; gap:10px; font-size:16px; margin-bottom:24px}
.auth-help-link:before{content:"?"; width:28px; height:28px; border-radius:50%; border:2px solid rgba(255,255,255,.78); display:inline-flex; align-items:center; justify-content:center; font-weight:700}
.auth-copy{font-size:13px; opacity:.92}
.auth-stage{display:flex; align-items:center; justify-content:center; padding:50px 22px}
.auth-card{width:min(100%, 520px); background:#fff; border:1px solid var(--app-border); box-shadow:0 18px 50px rgba(32, 52, 84, .08); border-radius:26px; padding:30px 30px 26px}
.auth-card-icon{width:82px; height:82px; margin:0 auto 18px; border-radius:50%; background:#edf3ff; color:#1e63f0; display:flex; align-items:center; justify-content:center; font-size:42px}
.auth-card h1{text-align:center; font-size:28px; margin:0 0 10px; color:#1d2c4d}
.auth-card-subtitle{text-align:center; color:var(--app-muted); margin:0 0 28px; font-size:18px}
.auth-form{display:grid; gap:18px}
.auth-field label{font-size:15px; font-weight:700; color:#223457; margin-bottom:9px; display:block}
.input-with-icon{position:relative}
.input-with-icon .input-icon{position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:18px; opacity:.8}
.input-with-icon input{padding-left:48px; min-height:54px; border-radius:14px; border:1px solid #d7dfea; font-size:16px; width:100%}
.auth-submit{width:100%; min-height:48px; font-size:18px; margin-top:6px}
.auth-note-box{display:flex; gap:14px; align-items:flex-start; margin:26px 0 0; padding:16px; border-radius:16px; background:#f7faff; border:1px solid #dbe6fb; color:#5a6781}
.auth-note-box strong{display:block; color:#31425f; margin-bottom:6px}
.auth-note-box span{display:block; line-height:1.6}
.auth-note-icon{width:46px; height:46px; min-width:46px; border-radius:50%; background:#edf3ff; display:flex; align-items:center; justify-content:center; font-size:22px}
.auth-register{text-align:center; margin-top:18px}
.auth-register a{font-weight:700; color:var(--app-primary)}

/* Mobile */
@media(max-width:1180px){
  body.app-authenticated .dashboard-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:980px){
  body.app-authenticated .app-sidebar{transform:translateX(-100%); transition:transform .22s ease}
  body.app-authenticated.sidebar-open .app-sidebar{transform:translateX(0)}
  body.app-authenticated .app-content{margin-left:0; width:100%}
  body.app-authenticated .sidebar-toggle{display:inline-flex; align-items:center; justify-content:center}
  body.app-authenticated .sidebar-overlay{position:fixed; inset:0; background:rgba(10,20,40,.36); z-index:25; display:block}
}
@media(max-width:760px){
  body.app-authenticated .app-topbar{padding:0 14px; height:auto; min-height:74px; flex-wrap:wrap; gap:10px; align-items:center}
  body.app-authenticated .app-topbar-right{width:100%; justify-content:flex-end; padding-bottom:10px}
  body.app-authenticated .page{padding:16px 14px 26px}
  body.app-authenticated .mobile-back-btn{display:inline-flex; margin:10px 14px 0}
  body.app-authenticated .dashboard-stat-grid,
  body.app-authenticated .form-row,
  body.app-authenticated .notification-time-range-wrap{grid-template-columns:1fr}
  body.app-authenticated .stat::before{left:18px; top:18px; width:48px; height:48px}
  body.app-authenticated .stat span,
  body.app-authenticated .stat b,
  body.app-authenticated .stat small{margin-left:76px}
  body.app-authenticated .stat b{font-size:46px}
  body.app-authenticated .dashboard-title-row,
  body.app-authenticated .dashboard-search,
  body.app-authenticated .dashboard-actions{padding-left:18px; padding-right:18px}
  body.app-authenticated .event-row{grid-template-columns:1fr}
  body.app-authenticated .event-meta{justify-content:flex-start}
  .auth-layout{grid-template-columns:1fr}
  .auth-brand-panel{min-height:180px}
  .auth-stage{padding:20px 14px 30px; margin-top:-58px}
  .auth-card{width:100%; border-radius:22px; padding:24px 18px 22px}
  .public-topbar{padding:0 14px; height:auto; min-height:76px; flex-wrap:wrap; gap:10px}
  .public-nav{width:100%; padding-bottom:12px; justify-content:flex-end; flex-wrap:wrap}
}
@media(max-width:560px){
  body.app-authenticated .app-page-subtitle{display:none}
  body.app-authenticated .app-topbar-right{gap:8px; align-items:center}
  body.app-authenticated .topbar-user-meta{display:none}
  body.app-authenticated .topbar-logout{padding:0 12px}
  body.app-authenticated .quick-actions,
  body.app-authenticated .searchbox{display:grid; grid-template-columns:1fr}
  body.app-authenticated .quick-actions .btn,
  body.app-authenticated .quick-actions button,
  body.app-authenticated .searchbox .btn,
  body.app-authenticated .searchbox button{width:100%}
  body.app-authenticated .table-wrap{border-radius:18px}
}

/* ============================================================
   SECOND PASS: closer to generated video stills
   ============================================================ */
body.app-authenticated .sidebar-brand-text{font-size:18px; line-height:1.18; max-width:150px; text-transform:uppercase}
body.app-authenticated .app-page-title{font-size:30px; font-weight:800; color:#14284d}
body.app-authenticated .app-page-subtitle{font-size:14px}
body.app-authenticated .dashboard-home-head{margin-bottom:18px}
body.app-authenticated .dashboard-home-head h1{font-size:42px; line-height:1.05; margin:0 0 6px}
body.app-authenticated .dashboard-home-head .muted{font-size:18px}
body.app-authenticated .dashboard-home-stats{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-bottom:20px}
body.app-authenticated .dashboard-home-stats .stat{min-height:182px}
body.app-authenticated .dashboard-home-stats .stat::before{width:72px; height:72px; left:20px; top:28px; background:#eef3ff}
body.app-authenticated .dashboard-home-stats .stat:nth-child(2)::before{background:#eaf8ef}
body.app-authenticated .dashboard-home-stats .stat:nth-child(3)::before{background:#fdeff0}
body.app-authenticated .dashboard-home-stats .stat span{font-size:16px; margin-left:106px}
body.app-authenticated .dashboard-home-stats .stat b{font-size:62px; margin-left:106px; margin-top:10px}
body.app-authenticated .dashboard-home-stats .stat small{font-size:15px; margin-left:106px; margin-top:10px}
body.app-authenticated .dashboard-events-table-panel{padding:20px 20px 14px; margin-bottom:18px}
body.app-authenticated .dashboard-events-table-panel .panel-heading{margin-bottom:16px}
body.app-authenticated .dashboard-events-table-wrap table{min-width:100%}
body.app-authenticated .dashboard-events-table-wrap th{padding-top:18px; padding-bottom:18px; font-size:15px}
body.app-authenticated .dashboard-events-table-wrap td{padding-top:18px; padding-bottom:18px; font-size:15px}
body.app-authenticated .dashboard-events-table-wrap td strong{font-size:16px}
body.app-authenticated .dashboard-quick-links{margin-bottom:18px}
body.app-authenticated .dashboard-quick-links .btn{border-radius:16px; min-height:50px}
body.app-authenticated .dashboard-grid-main{display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:0}
body.app-authenticated .heading-actions{display:flex; align-items:center; gap:12px}
body.app-authenticated .heading-actions a{color:#1765ff; text-decoration:none; font-weight:700}
body.app-authenticated .car-card-filter{margin-bottom:16px}
body.app-authenticated .car-card-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px}
body.app-authenticated .car-card{border:1px solid var(--app-border); background:#fff; border-radius:18px; padding:16px 16px 14px; box-shadow:none}
body.app-authenticated .car-card-top{display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start}
body.app-authenticated .car-card-top strong{font-size:19px; color:#16294c}
body.app-authenticated .car-card-top span{text-align:right; font-weight:700; color:#4d5d7c}
body.app-authenticated .car-mini-status{margin-top:12px; padding-top:10px; border-top:1px solid #edf1f6; color:#54637f; font-size:14px}
body.app-authenticated .car-card-actions{border-top:none; padding-top:0; margin-top:12px}
body.app-authenticated .missing-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:12px}
body.app-authenticated .missing-item{background:#fff; border:1px solid var(--app-border); border-radius:18px; padding:18px 14px}
body.app-authenticated .missing-item b{font-size:38px; color:#2048a7}
body.app-authenticated .tax-mini-row{background:#fff}
@media(max-width:1180px){
  body.app-authenticated .dashboard-home-stats{grid-template-columns:1fr 1fr 1fr}
}
@media(max-width:860px){
  body.app-authenticated .dashboard-home-stats,
  body.app-authenticated .dashboard-grid-main,
  body.app-authenticated .car-card-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  body.app-authenticated .dashboard-home-head h1{font-size:30px}
  body.app-authenticated .dashboard-home-head .muted{font-size:15px}
  body.app-authenticated .dashboard-home-stats .stat{min-height:154px}
  body.app-authenticated .dashboard-home-stats .stat::before{width:54px; height:54px}
  body.app-authenticated .dashboard-home-stats .stat span,
  body.app-authenticated .dashboard-home-stats .stat b,
  body.app-authenticated .dashboard-home-stats .stat small{margin-left:82px}
  body.app-authenticated .dashboard-home-stats .stat b{font-size:46px}
}

/* Page-by-page refinements */
body.app-authenticated .page-hero{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:0 0 18px; padding:4px 2px 0}
body.app-authenticated .page-hero h1{font-size:34px; margin:0 0 6px; color:#14284d}
body.app-authenticated .page-hero .muted{font-size:16px; color:#6c7992; margin:0}
body.app-authenticated .page-hero-badge{display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border-radius:16px; background:#eef4ff; color:#1a4ec6; font-weight:800; border:1px solid #dce6fb}
body.app-authenticated .profile-main-card,
body.app-authenticated .profile-notifications-card,
body.app-authenticated .vehicle-form-card,
body.app-authenticated .admin-settings-card{margin-bottom:18px}
body.app-authenticated .profile-main-card > h2,
body.app-authenticated .vehicle-form-card > h2,
body.app-authenticated .admin-settings-card > h2{font-size:24px; margin-bottom:16px}
body.app-authenticated .section-divider-title{margin-top:28px; padding-top:18px; border-top:1px solid #ecf0f6; font-size:20px}
body.page-profile .push-state-box{margin-top:10px}
body.page-profile #profile-device-check{margin-top:10px}
body.page-profile .profile-notifications-card h2{font-size:24px; margin-bottom:10px}
body.page-add-car .vehicle-form-card .form-row:first-of-type{margin-top:8px}
body.page-add-car .vehicle-form-card .small{margin-top:8px}
body.page-admin .grid-2{display:grid; grid-template-columns:1.25fr .75fr; gap:18px; align-items:start}
body.page-admin .grid-2 > *{min-width:0}
body.page-admin .admin-settings-card h3{margin-top:24px; margin-bottom:12px; padding-top:16px; border-top:1px solid #edf1f6}
body.page-admin .actions{display:flex; flex-wrap:wrap; gap:8px}
body.page-admin .inline-post-form{display:inline-flex}
body.page-admin .table-wrap + .small{margin-top:10px}
@media(max-width:980px){
  body.page-admin .grid-2{grid-template-columns:1fr}
}
@media(max-width:560px){
  body.app-authenticated .page-hero{display:grid}
  body.app-authenticated .page-hero h1{font-size:28px}
}

/* ============================================================
   FINAL 1:1 PASS based on supplied mockups
   ============================================================ */
body.app-authenticated{background:linear-gradient(180deg,#eef3f8 0%, #f7f9fc 100%)}
body.app-authenticated .app-sidebar{width:274px; border-radius:0 0 18px 0; padding:22px 14px 18px; background:linear-gradient(180deg,#0450c5 0%, #003b9d 100%)}
body.app-authenticated .sidebar-brand{margin:6px 10px 22px}
body.app-authenticated .sidebar-brand-icon{background:transparent; font-size:28px; width:36px; height:36px}
body.app-authenticated .sidebar-brand-text{font-size:22px; line-height:1.1; max-width:none; text-transform:uppercase; font-weight:800}
body.app-authenticated .sidebar-link{font-size:17px; font-weight:500; padding:14px 16px; border-radius:14px}
body.app-authenticated .sidebar-link.is-active{background:rgba(255,255,255,.14); box-shadow:none}
body.app-authenticated .sidebar-separator{margin:14px 6px 16px}
body.app-authenticated .sidebar-support{font-size:15px}
body.app-authenticated .sidebar-copy{font-size:12px}
body.app-authenticated .app-content{margin-left:274px; width:calc(100% - 274px)}
body.app-authenticated .app-topbar{height:76px; padding:0 26px; background:rgba(255,255,255,.92); backdrop-filter:blur(4px)}
body.app-authenticated .app-page-context{display:none}
body.app-authenticated .topbar-icon-btn{width:38px; height:38px; background:#fff; border:1px solid #e6ebf2; color:#67758d; position:relative}
body.app-authenticated .topbar-icon-btn:first-child::after{content:"2"; position:absolute; right:-2px; top:-4px; width:18px; height:18px; border-radius:50%; background:#1765ff; color:#fff; font-size:11px; display:flex; align-items:center; justify-content:center; font-weight:700}
body.app-authenticated .topbar-user-box{gap:10px; padding-left:4px}
body.app-authenticated .topbar-avatar{width:38px; height:38px; background:#f4f7fb; color:#78879e}
body.app-authenticated .topbar-user-meta strong{font-size:15px}
body.app-authenticated .topbar-user-meta span{display:none}
body.app-authenticated .topbar-logout{display:none}
body.app-authenticated .page{padding:22px 28px 30px}
body.app-authenticated .card{border-radius:22px; box-shadow:0 10px 30px rgba(26,45,74,.06)}
body.app-authenticated .page-hero{margin-bottom:16px}
body.app-authenticated .page-hero h1{font-size:27px; font-weight:800}
body.app-authenticated .page-hero .muted{font-size:14px}
body.app-authenticated .page-hero-badge{display:none}
body.app-authenticated .page-back-link{display:inline-flex; align-items:center; gap:6px; margin-bottom:10px; color:#1765ff; text-decoration:none; font-weight:700}
body.app-authenticated .form-row-3{grid-template-columns:1fr 1fr 1fr}
body.app-authenticated .req{color:#e74b4b}
body.app-authenticated .form-actions-end{display:flex; justify-content:flex-end; gap:14px; margin-top:18px}
body.app-authenticated .form-actions-end .btn{min-width:138px}
body.app-authenticated .profile-tabs{display:flex; gap:18px; margin:0 0 14px; padding:0 8px 0 2px; border-bottom:1px solid #dfe6ef}
body.app-authenticated .profile-tab{display:inline-flex; align-items:center; min-height:44px; color:#4b5b77; text-decoration:none; font-weight:600; padding:0 12px; border-bottom:3px solid transparent; margin-bottom:-1px}
body.app-authenticated .profile-tab.is-active{color:#1765ff; border-bottom-color:#1765ff}
body.app-authenticated .mycars-page-card{padding:18px 0 12px}
body.app-authenticated .mycars-toolbar{display:flex; justify-content:space-between; align-items:center; gap:12px; padding:0 24px 14px}
body.app-authenticated .mycars-toolbar input{max-width:360px; width:100%; min-height:44px; border-radius:14px; background:#fff}
body.app-authenticated .mycars-table-wrap{border:none; box-shadow:none; border-radius:0; overflow:auto}
body.app-authenticated .mycars-table-wrap table{min-width:920px}
body.app-authenticated .mycars-table-wrap thead th{background:#fbfcfe; color:#6e7d96; font-size:14px; padding:14px 16px; border-top:1px solid #edf1f6; border-bottom:1px solid #edf1f6}
body.app-authenticated .mycars-table-wrap tbody td{padding:18px 16px; vertical-align:middle; border-bottom:1px solid #edf1f6}
body.app-authenticated .brand-dot{width:34px; height:34px; border-radius:50%; background:#edf4ff; color:#0c56dd; display:flex; align-items:center; justify-content:center; font-weight:800}
body.app-authenticated .mycars-table-wrap .actions{display:flex; gap:10px; flex-wrap:wrap}
body.app-authenticated .mycars-table-wrap .actions .btn{min-height:38px; padding:0 14px; border-radius:10px; background:#fff; border-color:#dce4f1; color:#1765ff}
body.app-authenticated .mycars-count{padding:10px 24px 0}
body.app-authenticated .vehicle-form-card{padding:22px 26px}
body.app-authenticated .vehicle-form-card > h2{font-size:22px; margin-bottom:18px}
body.app-authenticated .vehicle-form-card textarea{min-height:92px}
body.page-profile .profile-main-card, body.page-profile .profile-notifications-card{padding:24px 26px}
body.page-profile .profile-notifications-card{margin-top:18px}
body.page-profile .event-list{border:1px solid #e8edf5; border-radius:16px; overflow:hidden; background:#fff}
body.page-profile .event-row{padding:18px 16px}
body.page-profile .event-row strong{font-size:16px}
body.page-profile .push-state-box{background:#f7faff}
body.page-profile .quick-actions{margin-top:14px}
body.page-profile .quick-actions .btn{min-height:44px}
body.page-login .auth-brand-panel{width:298px; max-width:298px; grid-column:1}
body.page-login .auth-layout{grid-template-columns:298px minmax(0,1fr)}
body.page-login .auth-brand-name{font-size:21px}
body.page-login .auth-stage{padding:70px 20px}
body.page-login .auth-card{max-width:500px; padding:30px 28px}
body.page-login .auth-card-subtitle{font-size:15px; margin-bottom:24px}
body.page-login .auth-note-box{padding:14px; font-size:14px}
body.page-login .auth-note-box span{font-size:14px}
body.page-admin #adminBroadcast .form{display:grid; grid-template-columns:1fr 1.2fr; gap:18px}
body.page-admin #adminBroadcast .form > div:nth-child(3),
body.page-admin #adminBroadcast .form > div:nth-child(4),
body.page-admin #adminBroadcast .form > button{grid-column:2}
body.page-admin #adminBroadcast textarea{min-height:160px}
body.page-admin .table-wrap{border-radius:18px}
@media(max-width:1200px){
  body.app-authenticated .form-row-3{grid-template-columns:1fr}
}
@media(max-width:980px){
  body.app-authenticated .app-sidebar{transform:translateX(-100%)}
  body.app-authenticated.sidebar-open .app-sidebar{transform:translateX(0)}
  body.app-authenticated .app-content{margin-left:0; width:100%}
}
@media(max-width:760px){
  body.app-authenticated .mycars-toolbar{display:grid; grid-template-columns:1fr}
  body.app-authenticated .mycars-toolbar .btn{width:100%}
  body.app-authenticated .page{padding:16px 14px 24px}
  body.app-authenticated .profile-tabs{overflow:auto; white-space:nowrap}
  body.page-login .auth-layout{grid-template-columns:1fr}
  body.page-login .auth-brand-panel{max-width:none; width:auto}
}

/* ============================================================
   FINAL COMPLETION: mobile overlay fix + events/admin + support
   ============================================================ */
body.app-authenticated .sidebar-overlay[hidden]{display:none !important; pointer-events:none !important; opacity:0 !important}
body.app-authenticated:not(.sidebar-open) .sidebar-overlay{display:none !important; pointer-events:none !important; opacity:0 !important}
body.app-authenticated.sidebar-open .sidebar-overlay{display:block !important; pointer-events:auto !important; opacity:1 !important}
body.app-authenticated .sidebar-support-link{color:#fff; text-decoration:none}
body.app-authenticated .sidebar-support-text{font-size:12px; line-height:1.45; color:rgba(255,255,255,.86); margin:-12px 0 18px 40px; word-break:break-word}
body.app-authenticated .admin-support-settings{padding:16px; border:1px solid #e5ebf5; border-radius:18px; background:#fbfdff}
body.app-authenticated .admin-support-settings h3{margin-top:0 !important; padding-top:0 !important; border-top:0 !important}

body.page-events .events-page-card{padding:0 0 12px; overflow:hidden}
body.page-events .events-toolbar{display:flex; align-items:end; justify-content:space-between; gap:14px; padding:22px 24px 16px}
body.page-events .events-toolbar > input{max-width:430px; min-height:46px}
body.page-events .events-days-form{display:flex; align-items:end; gap:10px; margin:0}
body.page-events .events-days-form label{margin:0 0 8px}
body.page-events .events-days-form input{width:140px; min-height:46px}
body.page-events .events-table-wrap{border:none; box-shadow:none; border-radius:0}
body.page-events .events-table-wrap table{min-width:860px}
body.page-events .events-table-wrap th{background:#fbfcfe; color:#6e7d96; font-size:14px; padding:15px 18px; border-top:1px solid #edf1f6; border-bottom:1px solid #edf1f6}
body.page-events .events-table-wrap td{padding:17px 18px; vertical-align:middle}
body.page-events .events-count{padding:10px 24px 0}

body.page-admin .page-hero-admin{margin-bottom:18px}
body.page-admin .admin-settings-card{overflow:hidden}
body.page-admin .admin-settings-card > h2{font-size:22px; margin-bottom:14px}
body.page-admin #adminBroadcast{display:block; padding:24px 26px; border-radius:22px; background:#fff}
body.page-admin #adminBroadcast h2{font-size:24px; margin-bottom:8px}
body.page-admin #adminBroadcast .muted{max-width:980px}
body.page-admin #adminBroadcast .form{margin-top:18px; padding:18px; border:1px solid #e6edf7; border-radius:20px; background:#fbfdff}
body.page-admin #adminBroadcast input,
body.page-admin #adminBroadcast textarea,
body.page-admin #adminBroadcast select{background:#fff}
body.page-admin section.card .table-wrap{box-shadow:none; border:1px solid #e6edf7}
body.page-admin section.card h2{font-size:22px}
body.page-admin .admin-notification-actions{padding:14px; border:1px solid #e6edf7; border-radius:18px; background:#fbfdff}

@media(max-width:760px){
  body.app-authenticated .app-sidebar{z-index:60}
  body.app-authenticated .sidebar-overlay{position:fixed; inset:0; background:rgba(10,20,40,.42); z-index:50}
  body.app-authenticated:not(.sidebar-open) .sidebar-overlay{display:none !important}
  body.page-events .events-toolbar{display:grid; grid-template-columns:1fr; align-items:stretch}
  body.page-events .events-toolbar > input{max-width:none; width:100%}
  body.page-events .events-days-form{display:grid; grid-template-columns:1fr 1fr auto; align-items:end}
  body.page-events .events-days-form label{grid-column:1/-1}
  body.page-admin #adminBroadcast .form{display:grid; grid-template-columns:1fr}
  body.page-admin #adminBroadcast .form > div:nth-child(3),
  body.page-admin #adminBroadcast .form > div:nth-child(4),
  body.page-admin #adminBroadcast .form > button{grid-column:auto}
}
@media(max-width:560px){
  body.page-events .events-days-form{grid-template-columns:1fr}
  body.page-events .events-days-form input,
  body.page-events .events-days-form button{width:100%}
  body.page-admin .admin-settings-card,
  body.page-admin #adminBroadcast{padding:18px}
}

/* Support page + admin/logout/nav corrections */
body.app-authenticated .topbar-logout{display:inline-flex !important; align-items:center; justify-content:center; min-height:38px; padding:0 16px; border-radius:14px; background:#f5f8ff; color:#14284d; border:1px solid #dce5f3; text-decoration:none; font-weight:800}
body.app-authenticated .topbar-admin-link{display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:0 14px; border-radius:14px; background:#1765ff; color:#fff; text-decoration:none; font-weight:800; border:1px solid #1765ff}
body.app-authenticated .sidebar-support-link{display:flex !important; align-items:center; gap:10px; color:#fff; text-decoration:none; font-size:15px; line-height:1.35; margin-bottom:18px}
body.app-authenticated .sidebar-support-link:before{content:"?"; width:28px; height:28px; min-width:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; border:2px solid rgba(255,255,255,.78); font-weight:700}
body.app-authenticated .sidebar-support-link.is-active{font-weight:800; text-decoration:underline}
body.app-authenticated .support-page-card{max-width:980px; padding:28px 30px}
body.app-authenticated .support-page-content{font-size:17px; line-height:1.75; color:#243553; white-space:normal}
body.app-authenticated .support-page-action{margin-top:24px; padding-top:18px; border-top:1px solid #e8edf5}
body.app-authenticated .admin-support-settings textarea{min-height:150px}
body.app-authenticated .sidebar-overlay{display:none !important; pointer-events:none !important; opacity:0 !important}
body.app-authenticated.sidebar-open .sidebar-overlay:not([hidden]){display:block !important; pointer-events:auto !important; opacity:1 !important}
@media(max-width:760px){
  body.app-authenticated .topbar-admin-link{display:none}
  body.app-authenticated .topbar-logout{min-height:36px; padding:0 12px}
  body.app-authenticated .support-page-card{padding:22px 18px}
  body.app-authenticated .support-page-content{font-size:15px}
}

/* Mobile readable event tables — no horizontal scroll */
@media(max-width:760px){
  body.app-authenticated .dashboard-events-table-panel{padding:16px 14px; overflow:visible}
  body.app-authenticated .dashboard-events-table-panel .panel-heading{display:grid; grid-template-columns:1fr; gap:8px; align-items:start}
  body.app-authenticated .dashboard-events-table-panel .panel-heading a{width:100%; justify-content:center; display:inline-flex; min-height:42px; align-items:center; border:1px solid #dbe5f4; border-radius:14px; background:#f7faff}
  body.app-authenticated .dashboard-events-table-wrap{overflow:visible !important; border:0 !important; box-shadow:none !important; background:transparent !important}
  body.app-authenticated .dashboard-events-table-wrap table,
  body.app-authenticated .dashboard-events-table-wrap thead,
  body.app-authenticated .dashboard-events-table-wrap tbody,
  body.app-authenticated .dashboard-events-table-wrap tr,
  body.app-authenticated .dashboard-events-table-wrap th,
  body.app-authenticated .dashboard-events-table-wrap td{display:block; width:100%; min-width:0 !important}
  body.app-authenticated .dashboard-events-table-wrap thead{display:none}
  body.app-authenticated .dashboard-events-table-wrap tbody{display:grid; gap:12px}
  body.app-authenticated .dashboard-events-table-wrap tr{background:#fff; border:1px solid #e1e8f3; border-radius:18px; box-shadow:0 8px 22px rgba(26,45,74,.06); padding:12px 14px}
  body.app-authenticated .dashboard-events-table-wrap td{border:0 !important; padding:9px 0 9px 112px !important; position:relative; min-height:36px; color:#203253; background:transparent !important; white-space:normal !important; overflow-wrap:anywhere}
  body.app-authenticated .dashboard-events-table-wrap td::before{content:attr(data-label); position:absolute; left:0; top:10px; width:98px; font-size:11px; line-height:1.25; color:#72819a; text-transform:uppercase; letter-spacing:.04em; font-weight:800}
  body.app-authenticated .dashboard-events-table-wrap td:first-child{padding-left:0 !important; padding-top:2px !important; font-size:17px}
  body.app-authenticated .dashboard-events-table-wrap td:first-child::before{display:none}
  body.app-authenticated .dashboard-events-table-wrap td:first-child strong{display:block; font-size:17px; color:#10264b}
  body.app-authenticated .dashboard-events-table-wrap td .badge{min-height:30px; padding:0 12px; white-space:normal; text-align:center}
  body.app-authenticated .dashboard-events-table-wrap td:last-child{padding-bottom:2px !important}
}

/* FIX: mobile event cards readable — prevent text going letter-by-letter */
@media(max-width:760px){
  body.app-authenticated .dashboard-events-table-wrap{
    overflow:visible !important;
    width:100% !important;
  }
  body.app-authenticated .dashboard-events-table-wrap table,
  body.app-authenticated .dashboard-events-table-wrap tbody,
  body.app-authenticated .dashboard-events-table-wrap tr,
  body.app-authenticated .dashboard-events-table-wrap td{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }
  body.app-authenticated .dashboard-events-table-wrap tbody{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  body.app-authenticated .dashboard-events-table-wrap tr{
    display:block !important;
    padding:14px !important;
    border:1px solid #e1e8f3 !important;
    border-radius:18px !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(26,45,74,.06) !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td{
    display:block !important;
    position:static !important;
    padding:8px 0 !important;
    border:0 !important;
    background:transparent !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    line-break:auto !important;
    hyphens:none !important;
    text-align:left !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td::before{
    content:attr(data-label) !important;
    display:block !important;
    position:static !important;
    width:auto !important;
    margin:0 0 4px !important;
    font-size:11px !important;
    line-height:1.25 !important;
    color:#72819a !important;
    text-transform:uppercase !important;
    letter-spacing:.04em !important;
    font-weight:800 !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td:first-child::before{
    display:block !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td:first-child{
    padding-top:0 !important;
    font-size:16px !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td strong,
  body.app-authenticated .dashboard-events-table-wrap td span,
  body.app-authenticated .dashboard-events-table-wrap td .small{
    display:inline !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    white-space:normal !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td:first-child strong,
  body.app-authenticated .dashboard-events-table-wrap td:nth-child(2) strong{
    display:block !important;
    font-size:16px !important;
    color:#10264b !important;
  }
  body.app-authenticated .dashboard-events-table-wrap td .badge{
    display:inline-flex !important;
    width:auto !important;
    max-width:100% !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
  }
}

/* DEFINITIVE FIX: dashboard mobile events use separate cards, table is hidden */
.dashboard-events-mobile-cards{display:none}
@media(max-width:760px){
  body.app-authenticated .dashboard-events-table-wrap{display:none !important}
  body.app-authenticated .dashboard-events-mobile-cards{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    width:100% !important;
    margin-top:12px !important;
  }
  body.app-authenticated .mobile-event-card{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    padding:14px !important;
    border:1px solid #e1e8f3 !important;
    border-radius:18px !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(26,45,74,.06) !important;
    overflow:hidden !important;
  }
  body.app-authenticated .mobile-event-card *{
    min-width:0 !important;
    max-width:100% !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    white-space:normal !important;
    hyphens:none !important;
    line-break:auto !important;
  }
  body.app-authenticated .mobile-event-card-head{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:10px !important;
    margin-bottom:12px !important;
  }
  body.app-authenticated .mobile-event-card-head strong{
    display:block !important;
    font-size:17px !important;
    line-height:1.25 !important;
    color:#10264b !important;
  }
  body.app-authenticated .mobile-event-card-head .badge{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }
  body.app-authenticated .mobile-event-field{
    display:block !important;
    padding:9px 0 !important;
    border-top:1px solid #edf2f7 !important;
  }
  body.app-authenticated .mobile-event-field span{
    display:block !important;
    font-size:11px !important;
    line-height:1.25 !important;
    color:#72819a !important;
    text-transform:uppercase !important;
    letter-spacing:.04em !important;
    font-weight:800 !important;
    margin-bottom:5px !important;
  }
  body.app-authenticated .mobile-event-field b{
    display:block !important;
    font-size:16px !important;
    line-height:1.35 !important;
    color:#15294e !important;
  }
  body.app-authenticated .mobile-event-field em{
    display:block !important;
    margin-top:3px !important;
    font-style:normal !important;
    font-size:14px !important;
    line-height:1.35 !important;
    color:#66758d !important;
  }
  body.app-authenticated .mobile-event-grid{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:12px !important;
  }
  body.app-authenticated .mobile-event-grid .mobile-event-field{
    min-width:0 !important;
  }
}
@media(max-width:420px){
  body.app-authenticated .mobile-event-card-head{display:grid !important; grid-template-columns:1fr !important}
  body.app-authenticated .mobile-event-card-head .badge{justify-self:start !important}
  body.app-authenticated .mobile-event-grid{grid-template-columns:1fr !important; gap:0 !important}
}


/* ============================================================
   HOTFIX 2026-05-25: mobile dashboard events — one block only
   ============================================================ */
.dashboard-events-mobile-cards{
  display:none !important;
}
@media (max-width: 980px){
  body.app-authenticated .dashboard-events-table-panel{
    padding:18px 14px !important;
    overflow:hidden !important;
  }
  body.app-authenticated .dashboard-events-table-panel .panel-heading{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    align-items:start !important;
  }
  body.app-authenticated .dashboard-events-table-panel .panel-heading h2{
    font-size:28px !important;
    line-height:1.2 !important;
    margin:0 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .panel-heading a{
    display:flex !important;
    width:100% !important;
    min-height:48px !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid #dbe5f4 !important;
    border-radius:16px !important;
    background:#f7faff !important;
    color:#1765ff !important;
    text-decoration:none !important;
    font-weight:800 !important;
  }

  /* Hide the desktop table completely on phones/tablets. */
  body.app-authenticated .dashboard-events-table-panel .dashboard-events-table-wrap,
  body.app-authenticated .dashboard-events-table-panel .dashboard-events-table-wrap *,
  body.app-authenticated .dashboard-events-table-panel table,
  body.app-authenticated .dashboard-events-table-panel thead,
  body.app-authenticated .dashboard-events-table-panel tbody,
  body.app-authenticated .dashboard-events-table-panel tr,
  body.app-authenticated .dashboard-events-table-panel th,
  body.app-authenticated .dashboard-events-table-panel td{
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    max-height:0 !important;
    overflow:hidden !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
  }

  /* Show the real mobile cards only. */
  body.app-authenticated .dashboard-events-table-panel .dashboard-events-mobile-cards{
    display:grid !important;
    visibility:visible !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
    width:100% !important;
    margin-top:14px !important;
    overflow:visible !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card{
    display:block !important;
    visibility:visible !important;
    height:auto !important;
    max-height:none !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
    padding:16px !important;
    border:1px solid #e1e8f3 !important;
    border-radius:20px !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(26,45,74,.06) !important;
    overflow:hidden !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card,
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card *{
    word-break:normal !important;
    overflow-wrap:break-word !important;
    white-space:normal !important;
    hyphens:none !important;
    line-break:auto !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card-head{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:10px !important;
    margin-bottom:12px !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card-head strong{
    display:block !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    font-size:20px !important;
    line-height:1.25 !important;
    color:#10264b !important;
    font-weight:900 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card-head .badge{
    display:inline-flex !important;
    flex:0 0 auto !important;
    width:auto !important;
    white-space:nowrap !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field{
    display:block !important;
    visibility:visible !important;
    height:auto !important;
    max-height:none !important;
    padding:10px 0 !important;
    border-top:1px solid #edf2f7 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field span{
    display:block !important;
    font-size:12px !important;
    line-height:1.25 !important;
    color:#72819a !important;
    text-transform:uppercase !important;
    letter-spacing:.04em !important;
    font-weight:900 !important;
    margin:0 0 6px !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field b{
    display:block !important;
    font-size:19px !important;
    line-height:1.35 !important;
    color:#15294e !important;
    font-weight:900 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field em{
    display:block !important;
    margin-top:4px !important;
    font-style:normal !important;
    font-size:15px !important;
    line-height:1.35 !important;
    color:#66758d !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:0 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field .badge{
    display:inline-flex !important;
    width:auto !important;
    max-width:100% !important;
    white-space:nowrap !important;
    min-height:36px !important;
    padding:0 16px !important;
    border-radius:999px !important;
  }
}

/* ============================================================
   GLOBAL MOBILE SAFETY PASS — all pages / all tables / all forms
   Prevents horizontal overflow, letter-by-letter wrapping and stuck overlays.
   ============================================================ */
html, body{
  max-width:100%;
  overflow-x:hidden;
}
body.app-authenticated *{
  box-sizing:border-box;
}
body.app-authenticated .page,
body.app-authenticated .card,
body.app-authenticated .dashboard-panel,
body.app-authenticated .table-wrap,
body.app-authenticated form,
body.app-authenticated .form,
body.app-authenticated .form-row,
body.app-authenticated .quick-actions,
body.app-authenticated .actions{
  min-width:0;
  max-width:100%;
}
body.app-authenticated input,
body.app-authenticated select,
body.app-authenticated textarea,
body.app-authenticated button,
body.app-authenticated .btn{
  max-width:100%;
}
body:not(.sidebar-open) .sidebar-overlay,
body:not(.sidebar-open) [data-sidebar-overlay],
.sidebar-overlay[hidden],
[data-sidebar-overlay][hidden]{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
body.sidebar-open .sidebar-overlay:not([hidden]),
body.sidebar-open [data-sidebar-overlay]:not([hidden]){
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
}
body:not(.sidebar-open){
  overflow:auto;
}

@media(max-width:760px){
  body.app-authenticated{
    overflow-x:hidden !important;
  }
  body.app-authenticated .app-content,
  body.app-authenticated .page{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }
  body.app-authenticated .page{
    padding-left:14px !important;
    padding-right:14px !important;
  }
  body.app-authenticated .card,
  body.app-authenticated .dashboard-panel,
  body.app-authenticated .profile-main-card,
  body.app-authenticated .profile-notifications-card,
  body.app-authenticated .vehicle-form-card,
  body.app-authenticated .admin-settings-card,
  body.app-authenticated .support-page-card{
    width:100% !important;
    max-width:100% !important;
    padding:18px !important;
    border-radius:22px !important;
    overflow:hidden !important;
  }
  body.app-authenticated .page-hero{
    width:100% !important;
    max-width:100% !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    padding:0 !important;
    margin-bottom:14px !important;
  }
  body.app-authenticated .page-hero h1,
  body.app-authenticated .dashboard-home-head h1{
    font-size:28px !important;
    line-height:1.15 !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
  }
  body.app-authenticated .form-row,
  body.app-authenticated .form-row-3,
  body.app-authenticated .grid-2,
  body.app-authenticated .dashboard-grid-main,
  body.app-authenticated .dashboard-home-stats,
  body.app-authenticated .dashboard-stat-grid,
  body.app-authenticated .car-card-grid,
  body.app-authenticated .missing-grid,
  body.app-authenticated .notification-time-range-wrap{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  body.app-authenticated .quick-actions,
  body.app-authenticated .actions,
  body.app-authenticated .car-card-actions,
  body.app-authenticated .form-actions-end,
  body.app-authenticated .admin-notification-actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
    justify-content:stretch !important;
  }
  body.app-authenticated .quick-actions .btn,
  body.app-authenticated .quick-actions button,
  body.app-authenticated .actions .btn,
  body.app-authenticated .actions button,
  body.app-authenticated .form-actions-end .btn,
  body.app-authenticated .form-actions-end button,
  body.app-authenticated .admin-notification-actions .btn,
  body.app-authenticated .admin-notification-actions button{
    width:100% !important;
    min-width:0 !important;
    justify-content:center !important;
  }
  body.app-authenticated input,
  body.app-authenticated select,
  body.app-authenticated textarea{
    width:100% !important;
    min-width:0 !important;
  }

  /* Generic mobile card tables for every page. JS fills data-label from table headers. */
  body.app-authenticated .table-wrap{
    width:100% !important;
    max-width:100% !important;
    overflow:visible !important;
    border:0 !important;
    box-shadow:none !important;
    background:transparent !important;
    border-radius:0 !important;
  }
  body.app-authenticated .table-wrap table{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    background:transparent !important;
    border-collapse:separate !important;
  }
  body.app-authenticated .table-wrap thead{
    display:none !important;
  }
  body.app-authenticated .table-wrap tbody{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    width:100% !important;
  }
  body.app-authenticated .table-wrap tr{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    border:1px solid #e1e8f3 !important;
    border-radius:20px !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(26,45,74,.06) !important;
    overflow:hidden !important;
  }
  body.app-authenticated .table-wrap td{
    display:grid !important;
    grid-template-columns:minmax(0, 112px) minmax(0, 1fr) !important;
    gap:10px !important;
    align-items:start !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding:12px 14px !important;
    border:0 !important;
    border-bottom:1px solid #edf2f7 !important;
    text-align:left !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    hyphens:none !important;
    line-break:auto !important;
  }
  body.app-authenticated .table-wrap tr td:last-child{
    border-bottom:0 !important;
  }
  body.app-authenticated .table-wrap td::before{
    content:attr(data-label) !important;
    display:block !important;
    position:static !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    color:#72819a !important;
    font-size:12px !important;
    line-height:1.25 !important;
    text-transform:uppercase !important;
    letter-spacing:.04em !important;
    font-weight:900 !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
  }
  body.app-authenticated .table-wrap td:empty::before{
    display:none !important;
  }
  body.app-authenticated .table-wrap td > *,
  body.app-authenticated .table-wrap td strong,
  body.app-authenticated .table-wrap td span,
  body.app-authenticated .table-wrap td div,
  body.app-authenticated .table-wrap td a,
  body.app-authenticated .table-wrap td button{
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    hyphens:none !important;
  }
  body.app-authenticated .table-wrap td .badge{
    display:inline-flex !important;
    width:auto !important;
    max-width:100% !important;
    white-space:nowrap !important;
  }
  body.app-authenticated .table-wrap td.actions,
  body.app-authenticated .table-wrap td .actions{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  /* Dashboard upcoming events: never show the desktop table on phones. */
  body.app-authenticated .dashboard-events-table-panel .dashboard-events-table-wrap,
  body.app-authenticated .dashboard-events-table-panel .dashboard-events-table-wrap *,
  body.app-authenticated .dashboard-events-table-panel .table-wrap.dashboard-events-table-wrap,
  body.app-authenticated .dashboard-events-table-panel .table-wrap.dashboard-events-table-wrap *{
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    max-height:0 !important;
    overflow:hidden !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    box-shadow:none !important;
  }
  body.app-authenticated .dashboard-events-table-panel .dashboard-events-mobile-cards{
    display:grid !important;
    visibility:visible !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
    width:100% !important;
    max-width:100% !important;
    margin-top:12px !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card{
    display:block !important;
    visibility:visible !important;
    width:100% !important;
    max-width:100% !important;
    padding:16px !important;
    border:1px solid #e1e8f3 !important;
    border-radius:20px !important;
    background:#fff !important;
    box-shadow:0 8px 22px rgba(26,45,74,.06) !important;
    overflow:hidden !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card,
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card *{
    word-break:normal !important;
    overflow-wrap:break-word !important;
    white-space:normal !important;
    hyphens:none !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card-head{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
    margin-bottom:8px !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card-head strong{
    font-size:20px !important;
    line-height:1.3 !important;
    color:#10264b !important;
    font-weight:900 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-card-head .badge{
    justify-self:start !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field{
    display:block !important;
    padding:10px 0 !important;
    border-top:1px solid #edf2f7 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field span{
    display:block !important;
    margin-bottom:5px !important;
    color:#72819a !important;
    font-size:12px !important;
    line-height:1.25 !important;
    text-transform:uppercase !important;
    letter-spacing:.04em !important;
    font-weight:900 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field b{
    display:block !important;
    color:#15294e !important;
    font-size:19px !important;
    line-height:1.35 !important;
    font-weight:900 !important;
  }
  body.app-authenticated .dashboard-events-table-panel .mobile-event-field em{
    display:block !important;
    margin-top:4px !important;
    font-style:normal !important;
    color:#66758d !important;
    font-size:15px !important;
    line-height:1.35 !important;
  }
}
@media(max-width:420px){
  body.app-authenticated .table-wrap td{
    grid-template-columns:1fr !important;
    gap:5px !important;
  }
}
@media(min-width:761px){
  body.app-authenticated .dashboard-events-mobile-cards{
    display:none !important;
  }
}


/* ============================================================
   PUBLIC LANDING PAGE – AVTOPARK
   ============================================================ */
body.page-index.app-public{
  background:#f3f6fb;
  color:#1f2d4d;
}
body.page-index.app-public .page{
  padding:0;
  max-width:none;
}
body.page-index.app-public .public-topbar{
  position:sticky;
  top:0;
  z-index:30;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px);
}
.landing-hero{
  position:relative;
  overflow:hidden;
  padding:54px 28px 44px;
}
.landing-hero-bg{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 82% 12%, rgba(23,101,255,.16), transparent 34%),
    radial-gradient(circle at 12% 76%, rgba(255,255,255,.86), transparent 32%),
    linear-gradient(180deg,#edf4ff 0%, #f7f9fc 100%);
  z-index:0;
}
.landing-hero-inner{
  position:relative;
  z-index:1;
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0, .92fr) minmax(500px, 1.08fr);
  gap:42px;
  align-items:center;
}
.landing-kicker{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 14px;
  border-radius:999px;
  background:#e7efff;
  color:#0d4db8;
  font-weight:800;
  font-size:14px;
  margin-bottom:18px;
}
.landing-hero h1{
  font-size:58px;
  line-height:1.04;
  letter-spacing:-.04em;
  margin:0 0 18px;
  color:#14284d;
}
.landing-hero p{
  font-size:20px;
  line-height:1.65;
  color:#52627c;
  margin:0 0 26px;
}
.landing-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-bottom:20px;
}
.landing-main-btn,
.landing-secondary-btn{
  min-height:52px;
  padding:0 24px;
  border-radius:16px;
  font-size:16px;
}
.landing-contact-line{
  display:flex;
  flex-wrap:wrap;
  gap:12px 22px;
  color:#5d6e89;
  font-size:15px;
}
.landing-contact-line strong{
  color:#1f355d;
}
.landing-hero-visual{
  position:relative;
  min-height:520px;
}
.landing-monitor{
  position:absolute;
  inset:20px 0 auto 0;
  height:430px;
  background:#111827;
  border:8px solid #1d2738;
  border-radius:30px;
  box-shadow:0 28px 70px rgba(24,39,70,.24);
  overflow:hidden;
}
.landing-monitor:after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-88px;
  width:120px;
  height:88px;
  transform:translateX(-50%);
  background:#334155;
  border-radius:0 0 18px 18px;
}
.landing-monitor-top{
  height:44px;
  background:#f2f6fb;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 16px;
  color:#6b7b92;
}
.landing-monitor-top span{
  width:12px;
  height:12px;
  border-radius:50%;
  background:#ef4444;
}
.landing-monitor-top span:nth-child(2){background:#f59e0b}
.landing-monitor-top span:nth-child(3){background:#22c55e}
.landing-monitor-top b{
  margin-left:14px;
  font-size:14px;
}
.landing-monitor-body{
  display:grid;
  grid-template-columns:190px 1fr;
  height:386px;
  background:#f8fafc;
}
.landing-mini-sidebar{
  background:#0751c4;
  color:#fff;
  padding:24px 18px;
}
.landing-mini-sidebar strong{
  display:block;
  margin-bottom:24px;
  font-size:18px;
}
.landing-mini-sidebar em{
  display:block;
  font-style:normal;
  padding:10px 12px;
  margin-bottom:8px;
  border-radius:12px;
  background:rgba(255,255,255,.12);
  font-size:13px;
}
.landing-mini-content{
  padding:26px;
}
.landing-mini-title{
  font-size:22px;
  font-weight:800;
  margin-bottom:18px;
  color:#172b4d;
}
.landing-mini-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:18px;
}
.landing-mini-stats div{
  background:#fff;
  border:1px solid #e5ebf4;
  border-radius:18px;
  padding:14px;
}
.landing-mini-stats b{
  display:block;
  font-size:30px;
  color:#1765ff;
}
.landing-mini-stats span{
  display:block;
  color:#6b7b92;
  font-size:12px;
}
.landing-mini-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  background:#fff;
  border:1px solid #e5ebf4;
  border-radius:16px;
  padding:13px 14px;
  margin-bottom:10px;
  font-size:13px;
}
.landing-mini-row strong{
  color:#172b4d;
}
.landing-mini-row span{
  color:#6b7b92;
}
.landing-phone-card{
  position:absolute;
  right:20px;
  bottom:8px;
  width:300px;
  min-height:168px;
  background:#fff;
  border:1px solid #dfe7f3;
  border-radius:30px;
  box-shadow:0 22px 60px rgba(24,39,70,.22);
  padding:30px 22px 20px;
}
.landing-phone-notch{
  position:absolute;
  top:12px;
  left:50%;
  transform:translateX(-50%);
  width:86px;
  height:7px;
  border-radius:999px;
  background:#dbe4f0;
}
.landing-phone-card h3{
  margin:0 0 12px;
  font-size:17px;
  color:#172b4d;
}
.landing-phone-card strong{
  display:block;
  color:#172b4d;
  font-size:15px;
  margin-bottom:8px;
}
.landing-phone-card span{
  display:block;
  color:#6b7b92;
  line-height:1.45;
  font-size:14px;
}
.landing-section{
  max-width:1180px;
  margin:0 auto;
  padding:48px 28px;
}
.landing-section-head{
  max-width:720px;
  margin-bottom:24px;
}
.landing-section-head h2,
.landing-cta h2{
  margin:0 0 10px;
  color:#14284d;
  font-size:36px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.landing-section-head p,
.landing-cta p{
  color:#64748b;
  font-size:18px;
  line-height:1.6;
  margin:0;
}
.landing-feature-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.landing-feature-card{
  background:#fff;
  border:1px solid #e2e8f2;
  border-radius:24px;
  padding:26px;
  box-shadow:0 12px 34px rgba(20,40,77,.06);
}
.landing-feature-icon{
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  background:#edf4ff;
  font-size:27px;
  margin-bottom:16px;
}
.landing-feature-card h3{
  margin:0 0 10px;
  color:#14284d;
  font-size:22px;
}
.landing-feature-card p{
  margin:0;
  color:#5d6e89;
  line-height:1.65;
}
.landing-flow-section{
  padding-top:26px;
}
.landing-flow{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.landing-flow div{
  background:#fff;
  border:1px solid #e2e8f2;
  border-radius:22px;
  padding:22px;
}
.landing-flow b{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#1765ff;
  color:#fff;
  margin-bottom:14px;
}
.landing-flow strong{
  display:block;
  color:#14284d;
  margin-bottom:8px;
  font-size:18px;
}
.landing-flow span{
  color:#64748b;
  line-height:1.55;
  display:block;
}
.landing-cta{
  max-width:1124px;
  margin:26px auto 56px;
  padding:34px;
  border-radius:28px;
  background:linear-gradient(135deg,#0d4db8,#1765ff);
  color:#fff;
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  box-shadow:0 22px 60px rgba(23,101,255,.22);
}
.landing-cta h2,
.landing-cta p{
  color:#fff;
}
.landing-cta-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.landing-cta .btn{
  background:#fff;
  color:#0d4db8;
  border-color:#fff;
}
.landing-cta .btn-primary{
  background:#0b2f76;
  color:#fff;
  border-color:#0b2f76;
}
@media(max-width:1020px){
  .landing-hero-inner{
    grid-template-columns:1fr;
  }
  .landing-hero-visual{
    min-height:450px;
  }
  .landing-monitor{
    position:relative;
  }
  .landing-phone-card{
    right:18px;
    bottom:-10px;
  }
  .landing-feature-grid,
  .landing-flow{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:680px){
  .landing-hero{
    padding:34px 14px 28px;
  }
  .landing-hero h1{
    font-size:38px;
  }
  .landing-hero p{
    font-size:17px;
  }
  .landing-actions,
  .landing-cta-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .landing-actions .btn,
  .landing-cta-actions .btn{
    width:100%;
  }
  .landing-hero-visual{
    min-height:520px;
  }
  .landing-monitor{
    height:405px;
    border-width:5px;
    border-radius:24px;
  }
  .landing-monitor-body{
    grid-template-columns:1fr;
    height:361px;
  }
  .landing-mini-sidebar{
    display:none;
  }
  .landing-mini-content{
    padding:18px;
  }
  .landing-mini-stats{
    grid-template-columns:1fr;
  }
  .landing-mini-row{
    display:grid;
  }
  .landing-phone-card{
    left:18px;
    right:18px;
    bottom:0;
    width:auto;
  }
  .landing-section{
    padding:34px 14px;
  }
  .landing-section-head h2,
  .landing-cta h2{
    font-size:28px;
  }
  .landing-feature-grid,
  .landing-flow{
    grid-template-columns:1fr;
  }
  .landing-cta{
    margin:20px 14px 42px;
    display:grid;
    padding:26px 20px;
  }
}


/* ============================================================
   Icons + autocomplete hardening visual polish
   ============================================================ */
.reg-with-car,
.event-label-with-icon{
  display:inline-flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}
.event-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:30px;
  width:30px;
  height:30px;
  border-radius:10px;
  background:#edf4ff;
  color:#1765ff;
  font-size:17px;
  line-height:1;
}
.mycars-table-wrap td[data-label="Рег. №"] strong,
.events-table td[data-label="Рег. №"] strong{
  color:#16294c;
}
.car-card-top .reg-with-car{
  font-size:18px;
}
.mobile-event-card .event-label-with-icon{
  white-space:normal;
  align-items:flex-start;
}
.mobile-event-card .reg-with-car{
  white-space:normal;
}
@media(max-width:760px){
  .reg-with-car,
  .event-label-with-icon{
    white-space:normal;
    word-break:normal;
    overflow-wrap:anywhere;
  }
  .events-table-wrap td[data-label="Тип събитие"] .event-label-with-icon,
  .dashboard-events-mobile-cards .event-label-with-icon{
    font-size:17px;
  }
  .event-icon{
    min-width:34px;
    width:34px;
    height:34px;
    border-radius:12px;
    font-size:18px;
  }
}


/* Profile: active notifications above basic settings */
body.page-profile .profile-active-notifications-top{
  margin:0 0 18px;
  border-color:#f3d48a;
  background:linear-gradient(180deg,#fffdf7 0%, #ffffff 72%);
}
body.page-profile .profile-active-notifications-top[data-empty="1"]{
  display:none !important;
}
body.page-profile .profile-active-notifications-top .panel-heading h2{
  color:#7c4a03;
}
body.page-profile .profile-active-notifications-top .badge.warning{
  background:#fff2cc;
  color:#a66400;
}
body.page-profile .profile-active-notifications-top [data-pwa-ack-panel]{
  margin-top:12px;
}


/* Profile: active notifications true top priority */
body.page-profile .profile-active-notifications-top{
  margin:0 0 18px !important;
  border:2px solid #f0c96a !important;
  background:linear-gradient(180deg,#fff8e6 0%, #ffffff 78%) !important;
  box-shadow:0 14px 38px rgba(181,112,10,.12) !important;
}
body.page-profile .profile-active-notifications-top[data-empty="1"]{display:none !important;}
body.page-profile .profile-active-notifications-top .panel-heading{align-items:flex-start;}
body.page-profile .profile-active-notifications-top h2{color:#7c4a03 !important; font-size:24px;}
body.page-profile .profile-active-notifications-top .muted{color:#6f5424; font-weight:600;}
body.page-profile .profile-active-notifications-top [data-pwa-ack-panel]{margin-top:14px;}
body.page-profile .profile-device-notifications-card{margin-top:18px;}


/* Admin: push repair access card */
.admin-push-repair-card{
  border-color:#cfe0ff;
  background:linear-gradient(180deg,#f8fbff 0%, #ffffff 72%);
  margin-bottom:18px;
}
.admin-push-repair-card .panel-heading{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
}
.admin-mini-info-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.admin-mini-info-grid div{
  background:#fff;
  border:1px solid #e2e8f2;
  border-radius:16px;
  padding:14px;
}
.admin-mini-info-grid strong{
  display:block;
  color:#14284d;
  margin-bottom:6px;
}
.admin-mini-info-grid span{
  color:#64748b;
  line-height:1.5;
  display:block;
}
@media(max-width:760px){
  .admin-push-repair-card .panel-heading{
    display:grid;
  }
  .admin-push-repair-card .panel-heading .btn{
    width:100%;
  }
  .admin-mini-info-grid{
    grid-template-columns:1fr;
  }
}


/* Push repair notice */
.push-repair-notice{
  border:1px solid #f4c95d;
  background:#fff8df;
  color:#6f4700;
  border-radius:18px;
  padding:16px 18px;
  margin:0 0 18px;
}
.push-repair-notice strong{
  color:#7c4a03;
}
.push-repair-notice .btn{
  margin-top:4px;
}


/* Dedicated push repair page */
.push-repair-page-card{
  max-width:860px;
  margin:0 auto;
  text-align:center;
  padding:34px 28px;
}
.push-repair-big-icon{
  width:78px;
  height:78px;
  margin:0 auto 18px;
  border-radius:28px;
  background:#edf4ff;
  color:#1765ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:38px;
}
.push-repair-status-box{
  margin:20px auto;
  max-width:680px;
  border:1px solid #dbe5f3;
  background:#f8fafc;
  color:#334155;
  border-radius:18px;
  padding:16px;
  font-weight:700;
}
.push-repair-status-box.warning{
  border-color:#f4c95d;
  background:#fff8df;
  color:#7c4a03;
}
.push-repair-status-box.success{
  border-color:#bbf7d0;
  background:#ecfdf3;
  color:#166534;
}
.push-repair-status-box.danger{
  border-color:#fecaca;
  background:#fef2f2;
  color:#991b1b;
}
.push-repair-page-actions{
  justify-content:center;
}
.push-repair-help{
  margin-top:22px;
  background:#f8fafc;
  border:1px solid #e2e8f2;
  border-radius:18px;
  padding:18px;
  text-align:left;
}
.push-repair-direct-block{
  margin-bottom:18px;
}
@media(max-width:680px){
  .push-repair-page-card{
    padding:24px 16px;
  }
  .push-repair-page-actions{
    display:grid;
  }
  .push-repair-page-actions .btn{
    width:100%;
  }
}


/* Global push repair banner shown at the top of every logged-in page */
.global-push-repair-banner{
  position:relative;
  z-index:50;
  width:100%;
  padding:12px 18px 0;
}
.global-push-repair-banner-inner{
  max-width:1180px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border:1px solid #f4c95d;
  background:linear-gradient(180deg,#fff8df 0%, #fff3c4 100%);
  color:#6f4700;
  border-radius:20px;
  box-shadow:0 14px 34px rgba(161,98,7,.14);
}
.global-push-repair-icon{
  width:44px;
  height:44px;
  border-radius:16px;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:23px;
  flex:0 0 auto;
}
.global-push-repair-text{
  display:grid;
  gap:3px;
  min-width:0;
  flex:1;
}
.global-push-repair-text strong{
  color:#7c4a03;
  font-size:16px;
}
.global-push-repair-text span{
  color:#704900;
  line-height:1.35;
  font-size:14px;
}
.global-push-repair-btn{
  white-space:nowrap;
}
@media(max-width:720px){
  .global-push-repair-banner{
    padding:10px 10px 0;
  }
  .global-push-repair-banner-inner{
    display:grid;
    grid-template-columns:42px 1fr;
    gap:10px;
    padding:13px;
    border-radius:18px;
  }
  .global-push-repair-btn{
    grid-column:1 / -1;
    width:100%;
  }
}


/* HARD FIX: global push repair banner must be the first visible element */
.global-push-repair-banner{
  position:sticky !important;
  top:0 !important;
  z-index:9999 !important;
  width:100% !important;
  padding:10px 12px !important;
  background:rgba(243,246,251,.96) !important;
  backdrop-filter:blur(8px);
}
.global-push-repair-banner-inner{
  max-width:1180px;
  margin:0 auto;
}
.push-repair-direct-block{
  display:none !important;
}


/* WHITE SCREEN BODY FIX: repair banner safe top placement */
.global-push-repair-banner{
  position:sticky;
  top:0;
  z-index:9999;
}


/* HARD FIX 2026-05-26: push repair banner as real top overlay, independent from sidebar/layout */
.global-push-repair-overlay[hidden]{
  display:none !important;
}
.global-push-repair-overlay{
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  width:100vw !important;
  max-width:none !important;
  z-index:2147483000 !important;
  display:block !important;
  padding:10px 12px !important;
  margin:0 !important;
  background:rgba(243,246,251,.96) !important;
  backdrop-filter:blur(8px);
  box-sizing:border-box !important;
  transform:none !important;
  overflow:visible !important;
  text-align:left !important;
}
.global-push-repair-box{
  width:min(1180px, calc(100vw - 24px)) !important;
  max-width:1180px !important;
  margin:0 auto !important;
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  padding:14px 16px !important;
  border:1px solid #f4c95d !important;
  background:linear-gradient(180deg,#fff8df 0%, #fff3c4 100%) !important;
  color:#6f4700 !important;
  border-radius:20px !important;
  box-shadow:0 14px 34px rgba(161,98,7,.18) !important;
  box-sizing:border-box !important;
}
.global-push-repair-icon{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  border-radius:16px !important;
  background:#ffffff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:23px !important;
  line-height:1 !important;
}
.global-push-repair-text{
  display:grid !important;
  gap:3px !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}
.global-push-repair-text strong{
  display:block !important;
  color:#7c4a03 !important;
  font-size:16px !important;
  line-height:1.25 !important;
  white-space:normal !important;
}
.global-push-repair-text span{
  display:block !important;
  color:#704900 !important;
  line-height:1.35 !important;
  font-size:14px !important;
  white-space:normal !important;
}
.global-push-repair-btn{
  flex:0 0 auto !important;
  white-space:nowrap !important;
}
body.has-global-push-repair-banner{
  padding-top:92px !important;
}
@media(max-width:720px){
  .global-push-repair-overlay{
    padding:8px !important;
  }
  .global-push-repair-box{
    width:calc(100vw - 16px) !important;
    display:grid !important;
    grid-template-columns:42px 1fr !important;
    gap:10px !important;
    padding:12px !important;
    border-radius:18px !important;
  }
  .global-push-repair-icon{
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
  }
  .global-push-repair-btn{
    grid-column:1 / -1 !important;
    width:100% !important;
    justify-content:center !important;
  }
  body.has-global-push-repair-banner{
    padding-top:150px !important;
  }
}

/* DUPLICATE PUSH REPAIR BLOCK HIDE */
.push-repair-direct-block{display:none!important;}


/* RESTORE PAGES AFTER BLANK SCREEN: disable experimental global push repair overlay */
.global-push-repair-overlay,
.global-push-repair-banner,
#globalPushRepairOverlay{
  display:none !important;
}
body.has-global-push-repair-banner,
html.has-global-push-repair-banner{
  padding-top:0 !important;
}


/* SERVER-SIDE PUSH REPAIR BANNER - safe inside app content, no JS required */
.server-push-repair-banner{
  display:flex;
  align-items:center;
  gap:14px;
  margin:14px 18px 0;
  padding:14px 16px;
  border:1px solid #f4c95d;
  background:linear-gradient(180deg,#fff8df 0%, #fff3c4 100%);
  color:#6f4700;
  border-radius:20px;
  box-shadow:0 14px 34px rgba(161,98,7,.14);
  position:relative;
  z-index:5;
}
.server-push-repair-icon{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:16px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:23px;
}
.server-push-repair-text{
  display:grid;
  gap:3px;
  min-width:0;
  flex:1;
}
.server-push-repair-text strong{
  color:#7c4a03;
  font-size:16px;
}
.server-push-repair-text span{
  color:#704900;
  line-height:1.35;
  font-size:14px;
}
.server-push-repair-btn{
  white-space:nowrap;
}
.global-push-repair-overlay,
.global-push-repair-banner,
#globalPushRepairOverlay{
  display:none !important;
}
body.has-global-push-repair-banner,
html.has-global-push-repair-banner{
  padding-top:0 !important;
}
@media(max-width:720px){
  .server-push-repair-banner{
    display:grid;
    grid-template-columns:42px 1fr;
    gap:10px;
    margin:10px 10px 0;
    padding:12px;
    border-radius:18px;
  }
  .server-push-repair-icon{
    width:42px;
    height:42px;
    min-width:42px;
  }
  .server-push-repair-btn{
    grid-column:1 / -1;
    width:100%;
    justify-content:center;
  }
}


/* HARD SERVER-SIDE PUSH REPAIR BANNER */
.server-push-repair-banner{
  display:flex;
  align-items:center;
  gap:14px;
  margin:14px 18px 0;
  padding:14px 16px;
  border:1px solid #f4c95d;
  background:linear-gradient(180deg,#fff8df 0%, #fff3c4 100%);
  color:#6f4700;
  border-radius:20px;
  box-shadow:0 14px 34px rgba(161,98,7,.14);
  position:relative;
  z-index:20;
}
.server-push-repair-icon{width:44px;height:44px;min-width:44px;border-radius:16px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:23px}
.server-push-repair-text{display:grid;gap:3px;min-width:0;flex:1}
.server-push-repair-text strong{color:#7c4a03;font-size:16px}
.server-push-repair-text span{color:#704900;line-height:1.35;font-size:14px}
.server-push-repair-btn{white-space:nowrap}
@media(max-width:720px){
  .server-push-repair-banner{display:grid;grid-template-columns:42px 1fr;gap:10px;margin:10px 10px 0;padding:12px;border-radius:18px}
  .server-push-repair-btn{grid-column:1/-1;width:100%;justify-content:center}
}


/* FINAL SERVER-SIDE PUSH REPAIR BANNER */
.server-push-repair-banner{
  display:flex;
  align-items:center;
  gap:14px;
  margin:14px 18px 0;
  padding:14px 16px;
  border:1px solid #f4c95d;
  background:linear-gradient(180deg,#fff8df 0%, #fff3c4 100%);
  color:#6f4700;
  border-radius:20px;
  box-shadow:0 14px 34px rgba(161,98,7,.14);
  position:relative;
  z-index:20;
}
.server-push-repair-icon{width:44px;height:44px;min-width:44px;border-radius:16px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:23px}
.server-push-repair-text{display:grid;gap:3px;min-width:0;flex:1}
.server-push-repair-text strong{color:#7c4a03;font-size:16px}
.server-push-repair-text span{color:#704900;line-height:1.35;font-size:14px}
.server-push-repair-btn{white-space:nowrap}
@media(max-width:720px){
  .server-push-repair-banner{display:grid;grid-template-columns:42px 1fr;gap:10px;margin:10px 10px 0;padding:12px;border-radius:18px}
  .server-push-repair-btn{grid-column:1/-1;width:100%;justify-content:center}
}


/* USER-FLAG PUSH REPAIR BANNER */
.server-push-repair-banner{
  display:flex;align-items:center;gap:14px;margin:14px 18px 0;padding:14px 16px;
  border:1px solid #f4c95d;background:linear-gradient(180deg,#fff8df 0%,#fff3c4 100%);
  color:#6f4700;border-radius:20px;box-shadow:0 14px 34px rgba(161,98,7,.14);position:relative;z-index:20;
}
.server-push-repair-icon{width:44px;height:44px;min-width:44px;border-radius:16px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:23px}
.server-push-repair-text{display:grid;gap:3px;min-width:0;flex:1}
.server-push-repair-text strong{color:#7c4a03;font-size:16px}
.server-push-repair-text span{color:#704900;line-height:1.35;font-size:14px}
.server-push-repair-btn{white-space:nowrap}
@media(max-width:720px){.server-push-repair-banner{display:grid;grid-template-columns:42px 1fr;gap:10px;margin:10px 10px 0;padding:12px;border-radius:18px}.server-push-repair-btn{grid-column:1/-1;width:100%;justify-content:center}}


/* UI flow fix: real event counters and notification page */
.sidebar-link{
  position:relative;
}
.sidebar-count{
  margin-left:auto;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
}
.topbar-bell{
  position:relative;
}
.topbar-count{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  line-height:20px;
  font-weight:900;
  box-shadow:0 4px 10px rgba(239,68,68,.35);
}
.page-notification-settings .profile-notification-card,
.page-notification-settings .profile-active-notifications-top{
  margin-bottom:18px;
}
@media(max-width:720px){
  .mycars-page-card .mycars-toolbar .btn[href="add_car.php"]{
    width:100%;
  }
}


/* Top bell real events count */
.topbar-bell{
  position:relative;
}
.topbar-count{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  line-height:20px;
  font-weight:900;
  box-shadow:0 4px 10px rgba(239,68,68,.35);
}
.sidebar-count{
  margin-left:auto;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
}


/* Top bell single real count badge - remove old overlapping blue circle */
.topbar-bell .badge,
.topbar-bell .notification-count,
.topbar-bell .notification-badge,
.topbar-bell .pwa-badge,
.topbar-bell .device-badge,
.topbar-bell [data-badge],
.topbar-bell [data-notification-count],
.topbar-bell .badge-count{
  display:none !important;
}

.topbar-bell{
  position:relative !important;
}

.topbar-bell .topbar-count{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  color:#fff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  border:2px solid #fff !important;
  z-index:3 !important;
}


/* Maintenance mode admin UI */
.admin-maintenance-card{
  border-color:#f4c95d;
  background:linear-gradient(180deg,#fffdf4 0%, #ffffff 80%);
}
.maintenance-admin-card .toggle-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border:1px solid #e2e8f2;
  border-radius:16px;
  background:#f8fafc;
  cursor:pointer;
}
.maintenance-admin-card .toggle-row input{
  width:22px;
  height:22px;
  margin-top:3px;
}
.maintenance-admin-card .toggle-row span{
  display:grid;
  gap:4px;
}
.maintenance-admin-card .toggle-row small{
  color:#64748b;
}


/* Maintenance/admin primary button contrast fix */
.btn.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary,
.admin-maintenance-card .btn.btn-primary,
.admin-push-repair-card .btn.btn-primary,
.admin-settings-card .btn.btn-primary{
  color:#ffffff !important;
}

.btn.btn-primary:visited,
a.btn.btn-primary:visited,
.btn.btn-primary:hover,
a.btn.btn-primary:hover,
.btn.btn-primary:focus,
a.btn.btn-primary:focus{
  color:#ffffff !important;
}


/* FINAL: real event count badges */
.topbar-bell{
  position:relative !important;
}

.topbar-bell .badge,
.topbar-bell .notification-count,
.topbar-bell .notification-badge,
.topbar-bell .pwa-badge,
.topbar-bell .device-badge,
.topbar-bell [data-badge],
.topbar-bell [data-notification-count],
.topbar-bell .badge-count{
  display:none !important;
}

.topbar-bell .topbar-count{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  border:2px solid #ffffff !important;
  z-index:5 !important;
}

.sidebar-count{
  margin-left:auto !important;
  min-width:22px !important;
  height:22px !important;
  padding:0 7px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:12px !important;
  font-weight:900 !important;
}

/* FINAL: button text contrast rules */
/* Blue background buttons must always have white text */
.btn.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary,
input.btn.btn-primary,
.btn-primary,
a.btn-primary,
button.btn-primary,
.quick-actions .btn.btn-primary,
.card .btn.btn-primary,
.panel-heading .btn.btn-primary{
  color:#ffffff !important;
}

.btn.btn-primary:visited,
a.btn.btn-primary:visited,
.btn.btn-primary:hover,
a.btn.btn-primary:hover,
.btn.btn-primary:focus,
a.btn.btn-primary:focus,
button.btn.btn-primary:hover,
button.btn.btn-primary:focus{
  color:#ffffff !important;
}

/* Non-blue/default/light buttons should use black/dark readable text */
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger){
  color:#111827 !important;
}

/* Danger buttons keep white text for readability on red background */
.btn.btn-danger,
a.btn.btn-danger,
button.btn.btn-danger,
input.btn.btn-danger,
.btn-danger,
a.btn-danger,
button.btn-danger{
  color:#ffffff !important;
}

.btn.btn-danger:hover,
a.btn.btn-danger:hover,
.btn.btn-danger:focus,
a.btn.btn-danger:focus,
.btn.btn-danger:visited,
a.btn.btn-danger:visited{
  color:#ffffff !important;
}



/* FINAL FIX: readable client statuses and badges */
.badge{
  color:#111827 !important;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
}

.badge.muted,
.badge.secondary,
.badge.default{
  color:#334155 !important;
  background:#f1f5f9 !important;
  border-color:#e2e8f0 !important;
}

.badge.success,
.badge.ok,
.badge.active,
.status-success,
.status-active{
  color:#166534 !important;
  background:#dcfce7 !important;
  border-color:#bbf7d0 !important;
}

.badge.warning,
.badge.pending,
.status-warning,
.status-pending{
  color:#92400e !important;
  background:#fef3c7 !important;
  border-color:#fde68a !important;
}

.badge.danger,
.badge.error,
.badge.expired,
.status-danger,
.status-error,
.status-expired{
  color:#991b1b !important;
  background:#fee2e2 !important;
  border-color:#fecaca !important;
}

.badge.info,
.status-info{
  color:#1e3a8a !important;
  background:#dbeafe !important;
  border-color:#bfdbfe !important;
}

/* Event count badges stay red with white text only here */
.sidebar-count,
.topbar-count,
.topbar-bell .topbar-count{
  color:#ffffff !important;
  background:#ef4444 !important;
}

/* Button contrast: only blue primary buttons get white text */
.btn.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary,
input.btn.btn-primary,
.btn-primary,
a.btn-primary,
button.btn-primary{
  color:#ffffff !important;
}

/* Light/default buttons get dark text */
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger){
  color:#111827 !important;
}

/* Red danger buttons keep white text */
.btn.btn-danger,
a.btn.btn-danger,
button.btn.btn-danger,
input.btn.btn-danger,
.btn-danger,
a.btn-danger,
button.btn-danger{
  color:#ffffff !important;
}

/* Table/status text should not inherit white from parent buttons */
td .badge,
.card .badge,
.table-wrap .badge,
.mycars-card .badge,
.event-card .badge,
.vehicle-card .badge{
  color:inherit;
}
td .badge.success,
.card .badge.success,
.table-wrap .badge.success{ color:#166534 !important; }
td .badge.warning,
.card .badge.warning,
.table-wrap .badge.warning{ color:#92400e !important; }
td .badge.danger,
.card .badge.danger,
.table-wrap .badge.danger{ color:#991b1b !important; }
td .badge.muted,
.card .badge.muted,
.table-wrap .badge.muted{ color:#334155 !important; }


/* FINAL FIX: notification page action buttons readable text */
.profile-notification-card .btn,
.profile-active-notifications-top .btn,
.page-notification-settings .btn,
[data-pwa-ack-panel] .btn,
[data-pwa-ack-panel] button,
[data-enable-pwa-notifications],
[data-disable-device-notifications],
[data-enable-device-notifications],
[data-test-server-webpush],
[data-test-local-notification],
[data-pwa-ack],
button[data-pwa-ack],
.btn[data-pwa-ack]{
  color:#111827 !important;
}

/* If a notification button is explicitly primary/blue, keep readable white text */
.profile-notification-card .btn.btn-primary,
.page-notification-settings .btn.btn-primary,
button.btn.btn-primary[data-enable-pwa-notifications],
button.btn.btn-primary[data-enable-device-notifications]{
  color:#ffffff !important;
}

/* Disable/off buttons that are not blue must stay dark text on light backgrounds */
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger),
.profile-active-notifications-top .btn:not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger),
[data-pwa-ack-panel] .btn:not(.btn-primary):not(.btn-danger),
[data-pwa-ack-panel] button:not(.btn-primary):not(.btn-danger){
  color:#111827 !important;
}

/* Danger/red buttons keep white text */
.profile-notification-card .btn.btn-danger,
.page-notification-settings .btn.btn-danger,
button.btn.btn-danger[data-disable-device-notifications]{
  color:#ffffff !important;
}

/* Specific "Разбрах" acknowledgement buttons are light buttons: dark text */
[data-pwa-ack-panel] button,
[data-pwa-ack-panel] .btn,
button[data-pwa-ack],
.btn[data-pwa-ack]{
  color:#111827 !important;
  background:#ffffff;
  border-color:#dbe5f3;
}


/* HARD FIX: notification_settings buttons text */
body.page-notification_settings .btn,
body.page-notification-settings .btn,
.notification-settings-page .btn,
.profile-notification-card .btn,
.profile-active-notifications-top .btn,
.page-notification-settings .btn,
[data-pwa-ack-panel] .btn,
[data-pwa-ack-panel] button,
.notification_settings .btn,
a[href="notification_settings.php"].btn,
button[data-enable-pwa-notifications],
button[data-disable-device-notifications],
button[data-enable-device-notifications],
button[data-test-server-webpush],
button[data-test-local-notification],
button[data-pwa-ack],
.btn[data-pwa-ack]{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* In notification settings, even if classes are primary/danger, keep text readable as requested */
.profile-notification-card button,
.profile-notification-card .btn,
.page-notification-settings button,
.page-notification-settings .btn,
[data-pwa-ack-panel] button,
[data-pwa-ack-panel] .btn{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* "Разбрах" buttons specifically */
button[data-pwa-ack],
.btn[data-pwa-ack],
[data-pwa-ack-panel] button{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  background:#ffffff !important;
  border-color:#dbe5f3 !important;
}

/* Hide upper mobile back button in client notification/mobile layouts */
@media(max-width: 760px){
  .mobile-top-back,
  .client-top-back,
  .page-hero .btn[href="profile.php"],
  .page-hero .btn[href="dashboard.php"],
  .page-hero .btn[href="my_cars.php"]{
    display:none !important;
  }
}

/* Safety: in My cars, avoid duplicate add-car buttons if any duplicate remains in same toolbar */
.mycars-toolbar a[href="add_car.php"] + a[href="add_car.php"],
.quick-actions a[href="add_car.php"] + a[href="add_car.php"],
.panel-heading a[href="add_car.php"] + a[href="add_car.php"]{
  display:none !important;
}


/* Do NOT hide the old badge anymore. Recolor it red instead. */
.topbar-bell .badge,
.topbar-bell .notification-count,
.topbar-bell .notification-badge,
.topbar-bell .pwa-badge,
.topbar-bell .device-badge,
.topbar-bell .badge-count,
.topbar-bell [data-badge],
.topbar-bell [data-notification-count],
.topbar-events-bell .badge,
.topbar-events-bell .notification-count,
.topbar-events-bell .notification-badge,
.topbar-events-bell .pwa-badge,
.topbar-events-bell .device-badge,
.topbar-events-bell .badge-count,
.topbar-events-bell [data-badge],
.topbar-events-bell [data-notification-count],
a[href="events.php"].topbar-icon-btn .badge,
a[href="events.php"].topbar-icon-btn .notification-count,
a[href="events.php"].topbar-icon-btn .notification-badge,
a[href="events.php"].topbar-icon-btn .pwa-badge,
a[href="events.php"].topbar-icon-btn .device-badge,
a[href="events.php"].topbar-icon-btn .badge-count,
a[href="events.php"].topbar-icon-btn [data-badge],
a[href="events.php"].topbar-icon-btn [data-notification-count],
.topbar-count,
.topbar-count-real{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:999 !important;
}

/* If two badge elements exist, keep the real .topbar-count visible and hide only following duplicates */
.topbar-bell .topbar-count ~ .badge,
.topbar-bell .topbar-count ~ .notification-count,
.topbar-bell .topbar-count ~ .notification-badge,
.topbar-bell .topbar-count ~ .pwa-badge,
.topbar-bell .topbar-count ~ .device-badge,
.topbar-bell .topbar-count ~ .badge-count,
.topbar-events-bell .topbar-count ~ .badge,
.topbar-events-bell .topbar-count ~ .notification-count,
.topbar-events-bell .topbar-count ~ .notification-badge,
.topbar-events-bell .topbar-count ~ .pwa-badge,
.topbar-events-bell .topbar-count ~ .device-badge,
.topbar-events-bell .topbar-count ~ .badge-count{
  display:none !important;
}


/* Actual topbar positioning for the visible bell count */
#topbarEventsCount,
[data-event-bell="1"] .topbar-count,
#topbarEventsBell .topbar-count,
.app-topbar-right a[href="events.php"] .topbar-count,
.app-topbar-right a.topbar-icon-btn:first-child .topbar-count{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:99999 !important;
}

/* Sidebar event count also red */
.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-count.event-badge{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* If browser/PWA injects a blue count by inline style, this still forces red on known count elements */
#topbarEventsBell *[style],
[data-event-bell="1"] *[style],
.app-topbar-right a[href="events.php"] *[style]{
  --app-primary:#ef4444 !important;
  --primary:#ef4444 !important;
  --blue:#ef4444 !important;
}

/* Mobile topbar bell same rule */
@media(max-width: 900px){
  #topbarEventsCount,
  [data-event-bell="1"] .topbar-count,
  #topbarEventsBell .topbar-count,
  .app-topbar-right a[href="events.php"] .topbar-count,
  .app-topbar-right a.topbar-icon-btn:first-child .topbar-count{
    background:#ef4444 !important;
    background-color:#ef4444 !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
  }
}


/* Any small badge/count inside topbar must be red when it is in the icon button area */
.app-topbar .topbar-icon-btn .badge,
.app-topbar .topbar-icon-btn [class*="badge"],
.app-topbar .topbar-icon-btn [class*="count"],
.app-topbar .topbar-icon-btn [class*="notification"],
.topbar .topbar-icon-btn .badge,
.topbar .topbar-icon-btn [class*="badge"],
.topbar .topbar-icon-btn [class*="count"],
.topbar .topbar-icon-btn [class*="notification"],
.app-header .topbar-icon-btn .badge,
.app-header .topbar-icon-btn [class*="badge"],
.app-header .topbar-icon-btn [class*="count"],
.app-header .topbar-icon-btn [class*="notification"],
.header .topbar-icon-btn .badge,
.header .topbar-icon-btn [class*="badge"],
.header .topbar-icon-btn [class*="count"],
.header .topbar-icon-btn [class*="notification"],
.topbar-actions .topbar-icon-btn .badge,
.topbar-actions .topbar-icon-btn [class*="badge"],
.topbar-actions .topbar-icon-btn [class*="count"],
.topbar-actions .topbar-icon-btn [class*="notification"],
.header-actions .topbar-icon-btn .badge,
.header-actions .topbar-icon-btn [class*="badge"],
.header-actions .topbar-icon-btn [class*="count"],
.header-actions .topbar-icon-btn [class*="notification"],
.app-topbar-right .topbar-icon-btn .badge,
.app-topbar-right .topbar-icon-btn [class*="badge"],
.app-topbar-right .topbar-icon-btn [class*="count"],
.app-topbar-right .topbar-icon-btn [class*="notification"],
.topbar-right .topbar-icon-btn .badge,
.topbar-right .topbar-icon-btn [class*="badge"],
.topbar-right .topbar-icon-btn [class*="count"],
.topbar-right .topbar-icon-btn [class*="notification"]{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:#ffffff !important;
}

/* Direct fallback: first icon button in the topbar is the bell in this UI */
.app-topbar .topbar-icon-btn:first-child > *,
.topbar .topbar-icon-btn:first-child > *,
.app-header .topbar-icon-btn:first-child > *,
.header .topbar-icon-btn:first-child > *,
.topbar-actions .topbar-icon-btn:first-child > *,
.header-actions .topbar-icon-btn:first-child > *,
.app-topbar-right .topbar-icon-btn:first-child > *,
.topbar-right .topbar-icon-btn:first-child > *{
  --primary:#ef4444 !important;
  --blue:#ef4444 !important;
}

/* If the count bubble is a generic span/b element placed absolutely over the first icon, force it red */
.app-topbar .topbar-icon-btn:first-child > span:not(:first-child),
.app-topbar .topbar-icon-btn:first-child > b,
.app-topbar .topbar-icon-btn:first-child > i,
.topbar .topbar-icon-btn:first-child > span:not(:first-child),
.topbar .topbar-icon-btn:first-child > b,
.topbar .topbar-icon-btn:first-child > i,
.app-header .topbar-icon-btn:first-child > span:not(:first-child),
.app-header .topbar-icon-btn:first-child > b,
.app-header .topbar-icon-btn:first-child > i,
.header .topbar-icon-btn:first-child > span:not(:first-child),
.header .topbar-icon-btn:first-child > b,
.header .topbar-icon-btn:first-child > i,
.topbar-actions .topbar-icon-btn:first-child > span:not(:first-child),
.topbar-actions .topbar-icon-btn:first-child > b,
.topbar-actions .topbar-icon-btn:first-child > i,
.header-actions .topbar-icon-btn:first-child > span:not(:first-child),
.header-actions .topbar-icon-btn:first-child > b,
.header-actions .topbar-icon-btn:first-child > i,
.app-topbar-right .topbar-icon-btn:first-child > span:not(:first-child),
.app-topbar-right .topbar-icon-btn:first-child > b,
.app-topbar-right .topbar-icon-btn:first-child > i,
.topbar-right .topbar-icon-btn:first-child > span:not(:first-child),
.topbar-right .topbar-icon-btn:first-child > b,
.topbar-right .topbar-icon-btn:first-child > i{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:#ffffff !important;
}

/* Keep normal icon circles untouched unless they are the small numeric badge */
.topbar-icon-btn .topbar-count,
.topbar-icon-btn .event-badge,
.topbar-icon-btn [data-event-badge],
.topbar-icon-btn [data-force-red-badge-count]{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}


/* Repaint any pseudo badge generated by CSS */
#topbarEventsBell::before,
#topbarEventsBell::after,
[data-event-bell="1"]::before,
[data-event-bell="1"]::after,
.topbar-bell::before,
.topbar-bell::after,
.topbar-events-bell::before,
.topbar-events-bell::after,
.app-topbar-right .topbar-icon-btn:first-child::before,
.app-topbar-right .topbar-icon-btn:first-child::after,
.app-topbar .topbar-icon-btn:first-child::before,
.app-topbar .topbar-icon-btn:first-child::after,
.topbar .topbar-icon-btn:first-child::before,
.topbar .topbar-icon-btn:first-child::after,
.app-header .topbar-icon-btn:first-child::before,
.app-header .topbar-icon-btn:first-child::after,
.header .topbar-icon-btn:first-child::before,
.header .topbar-icon-btn:first-child::after{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border-color:#ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
}

/* If existing CSS uses ::after for the blue count, this makes it red and keeps position */
#topbarEventsBell[data-count]:not([data-count="0"])::after,
[data-event-bell="1"][data-count]:not([data-count="0"])::after{
  content:attr(data-count) !important;
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:99999 !important;
}

/* Hide real b-count when pseudo badge is active, to avoid duplicates */
#topbarEventsBell[data-count]:not([data-count="0"]) .topbar-count,
[data-event-bell="1"][data-count]:not([data-count="0"]) .topbar-count{
  display:none !important;
}

/* Also force sidebar event count red */
.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-count.event-badge,
.sidebar-count-real{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}





/* STABLE FIX: no JS, no pseudo badge, only real red count element */
#topbarEventsBell{
  position:relative !important;
}

#topbarEventsCount,
.topbar-bell .topbar-count{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:10 !important;
}

.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-count.event-badge{
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Disable old pseudo badge if any earlier CSS remains cached in cascade */
#topbarEventsBell::before,
#topbarEventsBell::after,
.topbar-bell::before,
.topbar-bell::after{
  content:none !important;
  display:none !important;
}


/* FINAL GLOBAL FIX: menu event badge and button hover contrast */

/* Real count badge beside "Предстоящи събития" in sidebar */
.sidebar-link[href="events.php"]{
  position:relative !important;
}
.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-link[href="events.php"] .event-badge,
.sidebar-count.event-badge{
  margin-left:auto !important;
  min-width:22px !important;
  height:22px !important;
  padding:0 7px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:12px !important;
  line-height:22px !important;
  font-weight:900 !important;
  box-shadow:0 4px 10px rgba(239,68,68,.25) !important;
}

/* Top bell simple real count */
#topbarEventsBell{
  position:relative !important;
}
#topbarEventsCount,
.topbar-bell .topbar-count{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:10 !important;
}

/* Disable old pseudo badge */
#topbarEventsBell::before,
#topbarEventsBell::after,
.topbar-bell::before,
.topbar-bell::after{
  content:none !important;
  display:none !important;
}

/* UNIVERSAL BUTTON CONTRAST */
/* Blue/primary buttons: always white text, including hover/focus/active/visited */
.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,
[type="submit"].btn-primary,
.quick-actions .btn.btn-primary,
.panel-heading .btn.btn-primary,
.card .btn.btn-primary{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover,
button.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
a.btn-primary:focus,
a.btn.btn-primary:focus,
button.btn-primary:focus,
button.btn.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:active,
a.btn-primary:active,
a.btn.btn-primary:active,
.btn-primary:visited,
a.btn-primary:visited,
a.btn.btn-primary:visited{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Red/danger buttons: white text, because the background is dark */
.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;
}
.btn-danger:hover,
.btn.btn-danger:hover,
a.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn-danger:hover,
button.btn.btn-danger:hover,
.btn-danger:focus,
.btn.btn-danger:focus,
a.btn-danger:focus,
a.btn.btn-danger:focus,
button.btn-danger:focus,
button.btn.btn-danger:focus,
.btn-danger:active,
.btn.btn-danger:active,
a.btn-danger:active,
a.btn.btn-danger:active,
.btn-danger:visited,
a.btn-danger:visited,
a.btn.btn-danger:visited{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Every non-primary, non-danger button: dark text on normal and hover states */
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger){
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
.btn:not(.btn-primary):not(.btn-danger):hover,
a.btn:not(.btn-primary):not(.btn-danger):hover,
button.btn:not(.btn-primary):not(.btn-danger):hover,
input.btn:not(.btn-primary):not(.btn-danger):hover,
.btn:not(.btn-primary):not(.btn-danger):focus,
a.btn:not(.btn-primary):not(.btn-danger):focus,
button.btn:not(.btn-primary):not(.btn-danger):focus,
input.btn:not(.btn-primary):not(.btn-danger):focus,
.btn:not(.btn-primary):not(.btn-danger):active,
a.btn:not(.btn-primary):not(.btn-danger):active,
button.btn:not(.btn-primary):not(.btn-danger):active,
input.btn:not(.btn-primary):not(.btn-danger):active,
.btn:not(.btn-primary):not(.btn-danger):visited,
a.btn:not(.btn-primary):not(.btn-danger):visited{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Extra fallback for light buttons that may not have .btn */
button:not(.btn-primary):not(.btn-danger):not(.sidebar-link),
a.button:not(.btn-primary):not(.btn-danger),
.action-button:not(.btn-primary):not(.btn-danger){
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
button:not(.btn-primary):not(.btn-danger):hover,
a.button:not(.btn-primary):not(.btn-danger):hover,
.action-button:not(.btn-primary):not(.btn-danger):hover{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Do not let button rules break badges/statuses */
.badge.success,.status-success{color:#166534 !important;-webkit-text-fill-color:#166534 !important;}
.badge.warning,.status-warning{color:#92400e !important;-webkit-text-fill-color:#92400e !important;}
.badge.danger,.badge.expired,.status-danger{color:#991b1b !important;-webkit-text-fill-color:#991b1b !important;}
.badge.muted,.badge.default{color:#334155 !important;-webkit-text-fill-color:#334155 !important;}
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* ============================================================
   ABSOLUTE FINAL 2026-05-26:
   real event badges, button hover contrast, remove top back
   ============================================================ */

/* Sidebar real event badge after "Предстоящи събития" */
.sidebar-link[href="events.php"]{
  position:relative !important;
}
.sidebar-link[href="events.php"] .sidebar-count.event-badge,
.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-count.event-badge{
  margin-left:auto !important;
  min-width:22px !important;
  height:22px !important;
  padding:0 7px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:12px !important;
  line-height:22px !important;
  font-weight:900 !important;
  box-shadow:0 4px 10px rgba(239,68,68,.25) !important;
}

/* Top bell count, pure HTML, no pseudo, no JS */
#topbarEventsBell{
  position:relative !important;
}
#topbarEventsCount,
#topbarEventsBell .topbar-count,
.topbar-bell .topbar-count.event-badge{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:10 !important;
}
#topbarEventsBell::before,
#topbarEventsBell::after,
.topbar-bell::before,
.topbar-bell::after{
  content:none !important;
  display:none !important;
}

/* Remove/hide remaining upper back button globally */
.mobile-back-btn,
.client-top-back,
.mobile-top-back,
[data-mobile-back]{
  display:none !important;
}

/* Button contrast, all pages and hover states */
/* Blue primary 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,
[type="submit"].btn-primary,
[type="button"].btn-primary,
.btn-primary *,
.btn.btn-primary *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover,
button.btn.btn-primary:hover,
input.btn-primary:hover,
input.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
a.btn-primary:focus,
a.btn.btn-primary:focus,
button.btn-primary:focus,
button.btn.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:active,
a.btn-primary:active,
a.btn.btn-primary:active,
.btn-primary:visited,
a.btn-primary:visited,
a.btn.btn-primary:visited,
.btn-primary:hover *,
.btn.btn-primary:hover *,
.btn-primary:focus *,
.btn.btn-primary:focus *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

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

/* Every non-primary / non-danger button: black text always, including hover */
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger),
.btn:not(.btn-primary):not(.btn-danger) *,
a.btn:not(.btn-primary):not(.btn-danger) *,
button.btn:not(.btn-primary):not(.btn-danger) *{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
.btn:not(.btn-primary):not(.btn-danger):hover,
a.btn:not(.btn-primary):not(.btn-danger):hover,
button.btn:not(.btn-primary):not(.btn-danger):hover,
input.btn:not(.btn-primary):not(.btn-danger):hover,
.btn:not(.btn-primary):not(.btn-danger):focus,
a.btn:not(.btn-primary):not(.btn-danger):focus,
button.btn:not(.btn-primary):not(.btn-danger):focus,
input.btn:not(.btn-primary):not(.btn-danger):focus,
.btn:not(.btn-primary):not(.btn-danger):active,
a.btn:not(.btn-primary):not(.btn-danger):active,
button.btn:not(.btn-primary):not(.btn-danger):active,
input.btn:not(.btn-primary):not(.btn-danger):active,
.btn:not(.btn-primary):not(.btn-danger):visited,
a.btn:not(.btn-primary):not(.btn-danger):visited,
.btn:not(.btn-primary):not(.btn-danger):hover *,
a.btn:not(.btn-primary):not(.btn-danger):hover *,
button.btn:not(.btn-primary):not(.btn-danger):hover *,
.btn:not(.btn-primary):not(.btn-danger):focus *,
a.btn:not(.btn-primary):not(.btn-danger):focus *,
button.btn:not(.btn-primary):not(.btn-danger):focus *{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Buttons that are not class .btn but look like light buttons */
button:not(.btn-primary):not(.btn-danger):not(.sidebar-toggle),
input[type="button"]:not(.btn-primary):not(.btn-danger),
input[type="submit"]:not(.btn-primary):not(.btn-danger),
a.button:not(.btn-primary):not(.btn-danger),
.action-button:not(.btn-primary):not(.btn-danger){
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
button:not(.btn-primary):not(.btn-danger):not(.sidebar-toggle):hover,
input[type="button"]:not(.btn-primary):not(.btn-danger):hover,
input[type="submit"]:not(.btn-primary):not(.btn-danger):hover,
a.button:not(.btn-primary):not(.btn-danger):hover,
.action-button:not(.btn-primary):not(.btn-danger):hover{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Do not break readable status badges */
.badge.success,.status-success{color:#166534 !important;-webkit-text-fill-color:#166534 !important;}
.badge.warning,.status-warning{color:#92400e !important;-webkit-text-fill-color:#92400e !important;}
.badge.danger,.badge.expired,.status-danger{color:#991b1b !important;-webkit-text-fill-color:#991b1b !important;}
.badge.muted,.badge.default{color:#334155 !important;-webkit-text-fill-color:#334155 !important;}
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* FINAL FIX: keep "Предстоящи събития" badge visible on hover/active/click */
.sidebar-nav .sidebar-link[href="events.php"],
.sidebar-link[href="events.php"]{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  overflow:visible !important;
}

.sidebar-nav .sidebar-link[href="events.php"] .sidebar-count,
.sidebar-nav .sidebar-link[href="events.php"] .event-badge,
.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-link[href="events.php"] .event-badge{
  margin-left:auto !important;
  min-width:22px !important;
  height:22px !important;
  padding:0 7px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  opacity:1 !important;
  visibility:visible !important;
  transform:none !important;
  position:static !important;
  font-size:12px !important;
  line-height:22px !important;
  font-weight:900 !important;
  pointer-events:none !important;
  box-shadow:0 4px 10px rgba(239,68,68,.25) !important;
}

/* State-specific overrides: do not hide it after click */
.sidebar-nav .sidebar-link[href="events.php"]:hover .sidebar-count,
.sidebar-nav .sidebar-link[href="events.php"]:focus .sidebar-count,
.sidebar-nav .sidebar-link[href="events.php"]:active .sidebar-count,
.sidebar-nav .sidebar-link[href="events.php"].is-active .sidebar-count,
.sidebar-nav .sidebar-link[href="events.php"]:hover .event-badge,
.sidebar-nav .sidebar-link[href="events.php"]:focus .event-badge,
.sidebar-nav .sidebar-link[href="events.php"]:active .event-badge,
.sidebar-nav .sidebar-link[href="events.php"].is-active .event-badge,
.sidebar-link[href="events.php"]:hover .sidebar-count,
.sidebar-link[href="events.php"]:focus .sidebar-count,
.sidebar-link[href="events.php"]:active .sidebar-count,
.sidebar-link[href="events.php"].is-active .sidebar-count,
.sidebar-link[href="events.php"]:hover .event-badge,
.sidebar-link[href="events.php"]:focus .event-badge,
.sidebar-link[href="events.php"]:active .event-badge,
.sidebar-link[href="events.php"].is-active .event-badge{
  display:inline-flex !important;
  opacity:1 !important;
  visibility:visible !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* If active sidebar styles recolor all children, keep badge white text */
.sidebar-link[href="events.php"].is-active .sidebar-count,
.sidebar-link[href="events.php"].is-active .event-badge,
.sidebar-link[href="events.php"]:hover .sidebar-count,
.sidebar-link[href="events.php"]:hover .event-badge{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* ABSOLUTE FINAL FIX 2026-05-26: JS endpoint badge persistence + button contrast */

/* Persistent sidebar badge after Предстоящи събития */
.sidebar-events-link,
.sidebar-link[href="events.php"]{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  overflow:visible !important;
}
.sidebar-events-link .sidebar-count,
.sidebar-link[href="events.php"] .sidebar-count,
.sidebar-events-link .event-badge,
.sidebar-link[href="events.php"] .event-badge{
  margin-left:auto !important;
  min-width:22px !important;
  height:22px !important;
  padding:0 7px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  opacity:1 !important;
  visibility:visible !important;
  transform:none !important;
  position:static !important;
  font-size:12px !important;
  line-height:22px !important;
  font-weight:900 !important;
  pointer-events:none !important;
  box-shadow:0 4px 10px rgba(239,68,68,.25) !important;
}
.sidebar-events-link:hover .sidebar-count,
.sidebar-events-link:focus .sidebar-count,
.sidebar-events-link:active .sidebar-count,
.sidebar-events-link.is-active .sidebar-count,
.sidebar-link[href="events.php"]:hover .sidebar-count,
.sidebar-link[href="events.php"]:focus .sidebar-count,
.sidebar-link[href="events.php"]:active .sidebar-count,
.sidebar-link[href="events.php"].is-active .sidebar-count{
  display:inline-flex !important;
  opacity:1 !important;
  visibility:visible !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Top bell badge */
#topbarEventsBell{
  position:relative !important;
}
#topbarEventsCount,
#topbarEventsBell .topbar-count{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 6px !important;
  border-radius:999px !important;
  background:#ef4444 !important;
  background-color:#ef4444 !important;
  background-image:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:11px !important;
  line-height:20px !important;
  font-weight:900 !important;
  border:2px solid #ffffff !important;
  box-shadow:0 4px 10px rgba(239,68,68,.35) !important;
  z-index:10 !important;
}
#topbarEventsBell::before,
#topbarEventsBell::after,
.topbar-bell::before,
.topbar-bell::after{
  content:none !important;
  display:none !important;
}

/* No upper back */
.mobile-back-btn,
.client-top-back,
.mobile-top-back,
[data-mobile-back]{
  display:none !important;
}

/* Button text contrast in every page and every hover state */
.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 *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover,
button.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:active,
.btn-primary:visited,
a.btn-primary:visited,
a.btn.btn-primary:visited,
.btn-primary:hover *,
.btn.btn-primary:hover *,
.btn-primary:focus *,
.btn.btn-primary:focus *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-danger,
.btn.btn-danger,
a.btn-danger,
a.btn.btn-danger,
button.btn-danger,
button.btn.btn-danger,
.btn-danger *,
.btn.btn-danger *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-danger:hover,
.btn.btn-danger:hover,
a.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn-danger:hover,
button.btn.btn-danger:hover,
.btn-danger:focus,
.btn.btn-danger:focus,
.btn-danger:active,
.btn.btn-danger:active,
.btn-danger:visited,
a.btn-danger:visited,
a.btn.btn-danger:visited,
.btn-danger:hover *,
.btn.btn-danger:hover *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger),
.btn:not(.btn-primary):not(.btn-danger) *,
a.btn:not(.btn-primary):not(.btn-danger) *,
button.btn:not(.btn-primary):not(.btn-danger) *{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
.btn:not(.btn-primary):not(.btn-danger):hover,
a.btn:not(.btn-primary):not(.btn-danger):hover,
button.btn:not(.btn-primary):not(.btn-danger):hover,
input.btn:not(.btn-primary):not(.btn-danger):hover,
.btn:not(.btn-primary):not(.btn-danger):focus,
a.btn:not(.btn-primary):not(.btn-danger):focus,
button.btn:not(.btn-primary):not(.btn-danger):focus,
input.btn:not(.btn-primary):not(.btn-danger):focus,
.btn:not(.btn-primary):not(.btn-danger):active,
a.btn:not(.btn-primary):not(.btn-danger):active,
button.btn:not(.btn-primary):not(.btn-danger):active,
input.btn:not(.btn-primary):not(.btn-danger):active,
.btn:not(.btn-primary):not(.btn-danger):visited,
a.btn:not(.btn-primary):not(.btn-danger):visited,
.btn:not(.btn-primary):not(.btn-danger):hover *,
a.btn:not(.btn-primary):not(.btn-danger):hover *,
button.btn:not(.btn-primary):not(.btn-danger):hover *{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

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


/* ABSOLUTE FINAL BUTTON READABILITY + REGISTRATION GUARD */

/* Default all buttons/links styled as buttons to dark readable text */
.btn,
a.btn,
button.btn,
input.btn,
button,
input[type="button"],
input[type="submit"],
a.button,
.action-button{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Same on hover/focus/active/visited */
.btn:hover,
a.btn:hover,
button.btn:hover,
input.btn:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
a.button:hover,
.action-button:hover,
.btn:focus,
a.btn:focus,
button.btn:focus,
input.btn:focus,
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
a.button:focus,
.action-button:focus,
.btn:active,
a.btn:active,
button.btn:active,
input.btn:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
a.button:active,
.action-button:active,
a.btn:visited,
a.button:visited{
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

/* Primary blue buttons must stay white */
.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,
button[type="submit"].btn-primary,
input[type="submit"].btn-primary,
.btn-primary *,
.btn.btn-primary *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover,
button.btn.btn-primary:hover,
input.btn-primary:hover,
input.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
a.btn-primary:focus,
a.btn.btn-primary:focus,
button.btn-primary:focus,
button.btn.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:active,
a.btn-primary:active,
a.btn.btn-primary:active,
a.btn-primary:visited,
a.btn.btn-primary:visited,
.btn-primary:hover *,
.btn.btn-primary:hover *,
.btn-primary:focus *,
.btn.btn-primary:focus *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Danger red buttons must stay white */
.btn-danger,
.btn.btn-danger,
a.btn-danger,
a.btn.btn-danger,
button.btn-danger,
button.btn.btn-danger,
input.btn-danger,
input.btn.btn-danger,
.btn-danger *,
.btn.btn-danger *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.btn-danger:hover,
.btn.btn-danger:hover,
a.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn-danger:hover,
button.btn.btn-danger:hover,
.btn-danger:focus,
.btn.btn-danger:focus,
.btn-danger:active,
.btn.btn-danger:active,
a.btn-danger:visited,
a.btn.btn-danger:visited{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Do not break sidebar dark menu links */
.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-link .sidebar-count,
.sidebar-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;}
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{color:#fff !important;-webkit-text-fill-color:#fff !important;}

.registration-guard-message{
  margin-top:6px;
  font-weight:700;
}
.registration-guard-message.warning{color:#92400e !important;}
.registration-guard-message.danger{color:#991b1b !important;}
.registration-guard-message.success{color:#166534 !important;}
input[data-registration-input="1"]:invalid{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.12) !important;
}


/* ============================================================
   BUTTON STYLE AUDIT FINAL FIX 2026-05-26
   Purpose:
   - light buttons: dark readable text in normal state
   - blue/primary buttons: white text
   - buttons that turn blue on hover: white text on hover
   - danger buttons: white text
   This block must stay at the VERY END of app.css.
   ============================================================ */

:root{
  --btn-primary-bg:#1765ff;
  --btn-primary-hover:#0d4db8;
  --btn-light-bg:#ffffff;
  --btn-light-border:#dbe5f3;
  --btn-dark-text:#111827;
  --btn-white-text:#ffffff;
}

/* Base readable button structure */
.btn,
a.btn,
button.btn,
input.btn,
.button,
a.button,
.action-button,
button,
input[type="button"],
input[type="submit"]{
  text-decoration:none !important;
}

/* 1) Normal light/default buttons = dark text */
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger),
.button:not(.btn-primary):not(.btn-danger),
a.button:not(.btn-primary):not(.btn-danger),
.action-button:not(.btn-primary):not(.btn-danger){
  color:var(--btn-dark-text) !important;
  -webkit-text-fill-color:var(--btn-dark-text) !important;
}

.btn:not(.btn-primary):not(.btn-danger) *,
a.btn:not(.btn-primary):not(.btn-danger) *,
button.btn:not(.btn-primary):not(.btn-danger) *,
.button:not(.btn-primary):not(.btn-danger) *,
.action-button:not(.btn-primary):not(.btn-danger) *{
  color:var(--btn-dark-text) !important;
  -webkit-text-fill-color:var(--btn-dark-text) !important;
}

/* 2) Hover/focus/active for default buttons: the design uses blue hover, so text must become white */
.btn:not(.btn-primary):not(.btn-danger):hover,
a.btn:not(.btn-primary):not(.btn-danger):hover,
button.btn:not(.btn-primary):not(.btn-danger):hover,
input.btn:not(.btn-primary):not(.btn-danger):hover,
.button:not(.btn-primary):not(.btn-danger):hover,
a.button:not(.btn-primary):not(.btn-danger):hover,
.action-button:not(.btn-primary):not(.btn-danger):hover,
.btn:not(.btn-primary):not(.btn-danger):focus,
a.btn:not(.btn-primary):not(.btn-danger):focus,
button.btn:not(.btn-primary):not(.btn-danger):focus,
input.btn:not(.btn-primary):not(.btn-danger):focus,
.button:not(.btn-primary):not(.btn-danger):focus,
a.button:not(.btn-primary):not(.btn-danger):focus,
.action-button:not(.btn-primary):not(.btn-danger):focus,
.btn:not(.btn-primary):not(.btn-danger):active,
a.btn:not(.btn-primary):not(.btn-danger):active,
button.btn:not(.btn-primary):not(.btn-danger):active,
input.btn:not(.btn-primary):not(.btn-danger):active,
.button:not(.btn-primary):not(.btn-danger):active,
a.button:not(.btn-primary):not(.btn-danger):active,
.action-button:not(.btn-primary):not(.btn-danger):active{
  background:var(--btn-primary-bg) !important;
  background-color:var(--btn-primary-bg) !important;
  background-image:none !important;
  border-color:var(--btn-primary-bg) !important;
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

.btn:not(.btn-primary):not(.btn-danger):hover *,
a.btn:not(.btn-primary):not(.btn-danger):hover *,
button.btn:not(.btn-primary):not(.btn-danger):hover *,
.button:not(.btn-primary):not(.btn-danger):hover *,
.action-button:not(.btn-primary):not(.btn-danger):hover *,
.btn:not(.btn-primary):not(.btn-danger):focus *,
a.btn:not(.btn-primary):not(.btn-danger):focus *,
button.btn:not(.btn-primary):not(.btn-danger):focus *,
.button:not(.btn-primary):not(.btn-danger):focus *,
.action-button:not(.btn-primary):not(.btn-danger):focus *,
.btn:not(.btn-primary):not(.btn-danger):active *,
a.btn:not(.btn-primary):not(.btn-danger):active *,
button.btn:not(.btn-primary):not(.btn-danger):active *,
.button:not(.btn-primary):not(.btn-danger):active *,
.action-button:not(.btn-primary):not(.btn-danger):active *{
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

/* 3) Visited default links must remain dark until hovered */
a.btn:not(.btn-primary):not(.btn-danger):visited,
a.button:not(.btn-primary):not(.btn-danger):visited{
  color:var(--btn-dark-text) !important;
  -webkit-text-fill-color:var(--btn-dark-text) !important;
}

/* 4) Primary blue buttons = white text in every state */
.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,
button[type="submit"].btn-primary,
input[type="submit"].btn-primary{
  background-color:var(--btn-primary-bg) !important;
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

.btn-primary *,
.btn.btn-primary *,
a.btn-primary *,
a.btn.btn-primary *,
button.btn-primary *,
button.btn.btn-primary *{
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover,
button.btn.btn-primary:hover,
input.btn-primary:hover,
input.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
a.btn-primary:focus,
a.btn.btn-primary:focus,
button.btn-primary:focus,
button.btn.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:active,
a.btn-primary:active,
a.btn.btn-primary:active,
a.btn-primary:visited,
a.btn.btn-primary:visited{
  background-color:var(--btn-primary-hover) !important;
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

/* 5) Danger/red buttons = white text in every state */
.btn-danger,
.btn.btn-danger,
a.btn-danger,
a.btn.btn-danger,
button.btn-danger,
button.btn.btn-danger,
input.btn-danger,
input.btn.btn-danger{
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

.btn-danger *,
.btn.btn-danger *,
a.btn-danger *,
a.btn.btn-danger *,
button.btn-danger *,
button.btn.btn-danger *{
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

.btn-danger:hover,
.btn.btn-danger:hover,
a.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn-danger:hover,
button.btn.btn-danger:hover,
.btn-danger:focus,
.btn.btn-danger:focus,
a.btn-danger:focus,
a.btn.btn-danger:focus,
.btn-danger:active,
.btn.btn-danger:active,
a.btn-danger:visited,
a.btn.btn-danger:visited{
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

/* 6) Unclassed submit buttons are blue action buttons in this system */
form button[type="submit"]:not(.btn):not(.btn-danger),
form input[type="submit"]:not(.btn):not(.btn-danger){
  background:var(--btn-primary-bg) !important;
  background-color:var(--btn-primary-bg) !important;
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

form button[type="submit"]:not(.btn):not(.btn-danger):hover,
form input[type="submit"]:not(.btn):not(.btn-danger):hover,
form button[type="submit"]:not(.btn):not(.btn-danger):focus,
form input[type="submit"]:not(.btn):not(.btn-danger):focus{
  background:var(--btn-primary-hover) !important;
  background-color:var(--btn-primary-hover) !important;
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

/* 7) Tax/history/actions area explicit protection */
.vehicle-tax-card .btn:not(.btn-primary):not(.btn-danger),
.vehicle-tax-card a.btn:not(.btn-primary):not(.btn-danger),
.tax-history-card .btn:not(.btn-primary):not(.btn-danger),
.tax-history-card a.btn:not(.btn-primary):not(.btn-danger),
.car-records-page .btn:not(.btn-primary):not(.btn-danger),
body.page-car-records .btn:not(.btn-primary):not(.btn-danger),
body.page-add_tax .btn:not(.btn-primary):not(.btn-danger),
.record-installment-card .btn:not(.btn-primary):not(.btn-danger),
.actions .btn:not(.btn-primary):not(.btn-danger),
.quick-actions .btn:not(.btn-primary):not(.btn-danger){
  color:var(--btn-dark-text) !important;
  -webkit-text-fill-color:var(--btn-dark-text) !important;
}

.vehicle-tax-card .btn:not(.btn-primary):not(.btn-danger):hover,
.vehicle-tax-card a.btn:not(.btn-primary):not(.btn-danger):hover,
.tax-history-card .btn:not(.btn-primary):not(.btn-danger):hover,
.tax-history-card a.btn:not(.btn-primary):not(.btn-danger):hover,
.car-records-page .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-car-records .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-add_tax .btn:not(.btn-primary):not(.btn-danger):hover,
.record-installment-card .btn:not(.btn-primary):not(.btn-danger):hover,
.actions .btn:not(.btn-primary):not(.btn-danger):hover,
.quick-actions .btn:not(.btn-primary):not(.btn-danger):hover{
  background:var(--btn-primary-bg) !important;
  background-color:var(--btn-primary-bg) !important;
  color:var(--btn-white-text) !important;
  -webkit-text-fill-color:var(--btn-white-text) !important;
}

/* 8) Keep sidebar and badges unaffected by button overrides */
.sidebar-link,
.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link:active,
.sidebar-link.is-active{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

.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;}
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* ============================================================
   GLOBAL ALL-PAGES BUTTON READABILITY FIX 2026-05-26
   Covers: notification_settings.php, profile.php, support, admin,
   repair pages, cards, tables, actions, form-actions, quick-actions.
   Must be the LAST button layer in app.css.
   ============================================================ */

/* Variables */
:root{
  --readable-blue:#1765ff;
  --readable-blue-hover:#0d4db8;
  --readable-dark:#111827;
  --readable-white:#ffffff;
  --readable-light:#ffffff;
  --readable-light-border:#dbe5f3;
}

/* Treat these areas as button zones across all pages */
.quick-actions .btn,
.actions .btn,
.form-actions .btn,
.form-actions-end .btn,
.card .btn,
.page-hero .btn,
.panel-heading .btn,
.profile-card .btn,
.profile-notification-card .btn,
.profile-active-notifications-top .btn,
.notification-settings-card .btn,
.page-notification-settings .btn,
.support-card .btn,
.admin-card .btn,
.admin-maintenance-card .btn,
.admin-push-repair-card .btn,
.repair-card .btn,
.table-wrap .btn,
td .btn,
.record-installment-card .btn,
.vehicle-tax-card .btn,
.tax-history-card .btn{
  text-decoration:none !important;
}

/* DEFAULT / LIGHT BUTTONS: dark text in normal state */
.btn:not(.btn-primary):not(.btn-danger),
a.btn:not(.btn-primary):not(.btn-danger),
button.btn:not(.btn-primary):not(.btn-danger),
input.btn:not(.btn-primary):not(.btn-danger),
.quick-actions .btn:not(.btn-primary):not(.btn-danger),
.actions .btn:not(.btn-primary):not(.btn-danger),
.form-actions .btn:not(.btn-primary):not(.btn-danger),
.form-actions-end .btn:not(.btn-primary):not(.btn-danger),
.card .btn:not(.btn-primary):not(.btn-danger),
.page-hero .btn:not(.btn-primary):not(.btn-danger),
.profile-card .btn:not(.btn-primary):not(.btn-danger),
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger),
.profile-active-notifications-top .btn:not(.btn-primary):not(.btn-danger),
.notification-settings-card .btn:not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger),
body.page-notification-settings .btn:not(.btn-primary):not(.btn-danger),
body.page-notification_settings .btn:not(.btn-primary):not(.btn-danger),
body.page-profile .btn:not(.btn-primary):not(.btn-danger),
body.page-support .btn:not(.btn-primary):not(.btn-danger),
body.page-admin .btn:not(.btn-primary):not(.btn-danger),
body.page-admin-maintenance .btn:not(.btn-primary):not(.btn-danger),
body.page-admin-push-repair .btn:not(.btn-primary):not(.btn-danger),
body.page-push-repair .btn:not(.btn-primary):not(.btn-danger),
.table-wrap .btn:not(.btn-primary):not(.btn-danger),
td .btn:not(.btn-primary):not(.btn-danger){
  color:var(--readable-dark) !important;
  -webkit-text-fill-color:var(--readable-dark) !important;
}

/* Children inside default buttons must also be dark */
.btn:not(.btn-primary):not(.btn-danger) *,
a.btn:not(.btn-primary):not(.btn-danger) *,
button.btn:not(.btn-primary):not(.btn-danger) *,
.quick-actions .btn:not(.btn-primary):not(.btn-danger) *,
.actions .btn:not(.btn-primary):not(.btn-danger) *,
.form-actions .btn:not(.btn-primary):not(.btn-danger) *,
.form-actions-end .btn:not(.btn-primary):not(.btn-danger) *,
.card .btn:not(.btn-primary):not(.btn-danger) *,
.page-hero .btn:not(.btn-primary):not(.btn-danger) *,
.profile-card .btn:not(.btn-primary):not(.btn-danger) *,
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger) *,
.notification-settings-card .btn:not(.btn-primary):not(.btn-danger) *,
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger) *,
.table-wrap .btn:not(.btn-primary):not(.btn-danger) *,
td .btn:not(.btn-primary):not(.btn-danger) *{
  color:var(--readable-dark) !important;
  -webkit-text-fill-color:var(--readable-dark) !important;
}

/* DEFAULT/LIGHT BUTTONS ON HOVER: the system uses blue hover, therefore white text */
.btn:not(.btn-primary):not(.btn-danger):hover,
a.btn:not(.btn-primary):not(.btn-danger):hover,
button.btn:not(.btn-primary):not(.btn-danger):hover,
input.btn:not(.btn-primary):not(.btn-danger):hover,
.quick-actions .btn:not(.btn-primary):not(.btn-danger):hover,
.actions .btn:not(.btn-primary):not(.btn-danger):hover,
.form-actions .btn:not(.btn-primary):not(.btn-danger):hover,
.form-actions-end .btn:not(.btn-primary):not(.btn-danger):hover,
.card .btn:not(.btn-primary):not(.btn-danger):hover,
.page-hero .btn:not(.btn-primary):not(.btn-danger):hover,
.profile-card .btn:not(.btn-primary):not(.btn-danger):hover,
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger):hover,
.profile-active-notifications-top .btn:not(.btn-primary):not(.btn-danger):hover,
.notification-settings-card .btn:not(.btn-primary):not(.btn-danger):hover,
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-notification_settings .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-profile .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-support .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-admin .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-admin-maintenance .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-admin-push-repair .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-push-repair .btn:not(.btn-primary):not(.btn-danger):hover,
.table-wrap .btn:not(.btn-primary):not(.btn-danger):hover,
td .btn:not(.btn-primary):not(.btn-danger):hover,
.btn:not(.btn-primary):not(.btn-danger):focus,
a.btn:not(.btn-primary):not(.btn-danger):focus,
button.btn:not(.btn-primary):not(.btn-danger):focus,
.btn:not(.btn-primary):not(.btn-danger):active,
a.btn:not(.btn-primary):not(.btn-danger):active,
button.btn:not(.btn-primary):not(.btn-danger):active{
  background:var(--readable-blue) !important;
  background-color:var(--readable-blue) !important;
  background-image:none !important;
  border-color:var(--readable-blue) !important;
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* Children inside hovered default buttons must be white */
.btn:not(.btn-primary):not(.btn-danger):hover *,
a.btn:not(.btn-primary):not(.btn-danger):hover *,
button.btn:not(.btn-primary):not(.btn-danger):hover *,
.quick-actions .btn:not(.btn-primary):not(.btn-danger):hover *,
.actions .btn:not(.btn-primary):not(.btn-danger):hover *,
.form-actions .btn:not(.btn-primary):not(.btn-danger):hover *,
.form-actions-end .btn:not(.btn-primary):not(.btn-danger):hover *,
.card .btn:not(.btn-primary):not(.btn-danger):hover *,
.page-hero .btn:not(.btn-primary):not(.btn-danger):hover *,
.profile-card .btn:not(.btn-primary):not(.btn-danger):hover *,
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger):hover *,
.notification-settings-card .btn:not(.btn-primary):not(.btn-danger):hover *,
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):hover *,
.table-wrap .btn:not(.btn-primary):not(.btn-danger):hover *,
td .btn:not(.btn-primary):not(.btn-danger):hover *,
.btn:not(.btn-primary):not(.btn-danger):focus *,
a.btn:not(.btn-primary):not(.btn-danger):focus *,
button.btn:not(.btn-primary):not(.btn-danger):focus *,
.btn:not(.btn-primary):not(.btn-danger):active *,
a.btn:not(.btn-primary):not(.btn-danger):active *,
button.btn:not(.btn-primary):not(.btn-danger):active *{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* VISITED light button link: dark until hovered */
a.btn:not(.btn-primary):not(.btn-danger):visited{
  color:var(--readable-dark) !important;
  -webkit-text-fill-color:var(--readable-dark) !important;
}
a.btn:not(.btn-primary):not(.btn-danger):visited:hover{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* PRIMARY BLUE BUTTONS: white text in all states */
.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,
button[type="submit"].btn-primary,
input[type="submit"].btn-primary,
.quick-actions .btn.btn-primary,
.actions .btn.btn-primary,
.form-actions .btn.btn-primary,
.form-actions-end .btn.btn-primary,
.card .btn.btn-primary,
.page-hero .btn.btn-primary,
.profile-card .btn.btn-primary,
.profile-notification-card .btn.btn-primary,
.notification-settings-card .btn.btn-primary,
.page-notification-settings .btn.btn-primary,
body.page-profile .btn.btn-primary,
body.page-notification-settings .btn.btn-primary,
body.page-notification_settings .btn.btn-primary{
  background-color:var(--readable-blue) !important;
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

.btn-primary *,
.btn.btn-primary *,
a.btn-primary *,
a.btn.btn-primary *,
button.btn-primary *,
button.btn.btn-primary *,
.quick-actions .btn.btn-primary *,
.actions .btn.btn-primary *,
.form-actions .btn.btn-primary *,
.form-actions-end .btn.btn-primary *,
.card .btn.btn-primary *,
.page-hero .btn.btn-primary *,
.profile-card .btn.btn-primary *,
.profile-notification-card .btn.btn-primary *,
.notification-settings-card .btn.btn-primary *,
.page-notification-settings .btn.btn-primary *{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover,
button.btn.btn-primary:hover,
input.btn-primary:hover,
input.btn.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
a.btn-primary:focus,
a.btn.btn-primary:focus,
button.btn-primary:focus,
button.btn.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:active,
a.btn-primary:active,
a.btn.btn-primary:active,
a.btn-primary:visited,
a.btn.btn-primary:visited{
  background-color:var(--readable-blue-hover) !important;
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* DANGER BUTTONS: white text in all states */
.btn-danger,
.btn.btn-danger,
a.btn-danger,
a.btn.btn-danger,
button.btn-danger,
button.btn.btn-danger,
input.btn-danger,
input.btn.btn-danger{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}
.btn-danger *,
.btn.btn-danger *,
a.btn-danger *,
a.btn.btn-danger *,
button.btn-danger *,
button.btn.btn-danger *{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}
.btn-danger:hover,
.btn.btn-danger:hover,
a.btn-danger:hover,
a.btn.btn-danger:hover,
button.btn-danger:hover,
button.btn.btn-danger:hover,
.btn-danger:focus,
.btn.btn-danger:focus,
.btn-danger:active,
.btn.btn-danger:active,
a.btn-danger:visited,
a.btn.btn-danger:visited{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* Unclassed form submit buttons are primary actions */
form button[type="submit"]:not(.btn-danger),
form input[type="submit"]:not(.btn-danger){
  background:var(--readable-blue) !important;
  background-color:var(--readable-blue) !important;
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}
form button[type="submit"]:not(.btn-danger):hover,
form input[type="submit"]:not(.btn-danger):hover,
form button[type="submit"]:not(.btn-danger):focus,
form input[type="submit"]:not(.btn-danger):focus{
  background:var(--readable-blue-hover) !important;
  background-color:var(--readable-blue-hover) !important;
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* Notification/Profile specific safety: if a button is light, normal text is dark */
body.page-notification-settings .btn:not(:hover):not(:focus):not(:active):not(.btn-primary):not(.btn-danger),
body.page-notification_settings .btn:not(:hover):not(:focus):not(:active):not(.btn-primary):not(.btn-danger),
body.page-profile .btn:not(:hover):not(:focus):not(:active):not(.btn-primary):not(.btn-danger),
.profile-notification-card .btn:not(:hover):not(:focus):not(:active):not(.btn-primary):not(.btn-danger),
.profile-active-notifications-top .btn:not(:hover):not(:focus):not(:active):not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn:not(:hover):not(:focus):not(:active):not(.btn-primary):not(.btn-danger){
  color:var(--readable-dark) !important;
  -webkit-text-fill-color:var(--readable-dark) !important;
}

/* But once hover turns them blue, text is white */
body.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-notification_settings .btn:not(.btn-primary):not(.btn-danger):hover,
body.page-profile .btn:not(.btn-primary):not(.btn-danger):hover,
.profile-notification-card .btn:not(.btn-primary):not(.btn-danger):hover,
.profile-active-notifications-top .btn:not(.btn-primary):not(.btn-danger):hover,
.page-notification-settings .btn:not(.btn-primary):not(.btn-danger):hover{
  color:var(--readable-white) !important;
  -webkit-text-fill-color:var(--readable-white) !important;
}

/* Sidebar/menu must stay 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 must stay white on red */
.sidebar-count.event-badge,
.topbar-count.event-badge,
#topbarEventsCount{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* Status badges must stay readable, not inherit button 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;}


/* ============================================================
   DISABLED + NON-PRIMARY BLUE BUTTON FIX 2026-05-26
   Fixes:
   - disabled light buttons with white unreadable text
   - blue action buttons without .btn-primary with black unreadable text
   Examples:
   - notification_settings.php "Изключи..."
   - profile.php "Изключи..."
   - logout.php "Отказ и връщане в системата"
   ============================================================ */

:root{
  --fix-blue:#1765ff;
  --fix-blue-hover:#0d4db8;
  --fix-dark:#111827;
  --fix-white:#ffffff;
  --fix-disabled-bg:#eef3fb;
  --fix-disabled-border:#dbe5f3;
  --fix-disabled-text:#64748b;
}

/* DISABLED buttons: if not primary/danger, they are light controls -> readable muted dark text */
.btn:disabled:not(.btn-primary):not(.btn-danger),
.btn[disabled]:not(.btn-primary):not(.btn-danger),
button:disabled:not(.btn-primary):not(.btn-danger),
button[disabled]:not(.btn-primary):not(.btn-danger),
input[type="button"]:disabled:not(.btn-primary):not(.btn-danger),
input[type="submit"]:disabled:not(.btn-primary):not(.btn-danger),
input[disabled]:not(.btn-primary):not(.btn-danger),
.profile-notification-card .btn:disabled:not(.btn-primary):not(.btn-danger),
.profile-notification-card .btn[disabled]:not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn:disabled:not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn[disabled]:not(.btn-primary):not(.btn-danger),
body.page-notification-settings .btn:disabled:not(.btn-primary):not(.btn-danger),
body.page-notification_settings .btn:disabled:not(.btn-primary):not(.btn-danger),
body.page-profile .btn:disabled:not(.btn-primary):not(.btn-danger){
  background:var(--fix-disabled-bg) !important;
  background-color:var(--fix-disabled-bg) !important;
  background-image:none !important;
  border-color:var(--fix-disabled-border) !important;
  color:var(--fix-disabled-text) !important;
  -webkit-text-fill-color:var(--fix-disabled-text) !important;
  opacity:1 !important;
  cursor:not-allowed !important;
}

/* Disabled children/icons/text must also be readable */
.btn:disabled:not(.btn-primary):not(.btn-danger) *,
.btn[disabled]:not(.btn-primary):not(.btn-danger) *,
button:disabled:not(.btn-primary):not(.btn-danger) *,
button[disabled]:not(.btn-primary):not(.btn-danger) *,
.profile-notification-card .btn:disabled:not(.btn-primary):not(.btn-danger) *,
.profile-notification-card .btn[disabled]:not(.btn-primary):not(.btn-danger) *,
.page-notification-settings .btn:disabled:not(.btn-primary):not(.btn-danger) *,
.page-notification-settings .btn[disabled]:not(.btn-primary):not(.btn-danger) *{
  color:var(--fix-disabled-text) !important;
  -webkit-text-fill-color:var(--fix-disabled-text) !important;
}

/* Disabled primary/danger stay white because their background is colored */
.btn-primary:disabled,
.btn-primary[disabled],
button.btn-primary:disabled,
button.btn-primary[disabled],
.btn-danger:disabled,
.btn-danger[disabled],
button.btn-danger:disabled,
button.btn-danger[disabled]{
  color:var(--fix-white) !important;
  -webkit-text-fill-color:var(--fix-white) !important;
  opacity:.75 !important;
}

/* NON-PRIMARY BLUE ACTION BUTTONS.
   Some pages use .btn without .btn-primary but visually blue because of existing CSS.
   These contexts must have white text. */
.logout-card .btn,
.logout-confirm-card .btn,
body.page-logout .btn,
body.page-logout a.btn,
body.page-logout button.btn,
.card.logout-card .btn,
.confirm-logout .btn,
.confirmation-card .btn{
  color:var(--fix-white) !important;
  -webkit-text-fill-color:var(--fix-white) !important;
}

/* In logout, if there are light cancel buttons explicitly NOT blue, normal class can override by btn-light/btn-secondary */
body.page-logout .btn-light,
body.page-logout .btn-secondary,
.logout-card .btn-light,
.logout-card .btn-secondary{
  color:var(--fix-dark) !important;
  -webkit-text-fill-color:var(--fix-dark) !important;
}

/* Any full-width prominent action inside card/form that has blue background but lacks btn-primary:
   force text white on hover/focus/active. */
.card .btn[style*="background: #1765ff"],
.card .btn[style*="background:#1765ff"],
.card .btn[style*="background-color: #1765ff"],
.card .btn[style*="background-color:#1765ff"],
.card button[style*="background: #1765ff"],
.card button[style*="background:#1765ff"],
.card button[style*="background-color: #1765ff"],
.card button[style*="background-color:#1765ff"]{
  color:var(--fix-white) !important;
  -webkit-text-fill-color:var(--fix-white) !important;
}

/* Buttons that become blue on hover: white text in hover */
.btn:not(.btn-danger):hover,
a.btn:not(.btn-danger):hover,
button.btn:not(.btn-danger):hover,
input.btn:not(.btn-danger):hover,
.card .btn:not(.btn-danger):hover,
.quick-actions .btn:not(.btn-danger):hover,
.actions .btn:not(.btn-danger):hover,
.form-actions .btn:not(.btn-danger):hover,
.form-actions-end .btn:not(.btn-danger):hover{
  color:var(--fix-white) !important;
  -webkit-text-fill-color:var(--fix-white) !important;
}

/* But disabled buttons must NOT turn white on hover */
.btn:disabled:hover:not(.btn-primary):not(.btn-danger),
.btn[disabled]:hover:not(.btn-primary):not(.btn-danger),
button:disabled:hover:not(.btn-primary):not(.btn-danger),
button[disabled]:hover:not(.btn-primary):not(.btn-danger),
.profile-notification-card .btn:disabled:hover:not(.btn-primary):not(.btn-danger),
.profile-notification-card .btn[disabled]:hover:not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn:disabled:hover:not(.btn-primary):not(.btn-danger),
.page-notification-settings .btn[disabled]:hover:not(.btn-primary):not(.btn-danger){
  color:var(--fix-disabled-text) !important;
  -webkit-text-fill-color:var(--fix-disabled-text) !important;
  background:var(--fix-disabled-bg) !important;
  background-color:var(--fix-disabled-bg) !important;
}

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

/* Normal non-disabled light buttons: dark until hover */
.btn:not(.btn-primary):not(.btn-danger):not(:hover):not(:focus):not(:active):not(:disabled):not([disabled]),
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):not(:disabled):not([disabled]){
  color:var(--fix-dark) !important;
  -webkit-text-fill-color:var(--fix-dark) !important;
}

/* Keep event badges and sidebar 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;
}


/* ============================================================
   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;
  }
}

/* 20260812 UI responsive alignment and car records modal fix */
body.app-authenticated .mycars-table-wrap td.actions,
body.app-authenticated .mycars-table-wrap td[data-label="Действия"],
body.app-authenticated td.actions,
body.app-authenticated td[data-label="Действия"]{
  vertical-align:middle !important;
}
body.app-authenticated .mycars-table-wrap td.actions,
body.app-authenticated .mycars-table-wrap td[data-label="Действия"]{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:center !important;
  gap:10px !important;
  min-height:94px !important;
}
body.app-authenticated .mycars-table-wrap td.actions .inline-post-form,
body.app-authenticated .mycars-table-wrap td[data-label="Действия"] .inline-post-form,
body.app-authenticated .mycars-table-wrap td.actions .btn,
body.app-authenticated .mycars-table-wrap td[data-label="Действия"] .btn,
body.app-authenticated .mycars-table-wrap td.actions button,
body.app-authenticated .mycars-table-wrap td[data-label="Действия"] button{
  width:100% !important;
  min-width:104px !important;
  height:40px !important;
  min-height:40px !important;
  margin:0 !important;
}
body.app-authenticated .car-card-actions{
  margin-top:auto !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  align-items:stretch !important;
}
body.app-authenticated .car-card-actions .inline-post-form,
body.app-authenticated .car-card-actions .btn,
body.app-authenticated .car-card-actions button{
  width:100% !important;
  min-height:44px !important;
}
body.app-authenticated .car-records-action-bar{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:stretch !important;
}
body.app-authenticated .car-records-action-bar .inline-post-form,
body.app-authenticated .car-records-action-bar .btn,
body.app-authenticated .car-records-action-bar button{
  min-height:44px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.record-modal[hidden]{display:none !important;}
.record-modal{
  position:fixed !important;
  inset:0 !important;
  z-index:2147482000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:22px !important;
}
.record-modal-backdrop{
  position:absolute !important;
  inset:0 !important;
  background:rgba(15,23,42,.58) !important;
  backdrop-filter:blur(4px) !important;
}
.record-modal-panel{
  position:relative !important;
  width:min(1040px, calc(100vw - 44px)) !important;
  height:min(760px, calc(100vh - 44px)) !important;
  background:#fff !important;
  border-radius:24px !important;
  box-shadow:0 30px 90px rgba(15,23,42,.32) !important;
  border:1px solid #dbe5f2 !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
}
.record-modal-header{
  height:58px !important;
  min-height:58px !important;
  padding:0 16px 0 22px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  border-bottom:1px solid #e5edf8 !important;
  background:#f8fbff !important;
  color:#10254a !important;
  font-size:18px !important;
}
.record-modal-close{
  width:42px !important;
  height:42px !important;
  border:1px solid #dbe5f2 !important;
  border-radius:14px !important;
  background:#fff !important;
  color:#10254a !important;
  font-size:26px !important;
  line-height:1 !important;
  cursor:pointer !important;
}
.record-modal-close:hover{background:#eef4ff !important;}
.record-modal iframe{
  flex:1 1 auto !important;
  width:100% !important;
  height:100% !important;
  border:0 !important;
  background:#fff !important;
}
body.record-modal-open{overflow:hidden !important;}
@media (max-width:900px){
  .record-modal{padding:10px !important; align-items:stretch !important;}
  .record-modal-panel{width:calc(100vw - 20px) !important; height:calc(100vh - 20px) !important; border-radius:18px !important;}
  .record-modal-header{height:54px !important; min-height:54px !important; padding-left:14px !important; font-size:16px !important;}
  body.app-authenticated .car-records-action-bar{display:grid !important; grid-template-columns:1fr 1fr !important;}
  body.app-authenticated .car-records-action-bar .inline-post-form,
  body.app-authenticated .car-records-action-bar .btn,
  body.app-authenticated .car-records-action-bar button{width:100% !important;}
}
@media (max-width:560px){
  body.app-authenticated .car-records-action-bar{grid-template-columns:1fr !important;}
  body.app-authenticated .mycars-table-wrap td.actions,
  body.app-authenticated .mycars-table-wrap td[data-label="Действия"]{min-height:auto !important; display:grid !important; grid-template-columns:1fr !important;}
  body.app-authenticated .mycars-table-wrap td.actions .btn,
  body.app-authenticated .mycars-table-wrap td[data-label="Действия"] .btn,
  body.app-authenticated .mycars-table-wrap td.actions button,
  body.app-authenticated .mycars-table-wrap td[data-label="Действия"] button{width:100% !important; min-width:0 !important;}
}


/* 20260812 HARD FIX: record modal must cover sidebar and full PWA viewport */
body.app-authenticated.record-modal-open .app-sidebar,
body.app-authenticated.record-modal-open .sidebar,
body.app-authenticated.record-modal-open .app-topbar,
body.app-authenticated.record-modal-open .topbar{
  pointer-events:none !important;
}
body.app-authenticated .record-modal{
  position:fixed !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;
  left:0 !important;
  width:100vw !important;
  height:100vh !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  z-index:2147483640 !important;
}
body.app-authenticated .record-modal-backdrop{
  z-index:0 !important;
}
body.app-authenticated .record-modal-panel{
  z-index:1 !important;
  max-width:calc(100vw - 44px) !important;
  max-height:calc(100vh - 44px) !important;
}
body.app-authenticated.record-modal-open .app-content{
  overflow:visible !important;
}
@media (min-width:901px){
  body.app-authenticated .record-modal-panel{
    width:min(1080px, calc(100vw - 88px)) !important;
    height:min(760px, calc(100vh - 70px)) !important;
  }
}
@media (max-width:900px){
  body.app-authenticated .record-modal-panel{
    width:calc(100vw - 20px) !important;
    height:calc(100vh - 20px) !important;
  }
}


/* 20260812 COMPACT MODAL + DASHBOARD CAR CARD POLISH */
body.app-authenticated .record-modal{
  padding:18px !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated .record-modal-panel{
  width:min(760px, calc(100vw - 48px)) !important;
  height:auto !important;
  min-height:0 !important;
  max-height:calc(100vh - 56px) !important;
  border-radius:20px !important;
  overflow:hidden !important;
}
body.app-authenticated .record-modal-header{
  height:52px !important;
  min-height:52px !important;
  padding:0 14px 0 20px !important;
  font-size:17px !important;
}
body.app-authenticated .record-modal-close{
  width:40px !important;
  height:40px !important;
  border-radius:13px !important;
}
body.app-authenticated .record-modal iframe{
  flex:0 0 auto !important;
  height:390px !important;
  min-height:0 !important;
  overflow:auto !important;
}
body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:min(700px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--inspection iframe{height:326px !important;}
body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:min(720px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--vignette iframe{height:430px !important;}
body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:min(720px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--tax iframe{height:480px !important;}
body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:min(760px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--insurance iframe{height:560px !important;}
@media (min-width:1200px){
  body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:780px !important;}
  body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:700px !important;}
  body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:720px !important;}
}
@media (max-width:900px){
  body.app-authenticated .record-modal{padding:10px !important;align-items:center !important;}
  body.app-authenticated .record-modal-panel{
    width:calc(100vw - 20px) !important;
    max-height:calc(100vh - 20px) !important;
    border-radius:18px !important;
  }
  body.app-authenticated .record-modal iframe{height:calc(100vh - 88px) !important;}
}
@media (max-height:620px) and (min-width:901px){
  body.app-authenticated .record-modal iframe{height:calc(100vh - 108px) !important;}
}

/* Dashboard compact car cards: keep registration away from right edge */
body.app-authenticated .dashboard-grid-main .car-card{
  padding:14px 16px 14px !important;
  overflow:hidden !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top{
  display:grid !important;
  grid-template-columns:auto minmax(0, 1fr) !important;
  align-items:center !important;
  column-gap:12px !important;
  min-width:0 !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top-text{
  min-width:0 !important;
  padding-right:8px !important;
  overflow:hidden !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top .reg-with-car{
  display:block !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  line-height:1.08 !important;
  padding-right:6px !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top span:not(.card-brand-logo-wrap):not(.brand-logo-fallback-text){
  text-align:left !important;
  max-width:100% !important;
  overflow-wrap:anywhere !important;
}
body.app-authenticated .dashboard-grid-main .car-card-actions{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px !important;
  margin-top:12px !important;
}
body.app-authenticated .dashboard-grid-main .car-card-actions .inline-post-form,
body.app-authenticated .dashboard-grid-main .car-card-actions .btn,
body.app-authenticated .dashboard-grid-main .car-card-actions button{
  width:100% !important;
  min-height:42px !important;
}
@media (min-width:1180px){
  body.app-authenticated .dashboard-grid-main .car-card-grid{gap:12px !important;}
}
@media (max-width:1180px){
  body.app-authenticated .dashboard-grid-main{grid-template-columns:1fr !important;}
  body.app-authenticated .dashboard-grid-main .car-card-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media (max-width:720px){
  body.app-authenticated .dashboard-grid-main .car-card-grid{grid-template-columns:1fr !important;}
  body.app-authenticated .dashboard-grid-main .car-card-top-text{padding-right:0 !important;}
}

/* FINAL FIX: dashboard car registration must never split letters */
body.app-authenticated .dashboard-grid-main .car-card-top{
  display:grid !important;
  grid-template-columns:auto minmax(0, 1fr) !important;
  align-items:center !important;
  column-gap:10px !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top-text{
  min-width:0 !important;
  max-width:100% !important;
  overflow:visible !important;
  padding-right:0 !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top .reg-with-car{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
  line-break:strict !important;
  max-width:none !important;
  width:auto !important;
  line-height:1.08 !important;
}
body.app-authenticated .dashboard-grid-main .car-card-top span:not(.card-brand-logo-wrap):not(.brand-logo-fallback-text){
  display:block !important;
  text-align:left !important;
  white-space:normal !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  line-height:1.12 !important;
}
@media (min-width:901px) and (max-width:1320px){
  body.app-authenticated .dashboard-grid-main .car-card{
    padding-left:13px !important;
    padding-right:13px !important;
  }
  body.app-authenticated .dashboard-grid-main .card-brand-logo-wrap .brand-logo-box{
    width:56px !important;
    min-width:56px !important;
    max-width:56px !important;
  }
  body.app-authenticated .dashboard-grid-main .brand-logo-img{
    width:52px !important;
  }
  body.app-authenticated .dashboard-grid-main .car-card-top .reg-with-car{
    font-size:18px !important;
  }
}
@media (max-width:720px){
  body.app-authenticated .dashboard-grid-main .car-card-top{
    grid-template-columns:auto minmax(0, 1fr) !important;
  }
  body.app-authenticated .dashboard-grid-main .car-card-top .reg-with-car{
    white-space:nowrap !important;
  }
}

/* 20260812 MODAL AUTO-FIT FIX: no internal iframe scroll on normal desktop/PWA sizes */
body.app-authenticated .record-modal{
  padding:18px !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated .record-modal-panel{
  height:auto !important;
  min-height:0 !important;
  max-height:calc(100vh - 52px) !important;
  overflow:hidden !important;
}
body.app-authenticated .record-modal-header{
  height:50px !important;
  min-height:50px !important;
}
body.app-authenticated .record-modal iframe{
  display:block !important;
  flex:0 0 auto !important;
  width:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
  max-height:calc(100vh - 104px) !important;
}
body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:min(700px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--inspection iframe{height:358px !important;}
body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:min(720px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--vignette iframe{height:424px !important;}
body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:min(720px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--tax iframe{height:438px !important;}
body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:min(780px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--insurance iframe{height:512px !important;}
@media (min-width:1200px){
  body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:700px !important;}
  body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:780px !important;}
}
@media (max-height:700px) and (min-width:901px){
  body.app-authenticated .record-modal{padding:12px !important;}
  body.app-authenticated .record-modal-panel{max-height:calc(100vh - 24px) !important;}
  body.app-authenticated .record-modal-header{height:46px !important;min-height:46px !important;}
  body.app-authenticated .record-modal iframe{max-height:calc(100vh - 70px) !important;}
}
@media (max-width:900px){
  body.app-authenticated .record-modal{padding:10px !important;}
  body.app-authenticated .record-modal-panel{width:calc(100vw - 20px) !important;max-height:calc(100vh - 20px) !important;}
  body.app-authenticated .record-modal iframe{height:calc(100vh - 72px) !important;max-height:calc(100vh - 72px) !important;overflow:auto !important;}
}


/* 20260812 FINAL MODAL NO-SCROLL + CENTERED CLOSE BUTTON FIX */
body.app-authenticated .record-modal{
  padding:18px !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated .record-modal-panel{
  height:auto !important;
  min-height:0 !important;
  overflow:hidden !important;
  max-height:calc(100vh - 40px) !important;
}
body.app-authenticated .record-modal-header{
  height:48px !important;
  min-height:48px !important;
  padding:0 12px 0 20px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
}
body.app-authenticated .record-modal-close{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  min-height:42px !important;
  padding:0 !important;
  margin:0 !important;
  line-height:1 !important;
  font-size:28px !important;
  font-weight:800 !important;
}
body.app-authenticated .record-modal iframe{
  display:block !important;
  width:100% !important;
  height:var(--record-modal-frame-height, 520px) !important;
  max-height:calc(100vh - 92px) !important;
  min-height:0 !important;
  border:0 !important;
  overflow:hidden !important;
}
body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:min(700px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--inspection iframe{height:var(--record-modal-frame-height, 386px) !important;}
body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:min(720px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--vignette iframe{height:var(--record-modal-frame-height, 500px) !important;}
body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:min(720px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--tax iframe{height:var(--record-modal-frame-height, 520px) !important;}
body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:min(780px, calc(100vw - 48px)) !important;}
body.app-authenticated .record-modal.record-modal--insurance iframe{height:var(--record-modal-frame-height, 590px) !important;}
@media (min-width:1200px){
  body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:700px !important;}
  body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:780px !important;}
}
@media (max-height:700px) and (min-width:901px){
  body.app-authenticated .record-modal{padding:12px !important;}
  body.app-authenticated .record-modal-panel{max-height:calc(100vh - 24px) !important;}
  body.app-authenticated .record-modal-header{height:44px !important;min-height:44px !important;}
  body.app-authenticated .record-modal-close{width:40px !important;height:40px !important;min-width:40px !important;min-height:40px !important;}
  body.app-authenticated .record-modal iframe{max-height:calc(100vh - 68px) !important;}
}
@media (max-width:900px){
  body.app-authenticated .record-modal{padding:10px !important;}
  body.app-authenticated .record-modal-panel{width:calc(100vw - 20px) !important;max-height:calc(100vh - 20px) !important;}
  body.app-authenticated .record-modal iframe{height:calc(100vh - 72px) !important;max-height:calc(100vh - 72px) !important;overflow:auto !important;}
}


/* 20260812 FINAL FIX: modal height follows content - no blank bottom area */
body.app-authenticated .record-modal{
  padding:18px !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated .record-modal-panel{
  height:auto !important;
  min-height:0 !important;
  overflow:hidden !important;
  max-height:calc(100vh - 36px) !important;
}
body.app-authenticated .record-modal-header{
  height:48px !important;
  min-height:48px !important;
  padding:0 12px 0 20px !important;
}
body.app-authenticated .record-modal iframe{
  height:var(--record-modal-frame-height, 360px) !important;
  min-height:0 !important;
  max-height:calc(100vh - 88px) !important;
  overflow:hidden !important;
}
body.app-authenticated .record-modal.record-modal--inspection iframe,
body.app-authenticated .record-modal.record-modal--vignette iframe,
body.app-authenticated .record-modal.record-modal--tax iframe,
body.app-authenticated .record-modal.record-modal--insurance iframe{
  height:var(--record-modal-frame-height, 360px) !important;
}
@media (min-width:901px){
  body.app-authenticated .record-modal.record-modal--inspection .record-modal-panel{width:700px !important;}
  body.app-authenticated .record-modal.record-modal--vignette .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--tax .record-modal-panel{width:720px !important;}
  body.app-authenticated .record-modal.record-modal--insurance .record-modal-panel{width:780px !important;}
}
@media (max-height:700px) and (min-width:901px){
  body.app-authenticated .record-modal{padding:12px !important;}
  body.app-authenticated .record-modal-panel{max-height:calc(100vh - 24px) !important;}
  body.app-authenticated .record-modal iframe{max-height:calc(100vh - 70px) !important;}
}
@media (max-width:900px){
  body.app-authenticated .record-modal{padding:10px !important;}
  body.app-authenticated .record-modal-panel{width:calc(100vw - 20px) !important;max-height:calc(100vh - 20px) !important;}
  body.app-authenticated .record-modal iframe{height:calc(100vh - 72px) !important;max-height:calc(100vh - 72px) !important;overflow:auto !important;}
}

/* 20260812 REAL CONTENT HEIGHT FIX: iframe modal follows form/card height, not old fixed iframe height */
body.app-authenticated .record-modal-panel{
  display:flex !important;
  flex-direction:column !important;
  height:auto !important;
  min-height:0 !important;
  overflow:hidden !important;
}
body.app-authenticated .record-modal iframe{
  display:block !important;
  flex:0 0 var(--record-modal-frame-height, 320px) !important;
  height:var(--record-modal-frame-height, 320px) !important;
  min-height:0 !important;
  max-height:calc(100vh - 88px) !important;
  overflow:hidden !important;
}
body.app-authenticated .record-modal.record-modal--inspection iframe,
body.app-authenticated .record-modal.record-modal--vignette iframe,
body.app-authenticated .record-modal.record-modal--tax iframe,
body.app-authenticated .record-modal.record-modal--insurance iframe{
  height:var(--record-modal-frame-height, 320px) !important;
  flex-basis:var(--record-modal-frame-height, 320px) !important;
}
body.app-authenticated .record-modal-close{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  padding:0 !important;
  text-align:center !important;
}
@media (max-width:900px){
  body.app-authenticated .record-modal iframe{
    height:var(--record-modal-frame-height, calc(100vh - 72px)) !important;
    flex-basis:var(--record-modal-frame-height, calc(100vh - 72px)) !important;
    max-height:calc(100vh - 72px) !important;
  }
}

/* 20260812 CAR RECORDS TABLE TEXT BASELINE ALIGNMENT FIX
   Align text, badges and action buttons in record tables to one clean row. */
body.app-authenticated.page-car-records table th,
body.app-authenticated.page-car-records table td{
  vertical-align:middle !important;
}
body.app-authenticated.page-car-records table tbody tr{
  min-height:64px !important;
}
body.app-authenticated.page-car-records table td{
  line-height:1.25 !important;
}
body.app-authenticated.page-car-records table td > .badge,
body.app-authenticated.page-car-records table td .badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  vertical-align:middle !important;
  line-height:1 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
  white-space:nowrap !important;
}
body.app-authenticated.page-car-records table td > .badge:not(:first-child){
  margin-left:8px !important;
}
body.app-authenticated.page-car-records .inline-post-form,
body.app-authenticated.page-car-records table td form{
  margin:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated.page-car-records table td:last-child,
body.app-authenticated.page-car-records table th:last-child{
  text-align:center !important;
}
body.app-authenticated.page-car-records .car-record-delete-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 auto !important;
  min-height:42px !important;
  line-height:1 !important;
}
body.app-authenticated.page-car-records .table-wrap table thead th{
  vertical-align:middle !important;
  line-height:1.2 !important;
}
@media (min-width:761px){
  body.app-authenticated.page-car-records .table-wrap table tbody td{
    padding-top:14px !important;
    padding-bottom:14px !important;
  }
}

/* 20260812 HARD FIX: car_records rows use one real visual baseline */
body.app-authenticated.page-car-records table.car-records-table{
  table-layout:fixed !important;
  width:100% !important;
}
body.app-authenticated.page-car-records table.car-records-table th,
body.app-authenticated.page-car-records table.car-records-table td{
  vertical-align:middle !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  height:64px !important;
  line-height:1.2 !important;
}
body.app-authenticated.page-car-records table.car-records-table tbody tr{
  height:64px !important;
}
body.app-authenticated.page-car-records .car-record-cell-line{
  min-height:64px !important;
  height:64px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  line-height:1.2 !important;
  margin:0 !important;
  padding:0 !important;
}
body.app-authenticated.page-car-records .car-record-cell-line--center{
  justify-content:center !important;
}
body.app-authenticated.page-car-records .car-record-cell-line--stack{
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:3px !important;
  white-space:normal !important;
}
body.app-authenticated.page-car-records .car-record-cell-line--payments{
  justify-content:center !important;
}
body.app-authenticated.page-car-records .car-record-cell-line .badge{
  flex:0 0 auto !important;
  align-self:center !important;
  margin:0 !important;
  transform:none !important;
}
body.app-authenticated.page-car-records table.car-records-table td:last-child .car-record-cell-line{
  justify-content:center !important;
}
body.app-authenticated.page-car-records table.car-records-table td:last-child{
  text-align:center !important;
}
body.app-authenticated.page-car-records table.car-records-table .inline-post-form{
  height:auto !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated.page-car-records table.car-records-table .car-record-delete-btn{
  height:42px !important;
  min-height:42px !important;
  margin:0 !important;
}
@media (max-width:760px){
  body.app-authenticated.page-car-records table.car-records-table{
    table-layout:auto !important;
  }
}

/* 20260812 STRUCTURAL FIX: car record rows - one visual line, no forced 64px baseline */
body.app-authenticated.page-car-records table.car-records-table{
  table-layout:fixed !important;
  width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
body.app-authenticated.page-car-records table.car-records-table thead th{
  height:auto !important;
  min-height:0 !important;
  padding:14px 18px !important;
  line-height:1.2 !important;
  vertical-align:middle !important;
}
body.app-authenticated.page-car-records table.car-records-table tbody tr,
body.app-authenticated.page-car-records table.car-records-table tbody td{
  height:auto !important;
  min-height:0 !important;
}
body.app-authenticated.page-car-records table.car-records-table tbody td{
  padding:12px 18px !important;
  vertical-align:top !important;
  line-height:1.2 !important;
}
body.app-authenticated.page-car-records .car-record-cell-line{
  display:flex !important;
  min-height:44px !important;
  height:auto !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  line-height:1.2 !important;
  margin:0 !important;
  padding:0 !important;
}
body.app-authenticated.page-car-records .car-record-cell-line--center{
  justify-content:center !important;
}
body.app-authenticated.page-car-records .car-record-cell-line--stack{
  min-height:44px !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:3px !important;
  white-space:normal !important;
}
body.app-authenticated.page-car-records .car-record-cell-line--payments{
  min-height:44px !important;
  align-items:center !important;
  justify-content:center !important;
}
body.app-authenticated.page-car-records table.car-records-table .badge,
body.app-authenticated.page-car-records table.car-records-table td .badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:34px !important;
  height:34px !important;
  line-height:1 !important;
  margin:0 !important;
  padding:0 16px !important;
  white-space:nowrap !important;
  vertical-align:middle !important;
  transform:none !important;
}
body.app-authenticated.page-car-records table.car-records-table .inline-post-form{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 !important;
  padding:0 !important;
  min-height:0 !important;
  height:auto !important;
}
body.app-authenticated.page-car-records table.car-records-table .car-record-delete-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:44px !important;
  min-height:44px !important;
  margin:0 !important;
  padding:0 22px !important;
  line-height:1 !important;
}
body.app-authenticated.page-car-records table.car-records-table td:last-child,
body.app-authenticated.page-car-records table.car-records-table th:last-child{
  text-align:center !important;
}
body.app-authenticated.page-car-records table.car-records-table td:last-child .car-record-cell-line{
  justify-content:center !important;
}
body.app-authenticated.page-car-records .record-installments-grid{
  width:100% !important;
}
@media (max-width:760px){
  body.app-authenticated.page-car-records table.car-records-table{
    table-layout:auto !important;
  }
  body.app-authenticated.page-car-records table.car-records-table tbody td{
    padding:10px 12px !important;
  }
}


/* 20260813 FINAL HARD FIX: records table alignment. Do not depend only on page body slug. */
html body table.car-records-table{
  table-layout:fixed !important;
  width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
html body table.car-records-table thead th{
  padding:14px 18px !important;
  line-height:1.2 !important;
  vertical-align:middle !important;
  height:auto !important;
  min-height:0 !important;
}
html body table.car-records-table tbody tr,
html body table.car-records-table tbody td{
  height:auto !important;
  min-height:0 !important;
}
html body table.car-records-table tbody td{
  padding:12px 18px !important;
  vertical-align:middle !important;
  line-height:1.2 !important;
}
html body table.car-records-table .car-record-cell-line{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  min-height:44px !important;
  height:44px !important;
  line-height:1.2 !important;
  margin:0 !important;
  padding:0 !important;
  white-space:nowrap !important;
  flex-wrap:nowrap !important;
}
html body table.car-records-table .car-record-cell-line--center{
  justify-content:center !important;
}
html body table.car-records-table .car-record-cell-line--stack{
  height:auto !important;
  min-height:44px !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:flex-start !important;
  gap:3px !important;
  white-space:normal !important;
}
html body table.car-records-table .car-record-cell-line--payments{
  justify-content:center !important;
  height:auto !important;
  min-height:44px !important;
}
html body table.car-records-table .badge,
html body table.car-records-table td .badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:34px !important;
  min-height:34px !important;
  line-height:1 !important;
  margin:0 !important;
  padding:0 16px !important;
  white-space:nowrap !important;
  vertical-align:middle !important;
  transform:none !important;
}
html body table.car-records-table .inline-post-form{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin:0 !important;
  padding:0 !important;
  height:44px !important;
  min-height:44px !important;
}
html body table.car-records-table .car-record-delete-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:44px !important;
  min-height:44px !important;
  line-height:1 !important;
  margin:0 !important;
  padding:0 22px !important;
}
html body table.car-records-table td:last-child,
html body table.car-records-table th:last-child{
  text-align:center !important;
}
html body table.car-records-table td:last-child .car-record-cell-line{
  justify-content:center !important;
}
@media (max-width:760px){
  html body table.car-records-table{
    table-layout:auto !important;
  }
  html body table.car-records-table tbody td{
    padding:10px 12px !important;
  }
  html body table.car-records-table .car-record-cell-line{
    height:auto !important;
    min-height:40px !important;
  }
}

/* ========================================================================== 
   2026-08-25 FINAL CONSOLIDATED FIX — Car records / insurance installments
   Scope: car_records.php only. Prevent installment cards and long messages
   from overflowing into the Actions column at desktop resolutions such as
   1366x768 / 1680x900 / 1920x1080.
   ========================================================================== */
html body table.car-records-table{
  min-width:0 !important;
}

/* The insurance table has six columns. Give the installment column the space
   it actually needs while keeping the action column predictable. */
html body .car-records-page + .card table.car-records-table th:nth-child(1),
html body .car-records-page + .card table.car-records-table td:nth-child(1){width:12% !important;}
html body .car-records-page + .card table.car-records-table th:nth-child(2),
html body .car-records-page + .card table.car-records-table td:nth-child(2){width:12% !important;}
html body .car-records-page + .card table.car-records-table th:nth-child(3),
html body .car-records-page + .card table.car-records-table td:nth-child(3){width:13% !important;}
html body .car-records-page + .card table.car-records-table th:nth-child(4),
html body .car-records-page + .card table.car-records-table td:nth-child(4){width:10% !important;}
html body .car-records-page + .card table.car-records-table th:nth-child(5),
html body .car-records-page + .card table.car-records-table td:nth-child(5){width:43% !important;}
html body .car-records-page + .card table.car-records-table th:nth-child(6),
html body .car-records-page + .card table.car-records-table td:nth-child(6){width:10% !important;}

html body .car-records-page + .card table.car-records-table td:nth-child(5){
  min-width:0 !important;
  overflow:hidden !important;
}
html body .car-records-page + .card .car-record-cell-line--payments{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  height:auto !important;
  min-height:44px !important;
  white-space:normal !important;
  overflow:visible !important;
}
html body .car-records-page + .card .record-installments-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
html body .car-records-page + .card .record-installment-card{
  min-width:0 !important;
  max-width:100% !important;
  width:auto !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  word-break:normal !important;
  overflow-wrap:anywhere !important;
}
html body .car-records-page + .card .record-installment-card > div{
  min-width:0 !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
html body .car-records-page + .card .record-installment-card .badge{
  max-width:100% !important;
  height:auto !important;
  min-height:30px !important;
  padding:7px 12px !important;
  white-space:normal !important;
  text-align:center !important;
  line-height:1.15 !important;
}
html body .car-records-page + .card .record-installment-card .small,
html body .car-records-page + .card .record-installment-card .grace-warning{
  display:block !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  line-height:1.3 !important;
}
html body .car-records-page + .card .installment-pay-form{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:7px !important;
  min-width:0 !important;
  width:100% !important;
}
html body .car-records-page + .card .installment-pay-form input[type="text"]{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
html body .car-records-page + .card .installment-pay-form .btn,
html body .car-records-page + .card .record-installment-card form .btn{
  max-width:100% !important;
  white-space:normal !important;
  line-height:1.15 !important;
}
html body .car-records-page + .card table.car-records-table td:last-child{
  overflow:visible !important;
}
html body .car-records-page + .card table.car-records-table .car-record-delete-btn{
  width:auto !important;
  max-width:100% !important;
  padding-left:14px !important;
  padding-right:14px !important;
}

/* At narrower desktop widths two installment cards become too cramped. One
   card per row is clearer and prevents horizontal overlap without forcing the
   whole table to grow beyond the viewport. */
@media (max-width:1550px){
  html body .car-records-page + .card .record-installments-grid{
    grid-template-columns:1fr !important;
  }
}
@media (max-width:1180px){
  html body .car-records-page + .card table.car-records-table{
    min-width:980px !important;
    table-layout:fixed !important;
  }
}
@media (max-width:760px){
  html body .car-records-page + .card table.car-records-table{
    min-width:900px !important;
  }
  html body .car-records-page + .card .installment-pay-form{
    grid-template-columns:1fr !important;
  }
  html body .car-records-page + .card .installment-pay-form .btn{
    width:100% !important;
  }
}


/* 2026-08-25 FINAL: installment note field above the payment button.
   Keep the full note visible while typing and avoid squeezed controls. */
html body .car-records-page + .card .installment-pay-form{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
}
html body .car-records-page + .card .installment-pay-form textarea[name="paid_note"]{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  min-height:58px !important;
  box-sizing:border-box !important;
  padding:9px 10px !important;
  border:1px solid var(--line) !important;
  border-radius:10px !important;
  font:inherit !important;
  line-height:1.3 !important;
  resize:vertical !important;
  white-space:pre-wrap !important;
  overflow-wrap:anywhere !important;
}
html body .car-records-page + .card .installment-pay-form .btn{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  box-sizing:border-box !important;
}
