/* === style.css (merged) === */
:root{--page:#fff;--panel:#fff;--text:#29313b;--muted:#697381;--border:#e7ebef;--accent:#5b84c8;--accent-dark:#466fb4;--success:#2d8a51;--warning:#c88628;--danger:#be4949;--toolbar-bg:#e8f0fa;--toolbar-border:#c8d6e6}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;color:var(--text);background:var(--page)}a{text-decoration:none;color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:204px;color:#f7f9fc;transition:width .16s ease;z-index:20}.workspace{width:calc(100% - 204px);margin-left:204px;min-height:100vh;transition:margin .16s ease,width .16s ease}.park-switcher{position:relative;border-bottom:1px solid rgba(255,255,255,.08)}.park-switcher-button{width:100%;min-height:58px;border:0;display:flex;align-items:center;padding:0 14px;color:#f7f9fc;background:transparent;cursor:pointer;text-align:left;font:inherit}.park-switcher-button:hover{background:rgba(255,255,255,.05)}.brand-mark{display:inline-grid;place-items:center;background:#5b84c8;color:#fff;font-size:12px;}.brand-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;}.park-switcher-arrow{margin-left:auto;color:#aeb4bb}.park-switcher-menu{position:absolute;top:51px;z-index:30;overflow:hidden;border:1px solid #dfe5eb;border-radius:6px;background:#fff;color:var(--text)}.park-switcher-menu form{margin:0}.park-switcher-option{width:100%;display:flex;justify-content:space-between;gap:12px;border:0;border-top:1px solid #edf0f3;padding:9px 11px;background:#fff;color:var(--text);cursor:pointer;text-align:left;font:inherit;font-size:13px}.park-switcher-option:hover{background:#f4f8ff}.park-switcher-option.is-current{background:#eef5ff;color:var(--accent);font-weight:700}.park-switcher-option small{color:var(--muted)}.sidebar-nav{padding:10px 7px}.nav-link{display:flex;align-items:center;min-height:37px;padding:0 9px;border-radius:5px;color:#d5dde8;}.nav-link:hover,.nav-link.is-active{color:#fff}.nav-icon{display:inline-grid;place-items:center;width:16px;height:16px;flex:0 0 16px;color:#b8c4d3}.nav-icon svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-group-title{margin:17px 9px 5px;color:#b8c4d3;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.nav-link-sub{margin-left:13px;padding-left:8px;font-size:13px}.topbar{height:52px;display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);}.sidebar-toggle{display:inline-grid;place-items:center;width:28px;height:28px;border:0;background:transparent;cursor:pointer;color:#4b535e}.sidebar-toggle svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.topbar-title{display:flex;align-items:center;gap:8px;color:#29313b;}.topbar-section-icon{display:inline-grid;place-items:center;width:19px;height:19px;color:#5b6674}.topbar-section-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:15px}.user-menu{display:flex;align-items:center;gap:8px;font-size:13px}.user-avatar{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#eaf2ff;color:#225eaa;font-size:12px;font-weight:700}.logout-button{border:0;background:transparent;color:var(--muted);cursor:pointer;font:inherit;font-size:13px}.content{padding:18px 20px;max-width:none}.page-heading{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-bottom:12px;}.page-heading h1{display:none}.page-heading-actions{display:flex;align-items:center;gap:8px}.button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;border:1px solid transparent;border-radius:5px;padding:0 11px;font-size:13px;font-weight:700;cursor:pointer;font-family:inherit}.button-primary{color:#fff;background:var(--accent)}.button-primary:hover{background:var(--accent-dark)}.button-secondary{color:var(--text);background:#fff;border-color:#cfd7e0}.button-icon{width:34px;padding:0;border-radius:50%;font-size:17px}.panel{background:var(--panel);border:1px solid var(--border);}.panel-header{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 14px;border-bottom:1px solid var(--border)}.panel-header h2{margin:0;font-size:15px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;border-bottom:1px solid var(--border);font-size:13px;vertical-align:middle;white-space:nowrap}th{color:#3c4652;font-size:12px;font-weight:700;letter-spacing:0;background:#fafbfd}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfcfd}.cell-primary{display:block;font-weight:400}.cell-secondary{display:block;margin-top:2px;color:var(--muted);font-size:11px}.entity-link{color:#2f66ad;font-weight:400}.entity-link:hover{text-decoration:underline}.badge{display:inline;font-size:13px;font-weight:400;padding:0;border-radius:0;background:transparent!important;color:var(--text)!important}.text-action,.action-link{color:var(--accent);font-weight:400}.action-link{display:inline-flex;align-items:center;padding:5px 7px;border:1px solid var(--border);border-radius:4px;background:#fff;font-size:12px}.empty-cell{color:var(--muted);text-align:center;padding:22px}.crm-notice-stack{display:grid;gap:8px;margin:0 0 12px}.crm-notice-stack[hidden]{display:none}.crm-notice-stack .alert{margin:0}.alert{margin-bottom:12px;padding:10px 12px;border-radius:4px;font-size:13px;line-height:1.4}.alert ul{margin:0;padding-left:18px}.alert-success{background:#effaf3;border:1px solid #bfe6ca;color:#176a37}.alert-warning,.alert-info{background:#fff8e8;border:1px solid #ead296;color:#8a5b0a}.alert-error{background:#fff0f0;border:1px solid #f0baba;color:#a13232}.search-form{display:flex;align-items:center;margin:0 0 10px}.search-form input{min-height:34px;max-width:330px}.search-trigger{border:0;background:#f1f3f6;width:34px;height:34px;border-radius:50%;font-size:17px;cursor:pointer;color:#4f5965}.search-trigger:hover{background:#e5e9ee}.sort-link{display:inline-flex;align-items:center;gap:4px;color:inherit}.sort-mark{width:10px;color:#9ca5af;font-size:11px}.sort-link.is-active .sort-mark{color:#4d6f9e}.list-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 11px;border-top:1px solid var(--border);font-size:12px}.per-page-form{display:flex;align-items:center;gap:6px}.per-page-form select{min-height:28px;border:1px solid #cfd7e0;border-radius:4px;background:#fff;padding:0 7px;font:inherit;font-size:12px;color:var(--text)}.pagination{display:flex;align-items:center;gap:3px}.pagination a,.pagination span{display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 6px;border:1px solid var(--border);border-radius:4px;color:#4f5b68}.pagination a:hover{border-color:#b7c5d7;color:#2f66ad}.pagination .is-current{background:#f0f4f9;border-color:#dce5ef;color:#2f66ad}.pagination .is-disabled{color:#adb5bd}.sidebar-collapsed .brand-text,.sidebar-collapsed .park-switcher-arrow,.sidebar-collapsed .nav-label,.sidebar-collapsed .nav-group-title{display:none}.sidebar-collapsed .park-switcher-button,.sidebar-collapsed .nav-link{justify-content:center;padding:0}.sidebar-collapsed .nav-icon{width:auto}.auth-card{width:min(100%,400px);background:#fff;border:1px solid #dfe5eb;padding:26px;box-shadow:0 8px 24px rgba(31,45,61,.08)}.auth-card .brand{letter-spacing:.02em;color:#2b5f9e;margin-bottom:24px}.auth-card h1{margin:0 0 8px;font-size:25px}.auth-card .muted{color:#64748b}.auth-card label{margin:16px 0 6px;font-weight:700}.auth-card input{display:block;min-height:40px;border:1px solid #cbd5e1;border-radius:5px;padding:9px 10px;font:inherit}.auth-card button{width:100%;margin-top:20px;border:0;border-radius:5px;padding:10px 14px;background:#2b5f9e;color:#fff;cursor:pointer;font:inherit;font-weight:700}@media(max-width:780px){.sidebar{width:62px}.workspace{width:calc(100% - 62px);margin-left:62px}.sidebar .brand-text,.sidebar .park-switcher-arrow,.sidebar .nav-label,.sidebar .nav-group-title{display:none}.park-switcher-button,.nav-link{justify-content:center;padding:0}.nav-link-sub{margin-left:0}.user-name{display:none}.content{padding:14px}.page-heading{align-items:flex-start;flex-direction:column}.page-heading-actions{width:100%}.page-heading-actions .button{flex:1}.search-form input{max-width:none;flex:1}.list-footer{align-items:flex-start;flex-direction:column}}

.nav-settings-toggle{width:100%;border:0;background:transparent;cursor:pointer;font-family:inherit;text-align:left}.nav-settings-toggle:hover{background:var(--sidebar-hover);color:#fff}.nav-caret{color:#aeb4bb;font-size:15px;transition:transform .16s ease}.settings-submenu{padding-top:1px}.settings-submenu[hidden]{display:none}.sidebar-collapsed .nav-caret,.sidebar-collapsed .settings-submenu{display:none!important}.sidebar-collapsed .settings-group{position:relative}.sidebar-collapsed .settings-group.is-open .settings-submenu{display:none!important}

.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);gap:16px;margin-bottom:16px}.dashboard-section{border:1px solid var(--border);background:#fff}.dashboard-section-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border-bottom:1px solid var(--toolbar-border);background:var(--toolbar-bg)}.dashboard-section-heading h2{margin:0;font-size:15px;}.dashboard-section-heading .search-form{flex:1 1 320px;min-width:220px;margin:0}.dashboard-section-heading .search-form input[type=search]{flex:1 1 auto;width:100%;max-width:none}.dashboard-section-heading .search-form .clear-search{flex:0 0 auto}.dashboard-empty{padding:22px 14px;color:var(--muted);font-size:13px}.dashboard-empty-compact{padding:11px 14px}.dashboard-table th,.dashboard-table td{padding:9px 11px}.number-cell{text-align:right}.dashboard-inspection-row{display:flex;justify-content:space-between;gap:12px;padding:8px 6px;border-top:1px solid var(--border);font-size:13px;color:var(--text)}.dashboard-inspection-row:hover{color:var(--accent);background:#fbfcfd}.dashboard-inspection-row small{color:var(--muted);font-size:12px;text-align:right}.vehicle-status-overview{grid-template-columns:repeat(6,minmax(0,1fr))}.vehicle-status-item{padding:12px 14px;}.vehicle-status-item:last-child{border-right:0}@media(max-width:980px){.dashboard-grid{grid-template-columns:1fr}.vehicle-status-overview{grid-template-columns:repeat(3,minmax(0,1fr))}.vehicle-status-item:nth-child(3n){border-right:0}.vehicle-status-item:nth-child(n/**/+4){border-top:1px solid var(--border)}}@media(max-width:620px){.vehicle-status-item{border-right:0;border-top:1px solid var(--border)}.vehicle-status-item:first-child{border-top:0}.dashboard-inspection-row{align-items:flex-start;flex-direction:column;gap:3px}.dashboard-inspection-row small{text-align:left}.dashboard-section-heading .search-form{order:2;flex-basis:100%;min-width:0}}
/* Главная: рабочие блоки */
.dashboard-schedule .schedule-block:last-child{border-bottom:0}
.due-group-toggle{gap:14px;padding:11px 14px;border:0;background:#fff;}
.due-group-toggle:hover{background:#fbfcfd}

.vehicle-status-item{border:0;border-right:1px solid var(--border);background:#fff;}.vehicle-status-item:hover,.vehicle-status-item.is-active{background:#f7f9fc}.dashboard-vehicle-list[hidden]{display:none}
/* Карточка водителя */
.driver-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--border);border-radius:4px;background:#fff;margin-bottom:14px}.driver-summary-item{padding:12px 14px;border-right:1px solid var(--border)}.driver-summary-item:last-child{border-right:0}.driver-summary-item span{display:block;color:var(--muted);font-size:12px}.driver-summary-item strong{display:block;margin-top:4px;font-size:18px;font-weight:400}.driver-tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:14px;overflow-x:auto}.driver-tab{padding:9px 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}.driver-tab:hover{color:var(--text)}.driver-tab.is-active{border-bottom-color:var(--accent);color:var(--text)}.driver-tab-panel[hidden]{display:none}.is-voided{opacity:.55;}
@media(max-width:900px){.driver-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.driver-summary-item:nth-child(2){border-right:0}.driver-summary-item:nth-child(n/**/+3){border-top:1px solid var(--border)}}
@media(max-width:620px){.driver-summary{grid-template-columns:1fr}.driver-summary-item{border-right:0;border-top:1px solid var(--border)}.driver-summary-item:first-child{border-top:0}.vehicle-status-overview{grid-template-columns:1fr}.due-group-toggle{align-items:flex-start;flex-direction:column;gap:3px}}


.tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:12px}.tab{padding:9px 13px;color:var(--muted);font-size:13px;border-bottom:2px solid transparent}.tab:hover{color:var(--text)}.tab.is-active{color:var(--accent);border-bottom-color:var(--accent)}.inline-upload{margin:0}.inline-upload label{cursor:pointer}.field-with-action{display:flex;gap:7px;align-items:center}.field-with-action input{min-width:0}.field-icon-button{flex:0 0 42px;width:42px;height:42px;border:1px solid #cfd7e0;border-radius:4px;color:#55616e;}.field-icon-button:hover{border-color:var(--accent);color:var(--accent)}

.driver-summary-item{color:var(--text)}.driver-summary-item:hover{background:#fbfcfd}.driver-summary-item:hover strong{color:var(--accent)}


/* === admin.css (merged) === */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:16px}.form-full{grid-column:1/-1}.field{display:block}.field>span,.form-grid>div>label,.form-grid>label{display:block;margin:0 0 5px;font-size:13px;font-weight:700}.field input,.field select,.field textarea,.form-grid input,.form-grid select,.form-grid textarea{display:block;width:100%;border:1px solid #cfd7e0;background:#fff;color:var(--text);font:inherit;font-size:14px;box-sizing:border-box}.field input,.field select,.form-grid input,.form-grid select{min-height:42px;padding:0 11px}.field textarea,.form-grid textarea{min-height:92px;padding:10px 11px;resize:vertical}.field.is-disabled input,.field.is-disabled select,.field.is-disabled textarea{background:#f1f3f5;color:#8b949e;border-color:#dfe4e9;cursor:not-allowed}.field input:focus,.field select:focus,.field textarea:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:var(--accent);outline:2px solid rgba(79,131,204,.14)}.form-grid input:not([type="search"])::placeholder,.form-grid textarea::placeholder,.field input:not([type="search"])::placeholder,.field textarea::placeholder{color:transparent}.form-actions{display:flex;justify-content:flex-end;gap:8px;padding:13px 16px;border-top:1px solid var(--border)}.form-checkbox{display:flex!important;align-items:center;gap:8px;margin:0!important;font-weight:600!important}.form-checkbox input{width:16px!important;height:16px!important;min-height:16px!important;margin:0!important}.assignment-row{display:grid;grid-template-columns:30px minmax(0,1fr) minmax(200px,.75fr);gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:4px}.assignment-row input[type="checkbox"]{width:16px;height:16px;margin:0}.assignment-row strong{display:block}.assignment-row span{display:block;color:var(--muted);font-size:12px;margin-top:2px}.assignment-row select{min-height:42px!important}.assignments{display:grid;gap:8px;padding:0 16px 16px}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 16px 16px}.permission-section{border:1px solid var(--border);border-radius:4px;padding:11px}.permission-section h3{margin:0 0 8px;font-size:14px}.permission-list{display:grid;gap:7px}.permission-list label{display:flex;align-items:center;gap:7px;font-size:13px}.permission-list input{width:16px;height:16px;margin:0}.form-section-title{margin:0;padding:16px 16px 10px;font-size:16px}.detail-grid,.details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}.detail{padding:12px 15px;border-bottom:1px solid var(--border)}.detail-label{display:block;color:var(--muted);font-size:12px;margin-bottom:3px}.detail-value{font-weight:600}.subpanel{margin-top:14px}.balance-negative{color:#b03434!important;font-weight:400}.balance-positive{color:#227342!important;font-weight:400}.page-description,.eyebrow,.form-help,.panel-header p{display:none!important}.combobox{position:relative}.combobox-menu{position:absolute;z-index:25;left:0;right:0;max-height:230px;overflow:auto;border:1px solid #cfd7e0;border-top:0;background:#fff;box-shadow:0 8px 20px rgba(0,0,0,.12)}.combobox-option{display:block;width:100%;padding:9px 11px;border:0;border-bottom:1px solid #edf0f3;background:#fff;text-align:left;color:var(--text);font:inherit;font-size:13px;cursor:pointer}.combobox-option[hidden]{display:none!important}.combobox-option:hover{background:#f5f8fc}.combobox-option small{display:block;margin-top:2px;color:var(--muted);font-size:11px}.rate-history{margin-top:14px}.rate-current{margin:0 0 14px;padding:11px 14px;border:1px solid var(--border);border-radius:4px;background:#fafbfd;font-size:13px}.rate-current strong{font-size:14px}table strong,table .cell-primary{font-weight:400!important}@media(max-width:900px){.detail-grid,.details-grid,.permission-grid{grid-template-columns:1fr}}@media(max-width:760px){.form-grid,.detail-grid,.details-grid{grid-template-columns:1fr}.form-full{grid-column:auto}.form-actions{flex-direction:column-reverse}.form-actions .button{width:100%}.assignment-row{grid-template-columns:26px minmax(0,1fr)}.assignment-row select{grid-column:2}}


/* === design.css (merged) === */
/* Visual layer: loaded after style.css and admin.css. Does not change CRM data or forms logic. */
:root{
  --sidebar:#263445;
  --sidebar-hover:#304057;
  --sidebar-active:#3b506d;
  --page:#f8fafc;
  --panel:#ffffff;
  --text:#26313d;
  --muted:#6e7b89;
  --border:#dfe6ed;
  --accent:#4f7ac1;
  --accent-dark:#3e68ae;
  --danger:#b94949;
}

/* Desktop navigation */
.sidebar{width:220px;background:var(--sidebar);box-shadow:none}
.workspace{width:calc(100% - 220px);margin-left:220px;background:var(--page)}
.park-switcher-button{min-height:62px;padding:0 15px;gap:10px}
.brand-mark{width:34px;min-width:34px;height:34px;border-radius:8px;background:#6688c8;font-size:13px;font-weight:700}
.brand-text{font-size:14px;font-weight:600}
.park-switcher-arrow{font-size:0;width:15px;height:15px;position:relative;color:#b8c4d3}
.park-switcher-arrow::after{content:"";position:absolute;top:4px;left:3px;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.park-switcher-menu{top:54px;left:8px;right:8px;border-radius:5px;box-shadow:0 12px 26px rgba(0,0,0,.28)}
.park-switcher-option{min-height:40px;padding:10px 11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.park-switcher-option span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-nav{padding:11px 8px}
.nav-link{position:relative;min-height:38px;padding:0 10px;border-radius:4px;font-size:13px;gap:10px}
.nav-link:hover{background:var(--sidebar-hover)}
.nav-link.is-active{background:var(--sidebar-active)}
.settings-group.is-open>.nav-settings-toggle{background:#314158}
.settings-group.is-open>.nav-settings-toggle:hover{background:#304057}
.nav-link-sub.is-active{background:#3b506d}
.nav-icon{width:17px;height:17px;flex-basis:17px}
.nav-icon svg{width:17px;height:17px;stroke-width:1.65}
.nav-link-sub{margin-left:12px;padding-left:9px;min-height:31px}
.nav-link-sub .nav-icon{width:15px;height:15px;flex-basis:15px}
.nav-link-sub .nav-icon svg{width:15px;height:15px}
.nav-settings-toggle{display:flex;align-items:center;gap:10px}
.nav-caret{width:15px;height:15px;position:relative;color:#b8c4d3;}
.nav-caret::after{content:"";position:absolute;top:4px;left:3px;width:7px;height:7px;border-right:1.4px solid currentColor;border-bottom:1.4px solid currentColor;transform:rotate(45deg);transition:transform .14s ease,top .14s ease}
.settings-group.is-open .nav-caret::after{top:7px;transform:rotate(225deg)}
.settings-submenu{padding:2px 0 4px}

/* Collapsed desktop menu. Hover hints use the common body-level tooltip. */
.sidebar-collapsed .sidebar{width:62px}
.sidebar-collapsed .workspace{width:calc(100% - 62px);margin-left:62px}
.sidebar-collapsed .park-switcher-menu{left:8px;right:auto;width:238px}
.sidebar-collapsed .park-switcher-button{position:relative}
.sidebar-collapsed .settings-group{overflow:visible}
.sidebar-collapsed .nav-settings-toggle{justify-content:center}
.sidebar-collapsed .nav-link{overflow:visible}
.sidebar-collapsed .nav-link-sub{margin-left:0}

/* Header + desktop working area. */
.topbar{height:54px;padding:0 19px;background:#fff}
.sidebar-toggle{width:30px;height:30px;border-radius:4px}
.sidebar-toggle:hover{background:#f1f4f7}
.topbar-title{font-size:18px;font-weight:400}
.topbar-section-icon{width:20px;height:20px;color:#5a6878}
.topbar-section-icon svg{width:20px;height:20px;stroke-width:1.65}
.content{padding:18px 20px 24px}
.page-heading{min-height:34px;margin-bottom:10px}
.button{border-radius:4px;font-weight:600}
.panel,.dashboard-section{border-color:var(--border);border-radius:4px;box-shadow:none}
.panel-header,.dashboard-section-heading{padding:10px 14px}
.panel-header h2,.dashboard-section-heading h2{font-weight:700}
th,td{padding:9px 11px}
tbody tr:hover{background:#f8fafc}

/* Dashboard: the status row is a control, not browser-default buttons. */
.dashboard-grid{gap:15px;margin-bottom:15px}
.dashboard-section{overflow:hidden}
.dashboard-debt,.dashboard-schedule,.dashboard-vehicles{background:#fff}
.dashboard-empty{padding:19px 14px}
.dashboard-schedule .schedule-block{border-bottom:1px solid var(--border)}

.due-group-toggle{
  appearance:none;-webkit-appearance:none;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 14px;border:0!important;outline:0;background:#fff!important;color:var(--text)!important;
  font:inherit;text-align:left;cursor:pointer;box-shadow:none!important;border-radius:0!important;
}
.due-group-toggle:hover{background:#f8fafc!important}
.due-group-toggle:focus-visible{outline:2px solid rgba(79,122,193,.35)!important;outline-offset:-2px}
.due-group-label{font-size:12px;color:var(--muted)}
.due-group-value{font-size:13px;color:var(--text)}
.due-group-toggle.is-warning .due-group-value{color:var(--danger)}
.due-group-toggle.is-critical .due-group-value{color:var(--danger);font-weight:400}
.due-group-list{padding:0 8px 8px;background:#fff}
.vehicle-status-overview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-bottom:1px solid var(--border)}
.vehicle-status-item{
  appearance:none;-webkit-appearance:none;display:flex;align-items:baseline;justify-content:space-between;gap:10px;min-height:54px;
  padding:11px 14px;border:0!important;border-right:1px solid var(--border)!important;border-radius:0!important;
  background:#fff!important;color:var(--text)!important;font:inherit;text-align:left;cursor:pointer;box-shadow:none!important;
}
.vehicle-status-item:last-child{border-right:0!important}
.vehicle-status-item:hover{background:#f8fafc!important}
.vehicle-status-item.is-active{background:#f1f5fb!important;box-shadow:inset 0 -2px 0 var(--accent)!important}
.vehicle-status-item:focus-visible{outline:2px solid rgba(79,122,193,.38)!important;outline-offset:-2px}
.vehicle-status-name{font-size:13px;color:var(--muted)}
.vehicle-status-item.is-active .vehicle-status-name{color:#2f66ad}
.vehicle-status-count{font-size:20px;font-weight:400;color:var(--text)}
.dashboard-vehicle-list{background:#fff}

/* File and form pages stay compact, no giant rounded SaaS blocks. */
.form-panel,
.field input,.field select,.field textarea,.form-grid input,.form-grid select,.form-grid textarea{border-radius:4px}

/* Mobile: sidebar is a drawer. It must never permanently consume 62px. */
.sidebar-backdrop{display:none}
@media(max-width:780px){
  .sidebar{width:264px!important;transform:translateX(-100%);transition:transform .18s ease;box-shadow:12px 0 28px rgba(0,0,0,.25);z-index:60}
  .workspace,.sidebar-collapsed .workspace{width:100%!important;margin-left:0!important}
  .app-shell.sidebar-mobile-open .sidebar{transform:translateX(0)}
  .sidebar-backdrop{position:fixed;inset:0;z-index:50;display:block;border:0;background:rgba(15,22,30,.36);opacity:0;pointer-events:none;transition:opacity .18s ease}
  .app-shell.sidebar-mobile-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  .sidebar .brand-text,.sidebar .park-switcher-arrow,.sidebar .nav-label,.sidebar .nav-group-title{display:initial}
  .sidebar .park-switcher-button,.sidebar .nav-link{justify-content:flex-start;padding:0 10px}
  .sidebar .nav-link-sub{margin-left:12px}
  .sidebar-collapsed .brand-text,.sidebar-collapsed .park-switcher-arrow,.sidebar-collapsed .nav-label{display:initial}
  .sidebar-collapsed .park-switcher-button,.sidebar-collapsed .nav-link{justify-content:flex-start;padding:0 10px}
  .sidebar-collapsed .nav-link-sub{margin-left:12px}
  .topbar{height:52px;padding:0 12px;gap:10px}
  .topbar-actions{gap:8px}
  .content{padding:13px}
  .dashboard-grid{grid-template-columns:1fr;gap:12px;margin-bottom:12px}
  .vehicle-status-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .vehicle-status-item{min-height:50px;border-right:1px solid var(--border)!important;border-bottom:1px solid var(--border)!important}
  .vehicle-status-item:nth-child(2n){border-right:0!important}
  .vehicle-status-item:last-child{grid-column:1 / -1;border-bottom:0!important}
  .dashboard-table th,.dashboard-table td{padding:9px 8px;font-size:12px}
  .dashboard-schedule .dashboard-inspection-row{padding:9px 6px}
  .due-group-toggle{align-items:flex-start;flex-direction:column;gap:3px}
  .page-heading{margin-bottom:8px}
}


/* Карточки интеграций: только интерфейс, без вызовов API до настройки доступа. */
.vehicle-live-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 12px}
.vehicle-live-card{border:1px solid var(--border);border-radius:4px;background:#fff;padding:13px 14px;box-shadow:none}
.vehicle-live-card{display:flex;flex-direction:column;gap:4px;min-height:103px}
.vehicle-live-card>span{font-size:12px;color:var(--muted)}
.vehicle-live-card strong{font-size:15px;font-weight:600;color:var(--text)}
.vehicle-live-card small{font-size:12px;line-height:17px;color:var(--muted)}
.vehicle-live-card-wide{gap:5px}
.vehicle-live-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.vehicle-live-card-header>span{font-size:12px;color:var(--muted)}

.mini-action{flex:0 0 28px;width:28px;height:28px;padding:0;border:1px solid #d5dce4;border-radius:50%;color:#5d6875;cursor:pointer}
.mini-action:hover{border-color:#8fa8c7;background:#f5f8fc;color:#2f66ad}
.mini-action svg{width:19px;height:19px;stroke-width:1.7;}
.vehicle-live-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:5px}
.button-compact{min-height:30px;padding:5px 9px;font-size:12px}



@media(max-width:780px){.vehicle-live-summary{gap:9px;margin-bottom:10px}.vehicle-live-card{min-height:auto}}


/* === list_interface.css (merged) === */

/* Рабочие списки: компактная верхняя строка и быстрые действия */
.list-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px;padding:10px 12px;border:1px solid var(--toolbar-border);border-radius:4px;background:var(--toolbar-bg)}.list-toolbar>.search-form:not(:has(>div)){display:contents;margin:0}.list-toolbar>.search-form:not(:has(>div))>input[type="search"]{order:2;flex:1 1 calc(100% - 42px);width:auto;min-width:calc(100% - 42px);max-width:none}.list-toolbar>.search-form:not(:has(>div)):has(>input[type="search"])>.clear-search{order:2}.list-toolbar>.search-form:not(:has(>div))>input[type="date"]{flex:0 0 148px;width:148px}.list-toolbar>.search-form:not(:has(>div))>select{flex:1 1 170px;min-width:150px;max-width:320px}.list-toolbar-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;order:1}.list-toolbar-actions form{margin:0}.list-toolbar>.quick-actions{order:1;margin-left:auto}.list-toolbar .button-add,.list-toolbar .clear-search{flex:0 0 34px;width:34px;height:34px;padding:0;border-radius:50%;font-size:21px;line-height:1}.list-toolbar .clear-search{font-size:18px;}.quick-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:108px}.quick-action{width:28px;height:28px;padding:0;border:1px solid #d5dce4;border-radius:50%;color:#5d6875;cursor:pointer;vertical-align:middle}.quick-action:hover{border-color:#8fa8c7;background:#f5f8fc;color:#2f66ad}.quick-action svg{width:19px;height:19px;stroke-width:1.7;}.quick-action[data-tooltip]{position:relative}.quick-action[data-tooltip]::after{position:absolute;z-index:80;left:50%;bottom:calc(100% + 7px);transform:translateX(-50%);content:attr(data-tooltip);display:none;max-width:180px;padding:6px 8px;border-radius:4px;background:#252a31;color:#fff;font:12px/1.2 Arial,Helvetica,sans-serif;white-space:nowrap;box-shadow:0 5px 14px rgba(0,0,0,.18);pointer-events:none}.quick-action[data-tooltip]:hover::after,.quick-action[data-tooltip]:focus-visible::after{display:block}.quick-action.is-document{color:#406eae}.quick-action.is-policy{color:#2d7a55}.quick-action.is-preview{color:#687482}.quick-action:focus-visible{outline:2px solid #8fb1e3;outline-offset:2px}.quick-action[disabled]{opacity:.55;}.list-toast{position:fixed;z-index:100;left:50%;bottom:22px;transform:translate(-50%,14px);padding:9px 12px;border-radius:5px;background:#262c33;color:#fff;font-size:13px;opacity:0;pointer-events:none;transition:opacity .16s ease,transform .16s ease;box-shadow:0 10px 25px rgba(0,0,0,.2)}.list-toast.is-visible{opacity:1;transform:translate(-50%,0)}.cell-amount{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.balance-negative{color:#b44343}.balance-positive{color:#2d7a55}.list-table-actions{width:1%;min-width:118px;text-align:right}.table-wrap th:last-child{white-space:nowrap}.contract-type{color:var(--muted)}
@media(min-width:781px){.list-toolbar:not(:has(select,input[type="date"]))>.search-form:not(:has(>div))>input[type="search"]{order:1;flex:1 1 280px;min-width:240px}.list-toolbar:not(:has(select,input[type="date"]))>.search-form:not(:has(>div)):has(>input[type="search"])>.clear-search{order:1}}
@media(max-width:780px){.list-toolbar{align-items:stretch;gap:8px;padding:10px}.list-toolbar>.search-form:not(:has(>div))>input[type="search"]{flex-basis:calc(100% - 42px);min-width:calc(100% - 42px)}.list-toolbar>.search-form:not(:has(>div))>input[type="date"],.list-toolbar>.search-form:not(:has(>div))>select{flex:1 1 145px;width:auto;max-width:none}.list-toolbar-actions,.list-toolbar>.quick-actions{width:100%;margin-left:0;justify-content:flex-end}.quick-actions{min-width:100px}.quick-action{width:27px;height:27px}.quick-action[data-tooltip]::after{display:none}.list-table-actions{min-width:102px}}


/* Точечные исправления: подсказки поверх таблиц и нижняя пагинация. */
.quick-action[data-tooltip]::after{display:none!important}
.crm-action-tooltip{position:fixed;z-index:10000;display:none;max-width:calc(100vw - 16px);padding:6px 8px;border-radius:4px;background:#252a31;color:#fff;font:12px/1.2 Arial,Helvetica,sans-serif;white-space:nowrap;box-shadow:0 5px 14px rgba(0,0,0,.18);pointer-events:none}
.crm-action-tooltip.is-visible{display:block}
.pagination-summary{white-space:nowrap;color:var(--text);font-size:12px}
.list-footer{flex-wrap:wrap}
.list-footer-right{margin-left:auto;display:flex;align-items:center;gap:14px}
.pagination{gap:0}
.pagination a,.pagination span{min-width:31px;height:31px;border-radius:0;border-right:0}
.pagination a:first-child,.pagination span:first-child{border-radius:4px 0 0 4px}
.pagination a:last-child,.pagination span:last-child{border-right:1px solid var(--border);border-radius:0 4px 4px 0}
.pagination .is-current{background:var(--accent);border-color:var(--accent);color:#fff}
.pagination .is-current + a,.pagination .is-current + span{border-left-color:var(--accent)}
@media(max-width:780px){.list-footer-right{width:100%;margin-left:0;justify-content:space-between;gap:8px}.pagination-summary{font-size:11px;white-space:normal;text-align:right}.pagination a,.pagination span{min-width:28px;height:28px}.crm-action-tooltip{display:none!important}}

/* Документы: цвет показывает, есть ли прикреплённый файл. */
.quick-action.is-available{color:#2d7a55;border-color:#9cc8af;background:#f5fbf7}
.quick-action.is-available:hover{color:#216645;border-color:#70ad8a;background:#edf8f0}
.quick-action.is-missing{color:#7b8794;border-color:#d5dce4;background:#fff}
.quick-action.is-missing:hover{color:#2f66ad;border-color:#8fa8c7;background:#f5f8fc}
.quick-action.is-print{color:#406eae;border-color:#b8cbe2;background:#f7faff}
.quick-action.is-print:hover{color:#2b5f9e;border-color:#83a6cf;background:#edf5fd}
.quick-action.is-disabled{opacity:.36}
.quick-action.is-disabled:hover{color:#406eae;border-color:#b8cbe2;background:#f7faff}





.panel-header-actions{display:flex;align-items:center;justify-content:space-between}


.file-upload-progress{position:fixed;inset:0;z-index:140;display:grid;place-items:center;background:rgba(255,255,255,.72);backdrop-filter:blur(1px)}.file-upload-progress[hidden]{display:none}.file-upload-progress-box{min-width:240px;max-width:360px;padding:18px 20px;border-radius:8px;background:#fff;box-shadow:0 12px 36px rgba(0,0,0,.2);font-size:14px;color:#27313b}.file-upload-progress-bar{height:6px;margin-top:11px;border-radius:99px;background:#e8edf2;overflow:hidden}.file-upload-progress-bar>span{display:block;height:100%;width:0;background:#2d7a55;transition:width .15s ease}.file-upload-progress-text{display:block;font-weight:600}
.inline-link-form{display:inline;margin:0}.link-button{padding:0;border:0;background:transparent;font:inherit;cursor:pointer}.link-button:hover{text-decoration:underline}



/* === control version additions === */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--page-bg,#f5f6f8)}
.auth-card{width:min(100%,390px);padding:28px;border:1px solid var(--border,#e5e7eb);border-radius:8px;background:var(--surface,#fff);box-shadow:0 14px 36px rgba(15,23,42,.10)}
.auth-card-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px}
.auth-brand{display:flex;align-items:center;min-width:0;gap:10px}
.auth-brand-mark{display:inline-grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:8px;background:var(--accent);color:#fff;font-size:13px;font-weight:700}
.auth-card .brand{overflow:hidden;margin:0;color:var(--text,#1f2937);font-size:16px;font-weight:700;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap}
.auth-card h1{margin:0 0 6px;font-size:24px}.auth-card .muted{margin:0 0 20px}.auth-card label{display:block;margin:14px 0 6px;font-size:13px;font-weight:600}.auth-card input{width:100%;min-height:42px}.auth-card>form>button[type="submit"]{width:100%;min-height:42px;margin-top:20px;border-radius:5px;background:var(--accent);color:#fff}.auth-card>form>button[type="submit"]:hover{background:var(--accent-dark)}
@media(max-width:480px){.auth-page{align-items:center;padding:16px}.auth-card{padding:24px 20px}.auth-card-header{margin-bottom:22px}}

/* Templates in Settings */
.template-list{display:grid}.template-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px;border-bottom:1px solid var(--border)}.template-row:last-child{border-bottom:0}.template-info{display:grid;gap:4px}.template-info strong{font-size:14px}.template-info small{color:var(--muted);font-size:12px}.template-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.template-upload-form{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0}.template-file-input{max-width:265px;font-size:12px}@media(max-width:780px){.template-row{grid-template-columns:1fr;gap:10px}.template-actions{justify-content:flex-start}.template-upload-form{width:100%}.template-file-input{max-width:100%;width:100%}}

/* Единые круглые действия. */
.list-add-action,
.list-toolbar .button-add {
  width:48px;
  height:48px;
  min-height:48px;
  padding:0;
  border-radius:50%;
  box-shadow:none;
}
.list-add-action svg,
.list-toolbar .button-add svg {
  width:25px;
  height:25px;
}
.list-toolbar .button-add {
  font-size:30px;
  font-weight:400;
}
.list-add-action:hover,
.list-toolbar .button-add:hover {
  border-color:#7e9fcd;
  background:#f6f9fd;
  color:#2f66ad;
}
.form-action-icon {
  width:36px;
  height:36px;
  min-height:36px;
  border-color:#b7c9e4;
}
.form-action-icon svg {
  width:18px;
  height:18px;
  stroke-width:1.7;
}
.form-actions .quick-action {
  flex:0 0 auto;
}

.vehicle-live-actions .gps-action {
  width:46px;
  height:46px;
  border-color:#c6d3e4;
  color:#5d6b7d;
}
.vehicle-live-actions .gps-action svg {
  width:23px;
  height:23px;
}
.vehicle-live-actions .gps-action:not([disabled]):hover {
  color:#2f66ad;
  border-color:#87a7cf;
  background:#f6f9fd;
}
.vehicle-live-actions .gps-action.is-loading svg {
  animation:crm-icon-spin .8s linear infinite;
}
@keyframes crm-icon-spin { to { transform:rotate(360deg); } }

.dashboard-section-actions {
  display:flex;
  align-items:center;
  gap:6px;
}
.dashboard-toggle-icon {
  width:30px;
  height:30px;
}
.due-group-link {
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}
.due-group-link:hover {
  color:#2f66ad;
}
.list-context-title {
  margin:0 0 10px;
  color:var(--muted);
  font-size:13px;
}

.integration-tabs {
  display:flex;
  gap:0;
  overflow-x:auto;
  margin:0 0 14px;
  border-bottom:1px solid var(--border);
}
.integration-tab {
  flex:0 0 auto;
  border:0;
  border-bottom:3px solid transparent;
  padding:10px 18px 9px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:14px;
  cursor:pointer;
}
.integration-tab:hover { color:var(--text); }
.integration-tab.is-active {
  border-bottom-color:var(--accent);
  color:var(--text);
}
.integration-tab-panel { margin-top:0; }

@media (max-width:780px) {
  .dashboard-debt-table th,
  .dashboard-debt-table td { padding-left:8px; padding-right:8px; }
  .dashboard-debt-table th:first-child,
  .dashboard-debt-table td:first-child { max-width:130px; overflow:hidden; text-overflow:ellipsis; }
  .dashboard-debt-table th:last-child,
  .dashboard-debt-table td:last-child { white-space:nowrap; }
  .integration-tab { padding-left:14px; padding-right:14px; }
  .list-add-action,
  .list-toolbar .button-add { width:46px; height:46px; min-height:46px; }
}
.panel-header .button-add {
  width:40px;
  height:40px;
  min-height:40px;
  padding:0;
  border-radius:50%;
  font-size:26px;
  font-weight:400;
}
.panel-header .button-add:hover {
  border-color:#7e9fcd;
  background:#f6f9fd;
  color:#2f66ad;
}
@media (max-width:780px) {
  .dashboard-debt-table th:nth-child(4),
  .dashboard-debt-table td:nth-child(4) { display:table-cell; }
}


/* Единый компактный размер иконок действий во всей CRM. */
.crm-icon-button,
.quick-action,
.mini-action,
.form-action-icon,
.field-icon-button,
.list-add-action,
.list-toolbar .button-add,
.panel-header .button-add,
.vehicle-live-actions .gps-action,
.dashboard-toggle-icon {
  box-sizing:border-box;
  flex:0 0 32px;
  width:32px !important;
  height:32px !important;
  min-width:32px !important;
  min-height:32px !important;
  border:1px solid #b7c9e4;
  background:#fff;
  color:#4875ba;
  line-height:1;
  text-decoration:none;
}
.crm-icon-button:hover:not([disabled]),
.quick-action:hover:not([disabled]),
.mini-action:hover:not([disabled]),
.form-action-icon:hover:not([disabled]),
.field-icon-button:hover:not([disabled]),
.list-add-action:hover:not([disabled]),
.list-toolbar .button-add:hover:not([disabled]),
.panel-header .button-add:hover:not([disabled]),
.vehicle-live-actions .gps-action:hover:not([disabled]),
.dashboard-toggle-icon:hover:not([disabled]) {
  border-color:#7e9fcd;
  background:#f6f9fd;
  color:#2f66ad;
}
.crm-icon-button svg,
.quick-action svg,
.mini-action svg,
.form-action-icon svg,
.field-icon-button svg,
.list-add-action svg,
.list-toolbar .button-add svg,
.panel-header .button-add svg,
.vehicle-live-actions .gps-action svg,
.dashboard-toggle-icon svg {
  width:17px !important;
  height:17px !important;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.crm-icon-button[disabled],
.quick-action[disabled],
.mini-action[disabled],
.form-action-icon[disabled],
.field-icon-button[disabled],
.list-add-action[disabled],
.list-toolbar .button-add[disabled],
.panel-header .button-add[disabled],
.vehicle-live-actions .gps-action[disabled],
.dashboard-toggle-icon[disabled] {
  opacity:.42;
  cursor:default;
}
.form-actions { align-items:center; }
.form-actions .crm-icon-button { flex:0 0 32px; }
.crm-icon-button[data-tooltip] { position:relative; }
@media(max-width:780px) {
  .form-actions { flex-direction:row; justify-content:flex-end; }
  .form-actions .crm-icon-button { width:32px !important; }
}

/* === CRM UI: единая система полей и форм === */
:root {
  --control-height:42px;
  --control-radius:4px;
  --control-border:#cfd7e0;
  --control-border-focus:#5b84c8;
  --control-placeholder:#8a96a3;
}

input[type="text"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="email"],
select,
textarea {
  width:100%;
  border:1px solid var(--control-border);
  border-radius:var(--control-radius);
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:14px;
  box-shadow:none;
}

input[type="text"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="email"],
select {
  min-height:var(--control-height);
  padding:0 11px;
}

textarea {
  min-height:112px;
  padding:10px 11px;
  line-height:1.45;
  resize:vertical;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color:var(--control-border-focus);
  outline:2px solid rgba(91,132,200,.16);
  outline-offset:0;
}

input::placeholder,
textarea::placeholder {
  color:var(--control-placeholder) !important;
  opacity:1;
}

.form-panel {
  max-width:1180px;
}

.form-grid {
  gap:16px;
  padding:18px;
}

.field > label,
.form-grid > div > label,
.form-grid > label {
  margin-bottom:6px;
  color:#34404c;
  font-size:13px;
  font-weight:600;
  line-height:1.3;
}

.form-actions {
  gap:9px;
  padding:14px 18px;
}

.field-with-action {
  gap:8px;
}

.field-with-action .field-icon-button {
  flex:0 0 var(--control-height);
  width:var(--control-height) !important;
  height:var(--control-height) !important;
  min-width:var(--control-height) !important;
  min-height:var(--control-height) !important;
  border-radius:var(--control-radius) !important;
}

.search-form {
  gap:8px;
}

.search-form input[type="search"] {
  min-height:var(--control-height);
}

.search-form select {
  flex:0 0 168px;
  width:168px;
}

.list-toolbar .button-add,
.list-toolbar .clear-search {
  flex:0 0 var(--control-height);
  width:var(--control-height) !important;
  height:var(--control-height) !important;
  min-width:var(--control-height) !important;
  min-height:var(--control-height) !important;
}

.per-page-form select {
  min-height:34px;
  padding:0 8px;
}

.integration-settings-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.integration-settings-grid .field:last-child:nth-child(odd) {
  grid-column:1 / span 1;
}

.notification-compose-panel {
  max-width:820px;
}

.notification-message {
  min-width:280px;
  max-width:620px;
  white-space:normal;
  line-height:1.45;
}

.notification-status.is-queued { color:#9a681e; }
.notification-status.is-sent { color:#227342; }
.notification-status.is-failed { color:#b03434; }

@media (max-width:780px) {
  .form-grid,
  .integration-settings-grid {
    grid-template-columns:1fr;
    padding:14px;
    gap:14px;
  }

  .form-actions {
    padding:13px 14px;
  }

  .search-form {
    flex-wrap:wrap;
  }

  .search-form input[type="search"] {
    flex:1 1 calc(100% - var(--control-height) - 8px);
  }

  .search-form select {
    flex:1 1 100%;
    width:100%;
  }


  .notification-message {
    min-width:220px;
  }
}

/* Денежные значения во всех рабочих таблицах. */
.cell-amount-inline{ display:block; text-align:right; font-variant-numeric:tabular-nums; }
.quick-action.is-active{ color:#2f66ad; border-color:#86a8d2; background:#edf4fd; }
.quick-action.is-active:hover{ color:#245991; border-color:#6793c7; background:#e4effc; }


/* Количественные значения: только данные, не заголовки. */
.cell-number { font-variant-numeric:tabular-nums; }
.driver-summary-item strong {
  text-align:right;
}

/* Отчёт по владельцам. */
.owner-report-toolbar .owner-report-filter {
  width:100%;
  margin:0;
}
.owner-report-filter select { flex:0 1 260px; width:260px; }
.owner-report-filter input[type="date"] { flex:0 0 168px; width:168px; }
.owner-report-filter .quick-action { margin-left:0; }
.report-summary-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin:0 0 12px;
  border:1px solid var(--border);
  border-radius:4px;
  background:#fff;
}
.report-summary-item {
  min-width:0;
  min-height:36px;
  padding:5px 10px;
  border-right:1px solid var(--border);
}
.report-summary-item:last-child { border-right:0; }
.report-summary-item span {
  display:block;
  color:var(--muted);
  font-size:12px;
}
.report-summary-item strong {
  display:block;
  margin-top:1px;
  text-align:right;
  font-size:15px;
  font-weight:400;
}
@media(max-width:780px) {
  .owner-report-filter { flex-wrap:wrap; }
  .owner-report-filter select,
  .owner-report-filter input[type="date"] { flex:1 1 100%; width:100%; }
  .report-summary-grid { grid-template-columns:1fr; }
  .report-summary-item { border-right:0; border-top:1px solid var(--border); }
  .report-summary-item:first-child { border-top:0; }
}

/* Количественные данные во всех рабочих таблицах и сводках. */
.table-wrap td.cell-amount,
.table-wrap td.cell-number,
.table-wrap td.number-cell,
.table-wrap td[data-number],
.dashboard-table td.number-cell,
.dashboard-table td.cell-amount,
.dashboard-table td.cell-number {
  text-align:right !important;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.driver-summary-item {
  display:flex;
  flex-direction:column;
}
.driver-summary-item strong {
  width:100%;
  align-self:stretch;
  text-align:right !important;
  font-variant-numeric:tabular-nums;
}
.report-summary-item strong, .vehicle-status-count{
  font-variant-numeric:tabular-nums;
}
.vehicle-status-count {
  display:block;
  text-align:right;
}
input[inputmode="decimal"] { text-align:right; font-variant-numeric:tabular-nums; }

/* В карточке автомобиля добавлены два независимых вида ТО. */
.vehicle-live-summary {
  grid-template-columns:repeat(4,minmax(0,1fr));
}


.field-hint {
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.field-hint.is-error { color:var(--danger); }

@media (max-width:1080px) {
  .vehicle-live-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:780px) {
  .vehicle-live-summary { grid-template-columns:1fr; }
}

/* GPS/Wialon привязка: иконка действия выравнивается с полем формы. */
.form-field-action{display:flex;align-items:flex-end}
.form-field-action .quick-action{margin:0 0 3px}

/* Путевой лист: период выбирается до формирования документа. */
.waybill-contract-summary { margin-bottom:12px; }
.waybill-form-panel { max-width:760px; }
.waybill-form-panel form { margin:0; }




/* Длинные имена штрафов не растягивают таблицу. Полное имя остаётся по ссылке и при наведении. */
.file-name-cell.is-truncated { width:360px; max-width:360px; }
.file-name-truncate { display:inline-block; max-width:340px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }

@media (max-width:780px) {
  .file-name-cell.is-truncated { width:auto; max-width:none; }
  .file-name-truncate { max-width:190px; }
}



/* Карточка автомобиля: те же вкладки, что и в карточке водителя. */
.vehicle-tabs{display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:14px;overflow-x:auto}
.vehicle-tab{padding:9px 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}
.vehicle-tab:hover{color:var(--text)}
.vehicle-tab.is-active{border-bottom-color:var(--accent);color:var(--text)}
.vehicle-tab-panel[hidden]{display:none}
.vehicle-repair-fields{margin:0}

/* Приход-расход: фиксированная ширина списка, чтобы длинное основание не сдвигало таблицу. */
.cashflow-table .cashflow-col-date{width:118px}
.cashflow-table .cashflow-col-driver{width:170px}
.cashflow-table .cashflow-col-vehicle{width:92px}
.cashflow-table .cashflow-col-category{width:112px}
.cashflow-table .cashflow-col-amount{width:104px}
.cashflow-table .cashflow-col-user{width:128px}
.cashflow-table th,.cashflow-table td{overflow:hidden;text-overflow:ellipsis}
.cashflow-table .cashflow-driver-cell,.cashflow-table .cashflow-vehicle-cell,.cashflow-table .cashflow-category-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cashflow-table .cashflow-reason-cell{white-space:normal;line-height:1.35}
.cashflow-table .cashflow-reason-cell .cell-primary{overflow-wrap:anywhere}

/* Штрафы: файл открывается по иконке, а не растягивает список техническим именем. */
.fines-table th:nth-child(1){width:20%}
.fines-table th:nth-child(2){width:25%}
.fines-table th:nth-child(3){width:145px}
.fines-table th:nth-child(4){width:105px}
.fines-table th:nth-child(5){width:120px}
.fines-table th:nth-child(6){width:100px}
.fines-table td{overflow:hidden;text-overflow:ellipsis}
.fines-table .fine-actions-cell{padding-right:9px;text-align:right}
.fines-table .fine-actions-cell .quick-actions{gap:4px}
.fine-payment-form{display:inline;}
.quick-action.is-payment{color:#2d7a55;border-color:#9cc8af;background:#f5fbf7}
.quick-action.is-payment:hover{color:#216645;border-color:#70ad8a;background:#edf8f0}
.quick-action.is-payment-cancel{color:#a35b31;border-color:#e0c2ad;background:#fff9f3}
.quick-action.is-payment-cancel:hover{color:#874720;border-color:#d2a383;background:#fff3e8}

@media(max-width:780px){
  .cashflow-table{table-layout:auto}
  .cashflow-table .cashflow-col-date,.cashflow-table .cashflow-col-driver,.cashflow-table .cashflow-col-vehicle,.cashflow-table .cashflow-col-category,.cashflow-table .cashflow-col-amount,.cashflow-table .cashflow-col-user{width:auto}
  .fines-table{table-layout:auto}
  .fines-table th:nth-child(n){width:auto}
}
/* Compact cashflow list: a long basis never pushes the table outside its panel. */
.cashflow-table .cashflow-reason-cell{white-space:normal!important;overflow-wrap:anywhere;display:table-cell}
.cashflow-table .cashflow-reason-cell .cell-primary{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
.cashflow-table .cashflow-reason-cell .cell-secondary{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden}
/* Audit and driver statement */

/* Компактное боковое меню: все рабочие разделы и настройки помещаются на обычном экране. */
.sidebar{overflow-y:auto}
.sidebar-nav{padding:6px 7px 9px}
.nav-link{min-height:34px}
.nav-link-sub{min-height:28px}
.settings-submenu{padding-top:0}

/* Личный профиль по клику на имя в правом верхнем углу. */
.user-menu-link{color:inherit;border-radius:4px;padding:3px 5px;margin:-3px -5px}
.user-menu-link:hover{background:#f2f5f8}
.profile-panel{max-width:720px}
.profile-password-form{padding:14px}

/* Аудит: вместо внутренних идентификаторов показывается объект и ссылка на него. */



/* === Консолидированное выравнивание интерфейса === */
.dashboard-grid-priority{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.dashboard-grid-schedules{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-newcomer-table tr.is-critical td{background:#fff7f5}
.dashboard-newcomer-table tr.is-critical td:first-child{box-shadow:inset 3px 0 0 #c44536}
.dashboard-schedule .due-group-label{font-size:14px;color:var(--text)}
.dashboard-schedule .due-group-value{font-size:14px}
.dashboard-vehicles-table .dashboard-sort{display:inline-flex;align-items:center;gap:4px;margin:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}
.dashboard-vehicles-table .dashboard-sort:hover{color:var(--accent)}
.dashboard-vehicles-table .dashboard-sort span{color:#8a99ab;font-weight:400}
.dashboard-vehicles-table .dashboard-sort:focus-visible{outline:2px solid rgba(79,122,193,.38);outline-offset:2px}
.dashboard-vehicles-table td{white-space:nowrap}
.contracts-table tr.is-closed td,
.driver-contracts-table tr.is-closed td{color:#8a96a3}
.contracts-table tr.is-closed .entity-link,
.driver-contracts-table tr.is-closed .entity-link{color:#718093}

/* В таблицах действия компактнее, чем основные кнопки страницы. */
.table-wrap .quick-action,
.table-wrap .crm-icon-button,
.table-wrap .mini-action{flex:0 0 26px;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important}

/* Редактор шаблонов: одна рабочая область, просмотр открывается отдельно. */












.crm-modal{position:fixed;z-index:50;inset:0;display:grid;place-items:center;padding:22px}
.crm-modal[hidden]{display:none!important}
.crm-modal-backdrop{position:absolute;inset:0;background:rgba(32,42,54,.38)}
.crm-modal-card{position:relative;z-index:1;width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;border:1px solid var(--border);border-radius:5px;background:#fff;box-shadow:0 18px 48px rgba(21,34,49,.22)}
.crm-modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border)}
.crm-modal-header h2{margin:0;font-size:15px}
.crm-modal-body{padding:14px}
.crm-modal-actions{padding:0 14px 14px;justify-content:flex-end}



@media(max-width:980px){.dashboard-grid-priority,.dashboard-grid-schedules{grid-template-columns:1fr}}
@media(max-width:620px){.crm-modal{padding:12px}}

/* Журнал операций: дата целиком, основание компактно. */
.cashflow-table .cashflow-col-date{width:156px}
.cashflow-table .cashflow-col-reason{width:30%}
.cashflow-table .cashflow-reason-cell .cell-primary{display:block!important;}
.cashflow-table .cashflow-reason-cell .cell-secondary{display:none!important}


/* === Патч: уведомления, шаблоны, финансовые таблицы === */
.dashboard-schedule .due-group-label{font-size:13px}
.cashflow-table .cashflow-col-date{width:150px!important}
.cashflow-table .cashflow-col-reason{width:260px!important}
.cashflow-table .cashflow-reason-cell,.cashflow-table .cashflow-reason-cell .cell-primary{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important}

/* Yandex Fleet: read-only driver profile and balance. */
.yandex-driver-panel{max-width:780px;padding:0}.yandex-driver-alert{margin:12px 14px 0}.yandex-driver-alert-warning{background:#fff8ed;border-color:#f0d29a;color:#956314}.yandex-balance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.yandex-balance-item{display:flex;flex-direction:column;gap:4px;min-height:72px;padding:13px 14px;border-right:1px solid var(--border)}.yandex-balance-item:last-child{border-right:0}.yandex-balance-item span{font-size:12px;color:var(--muted)}.yandex-balance-item strong{font-size:15px;font-variant-numeric:tabular-nums}@media(max-width:620px){.yandex-balance-grid{grid-template-columns:1fr}.yandex-balance-item{min-height:auto;border-right:0;border-top:1px solid var(--border)}.yandex-balance-item:first-child{border-top:0}}


/* Яндекс: форма тестовой проводки. */








/* Реальные команды GPS. */
.vehicle-live-actions form{display:inline-flex;margin:0}
.gps-command-status{margin-top:1px}
.gps-command-template-vehicle{padding:14px 16px 0;font-size:13px;color:var(--muted)}




/* Статус локальной привязки к Яндекс Такси. */
.entity-link-pills{display:flex;align-items:center;gap:7px;margin:0 0 9px}
.erap-session-pills{flex-wrap:wrap;justify-content:flex-end;max-width:100%;margin-bottom:0}
.erap-session-pills .entity-link-pill{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.entity-link-pill{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border:1px solid #cfd7e0;border-radius:13px;background:#fff;color:var(--muted);font-size:12px;line-height:24px}
.entity-link-pill.is-linked{border-color:#b9dfc6;background:#f2faf5;color:#287247}
.entity-link-pill.is-warning{border-color:#e5cf91;background:#fff9e8;color:#8a6512}
.entity-link-pill:hover{border-color:#aebed3;color:var(--text)}
/* Telegram */
.telegram-template-list{display:grid;gap:14px;margin-top:18px}.telegram-template-heading h2,.telegram-macro-glossary h2{margin:0;font-size:14px}.telegram-template-fields{grid-template-columns:repeat(2,minmax(0,1fr));}.telegram-macro-glossary{margin-top:18px;padding:12px;border:1px solid var(--border);border-radius:4px;background:#fafbfd}.telegram-chat-panel{overflow:hidden}.telegram-chat-thread{display:flex;flex-direction:column;gap:8px;min-height:180px;max-height:560px;padding:14px;background:#f6f8fb;overflow:auto}.telegram-bubble{max-width:min(76%,720px);padding:9px 11px;border-radius:10px;font-size:13px;line-height:1.4}.telegram-bubble.is-incoming{align-self:flex-start;background:#fff;border:1px solid #e0e6ed}.telegram-bubble.is-outgoing{align-self:flex-end;background:#eaf2ff;border:1px solid #d5e4f8}.telegram-bubble-meta{margin-top:5px;color:#718092;font-size:11px;text-align:right}.telegram-compose{display:flex;gap:9px;align-items:flex-end;padding:12px;}.telegram-compose textarea{flex:1;min-height:68px;}.telegram-compose .button{flex:0 0 auto}@media(max-width:780px){.telegram-template-fields{grid-template-columns:1fr}.telegram-bubble{max-width:92%}.telegram-compose{align-items:stretch;flex-direction:column}.telegram-compose .button{width:100%}}
.telegram-topbar-link{position:relative;display:inline-grid;place-items:center;width:30px;height:30px;color:#586574}.telegram-topbar-link:hover{color:#2f66ad;background:#f2f5f8;border-radius:4px}.telegram-topbar-link svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.telegram-topbar-link span{position:absolute;right:-5px;top:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#be4949;color:#fff;font-size:10px;line-height:16px;text-align:center;font-weight:700}
.telegram-topbar-menu{position:relative}.telegram-topbar-menu summary{list-style:none}.telegram-topbar-menu summary::-webkit-details-marker{display:none}.telegram-topbar-dropdown{position:absolute;right:0;top:36px;width:320px;max-height:420px;overflow:auto;border:1px solid #dfe5eb;border-radius:6px;background:#fff;box-shadow:0 12px 28px rgba(20,30,42,.18);z-index:50}.telegram-topbar-dropdown>a{display:block;padding:10px 12px;border-bottom:1px solid #edf0f3}.telegram-topbar-dropdown>a:hover{background:#f6f9fd}.telegram-topbar-dropdown strong{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.telegram-topbar-dropdown strong b{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:9px;background:#e9f0fa;color:#3266a2;font-size:10px}.telegram-topbar-dropdown span{display:block;overflow:hidden;margin-top:3px;color:#6b7786;font-size:11px;white-space:nowrap;text-overflow:ellipsis}.telegram-topbar-dropdown .telegram-topbar-all{color:#2f66ad;text-align:center;font-size:12px}.telegram-topbar-empty{padding:14px;color:#6b7786;font-size:12px;text-align:center}

/* === Unified interface components (audit 2026-07-01) ===
   This layer is intentionally last: it replaces page patch files without redesigning working screens. */
:root {
  --control-compact-height: 34px;
  --action-icon-size: 28px;
  --tab-active-bg: #f1f5fb;
  --tab-active-text: #2f66ad;
  --status-sent: #227342;
  --status-queued: #9a681e;
  --status-failed: #b03434;
}

/* Shared 28px icon actions. */
.quick-action,
.crm-icon-button,
.mini-action,
.form-action-icon,
.field-icon-button,
.list-add-action,
.list-toolbar .button-add,
.panel-header .button-add,
.vehicle-live-actions .gps-action,
.dashboard-toggle-icon,
.table-wrap .quick-action,
.table-wrap .crm-icon-button,
.table-wrap .mini-action {
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--action-icon-size);
  width: var(--action-icon-size) !important;
  height: var(--action-icon-size) !important;
  min-width: var(--action-icon-size) !important;
  min-height: var(--action-icon-size) !important;
  padding: 0 !important;
  border-radius: 50% !important;
}
.quick-action svg,
.crm-icon-button svg,
.mini-action svg,
.form-action-icon svg,
.field-icon-button svg,
.list-add-action svg,
.list-toolbar .button-add svg,
.panel-header .button-add svg,
.vehicle-live-actions .gps-action svg,
.dashboard-toggle-icon svg,
.table-wrap .quick-action svg,
.table-wrap .crm-icon-button svg,
.table-wrap .mini-action svg {
  width: 19px !important;
  height: 19px !important;
}

/* Compact list filters. Regular form controls remain unchanged. */
.list-toolbar .search-form > input,
.list-toolbar .search-form > select {
  min-height: var(--control-compact-height);
  height: var(--control-compact-height);
  box-sizing: border-box;
}
.list-toolbar .search-form > input[type="search"] { padding: 0 11px; }
.list-toolbar .search-form > select,
.list-toolbar .search-form > input[type="date"] { padding-top: 0; padding-bottom: 0; }

/* Dashboard-style tabs for cards, files and glossary. */
.section-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  overflow-x: auto;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}
.section-tab {
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.section-tab:last-child { border-right: 0; }
.section-tab:hover { color: var(--text); background: #fbfcfd; }
.section-tab.is-active {
  color: var(--tab-active-text);
  background: var(--tab-active-bg);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.section-tab:focus-visible { outline: 2px solid rgba(79, 122, 193, .38); outline-offset: -2px; }

/* Telegram’s plain colored status treatment is the common status language. */
.notification-status,
.whatsapp-state {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.35;
}
.notification-status.is-queued,
.whatsapp-state.is-waiting { color: var(--status-queued); }
.notification-status.is-cancelled { color: var(--muted); }
.notification-status.is-sent,
.whatsapp-state.is-connected { color: var(--status-sent); }
.notification-status.is-failed { color: var(--status-failed); }

/* Reusable compact schedule grids. */
.yandex-deduction-hours,
.accrual-hours-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  max-width: 620px;
  padding-top: 3px;
}
.yandex-deduction-hours .form-checkbox,
.accrual-hours-grid .form-checkbox { margin: 0; font-size: 13px; }
.yandex-deduction-minute { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.yandex-deduction-minute label { margin: 0; }
.yandex-deduction-minute select { width: 76px; min-height: 30px; }

/* Reusable inline field actions. */
.field-transfer-action,
.mileage-field-with-action { display: flex; align-items: center; gap: 8px; }
.field-transfer-action input,
.mileage-field-with-action input { min-width: 0; }
.field-transfer-action .quick-action { font-size: 13px; letter-spacing: -2px; font-weight: 700; }
.mileage-field-with-action .quick-action.is-disabled { opacity: .45; }

/* Telegram template cards and glossary share one structure. */
.telegram-template-row { border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.telegram-template-heading { padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.telegram-template-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.telegram-macro-glossary { margin-top: 0; }

/* Telegram chat composer: 28px send icon. */
.telegram-compose { display: grid;  gap: 8px; align-items: end; padding: 8px 12px; border-top: 1px solid var(--border); }
.telegram-compose textarea { min-height: 42px; max-height: 88px; resize: vertical; }
.message-send-button { justify-self:end; align-self:end; border-color:var(--accent); background:var(--accent); color:#fff; }
.message-send-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
.message-send-button svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.driver-tab-panel[data-driver-panel="notifications"] .telegram-chat-panel { display: flex; flex-direction: column; height: min(520px, calc(100vh - 300px)); min-height: 300px; max-height: 520px; }
.driver-tab-panel[data-driver-panel="notifications"] .telegram-chat-panel > .panel-header,
.driver-tab-panel[data-driver-panel="notifications"] .telegram-compose { flex: 0 0 auto; }
.driver-tab-panel[data-driver-panel="notifications"] .telegram-chat-thread {  min-height: 0;  }

/* WhatsApp is deliberately a candidate-only workspace. Composer comes before history. */
.whatsapp-chat-panel { display: flex; flex-direction: column; min-height: 300px; max-height: 520px; overflow: hidden; }
.whatsapp-chat-panel .panel-header { flex: 0 0 auto; }
.whatsapp-chat-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.whatsapp-bubble { max-width: min(78%, 720px); padding: 9px 11px; border-radius: 12px; line-height: 1.35; align-self: flex-start; background: #f4f6f8; }
.whatsapp-bubble.is-outgoing { align-self: flex-end; background: #e8f5ee; }
.whatsapp-bubble.is-muted { opacity: .62; }
.whatsapp-bubble-text {  word-break: break-word; }
.whatsapp-bubble-meta { margin-top: 4px; color: #697685; font-size: 12px; }
.whatsapp-compose {
  display: grid;
  gap: 8px;
  align-items: end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.message-template-select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cfd7e0;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  padding: 0 9px;
  font: inherit;
  font-size: 13px;
}
.whatsapp-compose textarea { min-height: 42px; max-height: 88px; resize: vertical; }
.whatsapp-contact-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; padding: 9px 12px; border-top: 1px solid var(--border); }
.candidate-list-status { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.candidate-list-status .candidate-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #d99a00; display: inline-block; }
.candidate-whatsapp-preview { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Finance: dedicated, fixed action column; no shared multi-action width. */
.cashflow-table { table-layout: fixed; }
.cashflow-table .cashflow-col-date { width: 150px; }
.cashflow-table .cashflow-col-reason { width: 260px; }
.cashflow-table .cashflow-col-actions { width: 92px; }
.cashflow-table .cashflow-actions-cell { width: 92px; min-width: 92px; padding-left: 10px; padding-right: 10px; text-align: center; }
.cashflow-table .cashflow-actions-cell .quick-actions { justify-content: center; min-width: 0; }
.cashflow-table .cashflow-reason-cell,
.cashflow-table .cashflow-reason-cell .cell-primary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.cashflow-table .cashflow-reason-cell .cell-secondary { display: none; }
tr.is-voided,
tr.is-voided td { opacity: 1; color: #8a96a3; text-decoration: none; }
tr.is-voided .balance-negative,
tr.is-voided .balance-positive,
tr.is-voided .cell-primary,
tr.is-voided .cell-secondary { color: #8a96a3 !important; }

.payment-operation-field { grid-column: 1 / -1; width: 50%; }
.payment-amount-field { grid-column: 1 / -1; width: 25%; }
.money-input { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 780px) {
  .section-tabs { grid-auto-columns: minmax(130px, 1fr); }
  .yandex-deduction-hours, .accrual-hours-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .telegram-template-fields { grid-template-columns: 1fr; }
  .driver-tab-panel[data-driver-panel="notifications"] .telegram-chat-panel { height: calc(100vh - 220px); min-height: 260px; max-height: 440px; }
  .whatsapp-chat-panel { max-height: 440px; min-height: 260px; }
  .message-template-select { grid-column: 1 / -1; }
  .whatsapp-bubble { max-width: 92%; }
  .payment-operation-field, .payment-amount-field { grid-column: 1 / -1; width: 100%; }
}



/* === Correction 2026-07-02: cached assets, section tabs and compact controls === */
/* Keep list additions at the agreed 28 px even where older layers target .button-add. */
.list-toolbar > .button-add,
.list-toolbar > .button-add.crm-icon-button {
  flex: 0 0 var(--action-icon-size) !important;
  width: var(--action-icon-size) !important;
  height: var(--action-icon-size) !important;
  min-width: var(--action-icon-size) !important;
  min-height: var(--action-icon-size) !important;
  font-size: 18px !important;
  line-height: 1 !important;
}
.list-toolbar > .button-add svg { width: 19px !important; height: 19px !important; }

/* All requested tab groups use the dashboard-style component. */
.candidate-tabs,
.driver-tabs,
.glossary-tabs {
  margin-top: 0;
}
.section-tabs .section-tab { text-decoration: none; }

/* The action row is moved by app.js only for full form cards. */
.form-actions.form-actions-top {
  border-top: 0;
  border-bottom: 1px solid var(--border);
  padding-top: 10px;
  padding-bottom: 10px;
}

/* The macro glossary has no additional legacy tab padding. */
.glossary-tabs.section-tabs { padding: 0; }


/* === Correction 2026-07-02: compact driver and settings controls === */
/* Driver tabs must stay within the working desktop width even with every optional section available. */
.driver-tabs {
  grid-auto-columns: minmax(0, 1fr);
}
.driver-tabs .section-tab {
  justify-content: center;
  min-height: 46px;
  padding: 0 8px;
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
}

/* Template macro groups inherit the dashboard tab component without legacy side padding. */


@media (max-width: 780px) {
  .driver-tabs {
    grid-auto-columns: minmax(100px, 1fr);
  }
}

/* === Correction 2026-07-02: form actions, vehicle tabs and list reset === */
/* Reset controls in every table toolbar use the same compact circular action size. */
.list-toolbar .clear-search {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--action-icon-size) !important;
  width: var(--action-icon-size) !important;
  height: var(--action-icon-size) !important;
  min-width: var(--action-icon-size) !important;
  min-height: var(--action-icon-size) !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  font-weight: 400;
  line-height: 1 !important;
}

/* Vehicle card tabs use the established dashboard tab component and fit four sections without overflow. */
.vehicle-tabs.section-tabs {
  grid-auto-columns: minmax(0, 1fr);
  overflow: hidden;
}
.vehicle-tabs .vehicle-tab {
  justify-content: center;
  min-height: 46px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 780px) {
  .vehicle-tabs.section-tabs {
    grid-auto-columns: minmax(100px, 1fr);
    overflow-x: auto;
  }
}

/* Public user manual link in the top bar. */
.help-topbar-link {
  display:inline-grid;
  place-items:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  border:1px solid #b7c9e4;
  border-radius:50%;
  background:#fff;
  color:#4875ba;
  font-size:16px;
  font-weight:700;
  text-decoration:none;
}
.help-topbar-link:hover {
  border-color:#7e9fcd;
  background:#f6f9fd;
  color:#2f66ad;
  text-decoration:none;
}
.help-topbar-link:focus-visible {
  outline:2px solid #8fb1e3;
  outline-offset:2px;
}


/* === Documents: card files and phone capture === */
.document-library-panel { overflow: visible; }
.document-library { display: grid; gap: 12px; padding: 12px; }
.document-library-group { height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.document-library-group-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--border); background: #f5f8fc; }
.document-library-group-header h3 { margin: 0; font-size: 13px; font-weight: 700; }
.document-phone-action { flex: 0 0 auto; }
.document-slots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 0; }
.document-slot { display: grid; grid-template-rows: auto auto auto; min-width: 0; border-right: 1px solid var(--border); }
.document-slot:last-child { border-right: 0; }
.document-slot-title { min-height: 34px; padding: 9px 11px 5px; color: var(--text); font-size: 12px; line-height: 1.25; }
.document-thumbnail { display: grid; place-items: center; min-height: 116px; margin: 0 11px 5px; overflow: hidden; border: 1px solid #dce3eb; border-radius: 4px; background: #f7f9fb; color: #9aa6b3; }
.document-thumbnail.is-image { background: #f1f4f7; }
.document-slot.is-empty .document-thumbnail { min-height: 92px; }
.document-slot.is-empty .document-pdf-preview { height: 92px; }
.document-thumbnail.is-image img { display: block; width: 100%; height: 116px; object-fit: contain; background: #f7f9fb; }
.document-thumbnail.is-pdf { background: #fff; }
.document-thumbnail.is-placeholder svg,
.document-pdf-preview > svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.document-pdf-preview { display: grid; place-items: center; width: 100%; height: 116px; color: #8695a5; }
.document-pdf-preview canvas { display: block; max-width: 100%; max-height: 116px; width: auto; height: auto; }
.document-slot-actions { display: flex; justify-content: flex-end; gap: 6px; min-height: 34px; padding: 2px 10px 6px; border-top: 0; }
.document-slot-actions .quick-action { width: 28px; height: 28px; }
.document-slot-add { display: block; min-height: 168px; background: #fff; }
.document-add-card { display: grid; place-items: center; align-content: center; gap: 8px; width: 100%; min-height: 168px; padding: 14px; border: 0; background: #fff; color: #2f66ad; font: 700 13px/1.3 Arial, Helvetica, sans-serif; cursor: pointer; }
.document-add-card:hover { background: #f5f8fc; }
.document-add-card-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #9fb4cf; border-radius: 50%; background: #fff; }
.document-add-card-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.document-modal .field { margin-top: 16px; }
.document-modal .field > span { display: block; margin-bottom: 6px; color: var(--text); font-size: 12px; font-weight: 700; }
.document-modal .field input[type=text] { width: 100%; }
.document-modal-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(24, 31, 39, .42); }
.document-modal { position: relative; width: min(100%, 410px); padding: 20px; border: 1px solid #dce4ed; border-radius: 6px; background: #fff; box-shadow: 0 18px 48px rgba(15, 23, 42, .25); }
.document-modal h2 { margin: 0 34px 7px 0; font-size: 17px; font-weight: 700; }
.document-modal p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.document-modal-close { position: absolute; top: 11px; right: 11px; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #d5dce4; border-radius: 50%; background: #fff; color: #5d6875; cursor: pointer; }
.document-modal-close:hover { border-color: #8fa8c7; background: #f5f8fc; color: #2f66ad; }
.document-modal-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.document-file-select { display: flex; align-items: center; justify-content: center; min-height: 96px; margin-top: 16px; border: 1px dashed #aebed1; border-radius: 5px; background: #fafcff; color: #2f66ad; font-size: 13px; font-weight: 700; cursor: pointer; }
.document-file-select:hover { border-color: #7e9fcd; background: #f4f8fd; }
.document-file-select input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.document-file-name { min-height: 18px; margin-top: 8px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.document-modal-error { margin-top: 8px; color: #a13232; font-size: 12px; line-height: 1.35; }
.document-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.document-modal-actions .button { min-height: 32px; }
.document-modal-actions .button svg { width: 15px; height: 15px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.document-qr-modal { text-align: center; }
.document-qr-modal h2 { margin-right: 0; }
.document-qr { display: inline-grid; place-items: center; width: 226px; height: 226px; margin: 16px auto 10px; padding: 9px; border: 1px solid #dce4ed; border-radius: 4px; background: #fff; }
.document-qr svg { display: block; width: 100%; height: 100%; }
.document-qr-status { min-height: 18px; color: var(--muted); font-size: 12px; }
.document-qr-link { display: inline-block; margin-top: 10px; font-size: 12px; }

.document-capture-body { min-height: 100vh; background: #f4f7fa; }
.document-capture-page { width: min(100%, 640px); margin: 0 auto; padding: 18px 14px 28px; }
.document-capture-header { margin: 0 0 14px; }
.document-capture-brand { color: #2f66ad; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.document-capture-header h1 { margin: 4px 0 0; color: var(--text); font-size: 22px; font-weight: 700; }
.document-capture-card, .document-capture-message { padding: 14px; border: 1px solid #dce4ed; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(31, 45, 61, .08); }
.document-capture-progress { display: flex; align-items: baseline; gap: 3px; color: var(--muted); font-size: 12px; }
.document-capture-progress span:first-child { color: var(--accent); font-size: 20px; font-weight: 700; }
.document-capture-card h2 { margin: 4px 0 4px; font-size: 18px; }
.document-capture-description { min-height: 36px; margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.document-capture-camera { position: relative; overflow: hidden; width: 100%; aspect-ratio: 3 / 4; border-radius: 6px; background: #1d252f; }
.document-capture-camera video { display: block; width: 100%; height: 100%; object-fit: cover; }
.document-capture-frame { position: absolute; inset: 5% 8%; border: 2px solid rgba(255, 255, 255, .96); border-radius: 4px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .37); pointer-events: none; }
.document-capture-card.is-sides .document-capture-camera { aspect-ratio: 4 / 3; }
.document-capture-card.is-sides .document-capture-frame { inset: auto; left: 7%; top: 50%; width: 86%; aspect-ratio: 85.6 / 54; transform: translateY(-50%); }
.document-camera-switch { position: absolute; right: 10px; top: 10px; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255, 255, 255, .7); border-radius: 50%; background: rgba(20, 28, 37, .58); color: #fff; cursor: pointer; }
.document-camera-switch svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.document-crop-editor { position: relative; overflow: hidden; width: 100%; max-height: 72vh; border-radius: 6px; background: #1d252f; touch-action: none; }
.document-crop-editor img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.document-crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 999px rgba(0, 0, 0, .44); cursor: move; touch-action: none; }
.document-crop-handle { position: absolute; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; background: #2f66ad; touch-action: none; }
.document-crop-handle.is-nw { left: -9px; top: -9px; cursor: nwse-resize; }
.document-crop-handle.is-ne { right: -9px; top: -9px; cursor: nesw-resize; }
.document-crop-handle.is-sw { left: -9px; bottom: -9px; cursor: nesw-resize; }
.document-crop-handle.is-se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.document-capture-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.document-capture-actions .button { min-height: 34px; }
.document-capture-error { margin-top: 10px; color: #a13232; font-size: 13px; line-height: 1.35; }
.document-capture-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; margin-top: 12px; }
.document-capture-page-thumb { position: relative; overflow: hidden; min-height: 136px; border: 1px solid #dce4ed; border-radius: 4px; background: #f8fafc; }
.document-capture-page-thumb img { display: block; width: 100%; height: 136px; object-fit: cover; }
.document-capture-page-title { position: absolute; left: 0; right: 0; top: 0; z-index: 1; padding: 5px 7px; background: rgba(255, 255, 255, .9); color: var(--text); font-size: 11px; }
.document-capture-pdf { display: grid; place-items: center; min-height: 136px; color: #6e7b89; font-size: 19px; font-weight: 700; }
.document-capture-page-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 6px; border-top: 1px solid #dce4ed; background: #fff; }
.document-capture-page-actions button { border: 0; padding: 0; background: transparent; color: #2f66ad; font: 12px/1.2 Arial, Helvetica, sans-serif; cursor: pointer; }
.document-capture-page-actions button:hover { color: #245991; text-decoration: underline; }
.document-capture-finished { padding: 28px 16px; text-align: center; }
.document-capture-finished strong { display: block; color: #2d7a55; font-size: 19px; }
.document-capture-finished p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 780px) {
  .document-library { padding: 10px; }
  .document-slots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-slot:nth-child(2n) { border-right: 0; }
  .document-slot:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .document-slot-title { min-height: 46px; padding: 9px 8px 6px; font-size: 11px; }
  .document-thumbnail { min-height: 112px; margin: 0 8px 8px; }
  .document-thumbnail.is-image img, .document-pdf-preview { height: 112px; }
  .document-pdf-preview canvas { max-height: 112px; }
  .document-slot-actions { min-height: 40px; padding: 6px 8px; }
  .document-modal-backdrop { align-items: end; padding: 10px; }
  .document-modal { width: 100%; padding: 18px; }
  .document-capture-page { padding: 10px 10px 118px; }
  .document-capture-header { margin-bottom: 9px; }
  .document-capture-header h1 { font-size: 20px; }
  .document-capture-card, .document-capture-message { padding: 12px; }
  .document-capture-description { min-height: 0; margin-bottom: 9px; }
  .document-capture-camera { height: min(42svh, 320px); aspect-ratio: auto; }
  .document-capture-card.is-sides .document-capture-camera { height: min(40svh, 300px); aspect-ratio: auto; }
  .document-crop-editor, .document-crop-editor img { max-height: 48svh; }
  .document-capture-actions { position: fixed; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; z-index: 40; display: grid; gap: 8px; margin: 0; padding: 8px; border: 1px solid #dce4ed; border-radius: 7px; background: rgba(255, 255, 255, .97); box-shadow: 0 8px 22px rgba(31, 45, 61, .18); }
  .document-capture-actions[hidden] { display: none; }
  .document-capture-actions[data-capture-live-actions], .document-capture-actions[data-capture-ready-actions] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-capture-actions[data-capture-edit-actions] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-capture-actions .button { width: 100%; min-height: 40px; padding: 0 6px; font-size: 12px; white-space: nowrap; }
  .document-capture-actions .button:disabled { cursor: wait; opacity: .68; }
}

/* === Documents and topbar refinement 2026-07-02 ===
   Additive only: preserves the confirmed shared tab and control rules above. */

/* The help and message buttons intentionally reuse the same 28px action component
   that is used for form, table and logout actions. */
.topbar-quick-links { display: flex; align-items: center; gap: 6px; }
.topbar-quick-action { position: relative; flex: 0 0 var(--action-icon-size); text-decoration: none; }
.topbar-quick-action.help-topbar-link { font-size: 17px; font-weight: 700; line-height: 1; }
.topbar-quick-action.telegram-topbar-link { display: inline-grid; place-items: center; width: var(--action-icon-size); height: var(--action-icon-size); color: #5d6875; }
.topbar-quick-action.telegram-topbar-link:hover { color: #2f66ad; background: #f5f8fc; border-radius: 50%; }
.topbar-quick-action.telegram-topbar-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar-quick-action.telegram-topbar-link span { right: -6px; top: -6px; min-width: 16px; height: 16px; padding: 0 4px; border: 2px solid #fff; border-radius: 9px; font-size: 10px; line-height: 12px; }
.telegram-topbar-menu[open] .topbar-quick-action.telegram-topbar-link { color: #2f66ad; border-color: #8fa8c7; background: #f5f8fc; }
.telegram-topbar-dropdown { top: 34px; }

/* Compact, predictable document grids. Empty space is no longer stretched into a full-width slot. */
.document-slots-grid--three,
.document-slots-grid--four { gap: 1px; background: var(--border); }
.document-slots-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.document-slots-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.document-slots-grid--three .document-slot,
.document-slots-grid--four .document-slot { border: 0; background: #fff; }
.document-slots-grid--three .document-slot:last-child,
.document-slots-grid--four .document-slot:last-child { border-right: 0; }
.document-slots-grid--three .document-thumbnail,
.document-slots-grid--four .document-thumbnail { min-height: 104px; }
.document-slots-grid--three .document-thumbnail.is-image img,
.document-slots-grid--four .document-thumbnail.is-image img,
.document-slots-grid--three .document-pdf-preview,
.document-slots-grid--four .document-pdf-preview { height: 104px; }
.document-slots-grid--three .document-pdf-preview canvas,
.document-slots-grid--four .document-pdf-preview canvas { max-height: 104px; }
.vehicle-tab-panel[data-vehicle-panel="documents"] .document-library-group + .document-library-group { width: calc((100% - 2px) / 3); }
.vehicle-tab-panel[data-vehicle-panel="documents"] .document-library-group + .document-library-group .document-slots-grid--three { grid-template-columns: 1fr; }

/* A4 pages use their own portrait guide, separate from card documents. */
.document-capture-card.is-a4 .document-capture-camera { aspect-ratio: 3 / 4; }
.document-capture-card.is-a4 .document-capture-frame { inset: auto; left: 50%; top: 50%; width: 73%;  transform: translate(-50%, -50%); }
.document-capture-card.is-a4 .document-capture-page-thumb img { object-fit: contain; background: #eef2f5; }
.document-capture-card.is-a4 .document-capture-page-thumb { background: #eef2f5; }

@media (max-width: 1180px) {
  .document-slots-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-tab-panel[data-vehicle-panel="documents"] .document-library-group + .document-library-group { width: calc((100% - 1px) / 2); }
}
@media (max-width: 780px) {
  .topbar-quick-links { gap: 6px; }
  .document-slots-grid--three,
  .document-slots-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-slots-grid--three .document-slot,
  .document-slots-grid--four .document-slot { border: 0; }
  .document-slots-grid--three .document-thumbnail,
  .document-slots-grid--four .document-thumbnail { min-height: 112px; }
  .document-slots-grid--three .document-thumbnail.is-image img,
  .document-slots-grid--four .document-thumbnail.is-image img,
  .document-slots-grid--three .document-pdf-preview,
  .document-slots-grid--four .document-pdf-preview { height: 112px; }
  .document-capture-card.is-a4 .document-capture-frame { width: 70%; }
}
@media (max-width: 480px) {
  .document-slots-grid--three,
  .document-slots-grid--four { grid-template-columns: 1fr; }
  .vehicle-tab-panel[data-vehicle-panel="documents"] .document-library-group + .document-library-group { width: 100%; }
}
.topbar-quick-action.help-topbar-link { width: var(--action-icon-size); height: var(--action-icon-size); padding: 0; border: 1px solid #d5dce4; border-radius: 50%; background: #fff; color: #5d6875; }
.topbar-quick-action.help-topbar-link:hover { border-color: #8fa8c7; background: #f5f8fc; color: #2f66ad; }


/* === A4 capture correction 2026-07-02 ===
   The guide is constrained by height so all four A4 borders remain visible.
   Camera images are already cut by this guide; the editor starts from that exact frame. */
.document-capture-card.is-a4 .document-capture-frame {
  width: auto;
  height: 88%;
  max-width: 88%;
  aspect-ratio: 210 / 297;
}
@media (max-width: 780px) {
  .document-capture-card.is-a4 .document-capture-camera {
    height: min(44svh, 360px);
    aspect-ratio: auto;
  }
  .document-capture-card.is-a4 .document-capture-frame {
    width: auto;
    height: 90%;
    max-width: 88%;
  }
  .document-capture-card.is-a4 .document-crop-editor,
  .document-capture-card.is-a4 .document-crop-editor img {
    max-height: 54svh;
  }
}



/* Files: compact policy register and working icon actions. */
.policies-table { table-layout: fixed; }
.policies-table th:nth-child(1) { width: 15%; }
.policies-table th:nth-child(2) { width: 25%; }
.policies-table th:nth-child(3) { width: 18%; }
.policies-table th:nth-child(4) { width: 25%; }
.policies-table th:nth-child(5) { width: 130px; }
.policies-table th:nth-child(6) { width: 44px; }
.policies-table td { overflow: hidden; text-overflow: ellipsis; }
.form-actions .quick-action.is-save-action { color: #2f66ad; border-color: #86a8d2; background: #edf4fd; }
.form-actions .quick-action.is-save-action:hover { color: #245991; border-color: #6793c7; background: #e4effc; }


/* GPS control confirmation: compact, centered, icon-only CRM dialog. */
.crm-modal--gps-control { padding: 18px; }
.crm-modal-card--gps-control { width: min(430px, calc(100vw - 32px)); overflow: hidden; }
.crm-modal-card--gps-control .crm-modal-header { justify-content:center; padding: 18px 18px 14px; border-bottom: 0; text-align:center; }
.crm-modal-card--gps-control .crm-modal-header h2 { font-size: 18px; line-height: 1.25; }
.crm-modal-control-actions { display: flex; justify-content: center; gap: 12px; padding: 0 18px 18px; }
.modal-control-action { width: 40px; height: 40px; border-color: #b8cbe2; color: #406eae; }
.modal-control-action:hover { border-color: #83a6cf; background: #edf5fd; color: #2b5f9e; }
.modal-control-action.is-active { color: #2f66ad; border-color: #86a8d2; background: #edf4fd; }
.modal-control-action.is-active:hover { color: #245991; border-color: #6793c7; background: #e4effc; }
.modal-control-action svg { width: 19px; height: 19px; }

/* File register entity links and compact action column. */
.fine-driver-unresolved { color: var(--muted); }
.statement-actions-cell { width: 44px; min-width: 44px; text-align: center; }

/* === Canonical icon action component ===
   Any icon-only control must use this fixed square box. A generic form/button
   rule can no longer widen it into an oval. */
:root { --crm-icon-action-size: 28px; }
.crm-icon-button,
.quick-action,
.mini-action,
.form-action-icon,
.list-add-action,
.modal-control-action {
  box-sizing: border-box !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 var(--crm-icon-action-size) !important;
  width: var(--crm-icon-action-size) !important;
  min-width: var(--crm-icon-action-size) !important;
  max-width: var(--crm-icon-action-size) !important;
  height: var(--crm-icon-action-size) !important;
  min-height: var(--crm-icon-action-size) !important;
  max-height: var(--crm-icon-action-size) !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  line-height: 1 !important;
  white-space: normal !important;
}
.crm-icon-button > svg,
.quick-action > svg,
.mini-action > svg,
.form-action-icon > svg,
.list-add-action > svg,
.modal-control-action > svg {
  width: 19px !important;
  height: 19px !important;
}
.vehicle-live-actions .gps-action {
  --crm-icon-action-size: 46px;
}
.vehicle-live-actions .gps-action > svg {
  width: 21px !important;
  height: 21px !important;
}
.crm-modal-control-actions .modal-control-action {
  --crm-icon-action-size: 28px;
}

/* Global file registers: individual selections only, never “select all”. */
.files-selection-column,
.files-selection-cell { width: 72px; min-width: 72px; text-align: center !important; }
.files-row-select {
  width: 15px;
  height: 15px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--accent);
}
.policies-table th:nth-child(1) { width: 72px; }
.policies-table th:nth-child(2) { width: 14%; }
.policies-table th:nth-child(3) { width: 25%; }
.policies-table th:nth-child(4) { width: 18%; }
.policies-table th:nth-child(5) { width: 25%; }
.policies-table th:nth-child(6) { width: 130px; }
.policies-table th:nth-child(7) { width: 44px; }
.policies-table .policy-actions-cell { width: 44px; min-width: 44px; text-align: center; overflow: visible; }
.fines-table th:nth-child(1) { width: 72px; }
.fines-table th:nth-child(2) { width: 20%; }
.fines-table th:nth-child(3) { width: 22%; }
.fines-table th:nth-child(4) { width: 150px; }
.fines-table th:nth-child(5),
.fines-table th:nth-child(6){ width: 110px; }
.fines-table th:nth-child(7) { width: 100px; }
.fines-table tr.is-unresolved td,
.fines-table tr.is-unresolved .entity-link{ color: #9aa3ad; }
.fines-table tr.is-unresolved .entity-link:hover { text-decoration: none; }
.fine-payment-form { display: inline-grid; margin: 0; }
.statements-table .statement-actions-cell { width: 44px; min-width: 44px; text-align: center; }
@media (max-width: 780px) {
  .files-selection-column,
  .files-selection-cell { width: 58px; min-width: 58px; }
  .policies-table,
  .fines-table { table-layout: auto; }
  .policies-table th:nth-child(n),
  .fines-table th:nth-child(n) { width: auto; }
}


/* Final icon-action guard. This is deliberately last so generic form/button rules
   cannot stretch an icon-only action into an oval. Use .crm-icon-button for new actions;
   JavaScript also marks converted legacy controls with [data-crm-icon-action]. */
:where(a, button, label).crm-icon-button,
:where(a, button, label).quick-action,
:where(a, button, label).mini-action,
:where(a, button, label).form-action-icon,
:where(a, button, label).field-icon-button,
:where(a, button, label).list-add-action,
:where(a, button, label).modal-control-action,
:where(a, button, label)[data-crm-icon-action] {
  box-sizing: border-box !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 var(--crm-icon-action-size, 28px) !important;
  inline-size: var(--crm-icon-action-size, 28px) !important;
  block-size: var(--crm-icon-action-size, 28px) !important;
  width: var(--crm-icon-action-size, 28px) !important;
  height: var(--crm-icon-action-size, 28px) !important;
  min-width: var(--crm-icon-action-size, 28px) !important;
  max-width: var(--crm-icon-action-size, 28px) !important;
  min-height: var(--crm-icon-action-size, 28px) !important;
  max-height: var(--crm-icon-action-size, 28px) !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
  line-height: 1 !important;
  overflow: hidden;
}
:where(a, button, label).crm-icon-button > svg,
:where(a, button, label).quick-action > svg,
:where(a, button, label).mini-action > svg,
:where(a, button, label).form-action-icon > svg,
:where(a, button, label).field-icon-button > svg,
:where(a, button, label).list-add-action > svg,
:where(a, button, label).modal-control-action > svg,
:where(a, button, label)[data-crm-icon-action] > svg {
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 auto !important;
}
.vehicle-live-actions .gps-action { --crm-icon-action-size: 28px; }
.vehicle-live-actions .gps-action > svg { width: 19px !important; height: 19px !important; }


/* Rich text editors for Telegram and WhatsApp. The saved value is normalised on the server. */
.message-editor { min-width: 0; border: 1px solid #cfd7e0; border-radius: 4px; background: #fff; }
.message-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 122, 193, .14); }
.message-editor.is-disabled { background: #f6f8fb; border-color: var(--border); opacity: .62; }
.message-editor.is-disabled:focus-within { border-color: var(--border); box-shadow: none; }
.message-editor.is-disabled .message-editor-toolbar { background: #f2f5f8; }
.message-editor.is-disabled .message-editor-body { color: #7b8794; cursor: default; }
.message-editor.is-disabled .message-editor-toolbar > button { cursor: default; }
.message-editor-toolbar { position: relative; display: flex; align-items: center; gap: 2px; min-height: 34px; padding: 3px 5px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.message-editor-toolbar > button,
.message-editor-emoji > button { display: inline-grid; place-items: center; width: 26px; height: 26px; min-width: 26px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.message-editor-toolbar > button:hover,
.message-editor-emoji > button:hover { background: #e8eef6; color: var(--accent-dark); }
.message-editor-toolbar > button.is-active { background: #dfeaf8; color: #285c9e; box-shadow: inset 0 0 0 1px #9db8da; }
.message-editor-toolbar-divider { width: 1px; height: 18px; margin: 0 3px; background: var(--border); }
.message-editor-body { min-height: 72px; padding: 9px 10px; outline: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.42; }
.message-editor-body:empty::before { content: attr(data-placeholder); color: #9aa7b4; pointer-events: none; }
.message-editor-body code { padding: 1px 3px; border-radius: 3px; background: #edf2f7; font-family: Consolas, monospace; }
.message-editor-emoji { position: absolute; z-index: 5; top: calc(100% + 4px); right: 5px; display: grid; grid-template-columns: repeat(8, 26px); gap: 2px; width: 238px; max-width: calc(100vw - 36px); max-height: 178px; overflow-y: auto; padding: 5px; border: 1px solid var(--border); border-radius: 4px; background: #fff; box-shadow: 0 8px 18px rgba(35,47,59,.16); }
.message-editor-emoji[hidden] { display: none; }
.message-editor-emoji > button { font-size: 17px; }
.telegram-compose { grid-template-columns: minmax(0, 1fr) auto; }
.telegram-compose .message-editor { min-width: 0; }
.whatsapp-compose { grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto; }
.whatsapp-compose .message-editor { min-width: 0; }
.whatsapp-compose .message-editor-body { min-height: 42px; max-height: 120px; overflow-y: auto; }
.telegram-bubble-text,
.whatsapp-bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.telegram-bubble-text a,
.whatsapp-bubble-text a { color: inherit; text-decoration: underline; }
.notification-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.notification-filter-grid label { display: grid; gap: 6px; font-size: 13px; }
.notification-audience-summary { padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px;   line-height: 1.45; }
.message-language-tabs { margin-bottom: 8px; }
.message-language-tabs .section-tab { min-height: 36px; }
.message-macro-list button { padding: 4px 7px;  border-radius: 3px;    }
.message-macro-list code { font: 12px/1.2 Consolas, monospace; }
.notification-preview-row { display: flex; gap: 8px; align-items: center; max-width: 600px; }
.notification-preview-row select { min-width: 0; flex: 1 1 auto; }
.notification-preview-card { margin-top: 10px; padding: 10px; border: 1px dashed var(--border); border-radius: 4px; background: #fafbfd; }
.notification-preview-card .telegram-bubble { margin-left: auto; }
.notification-preview-meta { margin-bottom: 6px; color: var(--muted); font-size: 12px; }

@media (max-width: 780px) {
  .whatsapp-compose { grid-template-columns: minmax(0, 1fr) auto; }
  .whatsapp-compose .message-template-select { grid-column: 1 / -1; }
  .notification-filter-grid { grid-template-columns: 1fr; }
  .notification-preview-row { align-items: stretch; flex-direction: column; }
}
.list-select-col { width: 34px; min-width: 34px; text-align: center; }
.list-select-col input { vertical-align: middle; }
/* Statement actions remain one compact horizontal group. */
.statements-table .statement-actions-cell { width: 72px; min-width: 72px; text-align: right; }
.statements-table .statement-actions-cell .quick-actions { min-width: 0; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }
.notification-audience-refresh { margin-left: 10px; }

/* Candidate WhatsApp follows the driver notification chat layout. */
.candidate-tab-panel[hidden] { display: none; }
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-chat-panel {
  display: flex;
  flex-direction: column;
  height: min(520px, calc(100vh - 300px));
  min-height: 300px;
  max-height: 520px;
}
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-chat-panel > .panel-header,
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-contact-summary,
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-compose,
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-chat-panel > .telegram-compose {
  flex: 0 0 auto;
}
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 14px;
  background: #f6f8fb;
}
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-bubble {
  max-width: min(76%, 720px);
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #e0e6ed;
}
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-bubble.is-outgoing {
  background: #eaf2ff;
  border-color: #d5e4f8;
}
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-bubble-meta {
  margin-top: 5px;
  color: #718092;
  font-size: 11px;
  text-align: right;
}
.candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-compose {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}
.whatsapp-compose.is-without-auto-replies { grid-template-columns: minmax(0, 1fr) auto; }

@media (max-width: 780px) {
  .candidate-tab-panel[data-candidate-panel="whatsapp"] .whatsapp-chat-panel {
    height: calc(100vh - 220px);
    min-height: 260px;
    max-height: 440px;
  }
}

/* Bank statement log: the row editor reuses the standard CRM modal and form controls. */
.statement-log-summary,.statement-log-process{padding:12px 14px;border-bottom:1px solid var(--border);font-size:13px}
.statement-log-table .is-editable{cursor:pointer}
.statement-log-table .is-editable:hover{background:#f5f8fc}
.statement-log-table .is-error td{color:#8d3b3b}
.statement-log-status{display:inline-flex;align-items:center;min-height:22px;padding:0 7px;border:1px solid var(--border);border-radius:12px;font-size:12px;color:var(--muted);background:#fff}
.statement-log-status.is-success{border-color:#bfe1ca;color:#237345;background:#f4fbf6}
.statement-log-status.is-error{border-color:#efc5c5;color:#a13b3b;background:#fff7f7}
.statement-log-status.is-voided{border-color:#d8dee6;color:#697381;background:#fafbfd}
.statement-log-modal-card{width:min(760px,calc(100vw - 32px))}
.statement-log-source{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border);border-radius:4px;overflow:hidden}
.statement-log-source .detail{padding:9px 11px}
.statement-log-source .detail:nth-child(odd){border-right:1px solid var(--border)}
.statement-log-source .detail:last-child:nth-child(odd){grid-column:1/-1;border-right:0}
.statement-log-form-grid{padding:14px 0 0}
.statement-log-driver-control{display:flex;gap:8px;align-items:center}
.statement-log-driver-control select{min-width:0;flex:1}
.statement-log-driver-control .button{flex:0 0 auto;white-space:nowrap}
@media(max-width:620px){.statement-log-source{grid-template-columns:1fr}.statement-log-source .detail:nth-child(odd){border-right:0}.statement-log-source .detail:last-child:nth-child(odd){grid-column:auto}.statement-log-driver-control{align-items:stretch;flex-direction:column}.statement-log-driver-control .button{width:100%}}

/* Scheduled publications: square image previews use the same compact table density. */
.publication-table-wrap{margin-top:14px}
.publication-thumbnail-column,.publication-thumbnail-cell{width:68px}
.publication-thumbnail{display:block;width:52px;height:52px;object-fit:cover;border:1px solid var(--border);border-radius:4px;background:#fafbfd}
.publication-video-thumbnail{display:grid;place-items:center;color:var(--text);font-size:11px;font-weight:700}
.publication-edit-modal-card{width:min(760px,calc(100vw - 32px))}
.publication-edit-preview{margin:0 0 14px;max-width:100%;overflow:hidden}
.publication-edit-image{display:block;width:100%;max-width:100%;height:auto;max-height:calc(100vh - 360px);margin:0 auto;object-fit:contain;border:1px solid var(--border);border-radius:4px;background:#fafbfd}
.publication-edit-image[hidden]{display:none}

.drivers-status-tabs,
.contracts-status-tabs {
    margin: 10px 0 14px;
}

/* CRM UI patch: compact semantic edit forms and statement dialogs. */
.entity-form-actions{border-top:0;border-bottom:1px solid var(--border);padding:10px 16px;gap:8px;background:#fff}
.entity-form{padding:0}
.entity-form-section{padding:14px 16px;border-bottom:1px solid var(--border)}
.entity-form-section:last-child{border-bottom:0}
.entity-form-section h2{margin:0 0 11px;font-size:15px;line-height:20px;color:var(--text);font-weight:700}
.entity-form-grid{display:grid;gap:12px;align-items:start}
.entity-form-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.entity-form-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.entity-form-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
.entity-form-grid--compact{max-width:820px}
.entity-form-section>.field{display:block}
.field-transfer-action--inline{display:grid;grid-template-columns:36px minmax(0,1fr);gap:8px;align-items:center}
.field-transfer-action--inline .quick-action{width:32px;height:32px;min-width:32px;font-size:13px}
.detail-kv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 22px;padding:14px 16px;border-bottom:1px solid var(--border)}
.detail-kv-grid>div{display:grid;grid-template-columns:minmax(120px,.36fr) minmax(0,1fr);gap:12px;align-items:baseline}
.detail-kv-grid span{font-weight:700;color:var(--text)}
.detail-kv-grid b{font-weight:400;color:var(--text)}
.balance-void-panel textarea{min-height:110px}
.statement-log-source{padding:0!important;margin:0 0 12px!important;border:0!important}
.statement-log-source-card{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--border);border-radius:6px;background:#fbfcfe;font-size:13px}
.statement-log-source-card strong{font-size:14px;line-height:20px;font-weight:700;color:var(--text)}
.statement-log-source-card span{color:var(--muted)}
.statement-log-source-error{display:grid;gap:2px;margin-top:4px;padding-top:7px;border-top:1px solid var(--border)}
.statement-log-source-error span{font-weight:700;color:var(--text)}
.statement-log-source-error b{font-weight:400;color:#9a3e3e}
.statement-log-modal-card{max-width:760px!important}
.statement-log-modal .crm-modal-body{padding:14px 16px!important}
.statement-log-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0!important}
.statement-log-form-grid .form-full{grid-column:1/-1}
.statement-log-form-grid textarea{min-height:76px}
.statement-log-bulk-form{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0 0 8px;padding:0 0 0 0}
.statement-log-bulk-form[hidden]{display:none!important}
.statement-log-bulk-form span{font-size:13px;color:var(--muted)}
.statement-transfer-form select{min-width:280px;max-width:min(520px,55vw);min-height:36px}
.statement-log-check-cell{width:34px;text-align:center}
.statement-log-check-cell input{width:16px;height:16px;margin:0}
.quick-action svg,.crm-icon-button svg,.form-action-icon svg,.field-icon-button svg{stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.quick-action.is-document svg,.field-icon-button svg{width:19px;height:19px}
@media(max-width:980px){.entity-form-grid--3,.entity-form-grid--4{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-kv-grid{grid-template-columns:1fr}}
@media(max-width:720px){.entity-form-grid--2,.entity-form-grid--3,.entity-form-grid--4,.statement-log-form-grid{grid-template-columns:1fr}.detail-kv-grid>div{grid-template-columns:1fr;gap:3px}.entity-form-actions{justify-content:flex-end}.statement-transfer-form select{width:100%;max-width:none}.statement-log-bulk-form{align-items:stretch;flex-wrap:wrap}.statement-log-bulk-form select{flex:1 1 100%}}


/* Forms grid fix: force semantic driver/vehicle form grids after the validation patch. */
.form-panel.entity-form,
.entity-form.form-panel {
    width: 100%;
    max-width: 1180px;
}
.form-panel.entity-form .entity-form-actions,
.entity-form.form-panel .entity-form-actions,
.entity-form-actions {
    min-height: auto !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 10px 16px !important;
    gap: 8px !important;
    justify-content: flex-end !important;
    background: #fff !important;
}
.form-panel.entity-form .entity-form-section,
.entity-form .entity-form-section {
    display: block !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border) !important;
}
.form-panel.entity-form .entity-form-section:last-child,
.entity-form .entity-form-section:last-child {
    border-bottom: 0 !important;
}
.form-panel.entity-form .entity-form-section h2,
.entity-form .entity-form-section h2 {
    display: block !important;
    margin: 0 0 11px !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 24px !important;
    color: var(--text) !important;
    font-weight: 700 !important;
}
.form-panel.entity-form .entity-form-grid,
.entity-form .entity-form-grid {
    display: grid !important;
    gap: 12px !important;
    align-items: start !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.form-panel.entity-form .entity-form-grid + .entity-form-grid,
.entity-form .entity-form-grid + .entity-form-grid {
    margin-top: 12px !important;
}
.form-panel.entity-form .entity-form-grid--2,
.entity-form .entity-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.form-panel.entity-form .entity-form-grid--3,
.entity-form .entity-form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.form-panel.entity-form .entity-form-grid--4,
.entity-form .entity-form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.form-panel.entity-form .entity-form-grid--compact,
.entity-form .entity-form-grid--compact {
    max-width: 820px !important;
}
.form-panel.entity-form .entity-form-section > .field,
.entity-form .entity-form-section > .field {
    display: block !important;
}
.form-panel.entity-form .field,
.entity-form .field {
    min-width: 0 !important;
    margin: 0 !important;
}
.form-panel.entity-form .field > span,
.entity-form .field > span {
    display: block !important;
    margin: 0 0 5px !important;
    font-size: 13px !important;
    line-height: 18px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}
.form-panel.entity-form .field input,
.form-panel.entity-form .field select,
.form-panel.entity-form .field textarea,
.entity-form .field input,
.entity-form .field select,
.entity-form .field textarea {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
.form-panel.entity-form .field textarea,
.entity-form .field textarea {
    min-height: 78px !important;
}
@media (max-width: 980px) {
    .form-panel.entity-form .entity-form-grid--3,
    .form-panel.entity-form .entity-form-grid--4,
    .entity-form .entity-form-grid--3,
    .entity-form .entity-form-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 720px) {
    .form-panel.entity-form .entity-form-grid--2,
    .form-panel.entity-form .entity-form-grid--3,
    .form-panel.entity-form .entity-form-grid--4,
    .entity-form .entity-form-grid--2,
    .entity-form .entity-form-grid--3,
    .entity-form .entity-form-grid--4 {
        grid-template-columns: 1fr !important;
    }
}

/* Driver data completeness: compact status, aligned with Telegram status badges. */
.driver-data-status, .driver-telegram-status { width: 1%; text-align: center; font-weight: 700; }
.driver-data-status span, .driver-telegram-status span { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 5px; font-size: 15px; line-height: 1; border: 1px solid transparent; border-radius: 999px; }
.driver-data-status.is-complete span { border-color: #b9dfc6; background: #f2faf5; color: #287247; }
.driver-data-status.is-incomplete span { border-color: #ead7a0; background: #fff9e8; color: #8a6500; }
.driver-data-status.is-error span { border-color: #efc5c5; background: #fff1f1; color: #a13b3b; }
.driver-data-status.is-pending span { width:24px; min-width:24px; padding:0; border-radius:50%; border-color:#bdd2ef; background:#eef5ff; color:#386fb2; }
.driver-telegram-status.is-connected span { border-color: #b9dfc6; background: #f2faf5; color: #287247; }
.driver-telegram-status.is-disconnected span { border-color: #efc5c5; background: #fff1f1; color: #b33b3b; }
.driver-data-pill{min-height:26px;padding:0 9px;font-size:12px;line-height:24px;cursor:pointer}
.driver-data-pill.is-complete{border-color:#b9dfc6;background:#f2faf5;color:#287247}
.driver-data-pill.is-incomplete{border-color:#ead7a0;background:#fff9e8;color:#8a6500}
.driver-data-pill.is-error{border-color:#efc5c5;background:#fff1f1;color:#a13b3b}
.driver-data-status-modal .crm-modal-card{width:min(560px,calc(100vw - 32px))}
.driver-incomplete-modal .crm-modal-card { width: min(480px, calc(100vw - 32px)); }
.driver-incomplete-text { margin: 0 0 10px; color: var(--muted); }
.driver-incomplete-list { margin: 0; padding-left: 20px; }
.driver-incomplete-list li + li { margin-top: 4px; }


/* Sidebar disclosure arrows and mobile header fix (20260709). */
.nav-caret{
  display:inline-grid;
  font-size:0;
  transition:transform .16s ease,opacity .16s ease;
}
.nav-caret::before{
  content:"";
}
.nav-settings-toggle:hover .nav-caret,.nav-settings-toggle.is-active .nav-caret{opacity:.95;color:#e4e8ed}
.settings-group.is-open .nav-caret{transform:rotate(180deg)}

@media(max-width:780px){
  .topbar{position:sticky;top:0;z-index:45;box-shadow:0 1px 0 var(--border);}
  .sidebar .nav-caret,
  .sidebar-collapsed .nav-caret{display:inline-grid!important;}
  .sidebar .nav-settings-toggle,
  .sidebar-collapsed .nav-settings-toggle{display:flex!important;}
  .sidebar .settings-submenu[hidden],
  .sidebar-collapsed .settings-submenu[hidden]{display:none!important;}
  .sidebar-collapsed .settings-group.is-open .settings-submenu{display:block!important;}
}

/* Sidebar disclosure arrow fix: keep chevrons, never an X (20260709). */
.nav-caret{
  display:inline-grid!important;
  place-items:center;
  flex:0 0 16px;
  width:16px;
  height:16px;
  margin-left:auto;
  color:#b9bec6;
  opacity:.72;
  font-size:0!important;
  line-height:1;
  transform:none!important;
  transition:opacity .16s ease,color .16s ease;
}
.nav-caret::after{
  content:none!important;
  display:none!important;
}
.nav-caret::before{
  content:""!important;
  display:block;
  width:7px;
  height:7px;
  border-right:1.7px solid currentColor;
  border-bottom:1.7px solid currentColor;
  transform:rotate(45deg);
  margin-top:-3px;
  transition:transform .16s ease,margin-top .16s ease;
}
.settings-group.is-open .nav-caret{transform:none!important;}
.settings-group.is-open .nav-caret::before{
  transform:rotate(225deg);
  margin-top:3px;
}
.permission-override-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 16px 16px}.permission-override-list{display:grid;gap:8px}.permission-override-list label{display:grid;grid-template-columns:minmax(0,1fr) 126px;gap:8px;align-items:center;font-size:13px}.permission-override-list small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.permission-override-list select{min-height:34px!important;padding:0 8px!important;font-size:13px!important}@media(max-width:900px){.permission-override-grid{grid-template-columns:1fr}}@media(max-width:760px){.permission-override-list label{grid-template-columns:1fr}.permission-override-list select{width:100%}}

/* 20260709 QR/menu cleanup */
.nav-link-sub{gap:0;padding-left:14px;}
.nav-link-sub .nav-icon{display:none!important;}
.nav-link-sub .nav-label{padding-left:0;}
.quick-action.is-disabled{pointer-events:none;opacity:.38;cursor:default;filter:grayscale(1);}
.quick-action.is-document-present svg{fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round;stroke-linejoin:round;}
.quick-action.is-document-missing svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.vehicle-qr-upload-status{display:inline-flex;align-items:center;min-height:28px;color:var(--muted);font-size:12px;margin-left:6px;}
.vehicle-qr-table td:nth-child(4){text-align:center;}
.vehicle-qr-scan{max-width:720px;margin:0 auto;overflow:hidden;}
.vehicle-qr-camera{position:relative;margin:14px;background:#111;border-radius:10px;overflow:hidden;min-height:360px;display:grid;place-items:center;}
.vehicle-qr-camera video{width:100%;height:100%;min-height:360px;object-fit:cover;display:block;}
.vehicle-qr-frame{position:absolute;inset:50% auto auto 50%;width:min(70vw,280px);height:min(70vw,280px);transform:translate(-50%,-50%);border:3px solid rgba(255,255,255,.95);border-radius:18px;box-shadow:0 0 0 999px rgba(0,0,0,.35);}
@media(max-width:780px){.vehicle-qr-camera{margin:10px;min-height:62vh}.vehicle-qr-camera video{min-height:62vh}.vehicle-qr-upload-status{display:none}.nav-link-sub{padding-left:12px}}


.permission-override-list label { grid-template-columns: minmax(0, 1fr) 132px; }
.permission-override-list select { min-width: 132px; }

/* 2026-07-09: unified card headers, clickable list rows, dashboard driver alerts. */
.topbar-title{min-width:0;flex:1 1 auto;overflow:hidden}.topbar-section-icon{flex:0 0 19px}.topbar-actions{flex:0 0 auto}.topbar-title--stacked{align-items:flex-start;gap:9px;line-height:1.12}.topbar-title--stacked .topbar-section-icon{margin-top:2px}.topbar-title-text{display:flex;min-width:0;overflow:hidden;flex:1 1 auto;flex-direction:column}.topbar-title-main{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;color:#27313d}.topbar-title-subtitle{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#27313d;font-size:14px;font-weight:400;line-height:1.25;margin-top:2px}.clickable-row{cursor:pointer}.clickable-row:focus{outline:2px solid rgba(79,131,204,.22);outline-offset:-2px}.clickable-row .entity-link{text-decoration:none!important}.clickable-row:hover .entity-link{color:#255f9e;text-decoration:none!important}.dashboard-drivers{margin:0}.dashboard-drivers .schedule-block:last-child{border-bottom:0}@media(max-width:780px){.topbar{height:auto;min-height:56px;padding-top:8px;padding-bottom:8px}.topbar-title-subtitle{font-size:13px}.topbar-title--stacked .topbar-section-icon{margin-top:1px}.topbar-title-main{font-size:13px}.dashboard-drivers{margin:0}}


/* Telegram driver notification settings */





















/* Аудит: фильтры в две строки, без растягивания и с рабочей кнопкой сброса. */

/* CRM context help panel */
.help-topbar-link{font-weight:800;font-size:18px;line-height:1;border:0;cursor:pointer}
.crm-help-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.22);z-index:110}
.crm-help-backdrop[hidden],.crm-help-panel[hidden]{display:none!important;visibility:hidden!important}
.crm-help-panel{position:fixed;top:0;right:0;width:min(440px,92vw);height:100vh;background:#fff;border-left:1px solid var(--border);box-shadow:-18px 0 40px rgba(15,23,42,.18);z-index:111;display:flex;flex-direction:column;transform:translateX(0);animation:crmHelpSlideIn .18s ease-out}
@keyframes crmHelpSlideIn{from{transform:translateX(100%)}to{transform:translateX(0)}}
.crm-help-header{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 58px 18px 20px;border-bottom:1px solid var(--border);background:#f8fafc}
.crm-help-header h2{margin:0;color:var(--text);font-size:20px;line-height:1.2}
.crm-help-close{position:absolute!important;top:16px;right:18px;z-index:5;box-shadow:none}.crm-help-close svg{display:block}.crm-help-close:hover{color:#2f66ad;border-color:#7e9fcd;background:#f6f9fd}
.crm-help-content{padding:18px 20px 28px;overflow:auto;color:#2f3a48;font-size:14px;line-height:1.58}
.crm-help-content h3{font-size:15px;margin:18px 0 8px;color:var(--text)}
.crm-help-content h3:first-child{margin-top:0}
.crm-help-content p{margin:0 0 12px}
.crm-help-content ul{margin:0 0 14px 18px;padding:0}
.crm-help-content li{margin:5px 0}
.crm-help-content strong{font-weight:800;color:#1f2937}
.crm-help-open{overflow:hidden}
.help-admin-layout{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:16px;align-items:start}.help-admin-list{position:sticky;top:14px;overflow:hidden}.help-admin-pages{display:grid;max-height:calc(100vh - 240px);overflow:auto}.help-admin-page{display:block;padding:10px 14px;border-top:1px solid var(--border);text-decoration:none;color:var(--text)}.help-admin-page:hover{background:#f7f9fc;text-decoration:none}.help-admin-page.is-active{background:#eef4ff;color:#1f5b99}.help-admin-page span{display:block;font-weight:700}.help-admin-page small{display:block;margin-top:2px;color:var(--muted);font-size:11px}.help-admin-editor-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.help-admin-editor-header .button[disabled]{opacity:.45;cursor:not-allowed}.help-admin-grid{grid-template-columns:1fr 1fr}.help-admin-grid textarea{min-height:420px;font-family:inherit;line-height:1.5}
@media(max-width:900px){.crm-help-backdrop{background:rgba(15,23,42,.28)}.crm-help-panel{top:auto;bottom:0;right:0;left:0;width:100vw;height:min(92vh,100vh);border-left:0;border-radius:18px 18px 0 0;box-shadow:0 -18px 40px rgba(15,23,42,.22);animation:crmHelpSlideUp .18s ease-out}.crm-help-header{position:sticky;top:0;z-index:4;border-radius:18px 18px 0 0;padding:18px 58px 16px 18px;padding-top:max(18px,env(safe-area-inset-top));background:#f8fafc}.crm-help-header h2{font-size:18px}.crm-help-close.crm-icon-button{position:absolute!important;top:max(14px,env(safe-area-inset-top));right:16px;z-index:6;display:inline-grid!important}.crm-help-content{font-size:14px;padding-bottom:max(34px,calc(env(safe-area-inset-bottom) + 18px))}@keyframes crmHelpSlideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}.help-admin-layout{grid-template-columns:1fr}.help-admin-list{position:static}.help-admin-pages{max-height:none}.help-admin-grid{grid-template-columns:1fr}.help-admin-grid textarea{min-height:260px}.help-admin-editor-header{display:grid}}

/* === Inspections schedule 2026-07-10 === */
.inspections-tabs {
  grid-auto-columns: minmax(0, 1fr);
}
.inspections-tabs .section-tab {
  justify-content: center;
  min-height: 46px;
  padding: 0 10px;
  text-align: center;
}
.inspection-schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.inspection-day-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
.inspection-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}
.inspection-day-header h2 {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspection-day-count {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #d5dce4;
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.inspection-day-dropzone {
  display: grid;
  gap: 6px;
  min-height: 58px;
  padding: 8px;
  transition: background .14s ease, box-shadow .14s ease;
}
.inspection-day-card.is-drag-over .inspection-day-dropzone {
  background: #f3f7fc;
  box-shadow: inset 0 0 0 2px #9ab5d8;
}
.inspection-day-empty {
  align-self: center;
  padding: 10px 4px;
  color: #9aa3ad;
  font-size: 12px;
  text-align: center;
}
.inspection-vehicle-chip {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #b8cbe2;
  border-radius: 18px;
  background: #f2f7fd;
  color: #2d537f;
  font: inherit;
  text-align: left;
  cursor: grab;
  touch-action: manipulation;
}
.inspection-vehicle-chip:hover {
  border-color: #86a8d2;
  background: #eaf2fb;
}
.inspection-vehicle-chip:focus-visible {
  outline: 2px solid rgba(79, 122, 193, .38);
  outline-offset: 2px;
}
.inspection-vehicle-chip strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspection-vehicle-chip span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspection-vehicle-chip.is-muted {
  border-color: #d9dde2;
  background: #f3f4f5;
  color: #7d858e;
}
.inspection-vehicle-chip.is-muted:hover {
  border-color: #c8ced5;
  background: #eceeef;
  color: #68717b;
}
.inspection-vehicle-chip.is-dragging {
  opacity: .45;
  cursor: grabbing;
}
.inspection-vehicle-chip.is-saving {
  opacity: .58;
  cursor: wait;
}
.inspection-vehicle-chip[disabled] {
  opacity: 1;
  cursor: default;
}
.inspection-day-modal-card {
  width: min(620px, calc(100vw - 32px));
  overflow: hidden;
}
.inspection-day-modal-card .crm-modal-header > div {
  min-width: 0;
}
.inspection-day-modal-vehicle {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspection-day-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.inspection-day-option {
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid #d5dce4;
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}
.inspection-day-option:hover:not([disabled]) {
  border-color: #8fa8c7;
  background: #f5f8fc;
  color: #2f66ad;
}
.inspection-day-option.is-current,
.inspection-day-option[disabled] {
  border-color: #dce1e7;
  background: #f3f4f6;
  color: #9aa3ad;
  cursor: default;
}
.list-toast.is-error {
  background: #8b4141;
}

.crm-operation-active{overflow:hidden}
.crm-operation-modal{z-index:260}
.crm-operation-modal .crm-modal-backdrop{cursor:wait}
.crm-operation-body{display:flex;align-items:center;gap:14px;min-height:72px}
.crm-operation-body p{margin:0;color:var(--muted)}
.crm-operation-spinner{width:30px;height:30px;flex:0 0 30px;border:3px solid #dce7f5;border-top-color:#4f78b8;border-radius:50%;animation:crm-operation-spin .8s linear infinite}
@keyframes crm-operation-spin{to{transform:rotate(360deg)}}

.crm-process-board{position:fixed;z-index:190;right:18px;bottom:18px;width:min(340px,calc(100vw - 30px));overflow:hidden;border:1px solid #d8e1ec;border-radius:10px;background:#fff;box-shadow:0 14px 38px rgba(31,49,72,.2)}
.crm-process-board-summary{display:flex;align-items:center;gap:9px;width:100%;min-height:42px;padding:9px 12px;border:0;background:#f5f8fc;color:#273444;text-align:left;cursor:pointer}
@media(min-width:701px) and (pointer:fine){.crm-process-board-summary{cursor:grab;user-select:none}.crm-process-board.is-dragging .crm-process-board-summary{cursor:grabbing}}
.crm-process-board-summary span:nth-child(2){font-weight:700;flex:1}
.crm-process-board-summary [data-process-board-count]{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#4f78b8;color:#fff;font-size:12px}
.crm-process-board-pulse{width:9px;height:9px;border-radius:50%;background:#8592a2}
.crm-process-board.has-active .crm-process-board-pulse{background:#4f78b8;box-shadow:0 0 0 4px rgba(79,120,184,.14);animation:crm-process-pulse 1.5s ease-in-out infinite}
.crm-process-board.has-error .crm-process-board-pulse,
.crm-process-board.has-error .crm-process-board-summary [data-process-board-count]{background:#b84d4d}
.crm-process-board.has-success .crm-process-board-pulse,
.crm-process-board.has-success .crm-process-board-summary [data-process-board-count]{background:#3f8b60}
@keyframes crm-process-pulse{50%{box-shadow:0 0 0 7px rgba(79,120,184,0)}}
.crm-process-board-list{max-height:min(310px,calc(100dvh - 70px));overflow:auto}
.crm-process-board.is-collapsed .crm-process-board-list{display:none}
.crm-process-item{display:flex;gap:10px;padding:10px 12px;border-top:1px solid #e4eaf1}
.crm-process-item-marker{width:10px;height:10px;flex:0 0 10px;margin-top:4px;border-radius:50%;background:#4f78b8}
.crm-process-item.is-completed .crm-process-item-marker{background:#4f9568}
.crm-process-item.is-error .crm-process-item-marker{background:#b84d4d}
.crm-process-item.is-queued .crm-process-item-marker{background:#be8a3b}
.crm-process-item-content{display:grid;gap:2px;min-width:0}
.crm-process-item-content strong{font-size:13px;line-height:1.3}
.crm-process-item-content span,.crm-process-item-content small{color:var(--muted);font-size:12px;line-height:1.3;overflow-wrap:anywhere}
@media(max-width:700px){.crm-process-board{right:10px;bottom:10px;width:calc(100vw - 20px)}}

@media (max-width: 1180px) {
  .inspection-schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .inspections-tabs {
    grid-auto-columns: minmax(110px, 1fr);
  }
  .inspection-schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .inspection-day-header {
    min-height: 36px;
    padding: 6px 7px;
  }
  .inspection-day-header h2 {
    font-size: 11px;
  }
  .inspection-day-count {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    font-size: 10px;
  }
  .inspection-day-dropzone {
    gap: 5px;
    min-height: 48px;
    padding: 5px;
  }
  .inspection-day-empty {
    padding: 8px 2px;
    font-size: 10px;
  }
  .inspection-vehicle-chip {
    grid-template-columns: 1fr;
    gap: 2px;
    min-height: 42px;
    padding: 6px 8px;
    border-radius: 7px;
  }
  .inspection-vehicle-chip strong {
    font-size: 12px;
  }
  .inspection-vehicle-chip span {
    font-size: 9px;
  }
  .inspection-day-modal {
    place-items: end center;
    padding: 0;
  }
  .inspection-day-modal-card {
    width: 100%;
    max-height: min(92vh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .inspection-day-modal-card .crm-modal-header {
    padding: 14px 14px 10px;
  }
  .inspection-day-modal-card .crm-modal-body {
    padding: 10px 12px 14px;
  }
  .inspection-day-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .inspection-day-option {
    min-height: 48px;
    font-size: 13px;
  }
}

/* QR автомобилей: передача распознавания на телефон. */
.vehicle-qr-upload-status:empty { display:none; }
.vehicle-qr-phone-modal .document-qr-status.is-success { color:#176a37; font-weight:700; }
.vehicle-qr-phone-result {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin-top:10px;
  font-size:12px;
}
.vehicle-qr-phone-result[hidden] { display:none; }
.vehicle-qr-public-card { overflow:hidden; }
.vehicle-qr-public-description {
  margin:0 0 10px;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}
.vehicle-qr-public-card .vehicle-qr-camera {
  margin:0 0 12px;
}
.vehicle-qr-public-card .alert {
  margin-bottom:0;
}
@media(max-width:780px) {
  .vehicle-qr-public-card { padding:10px; }
  .vehicle-qr-public-description { margin-bottom:8px; }
  .vehicle-qr-public-card .vehicle-qr-camera {
    min-height:min(68svh, 560px);
    margin:0 0 10px;
  }
  .vehicle-qr-public-card .vehicle-qr-camera video { min-height:min(68svh, 560px); }
}

/* QR автомобилей: загрузка, распознавание и передача на телефон. */
.vehicle-qr-desktop-result,
.vehicle-qr-public-result {
  text-align:center;
}
.vehicle-qr-desktop-result[hidden],
.vehicle-qr-public-result[hidden],
[data-vehicle-qr-camera-block][hidden] {
  display:none !important;
}
.vehicle-qr-result-plate {
  margin:4px 0 5px;
  color:var(--text);
  font-size:28px;
  font-weight:700;
  letter-spacing:.04em;
}
.vehicle-qr-result-model {
  margin-bottom:14px;
  color:var(--text);
  font-size:17px;
  font-weight:700;
}
.vehicle-qr-result-details {
  display:grid;
  grid-template-columns:max-content minmax(120px,1fr);
  gap:8px 16px;
  width:min(100%,420px);
  margin:0 auto 18px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:7px;
  background:#fafbfd;
  text-align:left;
  font-size:13px;
}
.vehicle-qr-result-details dt { font-weight:700; }
.vehicle-qr-result-details dd { margin:0; color:var(--text); }
.vehicle-qr-result-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}
.vehicle-qr-phone-success {
  margin:0 0 12px;
  color:#176a37;
  font-size:14px;
  font-weight:700;
}
.vehicle-qr-public-result p {
  margin:0 0 16px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}
.vehicle-qr-photo-button {
  width:100%;
  margin-top:10px;
}
.vehicle-qr-public-card [data-vehicle-qr-scan-status] {
  margin-bottom:0;
}
@media(max-width:780px) {
  .vehicle-qr-result-plate { font-size:25px; }
  .vehicle-qr-result-details {
    grid-template-columns:1fr;
    gap:3px;
  }
  .vehicle-qr-result-details dd { margin-bottom:8px; }
  .vehicle-qr-result-actions .button { width:100%; }
  .vehicle-qr-public-result {
    padding:24px 10px 12px;
  }
  .vehicle-qr-public-result .button { width:100%; }
}


/* View-only forms use the same layout without suggesting that values can be saved. */
[data-readonly-form] input:disabled,[data-readonly-form] select:disabled,[data-readonly-form] textarea:disabled{opacity:1;color:var(--text);background:var(--surface-muted);cursor:default}

/* Employee read-only preview */
.employee-preview-mode .workspace{padding-top:58px}
.employee-preview-banner{position:fixed;z-index:95;top:0;left:var(--sidebar-width,250px);right:0;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 18px;border-bottom:1px solid #d9b86d;background:#fff7dc;color:#5f4815;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.sidebar-collapsed .employee-preview-banner{left:62px}
.employee-preview-banner>div{display:flex;flex-direction:column;gap:2px}.employee-preview-banner strong{font-size:14px}.employee-preview-banner span{font-size:12px}.employee-preview-exit{flex:0 0 auto;border:1px solid #c8a34e;border-radius:5px;padding:7px 10px;background:#fff;color:#684d0f;font-size:12px;font-weight:700}
.employee-preview-mode .preview-readonly-form button[disabled],.employee-preview-mode [data-document-upload][disabled],.employee-preview-mode [data-document-capture][disabled],.employee-preview-mode [data-icon-confirm-open][disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}
.inline-action-form{display:inline-flex;margin:0}
@media(max-width:780px){.employee-preview-mode .workspace{padding-top:82px}.employee-preview-banner{left:62px;min-height:82px;align-items:flex-start;flex-direction:column;gap:6px;padding:8px 12px}.employee-preview-exit{align-self:flex-end}}


/* Per-user unseen publications counter in the sidebar. */
.nav-link-sub .nav-label{min-width:0;flex:1 1 auto}
.nav-settings-toggle{position:relative}
.nav-settings-toggle .nav-label{min-width:0;flex:1 1 auto}
.nav-item-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;margin-left:auto;border:2px solid #fff;border-radius:11px;background:#c83e3e;color:#fff;font-size:10px;line-height:16px;font-weight:700;font-variant-numeric:tabular-nums;box-shadow:0 1px 3px rgba(93,24,24,.18)}
.nav-item-badge.is-warning{background:var(--warning);box-shadow:0 1px 3px rgba(120,78,16,.2)}
.nav-item-badge.is-error{background:var(--danger)}
.nav-item-badges{display:inline-flex;align-items:center;gap:4px;margin-left:auto}
.nav-item-badges .nav-item-badge{margin-left:0}
.nav-item-badge.is-health{min-width:20px;padding:0}
.nav-item-badge[hidden]{display:none}
.nav-link-sub.is-active .nav-item-badge{border-color:#edf3fb}
.sidebar-collapsed .nav-item-badge{position:absolute;right:5px;top:5px;min-width:17px;height:17px;padding:0 4px;border-width:1px;font-size:9px;line-height:15px}
.sidebar-collapsed .nav-item-badges{position:absolute;right:5px;top:5px;gap:2px;margin-left:0}
.sidebar-collapsed .nav-item-badges .nav-item-badge{position:static;min-width:17px;height:17px;padding:0 4px;border-width:1px;font-size:9px;line-height:15px}
.sidebar-collapsed .nav-settings-toggle .nav-item-badge{right:auto;left:28px;top:2px}
@media(max-width:780px){.sidebar .nav-settings-toggle .nav-item-badge{position:absolute;right:auto;left:28px;top:2px;min-width:17px;height:17px;padding:0 4px;border-width:1px;font-size:9px;line-height:15px}}

/* Branded browser error pages replace raw white-screen messages. */
.crm-error-page{min-height:100vh;background:#f4f6f8}
.crm-error-page .crm-error-code{margin-bottom:8px;color:#9a4750;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.crm-error-page .crm-error-fallback-card{border-top:4px solid #bd4b55}
@media(max-width:640px){.crm-error-fallback{padding:14px}.crm-error-fallback-card{padding:22px}.crm-error-fallback-actions{flex-direction:column}.crm-error-fallback-actions a{justify-content:center}}


/* Role permissions use the same grouped card design as employee permissions. */
.role-permissions-form .role-permissions-hint{margin:-4px 0 12px}
.role-permissions-form .permission-override-grid{margin-top:0}



/* Mobile cashflow: keep the operational columns visible without horizontal scrolling. */
@media (max-width: 780px) {
  .cashflow-table { width: 100%; table-layout: fixed !important; min-width: 0; }
  .cashflow-table .cashflow-col-vehicle,
  .cashflow-table .cashflow-col-reason,
  .cashflow-table .cashflow-col-user,
  .cashflow-table .cashflow-vehicle-cell,
  .cashflow-table .cashflow-reason-cell,
  .cashflow-table .cashflow-user-cell { display: none !important; }
  .cashflow-table .cashflow-col-date { width: 112px !important; }
  .cashflow-table .cashflow-col-driver { width: auto !important; }
  .cashflow-table .cashflow-col-amount,
  .cashflow-table .cashflow-col-actions{ width: 82px !important; }
  .cashflow-table .cashflow-date-cell { width: 112px; white-space: normal; line-height: 1.25; }
  .cashflow-table .cashflow-driver-cell { width: auto; white-space: normal; line-height: 1.25; }
  .cashflow-table .cashflow-amount-cell { width: 82px; white-space: nowrap; }
  .cashflow-table .cashflow-actions-cell { width: 82px; min-width: 82px; padding-left: 5px; padding-right: 5px; }
  .cashflow-table th, .cashflow-table td { padding-left: 8px; padding-right: 8px; }
}


/* Main dashboard: vehicle search uses the same compact control as the vehicle register. */
.dashboard-vehicle-search {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.dashboard-vehicle-search .search-form {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.dashboard-vehicle-search .search-form input[type="search"] {
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
}
@media (max-width: 780px) {
  .dashboard-vehicle-search { padding: 10px 12px; }
}

/* Driver photo */
.driver-personal-fields{min-width:0}
.driver-photo-card{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0}
.driver-photo-thumbnail{width:170px;aspect-ratio:4/5;display:grid;place-items:center;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:#f6f8fa;color:#9aa4af;padding:0;cursor:pointer}
.driver-photo-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.driver-photo-thumbnail.is-placeholder{cursor:default}
.driver-photo-thumbnail.is-placeholder svg{width:54px;height:54px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.driver-photo-actions{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap}
.driver-photo-status{width:1%;text-align:center;font-weight:700}
.driver-photo-status span{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 5px;font-size:15px;line-height:1;border:1px solid transparent;border-radius:999px}
.driver-photo-status.is-available span{border-color:#b9dfc6;background:#f2faf5;color:#287247}
.driver-photo-status.is-missing span{border-color:#efc5c5;background:#fff1f1;color:#b33b3b}
.crm-modal-open{overflow:hidden}
.driver-photo-modal .crm-modal-card{position:relative;width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 28px);padding:44px 14px 14px;overflow:hidden}
.driver-photo-modal-close.crm-icon-button{position:absolute;top:9px;right:9px;z-index:2}
.driver-photo-modal-body{display:flex;align-items:center;justify-content:center;max-height:calc(100vh - 86px);overflow:hidden}
.driver-photo-modal-body img{display:block;max-width:100%;max-height:calc(100vh - 86px);object-fit:contain;border-radius:6px}

/* Public phone capture for a driver portrait */
.document-capture-card.is-photo .document-capture-camera{aspect-ratio:4/5;max-height:72vh;margin-inline:auto}
.document-capture-card.is-photo .document-capture-frame{inset:auto;left:50%;top:50%;width:66%;aspect-ratio:4/5;transform:translate(-50%,-50%);border-radius:10px}
.document-capture-card.is-photo .document-crop-editor{aspect-ratio:4/5;max-height:72vh;margin-inline:auto}
.document-capture-card.is-photo .document-crop-editor img{object-fit:contain}

@media(max-width:980px){
  .driver-photo-thumbnail{width:145px}
}
@media(max-width:720px){
  .driver-photo-card{order:-1}
  .driver-photo-thumbnail{width:min(180px,58vw)}
}

/* Driver full photo and square avatar */
.driver-photo-card-title{font-size:12px;font-weight:700;color:var(--muted);text-align:center}
.driver-photo-thumbnail.is-square{aspect-ratio:1/1}

/* Compact driver personal data: fields + full photo + square photo. */
.entity-form--driver .driver-personal-fields{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  min-width:0;
}
.entity-form--driver .driver-photo-card{
  align-items:stretch;
  gap:8px;
  min-width:0;
  height:100%;
}
.entity-form--driver .driver-photo-card-title{
  display:block;
  margin:0 0 5px;
  font-size:13px;
  line-height:18px;
  font-weight:700;
  color:var(--text);
  text-align:left;
}
.entity-form--driver .driver-photo-thumbnail{
  width:100%;
  max-width:180px;
  align-self:center;
}
.entity-form--driver .driver-photo-actions{align-self:center;margin-top:auto}
.field-transfer-action--trailing{position:relative;display:block}
.field-transfer-action--trailing input{padding-right:48px!important}
.field-transfer-action--trailing .quick-action{
  position:absolute;
  top:5px;
  right:5px;
  width:32px;
  height:32px;
  min-width:32px;
  font-size:13px;
  letter-spacing:-2px;
  font-weight:700;
}
@media(max-width:980px){
  .entity-form--driver .driver-photo-thumbnail{max-width:150px}
}
@media(max-width:720px){
  .entity-form--driver .driver-personal-fields{order:0}
  .entity-form--driver .driver-photo-thumbnail{width:min(180px,58vw);max-width:none}
}


/* Driver dates on phones: fixed DD.MM.YYYY display instead of iOS long locale text. */
.entity-form--driver .crm-date-display{display:none!important}
@media(max-width:720px){
  .entity-form--driver .crm-date-native{
    position:absolute!important;
    width:1px!important;
    min-width:1px!important;
    height:1px!important;
    min-height:1px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    opacity:0!important;
    pointer-events:none!important;
    overflow:hidden!important;
  }
  .entity-form--driver .crm-date-display{
    display:block!important;
    width:100%!important;
    text-align:left!important;
    font-variant-numeric:tabular-nums;
  }
}

/* Yandex driver-photo synchronization. */
.driver-photo-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.driver-photo-source{font-size:11px;font-weight:600;color:var(--muted);white-space:nowrap}.driver-photo-sync-note{grid-column:1/-1;color:var(--muted);font-size:12px}.status-pill.is-muted{background:#eef1f5;color:#667085}.status-pill.is-warning{background:#fff4e5;color:#9a5b00}.status-pill.is-success{background:#eaf7ee;color:#247342}
.yandex-deduction-runs-panel .empty-cell{padding:14px 0}


/* Driver profile: contacts separated from personal data and clear photo-source badges. */
.entity-form--driver .driver-photo-card-title{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  width:100%;
  min-height:20px;
}
.entity-form--driver .driver-photo-source{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:1px 7px;
  border:1px solid var(--border);
  border-radius:999px;
  font-size:11px;
  line-height:16px;
  font-weight:400;
  white-space:nowrap;
}
.entity-form--driver .driver-photo-source.is-yandex{
  border-color:#b9dfc6;
  background:#f2faf5;
  color:#287247;
}
.entity-form--driver .driver-photo-source.is-manual{
  border-color:#e7cf83;
  background:#fff8dc;
  color:#765c08;
}
@media(max-width:720px){
  .entity-form--driver .driver-photo-card-title{justify-content:center}
}

/* Telegram: ручное закрытие диалога без ответа. */
.telegram-no-reply-form{margin:0}.telegram-service-line{align-self:center;max-width:90%;padding:5px 10px;border-radius:999px;background:#e9edf2;color:#667382;font-size:11px;line-height:1.35;text-align:center}.telegram-bubble .notification-status.is-sent{color:var(--success)}
@media(max-width:780px){.telegram-chat-panel>.panel-header{align-items:flex-start}.telegram-no-reply-form .button{white-space:nowrap}}

/* GLONASSSoft object selector. */
.gps-link-modal-card{width:min(680px,calc(100vw - 32px))}
.gps-link-modal .crm-modal-header{align-items:flex-start}
.gps-link-modal .crm-modal-header > div{display:grid;gap:4px}
.gps-link-modal .crm-modal-header small{color:var(--muted);font-size:12px}
.gps-link-candidate-list{display:grid;gap:10px}
.gps-link-candidate{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px;border:1px solid var(--border);border-radius:5px;background:#fff}
.gps-link-candidate.is-current{border-color:#a7d4b3;background:#f5fbf6}
.gps-link-candidate.is-unavailable{background:#fafbfc}
.gps-link-candidate-main{display:grid;gap:3px;min-width:0}
.gps-link-candidate-main strong{overflow-wrap:anywhere}
.gps-link-candidate-main small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.gps-link-candidate-action form{margin:0}
.gps-link-badge{display:inline-flex;justify-self:start;margin-top:4px;padding:3px 7px;border:1px solid var(--border);border-radius:999px;font-size:11px;line-height:1.2}
.gps-link-badge.is-current{border-color:#a7d4b3;background:#edf8f0;color:#2f6f3f}
.gps-link-badge.is-busy{border-color:#e7c1c1;background:#fff4f4;color:#9a3e3e}
@media(max-width:620px){.gps-link-candidate{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px}.gps-link-modal-card{width:calc(100vw - 24px)}}

/* Выписки: детализация ошибок по найденным автомобилям видна только на десктопе. */


/* Driver PDF recognition and data reconciliation. */
.driver-document-import-section{background:#f8fbff}
.driver-document-import-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.driver-document-import-card{display:flex;flex-direction:column;gap:14px;min-height:128px;padding:16px;border:1px solid #dbe3ee;border-radius:10px;background:#fff}
.driver-document-import-card.is-filled{border-color:#b9d6c2;background:#f8fff9}
.driver-document-import-card-main{display:flex;align-items:center;gap:12px;min-width:0}
.driver-document-import-card-main>div{display:flex;flex-direction:column;gap:5px;min-width:0}
.driver-document-import-card-main strong{font-size:15px;color:#1f2937}
.driver-document-import-card-main span:not(.driver-document-import-icon){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#667085;font-size:13px}
.driver-document-import-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:9px;background:#f1f5fa;color:#6780a8}
.driver-document-import-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.driver-document-import-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:auto}
.driver-document-import-buttons{display:flex;align-items:center;gap:8px}
.driver-document-import-status{margin-right:auto;color:#667085;font-size:12px;line-height:1.35}
.driver-document-import-status.is-info{color:#40618c}
.driver-document-import-status.is-success{color:#2e7d45}
.driver-document-import-status.is-warning{color:#9a6500}
.driver-document-compare-modal .crm-modal-card{width:min(980px,calc(100vw - 32px))}
.driver-document-compare-table{min-width:760px}
.driver-document-compare-table th[scope=row]{width:220px;text-align:left}
.driver-document-compare-table td{vertical-align:top;white-space:normal;word-break:break-word}
.driver-document-choice-cell{display:flex;flex-direction:column;gap:8px;min-width:150px}
.driver-document-choice-cell label{display:flex;align-items:center;gap:7px;white-space:nowrap}
.driver-document-compare-actions{gap:10px;flex-wrap:wrap}

@media (max-width:760px){
  .driver-document-import-grid{grid-template-columns:1fr}
  .driver-document-import-card{min-height:116px}
  .driver-document-compare-modal .crm-modal-card{width:calc(100vw - 18px);max-height:calc(100vh - 18px)}
  .driver-document-compare-actions{display:grid;grid-template-columns:1fr}
  .driver-document-compare-actions .button{width:100%}
}

/* Contract form document actions and disabled planned end date. */
.contract-form-actions{align-items:center}
.contract-form-print-actions,.contract-form-save-actions{display:flex;align-items:center;gap:9px}
.contract-form-save-actions{margin-left:24px}
.contract-planned-end-input:disabled{opacity:1!important;background:#f1f3f5!important;color:#7c8794!important;border-color:#d7dde4!important;cursor:default}
@media(max-width:780px){.contract-form-save-actions{margin-left:18px}}

/* Взыскание */
.collection-toolbar{align-items:center}.collection-search-form{display:grid;grid-template-columns:minmax(260px,1fr) minmax(180px,260px) auto;gap:8px;width:100%}.collection-status-tabs,.collection-case-tabs{grid-auto-flow:column;grid-auto-columns:minmax(120px,1fr);overflow-x:auto}.collection-list-table .collection-status{text-decoration:none}.collection-status{display:inline-flex;align-items:center;min-height:26px;padding:3px 9px;border-radius:999px;background:#eef1f5;color:#5f6b7a;font-size:12px;font-weight:700;white-space:nowrap}.collection-status.is-warning{background:#fff4df;color:#8d5a00}.collection-status.is-info{background:#e9f4ff;color:#216292}.collection-status.is-accent{background:#edf0ff;color:#4057a7}.collection-status.is-schedule{background:#f1ecff;color:#6243a6}.collection-status.is-danger{background:#fff0f0;color:#a33434}.collection-status.is-success{background:#eaf7ee;color:#247342}.collection-case-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 14px}.collection-case-heading h1{margin:5px 0 3px;font-size:23px}.collection-case-meta{color:var(--muted);font-size:13px}.collection-case-summary{display:flex;align-items:center;gap:14px;padding-top:4px}.collection-case-summary strong{font-size:17px;white-space:nowrap}.collection-case-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:14px}.collection-action-stack{display:grid;gap:12px;padding:16px}.collection-inline-form{display:grid;gap:6px}.collection-inline-form label{font-size:13px;font-weight:700}.collection-inline-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.collection-inline-controls select{min-height:42px;border:1px solid #cfd7e0;border-radius:4px;background:#fff;padding:0 10px}.collection-finished-note{padding:12px;border:1px solid var(--border);border-radius:4px;background:#fafbfd;line-height:1.45}.collection-document-form{padding-bottom:0}.collection-timeline{display:grid;padding:4px 16px 16px}.collection-timeline-item{display:grid;grid-template-columns:130px minmax(0,1fr);gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}.collection-timeline-item:last-child{border-bottom:0}.collection-timeline-item time{color:var(--muted);font-size:12px}.collection-timeline-item strong{display:block}.collection-timeline-item span{display:block;margin-top:2px;color:var(--muted);font-size:12px}.collection-timeline-item p{margin:8px 0 0;line-height:1.45}.collection-schedule-table input{min-width:140px}.collection-driver-details .detail-value{white-space:pre-wrap}.button-danger{background:#b23b3b!important;border-color:#b23b3b!important;color:#fff!important}.is-voided{opacity:.58;text-decoration:line-through}.drivers-debtors-table td:nth-child(4),.drivers-debtors-table th:nth-child(4){text-align:right}.drivers-debtors-table .list-table-actions{width:56px}.crm-icon-button.is-disabled{opacity:.35;pointer-events:none}
@media(max-width:980px){.collection-case-grid{grid-template-columns:1fr}.collection-case-heading{align-items:stretch}.collection-case-summary{justify-content:space-between}.collection-search-form{grid-template-columns:1fr minmax(150px,220px) auto}}
@media(max-width:700px){.collection-case-heading{display:grid}.collection-case-summary{display:grid;grid-template-columns:1fr 1fr}.collection-search-form{grid-template-columns:1fr auto}.collection-search-form select{grid-column:1/-1;grid-row:2}.collection-timeline-item{grid-template-columns:1fr;gap:4px}.collection-case-tabs{grid-auto-columns:minmax(150px,1fr)}}

/* Договоры: отдельное состояние паузы. */
.contracts-table tr.is-paused td,
.driver-contracts-table tr.is-paused td{background:#fff8d9}
.contracts-table tr.is-paused:hover td,
.driver-contracts-table tr.is-paused:hover td{background:#fff4c9}
.contract-paused-panel{background:#fff8d9;border-color:#eadb9b}
.contract-paused-panel .field input,
.contract-paused-panel .field select,
.contract-paused-panel .field textarea{background:#fff}
.contract-pause-modal .crm-modal-card{width:min(520px,calc(100vw - 28px))}
.contract-pause-resume-text{margin:0;color:var(--text)}

.text-action{background:transparent;color:var(--accent);font-size:12px;}
.text-action:hover{text-decoration:underline}

/* Paused contracts in embedded tables */
.vehicle-contracts-table tr.is-paused td{background:#fff8d9}
.vehicle-contracts-table tr.is-paused:hover td{background:#fff4c9}

/* Superadmin balance amount editor */
.vehicle-contracts-table tr.is-closed td{color:#8a96a3}
.vehicle-contracts-table tr.is-closed .entity-link{color:#718093}

/* Balance operation categories and superadmin category editor */
.balance-operation-category{display:inline-flex;align-items:center;min-height:24px;padding:2px 8px;border-radius:999px;background:#eef2f6;color:#536170;font-size:12px;font-weight:700;white-space:nowrap}

/* Deposit return */
.deposit-return-modal .crm-modal-card{width:min(500px,calc(100vw - 28px))}
.deposit-return-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.deposit-return-summary>div{padding:10px 12px;border:1px solid var(--border);border-radius:4px;background:#fafbfd}
.deposit-return-summary span{display:block;margin-bottom:3px;color:var(--muted);font-size:12px}
.deposit-return-summary strong{font-size:16px;font-weight:600}
.deposit-return-note{margin:12px 0 0;line-height:1.45}
@media(max-width:560px){.deposit-return-summary{grid-template-columns:1fr}}

/* v15: counters, disabled-action hints and reusable list exports */
.quick-action.is-disabled,.crm-icon-button.is-disabled{pointer-events:auto!important;cursor:default!important}
.section-tab{display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-tab-count{margin-left:auto;font-size:20px;line-height:1;font-variant-numeric:tabular-nums;color:#1f2937}
.section-tab.is-active .section-tab-count{color:inherit}
.vehicles-status-tabs{grid-auto-flow:column;grid-auto-columns:minmax(150px,1fr);overflow-x:auto}
.vehicles-list-table .vehicle-owner-column{width:120px;max-width:120px}
.vehicles-list-table .vehicle-owner-name{display:block;width:120px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-export-modal-card{display:flex;flex-direction:column;width:min(1420px,calc(100vw - 32px));height:calc(100vh - 32px);max-height:calc(100vh - 32px);overflow:hidden}
.list-export-modal-card>.crm-modal-header{flex:0 0 auto}
.list-export-modal-card>.crm-modal-header .quick-actions{display:flex;align-items:center;gap:8px}
.list-export-body{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;gap:14px;overflow:hidden}
.list-export-section{display:flex;min-height:0;flex:0 0 auto;flex-direction:column;gap:8px}
.list-export-section+.list-export-section{margin-top:0}
.list-export-section>.form-section-title{flex:0 0 auto;padding:0}
.list-export-filter-rows{display:grid;gap:10px}
.list-export-filter-row{display:grid;align-items:end;gap:10px}
.list-export-filter-row>.field{min-width:0}
.list-export-filter-row--drivers-main{grid-template-columns:repeat(3,minmax(0,1fr))}
.list-export-filter-row--dates-four{grid-template-columns:repeat(4,minmax(150px,1fr))}
.list-export-filter-row--contracts-main{grid-template-columns:repeat(4,minmax(0,1fr))}
.list-export-filter-row--contracts-dates{grid-template-columns:minmax(240px,1.5fr) repeat(4,minmax(150px,1fr))}
.list-export-filter-row--vehicles-main{grid-template-columns:repeat(5,minmax(0,1fr))}
.list-export-filter-row--vehicles-dates{grid-template-columns:repeat(5,minmax(150px,1fr))}
.list-export-sort-control{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:7px;align-items:center}
.list-export-sort-control select{min-width:0}
.list-export-sort-direction{width:38px;min-width:38px;height:38px;font-size:21px;line-height:1}
.list-export-date-field input[type=date]{min-width:0}
.list-export-checkbox-field input[type=checkbox]{width:18px;min-width:18px;height:18px;min-height:18px;margin:11px 0 11px 2px;padding:0}
.list-export-count{flex:0 0 auto;padding:2px 0;color:var(--muted);font-size:13px;font-weight:600}
.list-export-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.list-export-section-heading>div{display:flex;gap:12px}
.list-export-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.list-export-column{display:flex;align-items:center;gap:8px;min-height:36px;padding:7px 9px;border:1px solid var(--border);border-radius:4px;background:#fff}
.list-export-column.is-fixed{background:#f4f7fb}
.list-export-columns-section{min-height:0;flex:1 1 auto}
.list-export-columns-section>.list-columns-board{height:auto;min-height:0;flex:1 1 auto}
.list-export-columns-section .list-columns-box{min-height:0}
.text-action{border:0;background:none;color:var(--link);padding:0;cursor:pointer;font:inherit}
.contracts-table .driver-balance-column{text-align:right;white-space:nowrap}
@media(max-width:1100px){.list-export-filter-row--vehicles-main{grid-template-columns:repeat(3,minmax(0,1fr))}.list-export-filter-row--vehicles-dates,.list-export-filter-row--contracts-dates{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:900px){.list-export-filter-row--drivers-main,.list-export-filter-row--contracts-main,.list-export-filter-row--vehicles-main{grid-template-columns:repeat(2,minmax(0,1fr))}.list-export-filter-row--dates-four,.list-export-filter-row--contracts-dates,.list-export-filter-row--vehicles-dates{grid-template-columns:repeat(2,minmax(150px,1fr))}.list-export-columns{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.list-export-modal-card{width:calc(100vw - 18px);height:calc(100vh - 18px);max-height:calc(100vh - 18px)}.list-export-body{overflow:auto}.list-export-columns-section{flex:0 0 auto}.list-export-columns-section>.list-columns-board{height:auto;min-height:auto}.list-export-columns-board .list-columns-box{min-height:260px}.list-export-filter-row--drivers-main,.list-export-filter-row--contracts-main,.list-export-filter-row--vehicles-main,.list-export-filter-row--dates-four,.list-export-filter-row--contracts-dates,.list-export-filter-row--vehicles-dates{grid-template-columns:1fr}}
@media(max-width:600px){.list-export-columns{grid-template-columns:1fr}.section-tab-count{font-size:17px}}

/* Карточка автомобиля: отдельное действие свободного путевого листа. */
.vehicle-free-waybill-action{margin-right:18px}
@media(max-width:720px){.vehicle-free-waybill-action{margin-right:12px}}

/* Telegram mass mailing: compact filters, fixed composer and scrollable recipients. */
.notification-broadcast-panel{
  display:flex;
  flex-direction:column;
  width:100%;
  max-width:none;
  height:calc(100dvh - 94px);
  min-height:560px;
  overflow:hidden;
}
.notification-broadcast-panel>.panel-header{flex:0 0 auto}
.notification-broadcast-form,
.notification-broadcast-form>.permission-readonly-fieldset{
  display:flex;
  flex:1 1 auto;
  min-height:0;
  flex-direction:column;
  overflow:hidden;
}
.notification-broadcast-toolbar{
  display:grid;
  grid-template-columns:190px 190px 190px minmax(104px,1fr);
  align-items:end;
  gap:10px;
  flex:0 0 auto;
  padding:11px 16px;
  border-bottom:1px solid var(--border);
  background:#fff;
}
.notification-broadcast-filter{display:block;min-width:0}
.notification-broadcast-filter>span{display:block;margin:0 0 5px;font-size:13px;font-weight:700}
.notification-broadcast-filter select,
.notification-broadcast-filter input{
  display:block;
  width:100%;
  min-height:40px;
  padding:0 11px;
  border:1px solid #cfd7e0;
  border-radius:4px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:14px;
}
.notification-broadcast-filter select:focus,
.notification-broadcast-filter input:focus{border-color:var(--accent);outline:2px solid rgba(79,131,204,.14)}
.notification-broadcast-filter input:disabled{background:#f1f3f5;color:#9aa1a9;cursor:default}
.notification-broadcast-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:40px}
.notification-broadcast-actions .quick-action{flex:0 0 28px}
.notification-broadcast-actions .quick-action.is-preview{color:#687482}
.notification-audience-summary{
  flex:0 0 auto;
  margin:0;
  padding:9px 16px;
  border-bottom:1px solid var(--border);
  background:#fafbfd;
  font-size:13px;
  line-height:1.35;
  white-space:normal;
}
.notification-audience-summary strong{font-variant-numeric:tabular-nums}
.notification-broadcast-list-area{flex:1 1 auto;min-height:140px;padding:0 16px;overflow:hidden;background:#fff}
.notification-driver-table-wrap{height:100%;max-height:none;overflow:auto;border:1px solid var(--border);border-radius:4px}
.notification-driver-table{margin:0}
.notification-driver-table thead th{position:sticky;top:0;z-index:2;background:#fafbfd}
.notification-driver-table th,
.notification-driver-table td{padding-top:8px;padding-bottom:8px}
.notification-driver-table tr.is-notification-unavailable{background:#f3f4f6;color:#9aa1a9}
.notification-driver-table tr.is-notification-unavailable:hover{background:#f3f4f6}
.notification-driver-table tr.is-notification-unavailable td{color:#9aa1a9}
.notification-driver-table tr.is-notification-unavailable .cell-secondary{color:#adb3ba}
.notification-driver-table .cell-amount{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.notification-driver-check{display:inline-grid;place-items:center;width:20px;height:20px}
.notification-driver-check.is-disabled{cursor:not-allowed}
.notification-selection-checkbox{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  accent-color:var(--accent);
  cursor:pointer;
  box-shadow:none!important;
}
.notification-selection-checkbox:focus-visible{outline:2px solid #8fb1e3!important;outline-offset:2px}
.notification-selection-checkbox:disabled{cursor:not-allowed;opacity:1}
.notification-broadcast-composer{
  flex:0 0 auto;
  padding:9px 16px 12px;
  border-top:1px solid var(--border);
  background:#fff;
}
.notification-broadcast-macros{flex-wrap:nowrap;overflow-x:auto;margin-bottom:7px;padding:1px 0 3px;scrollbar-width:thin}
.notification-broadcast-macros button{flex:0 0 auto}
.notification-broadcast-composer .message-editor-body{min-height:78px;max-height:118px;overflow-y:auto}
.notification-preview-modal .crm-modal-card{width:min(560px,calc(100vw - 32px))}
.notification-preview-modal .notification-preview-meta{margin-bottom:10px;color:var(--muted);font-size:12px}

@media(max-width:980px){
  .notification-broadcast-toolbar{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
}
@media(max-width:780px){
  .notification-broadcast-panel{height:calc(100dvh - 82px);min-height:0}
  .notification-broadcast-toolbar{grid-template-columns:repeat(3,minmax(0,1fr));padding:9px 10px}
  .notification-broadcast-actions{grid-column:1/-1;justify-content:flex-end;min-height:28px}
  .notification-broadcast-filter>span{font-size:12px}
  .notification-broadcast-filter select,.notification-broadcast-filter input{min-height:36px;padding:0 8px;font-size:13px}
  .notification-audience-summary{padding:7px 10px;font-size:12px}
  .notification-broadcast-list-area{min-height:110px;padding:0 10px}
  .notification-broadcast-composer{padding:8px 10px 10px}
  .notification-broadcast-macros{width:100%}
  .notification-broadcast-composer .message-editor-body{min-height:70px;max-height:96px}
}
@media(max-width:560px){
  .notification-broadcast-toolbar{grid-template-columns:1fr 1fr}
  .notification-broadcast-filter:nth-child(3){grid-column:1/-1}
}

/* v26: billing table keeps the reason flexible on desktop and scrolls only on mobile. */
.operation-reason-ellipsis{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.driver-billing-table-wrap{width:100%;max-width:100%;overflow-x:hidden}
.driver-billing-table{width:100%;max-width:100%;table-layout:fixed}
.driver-billing-col-date{width:122px}
.driver-billing-col-category{width:92px}
.driver-billing-col-money{width:82px}
.driver-billing-col-user{width:156px}
.driver-billing-col-receipt{width:58px}
.driver-billing-col-actions{width:94px}
.driver-billing-table .driver-billing-reason-cell{min-width:0;overflow-wrap:anywhere;word-break:normal}
.driver-billing-table .driver-billing-reason-cell .operation-reason-ellipsis,
.driver-billing-table .driver-billing-reason-cell .cell-secondary{max-width:none;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
.driver-billing-table .driver-billing-user-cell{white-space:normal;overflow-wrap:normal;word-break:normal}
.driver-billing-table .driver-billing-actions-cell{width:94px;min-width:94px;max-width:94px;padding-left:6px;padding-right:6px;text-align:right}
.driver-billing-table .driver-billing-actions-cell .quick-actions{width:100%;min-width:0;flex-wrap:nowrap;justify-content:flex-end;gap:4px}
@media(max-width:780px){.driver-billing-table-wrap{overflow-x:auto}.driver-billing-table{min-width:1040px;max-width:none;table-layout:auto}.driver-billing-table .driver-billing-reason-cell{width:300px;max-width:300px}.driver-billing-table .driver-billing-reason-cell .operation-reason-ellipsis{max-width:300px}.driver-billing-table .driver-billing-actions-cell{width:94px;min-width:94px;max-width:94px}}

/* Desktop tables: ordinary read-only tables fit their card; intentionally wide
   and editable grids retain the existing horizontal-scroll behaviour. */
@media(min-width:781px){
  .table-wrap.is-desktop-fit-table{width:100%;max-width:100%;overflow-x:hidden}
  .table-wrap.is-desktop-fit-table .crm-desktop-fit-table{width:100%;max-width:100%;table-layout:fixed}
  .crm-desktop-fit-table>thead>tr>th,
  .crm-desktop-fit-table>tbody>tr>td{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal}
  .crm-desktop-fit-table .cell-amount,
  .crm-desktop-fit-table .cell-number,
  .crm-desktop-fit-table .number-cell,
  .crm-desktop-fit-table td[data-number]{white-space:nowrap;overflow-wrap:normal}
  .crm-desktop-fit-table:not(.driver-billing-table) .list-table-actions{width:112px;min-width:0;max-width:112px;white-space:nowrap}
  .crm-desktop-fit-table:not(.driver-billing-table) .list-table-actions .quick-actions{min-width:0;flex-wrap:wrap;justify-content:flex-end}
}

/* Vehicle card: compact service columns, one flexible work-description column. */
.vehicle-maintenance-table{width:100%;table-layout:fixed}
.vehicle-maintenance-col-date{width:116px}
.vehicle-maintenance-col-type{width:138px}
.vehicle-maintenance-col-mileage{width:96px}
.vehicle-maintenance-col-expense{width:190px}
.vehicle-maintenance-col-amount{width:104px}
.vehicle-maintenance-col-files{width:82px}
.vehicle-maintenance-table .vehicle-maintenance-description-cell{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.vehicle-maintenance-table .vehicle-maintenance-description-cell .cell-secondary{white-space:normal;overflow-wrap:anywhere}
.vehicle-maintenance-table .vehicle-maintenance-files-cell .quick-actions{min-width:0}
@media(max-width:780px){.vehicle-maintenance-table{min-width:980px;table-layout:auto}.vehicle-maintenance-table col{width:auto}.vehicle-maintenance-table .vehicle-maintenance-description-cell{min-width:280px}}

/* Затраты парка и кассовый отчёт. */
.finance-list-filter,
.cash-report-filter {
  width:100%;
  margin:0;
  flex-wrap:wrap;
}
.finance-list-filter input[type="search"],
.cash-report-filter input[type="search"] { flex:1 1 280px; min-width:220px; }
.finance-list-filter input[type="date"],
.cash-report-filter input[type="date"] { flex:0 0 160px; width:160px; }
.finance-list-filter select,
.cash-report-filter select,
.cash-report-filter .cash-report-actual-input{ flex:0 1 190px; width:190px; }
.cash-report-summary { grid-template-columns:repeat(6,minmax(0,1fr)); }
.cash-report-combined-summary { margin-bottom:12px; }
tr.is-voided-row td { color:#8a96a3; }
tr.is-voided-row .cell-primary,
tr.is-voided-row .cell-secondary { color:#8a96a3 !important; }
@media(max-width:1180px) {
  .cash-report-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .cash-report-summary .report-summary-item:nth-child(3) { border-right:0; }
  .cash-report-summary .report-summary-item:nth-child(n/**/+4) { border-top:1px solid var(--border); }
}
@media(max-width:780px) {
  .finance-list-filter input[type="search"],
  .finance-list-filter input[type="date"],
  .finance-list-filter select,
  .cash-report-filter input[type="search"],
  .cash-report-filter input[type="date"],
  .cash-report-filter select,
  .cash-report-filter .cash-report-actual-input { flex:1 1 100%; width:100%; min-width:0; }
  .cash-report-summary { grid-template-columns:1fr; }
  .cash-report-summary .report-summary-item { border-right:0; border-top:1px solid var(--border); }
  .cash-report-summary .report-summary-item:first-child { border-top:0; }
}


/* Story form: show the current driver photo immediately in a fixed square preview. */
.story-author-photo-preview{width:180px;height:180px;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:#f7f9fc}
.story-author-photo-preview img{display:block;width:100%;height:100%;object-fit:cover}
@media(max-width:560px){.story-author-photo-preview{width:150px;height:150px}}


/* Контроль платежей */
.inline-form{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0}.inline-form input{width:auto;min-width:108px;max-width:150px;padding:7px 9px}.inline-form input[type=date]{min-width:138px}.inline-form .quick-action{flex:0 0 auto}.inline-form button.entity-link{border:0;background:transparent;padding:0;color:var(--accent);font:inherit;cursor:pointer}.vehicle-status-overview a.vehicle-status-item{text-decoration:none;color:inherit}.vehicle-status-overview a.vehicle-status-item:hover{background:#f7f9fc}.panel+.panel{margin-top:15px}details summary.entity-link{cursor:pointer;margin-top:4px}.detail .detail-label{display:block;color:var(--muted);font-size:12px;font-weight:400}.detail .detail-value{display:block;margin-top:3px;color:var(--text);font-weight:700}@media(max-width:760px){.inline-form{min-width:260px}.vehicle-status-overview{grid-template-columns:1fr}.vehicle-status-item{border-right:0;border-top:1px solid var(--border)}.vehicle-status-item:first-child{border-top:0}}

/* Payment control: batch schedule editing with kopecks. */
.payment-schedule-page-heading{position:sticky;top:0;z-index:8;background:#fff;padding:6px 0;margin-top:-6px}
.payment-schedule-page-heading .page-heading-actions{margin-left:auto;justify-content:flex-end}
.payment-schedule-change-count{color:var(--muted);font-size:12px;white-space:nowrap}
.payment-schedule-date-input,.payment-schedule-amount-input{min-height:36px;border:1px solid #cfd7e0;border-radius:4px;background:#fff;color:var(--text);font:inherit;font-size:13px;padding:0 9px}
.payment-schedule-date-input{width:142px}
.payment-schedule-amount-input{width:150px;}
tr.is-schedule-changed{background:#fffaf0}
.payment-schedule-page-heading .quick-action.is-save-action{color:#2f66ad;border-color:#86a8d2;background:#edf4fd}
.payment-schedule-page-heading .quick-action.is-save-action:hover:not([disabled]){color:#245991;border-color:#6793c7;background:#e4effc}
@media(max-width:780px){.payment-schedule-page-heading{top:0}.payment-schedule-page-heading .page-heading-actions{justify-content:flex-end;flex-wrap:wrap}.payment-schedule-change-count{order:-1;width:100%;text-align:right}}


/* Payment control: grouped decimal inputs and compact totals. */
.payment-schedule-amount-input,
[data-payment-money-input]{
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.payment-schedule-amount-input{width:170px}
.payment-schedule-page-heading ~ .panel .vehicle-status-overview{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.payment-schedule-page-heading ~ .panel .vehicle-status-item{
  min-width:0;
  padding-left:12px;
  padding-right:12px;
}
.payment-schedule-page-heading ~ .panel .vehicle-status-count{
  min-width:0;
  font-size:24px;
  line-height:1.1;
  white-space:nowrap;
  letter-spacing:-.02em;
}
@media(max-width:1180px){
  .payment-schedule-page-heading ~ .panel .vehicle-status-count{font-size:21px}
}
@media(max-width:900px){
  .payment-schedule-page-heading ~ .panel .vehicle-status-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .payment-schedule-page-heading ~ .panel .vehicle-status-item:nth-child(2n){border-right:0}
  .payment-schedule-page-heading ~ .panel .vehicle-status-item:nth-child(n/**/+3){border-top:1px solid var(--border)}
}
@media(max-width:560px){
  .payment-schedule-page-heading ~ .panel .vehicle-status-overview{grid-template-columns:1fr}
  .payment-schedule-page-heading ~ .panel .vehicle-status-item{border-right:0;border-top:1px solid var(--border)}
  .payment-schedule-page-heading ~ .panel .vehicle-status-item:first-child{border-top:0}
  .payment-schedule-page-heading ~ .panel .vehicle-status-count{font-size:20px}
}


/* Payment control summary cards: large amounts remain on one line. */
.payment-control-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
.payment-control-summary .vehicle-status-item{min-width:0;gap:6px;padding:10px 11px;overflow:hidden}
.payment-control-summary .vehicle-status-name{min-width:0;font-size:12px;line-height:1.25}
.payment-control-summary .vehicle-status-count{flex:0 0 auto;max-width:100%;font-size:clamp(16px,1.45vw,22px);line-height:1.1;letter-spacing:-.025em;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:1050px){
  .payment-control-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .payment-control-summary .vehicle-status-item:nth-child(2n){border-right:0!important}
  .payment-control-summary .vehicle-status-item:nth-child(n/**/+3){border-top:1px solid var(--border)}
  .payment-control-summary .vehicle-status-count{font-size:19px}
}
@media(max-width:560px){
  .payment-control-summary{grid-template-columns:1fr}
  .payment-control-summary .vehicle-status-item{border-right:0!important;border-top:1px solid var(--border)}
  .payment-control-summary .vehicle-status-item:first-child{border-top:0}
  .payment-control-summary .vehicle-status-count{font-size:18px}
}

/* Telegram and notification attachments. */
.notification-attachments{display:grid;gap:5px;margin-top:7px}
.notification-attachment{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 9px;font-size:12px;line-height:1.35}
.notification-attachment a{color:var(--accent);font-weight:600;text-decoration:none;overflow-wrap:anywhere}
.notification-attachment a:hover{text-decoration:underline}
.notification-attachment span{color:var(--muted)}
.telegram-bubble .notification-attachments{margin-top:8px;padding-top:7px;border-top:1px solid rgba(89,105,125,.18)}


/* Штрафы: полноширинный реестр с основными данными и компактными действиями. */
.fines-table {
  width: 100%;
  min-width: 1120px;
  max-width: none;
  table-layout: fixed;
}
.fines-table th,
.fines-table td { vertical-align: middle; }
.fines-table th:nth-child(1),
.fines-table td:nth-child(1) { width: 48px; min-width: 48px; }
.fines-table th:nth-child(2),
.fines-table td:nth-child(2) { width: 18%; }
.fines-table th:nth-child(3),
.fines-table td:nth-child(3),
.fines-table th:nth-child(4),
.fines-table td:nth-child(4){ width: 11%; }
.fines-table th:nth-child(5),
.fines-table td:nth-child(5) { width: 9%; }
.fines-table th:nth-child(6),
.fines-table td:nth-child(6),
.fines-table th:nth-child(7),
.fines-table td:nth-child(7){ width: 13%; }
.fines-table th:nth-child(8),
.fines-table td:nth-child(8) { width: 11%; }
.fines-table th:nth-child(9),
.fines-table td:nth-child(9) { width: 150px; min-width: 150px; max-width: 150px; }
.fines-table .fine-driver-cell,
.fines-table .fine-park-cell,
.fines-table .fine-owner-cell,
.fines-table .fine-vehicle-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fines-table .fine-date-cell {
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.fines-table .fine-date-line {
  display: block;
  font: inherit;
  line-height: inherit;
}
.fines-table .fine-money-column,
.fines-table .fine-money-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fines-table .fine-actions-cell { overflow: visible; }
.fines-table .fine-actions-cell .quick-actions { min-width: 0; justify-content: flex-end; flex-wrap: nowrap; }
.fines-table .fine-duplicate-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .fines-table { min-width: 1120px; }
}



/* 2026-07-23: notification filters. */
.notifications-date-filter{flex:0 0 148px;width:148px}
.driver-notification-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;margin-left:auto}
.driver-notification-filters{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin:0 0 0 auto;min-width:0}
.driver-notification-filters input[type="date"]{width:142px;min-height:34px}
.driver-notification-auto-toggle{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 9px;border:1px solid #cfd7e0;border-radius:4px;background:#fff;color:var(--text);font-size:12px;white-space:nowrap;cursor:pointer}
.driver-notification-auto-toggle input{margin:0}
@media(max-width:980px){
  .driver-notification-header{align-items:flex-start;flex-direction:column}
  .driver-notification-header-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}
  .driver-notification-filters{flex:1;flex-wrap:wrap}
}
@media(max-width:700px){
  .driver-notification-filters input[type="date"]{flex:1 1 135px;width:auto}
  .driver-notification-auto-toggle{flex:1 1 auto;justify-content:center}
}

/* 2026-07-24: compact maintenance form and one-time browser imports. */
.browser-import-action[disabled]{opacity:.45;cursor:wait}.browser-import-status{display:flex;align-items:center;gap:8px}.browser-import-status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;opacity:.65}.browser-import-status.is-running::before{animation:browser-import-pulse 1s ease-in-out infinite}@keyframes browser-import-pulse{0%,100%{transform:scale(.75);opacity:.35}50%{transform:scale(1);opacity:1}}


/* Files: explicit site import actions and cross-park entity links. */
.entity-switch-form{display:inline;margin:0}
.entity-link-button{display:inline;padding:0;border:0;background:transparent;color:#2f66ad;font:inherit;font-weight:400;cursor:pointer;text-align:left}
.entity-link-button:hover{text-decoration:underline}
.entity-link-button:focus-visible{outline:2px solid #8fb1e3;outline-offset:2px;border-radius:2px}

/* Inline manual Yandex operations in the driver card. */
.yandex-inline-operation-form{display:grid;grid-template-columns:minmax(150px,210px) minmax(0,1fr);align-items:end;gap:10px;padding:12px 14px;border-top:1px solid var(--border)}
.yandex-inline-operation-amount{margin:0}.yandex-inline-operation-amount>span{margin-bottom:5px;font-size:12px;font-weight:600;color:var(--muted)}
.yandex-inline-operation-amount input{min-height:36px;padding:0 10px;font-size:14px;text-align:right}
.yandex-inline-operation-buttons{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0;flex-wrap:nowrap}
.yandex-inline-action{width:36px;height:36px;flex:0 0 36px;border-radius:50%}
.yandex-inline-action svg{width:18px;height:18px}
.yandex-inline-action--withdraw{color:#2f66ad;border-color:#86a8d2;background:#edf4fd}
.yandex-inline-action--withdraw:hover:not([disabled]){color:#245991;border-color:#6793c7;background:#e4effc}
.yandex-inline-action--topup{color:#2d7a55;border-color:#9cc8af;background:#f5fbf7}
.yandex-inline-action--topup:hover:not([disabled]){color:#216645;border-color:#70ad8a;background:#edf8f0}
.yandex-inline-action.is-disabled,.yandex-inline-action[disabled]{opacity:.45;cursor:not-allowed;filter:none}
@media(max-width:620px){.yandex-inline-operation-form{grid-template-columns:1fr}.yandex-inline-operation-buttons{justify-content:flex-start}}

/* Live state of a manual Yandex balance operation. */
.yandex-inline-operation-status{grid-column:1/-1;min-height:18px;font-size:12px;line-height:1.4;color:var(--muted)}
.yandex-inline-operation-status.is-pending{color:#8a5a12}
.yandex-inline-operation-status.is-success{color:#247342}
.yandex-inline-operation-status.is-error{color:#a33434}
.yandex-inline-action.is-loading svg{animation:yandex-inline-action-spin .7s linear infinite}
@keyframes yandex-inline-action-spin{to{transform:rotate(360deg)}}

/* Unified CRM checkboxes and Yandex withdrawal status (2026-07-26). */
input[type="checkbox"]:not([hidden]){
  -webkit-appearance:none;
  appearance:none;
  display:inline-grid;
  place-content:center;
  flex:0 0 22px;
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  min-height:22px!important;
  max-width:22px!important;
  padding:0!important;
  margin:0;
  border:1px solid #aebaca!important;
  border-radius:5px!important;
  background:#fff!important;
  box-shadow:none!important;
  vertical-align:middle;
  cursor:pointer;
  transition:border-color .14s ease,background-color .14s ease,box-shadow .14s ease;
}
input[type="checkbox"]:not([hidden])::before{
  content:"";
  width:10px;
  height:6px;
  border-left:2px solid #3f6fae;
  border-bottom:2px solid #3f6fae;
  transform:rotate(-45deg) scale(0);
  transform-origin:center;
  margin-top:-2px;
  transition:transform .1s ease;
}
input[type="checkbox"]:not([hidden]):checked{
  border-color:#7897c1!important;
  background:#f1f6fc!important;
}
input[type="checkbox"]:not([hidden]):checked::before{transform:rotate(-45deg) scale(1)}
input[type="checkbox"]:not([hidden]):indeterminate{border-color:#7897c1!important;background:#f1f6fc!important}
input[type="checkbox"]:not([hidden]):indeterminate::before{width:10px;height:0;border:0;border-top:2px solid #3f6fae;transform:none;margin:0}
input[type="checkbox"]:not([hidden]):focus-visible{
  outline:2px solid rgba(63,111,174,.18);
  outline-offset:2px;
}
input[type="checkbox"]:not([hidden]):disabled{
  border-color:#d4dbe4!important;
  background:#f3f5f7!important;
  cursor:not-allowed;
  opacity:.72;
}
input[type="checkbox"]:not([hidden]):disabled::before{border-color:#9aa7b5}
.form-checkbox{gap:9px}
.assignment-row input[type="checkbox"], .permission-list input[type="checkbox"]{width:22px!important;height:22px!important;min-height:22px!important}

.yandex-withdrawal-rule-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 15px;border-top:1px solid var(--border)}
.yandex-withdrawal-rule-form{margin:0}
.yandex-withdrawal-rule-form .form-checkbox{font-size:13px;font-weight:600!important}
.driver-withdrawal-status{width:1%;text-align:center;font-weight:700}
.driver-withdrawal-status span{display:inline-flex;align-items:center;justify-content:center;width:24px;min-width:24px;height:24px;padding:0;font-size:15px;line-height:1;border:1px solid transparent;border-radius:50%}
.driver-yandex-status{width:1%;text-align:center;font-weight:700}
.driver-yandex-status span{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 5px;font-size:15px;line-height:1;border:1px solid transparent;border-radius:999px}
.driver-yandex-status.is-connected span{border-color:#b9dfc6;background:#f2faf5;color:#287247}
.driver-yandex-status.is-warning span{border-color:#ead39d;background:#fff8e8;color:#9a6500}
.driver-yandex-status.is-disconnected span{border-color:#efc5c5;background:#fff1f1;color:#b33b3b}
.driver-withdrawal-status.is-allowed span{border-color:#b9dfc6;background:#f2faf5;color:#287247}
.driver-withdrawal-status.is-blocked span{border-color:#efc5c5;background:#fff1f1;color:#b33b3b}
.driver-withdrawal-status.is-exempt span{border-color:#ead7a0;background:#fff9e8;color:#8a6500}
.driver-withdrawal-status.is-pending span{border-color:#bdd2ef;background:#eef5ff;color:#386fb2}





@media(max-width:720px){
  .yandex-withdrawal-rule-row{align-items:flex-start;flex-direction:column;gap:10px}
}

/* Binary permissions use the same approved CRM checkbox in employee and role forms. */
.permission-override-list .permission-check-row{
  display:flex;
  grid-template-columns:none;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:34px;
  font-size:13px;
  cursor:pointer;
}
.permission-override-list .permission-check-row>span{min-width:0}
.permission-override-list .permission-check-row>input[type="checkbox"]{flex:0 0 22px}
@media(max-width:760px){
  .permission-override-list .permission-check-row{display:flex;flex-direction:row;align-items:center}
}











/* Driver UI consolidation: compact fields, explicit actions and consistent feedback. */
.crm-icon-button,
.quick-action,
.mini-action,
.form-action-icon,
.field-icon-button,
.list-add-action,
.modal-control-action{
  transition:background-color .12s ease,border-color .12s ease,color .12s ease,transform .08s ease;
}
.crm-icon-button:active:not([disabled]):not(.is-disabled),
.quick-action:active:not([disabled]):not(.is-disabled),
.mini-action:active:not([disabled]):not(.is-disabled),
.form-action-icon:active:not([disabled]):not(.is-disabled),
.field-icon-button:active:not([disabled]):not(.is-disabled),
.list-add-action:active:not([disabled]):not(.is-disabled),
.modal-control-action:active:not([disabled]):not(.is-disabled),
.crm-icon-button.is-pressed,
.quick-action.is-pressed,
.mini-action.is-pressed,
.form-action-icon.is-pressed,
.field-icon-button.is-pressed,
.list-add-action.is-pressed,
.modal-control-action.is-pressed,
.crm-icon-button.is-active,
.quick-action.is-active{
  border-color:#9bb8de!important;
  background:#e8f1fc!important;
  color:#285f9f!important;
}
.crm-icon-button:active:not([disabled]):not(.is-disabled),
.quick-action:active:not([disabled]):not(.is-disabled),
.crm-icon-button.is-pressed,
.quick-action.is-pressed{transform:translateY(1px)}

.excel-action:hover:not([disabled]),
.excel-action.is-pressed{
  border-color:#8fa8c7!important;
  background:#f5f8fc!important;
  color:#2f66ad!important;
}
.excel-action svg{stroke-width:1.8!important}

.drivers-table .quick-action.is-document svg{stroke-width:1.8}
.drivers-table .quick-action.is-document:first-child{color:#486a9a}
.drivers-table .quick-action.is-document:nth-child(2){color:#29736b}
.operation-edit-action{color:#356fae}
.operation-void-action{color:#b34a4a}
.filter-apply-action{border-color:#a9bfdb!important;background:#f5f8fc!important;color:#326aa8!important}
[data-document-upload]{border-color:#b4c8e2!important;background:#f4f8fd!important;color:#326cae!important}
[data-document-capture-open],
[data-document-capture]{border-color:#c8bde3!important;background:#f8f5fd!important;color:#6950a0!important}
.quick-action.is-document{border-color:#b9d4c4!important;background:#f5faf7!important;color:#28734b!important}
.quick-action.is-danger{border-color:#e0b8b8!important;background:#fff7f7!important;color:#ad4141!important}

.entity-form--driver .field input,
.entity-form--driver .field select{
  min-height:36px!important;
  height:36px;
  padding:0 10px!important;
  font-size:14px!important;
}
.entity-form--driver .field textarea{
  min-height:68px!important;
  padding:8px 10px!important;
  font-size:14px!important;
}
.entity-form--driver .field>span{
  margin-bottom:4px;
  font-size:12px;
}
.entity-form--driver .entity-form-grid{gap:10px 12px}
.entity-form--driver .entity-form-section{padding-top:13px;padding-bottom:13px}
.entity-form--driver .entity-form-section>h2{margin-bottom:11px}

.driver-tab-panel[data-driver-panel="notifications"] .telegram-chat-panel{
  height:var(--driver-notification-chat-height,min(620px,calc(100dvh - 320px)));
  min-height:420px;
  max-height:none;
  overflow:hidden;
}
.driver-tab-panel[data-driver-panel="notifications"] .telegram-chat-thread{
  flex:1 1 auto;
  min-height:260px;
  max-height:none;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:12px;
  background:#fafbfd;
}
.driver-tab-panel[data-driver-panel="notifications"] .telegram-bubble{
  max-width:min(68%,680px);
  border-radius:5px;
  box-shadow:none;
}
.driver-tab-panel[data-driver-panel="notifications"] .telegram-bubble.is-incoming{
  border-color:var(--border);
  background:#fff;
}
.driver-tab-panel[data-driver-panel="notifications"] .telegram-bubble.is-outgoing{
  border-color:#cbdcf1;
  background:#edf4fc;
}
.driver-tab-panel[data-driver-panel="notifications"] .telegram-service-line{
  border-radius:4px;
  background:#eef1f5;
}
.driver-tab-panel[data-driver-panel="notifications"] .telegram-compose{
  padding:10px 12px;
  background:#fff;
}
.driver-tab-panel[data-driver-panel="notifications"] .message-editor-body{
  min-height:54px;
}

@media(max-width:720px){
  .entity-form--driver .field input,
  .entity-form--driver .field select{height:38px;min-height:38px!important}
  .driver-tab-panel[data-driver-panel="notifications"] .telegram-bubble{max-width:92%}
}

.yandex-driver-panel{display:flex;max-width:none;flex-direction:column}
.yandex-driver-panel .quick-actions form{margin:0}
.yandex-driver-panel .quick-action{flex:0 0 28px;min-width:28px;max-width:28px}
.yandex-finance-compact{order:1;width:calc(50% - 21px);margin:12px 14px 0;border:1px solid var(--border);border-radius:5px;overflow:hidden;background:#fff}
.yandex-finance-compact .yandex-balance-item{min-height:58px;padding:9px 12px}
.yandex-finance-compact .yandex-withdrawal-rule-row{padding:9px 12px}
.yandex-finance-compact .yandex-inline-operation-form{padding:9px 12px}
.yandex-profile-mapping{order:2;width:calc(100% - 28px);margin:12px 14px 14px;border:1px solid var(--border);border-radius:5px;overflow:hidden;background:#fff}
.yandex-profile-mapping-header>div:first-child{display:grid;gap:3px;min-width:0}
.yandex-profile-mapping-header small{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.yandex-profile-mapping-table{table-layout:fixed}
.yandex-profile-mapping-table th:nth-child(1){width:22%}
.yandex-profile-mapping-table th:nth-child(2),
.yandex-profile-mapping-table th:nth-child(3){width:29%}
.yandex-profile-mapping-table th:nth-child(4){width:86px;text-align:center}
.yandex-profile-mapping-table th:last-child{width:96px}
.yandex-profile-mapping-table td{white-space:normal;word-break:break-word}
.yandex-profile-mapping-table td:first-child strong{display:block}
.yandex-profile-mapping-actions{text-align:center}
.yandex-profile-mapping-actions .quick-action{display:inline-grid;margin-left:4px}
.yandex-profile-match{text-align:center}
.yandex-profile-match.is-neutral span{width:24px;min-width:24px;padding:0;border-color:#d8dee7;background:#f7f8fa;color:#7b8794}
.yandex-profile-error-modal .crm-modal-card{width:min(520px,calc(100vw - 32px))}

@media(max-width:720px){
  .yandex-finance-compact,.yandex-profile-mapping{width:calc(100% - 20px);margin:10px}
  .yandex-profile-mapping-table{min-width:760px}
}

/* 2026-07-29: unified dense cards, contextual actions and long-form ergonomics. */
.contract-document-menu{position:relative;display:inline-flex}
.contract-document-menu>summary{list-style:none}
.contract-document-menu>summary::-webkit-details-marker{display:none}
.contract-document-menu[open]>summary{color:#245991;border-color:#6793c7;background:#e4effc}
.contract-document-menu-popover{position:fixed;z-index:240;display:grid;width:230px;overflow:hidden;border:1px solid #d6dee8;border-radius:6px;background:#fff;box-shadow:0 12px 30px rgba(31,49,72,.2)}
.contract-document-menu-item{display:block;min-height:38px;padding:10px 12px;border-bottom:1px solid #edf0f4;color:var(--text);font-size:13px;line-height:18px;text-align:left;white-space:normal}
.contract-document-menu-item:last-child{border-bottom:0}
.contract-document-menu-item:hover{background:#f4f7fb;color:#2f66ad}
.contract-document-menu-item svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.driver-summary{display:inline-grid;grid-template-columns:repeat(3,minmax(135px,180px));width:auto;max-width:100%;margin:0 0 10px}
.driver-summary-item{min-height:52px;padding:8px 12px}
.driver-summary-item strong{margin-top:2px;font-size:16px}
.vehicle-live-summary{grid-template-columns:minmax(150px,220px) minmax(360px,620px);gap:8px;width:max-content;max-width:100%;margin-bottom:10px}
.vehicle-live-card{min-height:70px;padding:9px 12px}
.vehicle-live-card small{line-height:15px}
.vehicle-live-actions{margin-top:2px}

.section-tabs{margin-bottom:10px}

.crm-floating-table-header{position:fixed;z-index:165;top:0;overflow:hidden;border:1px solid var(--border);border-top:0;background:#fafbfd;box-shadow:0 4px 12px rgba(31,49,72,.12)}
.crm-floating-table-header[hidden]{display:none}
.crm-floating-table-header-viewport{width:100%;overflow:hidden}
.crm-floating-table-header table{margin:0;table-layout:fixed;transition:none}
.crm-floating-table-header thead th{box-sizing:border-box;background:#fafbfd;white-space:nowrap}
.crm-floating-table-header table{will-change:transform}

.entity-form-actions.is-sticky-save-bar{position:sticky!important;top:0;z-index:12;box-shadow:0 2px 7px rgba(31,49,72,.08)}
.entity-form-actions.is-sticky-save-bar .quick-action[disabled]{opacity:.32;filter:grayscale(1);cursor:default}
.entity-form.is-dirty .entity-form-actions.is-sticky-save-bar{background:#f8fbff!important}

@media(max-width:780px){
  .driver-summary{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));width:100%}
  .vehicle-live-summary{grid-template-columns:1fr;width:100%}
  .contract-document-menu-popover{width:min(230px,calc(100vw - 16px))}
  .table-wrap.is-responsive-wide-table{position:relative;overflow-x:auto;overflow-y:visible;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
  .table-wrap.is-responsive-wide-table>.crm-responsive-table,
  .table-wrap.is-responsive-wide-table .crm-responsive-table{width:max-content!important;min-width:max(100%,860px)!important}
  .table-wrap.is-responsive-wide-table .crm-responsive-table>thead>tr>th,
  .table-wrap.is-responsive-wide-table .crm-responsive-table>tbody>tr>td{display:table-cell!important}
  .table-wrap.is-responsive-wide-table .crm-responsive-table [hidden]{display:none!important}
  .table-wrap.is-responsive-wide-table.has-horizontal-overflow:not(.has-been-scrolled)::after{content:attr(data-scroll-hint);position:sticky;z-index:8;right:8px;bottom:8px;float:right;margin:-34px 8px 8px 0;padding:5px 8px;border-radius:12px;background:rgba(39,52,68,.86);color:#fff;font-size:11px;line-height:16px;pointer-events:none}
}
@media(max-width:560px){
  .driver-summary{grid-template-columns:1fr}
}

/* 2026-07-29: final component rules. Keep list/card navigation and action
   controls identical across registers, cards and finance pages. */
.contract-document-menu-popover { z-index:10020; }

/* One visual contract for every icon-only action. Semantic color is expressed
   by state classes, while size, geometry and interaction stay shared. */
:where(a,button,label,summary).crm-icon-button,
:where(a,button,label,summary).quick-action,
:where(a,button,label,summary).mini-action,
:where(a,button,label,summary).form-action-icon,
:where(a,button,label,summary).field-icon-button,
:where(a,button,label,summary).list-add-action,
:where(a,button,label,summary).modal-control-action {
  display:inline-grid !important;
  place-items:center !important;
  box-sizing:border-box !important;
  flex:0 0 28px !important;
  width:28px !important;
  min-width:28px !important;
  max-width:28px !important;
  height:28px !important;
  min-height:28px !important;
  max-height:28px !important;
  padding:0 !important;
  border:1px solid #cfd9e5 !important;
  border-radius:50% !important;
  line-height:1 !important;
  text-decoration:none !important;
  cursor:pointer;
}
:where(a,button,label,summary).crm-icon-button:hover:not([disabled]),
:where(a,button,label,summary).quick-action:hover:not([disabled]),
:where(a,button,label,summary).mini-action:hover:not([disabled]),
:where(a,button,label,summary).form-action-icon:hover:not([disabled]),
:where(a,button,label,summary).field-icon-button:hover:not([disabled]),
:where(a,button,label,summary).list-add-action:hover:not([disabled]),
:where(a,button,label,summary).modal-control-action:hover:not([disabled]),
:where(a,button,label,summary).crm-icon-button.is-active,
:where(a,button,label,summary).quick-action.is-active {
  border-color:#86a8d2 !important;
  background:#edf4fd !important;
  color:#245991 !important;
}
:where(a,button,label,summary).crm-icon-button:active:not([disabled]),
:where(a,button,label,summary).quick-action:active:not([disabled]),
:where(a,button,label,summary).mini-action:active:not([disabled]),
:where(a,button,label,summary).form-action-icon:active:not([disabled]),
:where(a,button,label,summary).field-icon-button:active:not([disabled]) {
  border-color:#7099cb !important;
  background:#dfeafa !important;
}
:where(a,button,label,summary).crm-icon-button > svg,
:where(a,button,label,summary).quick-action > svg,
:where(a,button,label,summary).mini-action > svg,
:where(a,button,label,summary).form-action-icon > svg,
:where(a,button,label,summary).field-icon-button > svg,
:where(a,button,label,summary).list-add-action > svg,
:where(a,button,label,summary).modal-control-action > svg {
  width:19px !important;
  height:19px !important;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.excel-action {
  border-color:#d5dce4 !important;
  color:#5d6875 !important;
}
.is-danger.crm-icon-button,
.is-danger.quick-action,
.crm-icon-button.is-danger,
.quick-action.is-danger {
  border-color:#e4bbbb !important;
  background:#fff6f6 !important;
  color:#a93f3f !important;
}
.crm-process-board[hidden] { display:none !important; }

/* 2026-07-29: one compact contract for register tabs and summary strips. */
.section-tabs .section-tab,
.payment-control-tabs .section-tab,
.driver-tabs .section-tab,
.vehicle-tabs .section-tab,
.integration-tabs .section-tab,
.cash-report-tabs .section-tab {
  min-height:34px !important;
  padding:0 9px !important;
  font-size:12px !important;
}
.vehicle-status-overview .vehicle-status-item,
.payment-control-summary .vehicle-status-item {
  min-height:36px !important;
  padding:5px 10px !important;
}
.vehicle-status-overview .vehicle-status-count,
.payment-control-summary .vehicle-status-count,
.section-tab-count {
  font-size:15px !important;
}
.cash-report-opening-hint {
  margin:5px 0 7px;
  font-size:11px;
  line-height:1.3;
}
.cash-report-operations-table {
  table-layout:fixed;
  min-width:880px;
}
.cash-report-operations-table .cash-report-col-date { width:135px; }
.cash-report-operations-table .cash-report-col-source { width:255px; }
.cash-report-operations-table .cash-report-col-reason { width:auto; }
.cash-report-operations-table .cash-report-col-method { width:180px; }
.cash-report-operations-table .cash-report-col-amount { width:105px; }
.cash-report-operations-table th,
.cash-report-operations-table td {
  padding-top:8px;
  padding-bottom:8px;
}
.cash-report-operations-table td:nth-child(2),
.cash-report-operations-table td:nth-child(3),
.cash-report-operations-table td:nth-child(4) {
  overflow:hidden;
  text-overflow:ellipsis;
}
.cash-report-operations-table tr[data-tooltip] { cursor:help; }

/* First scoped form-refactor stage: manual transaction, fine and profile tabs only. */
.visual-refactor-form,
.entity-form--driver,
.entity-form--vehicle.visual-refactor-profile {
  margin-left:0;
  margin-right:auto;
}
.manual-operation-form,
.balance-operation-edit-form { width:100%; max-width:840px; }
.fine-compact-form { width:100%; max-width:1050px; }
.visual-form-header,
.form-panel.entity-form .entity-form-actions.visual-form-header,
.entity-form.form-panel .entity-form-actions.visual-form-header {
  display:flex;
  align-items:center;
  justify-content:space-between!important;
  gap:14px;
  min-height:52px!important;
  padding:8px 14px!important;
  border-top:0!important;
  border-bottom:1px solid var(--toolbar-border)!important;
  background:var(--toolbar-bg)!important;
  box-sizing:border-box;
}
.visual-form-header>h2 {
  min-width:0;
  margin:0;
  font-size:17px;
  line-height:24px;
  font-weight:700;
  color:var(--text);
}
.visual-form-header-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
}
.visual-form-header>.form-actions,
.visual-form-header .visual-form-header-actions.form-actions {
  padding:0;
  border:0;
  background:transparent;
}
.semantic-form-grid,
.form-panel.entity-form .driver-semantic-grid,
.form-panel.entity-form .vehicle-semantic-grid {
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
.semantic-form-grid>.form-full { grid-column:1 / -1; }
.semantic-form-grid>.field-span-1,
.driver-semantic-grid>.field-span-1,
.vehicle-semantic-grid>.field-span-1 { grid-column:span 1; }
.semantic-form-grid>.field-span-2,
.driver-semantic-grid>.field-span-2,
.vehicle-semantic-grid>.field-span-2 { grid-column:span 2; }
.semantic-form-grid>.field-span-3,
.driver-semantic-grid>.field-span-3,
.vehicle-semantic-grid>.field-span-3 { grid-column:span 3; }
.semantic-form-grid>.field-span-4,
.driver-semantic-grid>.field-span-4,
.vehicle-semantic-grid>.field-span-4 { grid-column:span 4; }
.semantic-form-grid>.field-span-5,
.driver-semantic-grid>.field-span-5,
.vehicle-semantic-grid>.field-span-5 { grid-column:span 5; }
.semantic-form-grid>.field-span-6,
.driver-semantic-grid>.field-span-6,
.vehicle-semantic-grid>.field-span-6 { grid-column:span 6; }
.semantic-form-grid>.field-span-7,
.driver-semantic-grid>.field-span-7,
.vehicle-semantic-grid>.field-span-7 { grid-column:span 7; }
.semantic-form-grid>.field-span-8,
.driver-semantic-grid>.field-span-8,
.vehicle-semantic-grid>.field-span-8 { grid-column:span 8; }
.semantic-form-grid>.field-span-9,
.driver-semantic-grid>.field-span-9,
.vehicle-semantic-grid>.field-span-9 { grid-column:span 9; }
.semantic-form-grid>.field-span-10,
.driver-semantic-grid>.field-span-10,
.vehicle-semantic-grid>.field-span-10 { grid-column:span 10; }
.semantic-form-grid>.field-span-11,
.driver-semantic-grid>.field-span-11,
.vehicle-semantic-grid>.field-span-11 { grid-column:span 11; }
.semantic-form-grid>.field-span-12,
.driver-semantic-grid>.field-span-12,
.vehicle-semantic-grid>.field-span-12 { grid-column:span 12; }
.semantic-form-grid>*,
.driver-semantic-grid>*,
.vehicle-semantic-grid>* { min-width:0; }
.manual-operation-form .semantic-form-grid,
.fine-compact-form .semantic-form-grid { padding:14px; }
.manual-operation-form .payment-operation-field,
.manual-operation-form .payment-amount-field { width:100%; }
.manual-operation-form textarea { min-height:72px; }
.balance-operation-edit-form .entity-form { padding:0; }
.balance-operation-edit-form .balance-operation-readonly-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  padding:12px 14px;
}
.balance-operation-edit-form .balance-operation-readonly-grid>div {
  min-width:0;
  padding:7px 10px;
}
.balance-operation-edit-form .entity-form-section { padding:12px 14px 14px; }
.balance-operation-edit-form .balance-operation-fields { padding:0; }
.balance-operation-edit-form .balance-operation-amount-field { min-width:160px; max-width:200px; }
.balance-operation-edit-form textarea { min-height:72px; }
.fine-file-row {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:32px;
  padding:0 2px 8px;
  color:var(--muted);
  font-size:12px;
}
.fine-file-row strong {
  min-width:0;
  overflow:hidden;
  color:var(--text);
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.entity-form--driver .driver-personal-fields {
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:10px 12px;
}
.entity-form--driver .driver-semantic-grid>.field>span { white-space:nowrap; }
.entity-form--driver .driver-personal-fields .driver-field-name { grid-column:span 4; }
.entity-form--driver .driver-personal-fields .driver-field-iin,
.entity-form--driver .driver-personal-fields .driver-field-date { grid-column:span 3; }

@media (max-width:980px) and (min-width:721px) {
  .semantic-form-grid,
  .form-panel.entity-form .driver-semantic-grid,
  .form-panel.entity-form .vehicle-semantic-grid {
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
  .semantic-form-grid>.field-span-7,
  .semantic-form-grid>.field-span-8,
  .semantic-form-grid>.field-span-9,
  .semantic-form-grid>.field-span-10,
  .semantic-form-grid>.field-span-11,
  .semantic-form-grid>.field-span-12,
  .driver-semantic-grid>.field-span-7,
  .driver-semantic-grid>.field-span-8,
  .driver-semantic-grid>.field-span-9,
  .driver-semantic-grid>.field-span-10,
  .driver-semantic-grid>.field-span-11,
  .driver-semantic-grid>.field-span-12,
  .vehicle-semantic-grid>.field-span-7,
  .vehicle-semantic-grid>.field-span-8,
  .vehicle-semantic-grid>.field-span-9,
  .vehicle-semantic-grid>.field-span-10,
  .vehicle-semantic-grid>.field-span-11,
  .vehicle-semantic-grid>.field-span-12,
  .entity-form--driver .driver-personal-fields .driver-field-name,
  .entity-form--driver .driver-personal-fields .driver-field-iin,
  .entity-form--driver .driver-personal-fields .driver-field-date{ grid-column:span 6; }
  .entity-form--driver .driver-semantic-grid>.field>span { white-space:normal; }
}
@media (max-width:720px) {
  .visual-form-header,
  .form-panel.entity-form .entity-form-actions.visual-form-header,
  .entity-form.form-panel .entity-form-actions.visual-form-header {
    min-height:48px!important;
    padding:7px 10px!important;
  }
  .visual-form-header>h2 { font-size:15px; }
  .semantic-form-grid,
  .form-panel.entity-form .driver-semantic-grid,
  .form-panel.entity-form .vehicle-semantic-grid,
  .entity-form--driver .driver-personal-fields {
    grid-template-columns:1fr!important;
  }
  .semantic-form-grid>* ,
  .driver-semantic-grid>* ,
  .vehicle-semantic-grid>* ,
  .entity-form--driver .driver-personal-fields>* {
    grid-column:1!important;
  }
  .entity-form--driver .driver-semantic-grid>.field>span { white-space:normal; }
  .balance-operation-edit-form .balance-operation-readonly-grid { grid-template-columns:1fr; }
  .balance-operation-edit-form .balance-operation-amount-field { min-width:0; max-width:none; }
  .manual-operation-form .semantic-form-grid,
  .fine-compact-form .semantic-form-grid { padding:12px 10px; }
  .fine-file-row { align-items:flex-start; flex-direction:column; gap:2px; }
}

/* === Rent accrual schedule and inline journal details 2026-08-01 === */
.rent-journal-row { scroll-margin-top:14px; }
.rent-journal-row.is-selected>td { background:#f5f8fc; }
.rent-journal-detail-row>td {
  padding:0!important;
  border-top:0!important;
  background:#f8fafc;
}
.rent-journal-detail {
  padding:12px 14px 14px;
  border-top:1px solid var(--accent);
  border-bottom:1px solid var(--border);
}
.rent-journal-detail-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.rent-journal-detail-header>div { min-width:0; }
.rent-journal-detail-header strong {
  display:inline;
  font-size:14px;
  font-weight:700!important;
}
.rent-journal-detail-header span {
  margin-left:6px;
  color:var(--muted);
  font-size:12px;
}
.rent-journal-detail-filter {
  display:flex;
  align-items:end;
  margin:0 0 10px;
}
.rent-journal-detail-filter .field { width:190px; }
.rent-journal-detail-filter .field>span {
  display:block;
  margin:0 0 5px;
  font-size:12px;
  font-weight:700;
}
.rent-journal-detail-filter select { min-height:36px; }
.rent-journal-detail-table {
  border:1px solid var(--border);
  border-radius:4px;
  background:#fff;
}
.rent-journal-detail-table table { margin:0; }
.rent-result-skipped { color:var(--accent); }
.rent-detail-link { font-variant-numeric:tabular-nums; }

@media (max-width:720px) {
  .rent-journal-detail { padding:10px; }
  .rent-journal-detail-header { align-items:flex-start; }
  .rent-journal-detail-header span { display:block; margin:2px 0 0; }
  .rent-journal-detail-filter .field { width:100%; }
}
.rent-run-error { margin:0 0 10px; }
.permission-readonly-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

[data-readonly-panel] .form-actions,
[data-readonly-panel] button[type="submit"] {
    display: none;
}

[data-readonly-panel] .quick-action {
    opacity: .45;
    pointer-events: none;
}

[data-readonly-panel] input:not([type="hidden"]),
[data-readonly-panel] select,
[data-readonly-panel] textarea {
    color: var(--text);
    background: #f4f6f8;
}

/* Настройки парка: существующие параметры разнесены по вкладкам. */
.park-settings-tabs {
  max-width:1180px;
  grid-auto-columns:minmax(110px, 1fr);
}
.park-settings-form,
.park-settings-panel {
  width:100%;
  max-width:1180px;
}
.park-settings-panel[hidden] {
  display:none !important;
}
.park-settings-panel .panel-header {
  min-height:45px;
  background:var(--toolbar-bg);
  border-bottom-color:var(--toolbar-border);
}
.park-settings-empty {
  display:grid;
  place-items:center;
  min-height:180px;
  padding:24px;
  color:var(--muted);
  font-size:13px;
  text-align:center;
}
@media(max-width:760px) {
  .park-settings-tabs {
    grid-auto-columns:minmax(105px, 1fr);
  }
}

.park-settings-provider-list {
  display:grid;
  gap:14px;
  padding:14px;
}
.park-settings-provider {
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:5px;
  background:#fff;
}
.park-settings-provider-heading {
  min-height:42px;
  display:flex;
  align-items:center;
  padding:0 14px;
  border-bottom:1px solid var(--border);
  background:#f7f9fc;
}
.park-settings-provider-heading h3 {
  margin:0;
  font-size:14px;
}
.park-settings-provider .form-grid {
  padding:14px;
}
.park-settings-provider .form-actions {
  margin:0;
  padding:0 14px 14px;
}
@media(max-width:760px) {
  .park-settings-provider-list,
  .park-settings-provider .form-grid{ padding:10px; }
  .park-settings-provider .form-actions { padding:0 10px 10px; }
}

/* Расписание и отдельные настройки уведомлений. */


.notification-settings-form,
.notification-settings-panel {
  width:100%;
  max-width:1180px;
}
.notification-settings-form + .notification-settings-form,
.notification-settings-form + .notification-settings-panel {
  margin-top:14px;
}
.notification-settings-panel .panel-header {
  min-height:45px;
  background:var(--toolbar-bg);
  border-bottom-color:var(--toolbar-border);
}

.notification-template-list {
  margin:14px;
}



@media(max-width:620px) {
  
  .notification-template-list{
    margin:10px;
  }
}

/* 2026-08-02: compact park automation schedule. */
.park-schedule-header-actions{padding:0;border:0;flex-direction:row}
.park-schedule-content{display:grid;gap:14px;width:min(100%,1120px);margin:0 auto;padding:16px}
.park-schedule-primary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.park-schedule-primary-card{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:76px;padding:14px 16px;border:1px solid #dfe5ec;border-radius:6px;background:#fff}
.park-schedule-primary-toggle{display:flex;align-items:center;gap:11px;min-width:0;margin:0;cursor:pointer}
.park-schedule-primary-toggle input{flex:0 0 auto;margin:0}
.park-schedule-primary-copy{min-width:0;overflow:hidden;font-size:14px;font-weight:400;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.park-schedule-primary-time{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin:0;color:#647184;font-size:12px;font-weight:400;white-space:nowrap}
.park-schedule-primary-time input[type="time"],.park-schedule-notification-time input[type="time"]{width:118px;min-height:34px;padding:5px 8px;border:1px solid #cfd7e0;border-radius:4px;background:#fff;color:var(--text);font:inherit;font-size:13px;font-variant-numeric:tabular-nums}
.park-schedule-notifications{overflow:hidden;border:1px solid #dfe5ec;border-radius:6px;background:#fff}
.park-schedule-section-heading{display:flex;align-items:center;min-height:42px;padding:0 16px;border-bottom:1px solid var(--border);background:#f8fafc}
.park-schedule-section-heading h3{margin:0;font-size:14px}
.park-schedule-notification-list{display:grid}
.park-schedule-notification-row{display:grid;grid-template-columns:minmax(250px,1fr) 230px 118px;align-items:center;gap:18px;min-height:50px;padding:8px 16px;border-top:1px solid var(--border)}
.park-schedule-notification-row:first-child{border-top:0}
.park-schedule-notification-identity{display:flex;align-items:center;gap:11px;min-width:0;margin:0;cursor:pointer;grid-column:1}
.park-schedule-notification-identity input{flex:0 0 auto;margin:0}
.park-schedule-notification-identity span{overflow:hidden;font-size:13px;font-weight:400;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.park-schedule-inline-parameter{display:flex;align-items:center;justify-content:flex-start;gap:6px;grid-column:2;margin:0;color:#647184;font-size:12px;font-weight:400;white-space:nowrap}
.park-schedule-inline-parameter input[type="number"]{width:68px;min-height:34px;padding:5px 8px;text-align:right;font:inherit;font-size:13px;font-variant-numeric:tabular-nums}
.park-schedule-notification-time{display:flex;justify-content:flex-end;grid-column:3}
@media(max-width:900px){
  .park-schedule-content{width:100%}
  .park-schedule-primary-card{gap:12px}
  .park-schedule-notification-row{grid-template-columns:minmax(210px,1fr) 200px 118px;gap:12px}
}
@media(max-width:760px){
  .park-schedule-content{padding:10px}
  .park-schedule-primary-grid{grid-template-columns:1fr}
  .park-schedule-notification-row{grid-template-columns:minmax(0,1fr) 118px;gap:8px 12px;padding:10px 12px}
  .park-schedule-notification-identity{grid-column:1}
  .park-schedule-notification-time{grid-column:2;grid-row:1}
  .park-schedule-inline-parameter{grid-column:1 / 3;grid-row:2;justify-content:flex-start;padding-left:33px}
}
@media(max-width:520px){
  .park-schedule-primary-card{align-items:flex-start;flex-direction:column;gap:10px}
  .park-schedule-primary-time{width:100%;justify-content:space-between;padding-left:33px}
  .park-schedule-notification-row{grid-template-columns:minmax(0,1fr)}
  .park-schedule-notification-identity,.park-schedule-notification-time,.park-schedule-inline-parameter{grid-column:1;grid-row:auto}
  .park-schedule-notification-time{justify-content:flex-start;padding-left:33px}
  .park-schedule-inline-parameter{padding-left:33px}
}

/* Owners and tariffs: compact settings lists and semantic forms. */
.settings-record-form{width:100%;max-width:1180px;margin-left:0;margin-right:auto}
.settings-checkbox-field{display:flex;flex-direction:column;min-width:0}
.settings-checkbox-control{display:flex!important;align-items:center;min-height:42px;padding:0 11px;border:1px solid #cfd7e0;border-radius:4px;background:#fff;font-weight:400!important}
.settings-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px;padding:11px 12px;border:1px solid var(--border);border-radius:4px;background:#fbfcfe}
.settings-option-grid .form-checkbox{min-width:0;font-weight:400!important}
.settings-option-empty{color:var(--muted);font-size:13px}
.settings-list-table .settings-wrap-cell{min-width:220px;max-width:430px;white-space:normal;line-height:18px}
.tariff-settings-form .rate-current{margin:0 0 12px}
@media(max-width:980px){.settings-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.settings-option-grid{grid-template-columns:1fr}.settings-list-table .settings-wrap-cell{min-width:180px}}
.settings-record-form .entity-form-section>h2{font-size:15px!important;line-height:20px!important;margin-bottom:10px!important}

/* Единый выбор макросов в редакторах сообщений CRM */
.crm-macro-tabs{min-width:0}
.crm-macro-tab-list{margin:0 0 8px;overflow-x:auto;scrollbar-width:thin}
.crm-macro-tab-panel[hidden]{display:none!important}
.message-macro-list{display:flex;flex-wrap:wrap;gap:6px}
.message-macro-list button{display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:5px 8px;border:1px solid var(--border);border-radius:4px;background:#fafbfd;color:#2f5f9c;cursor:pointer;text-align:left}
.message-macro-list button:hover{border-color:var(--accent);background:#edf3fa}
.message-macro-list button code,.crm-macro-glossary-item code{font:12px/1.25 Consolas,monospace;color:#244f86;white-space:nowrap}
.message-macro-list button span{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.message-macro-list.is-glossary{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:6px}
.crm-macro-glossary-item{display:grid;grid-template-columns:minmax(150px,auto) minmax(0,1fr);align-items:start;gap:10px;padding:7px 9px;border:1px solid var(--border);border-radius:4px;background:#fafbfd}
.crm-macro-glossary-item span{font-size:12px;color:var(--text-muted)}
.notification-broadcast-macros{width:100%;margin-bottom:8px}
.notification-broadcast-macros .crm-macro-tab-list{margin-bottom:6px}
@media(max-width:720px){.message-macro-list.is-glossary{grid-template-columns:1fr}.crm-macro-glossary-item{grid-template-columns:1fr;gap:3px}}

/* 2026-08-04: unified simple action icons and status-style hover states. */
:where(a,button,label,summary).crm-icon-button,
:where(a,button,label,summary).quick-action,
:where(a,button,label,summary).mini-action,
:where(a,button,label,summary).form-action-icon,
:where(a,button,label,summary).field-icon-button,
:where(a,button,label,summary).list-add-action,
:where(a,button,label,summary).modal-control-action {
  border-color:#cfd9e5 !important;
  background:#fff !important;
  color:#4f74aa !important;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease,transform .10s ease !important;
}

/* Override old per-action colors: every active button is neutral blue at rest. */
.crm-icon-button.is-danger,
.quick-action.is-danger,
.form-action-icon.is-danger,
.field-icon-button.is-danger,
.quick-action.is-document,
.quick-action.is-document-present,
.quick-action.is-preview,
.crm-icon-button.is-preview,
.quick-action.is-available,
.quick-action.is-missing,
.quick-action.is-print,
.quick-action.is-payment,
.quick-action.is-payment-cancel,
.crm-icon-button.is-payment,
.crm-icon-button.is-payment-cancel,
.excel-action {
  border-color:#cfd9e5 !important;
  background:#fff !important;
  color:#4f74aa !important;
}

:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > svg.crm-action-icon {
  width:18px !important;
  height:18px !important;
  fill:none !important;
  stroke:currentColor !important;
  stroke-width:2.35 !important;
  stroke-linecap:round !important;
  stroke-linejoin:round !important;
  transform:none !important;
  transition:none !important;
}

:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > svg.crm-action-icon--strong {
  stroke-width:3 !important;
}

:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > svg.crm-action-icon--pause {
  stroke-width:3.6 !important;
}

:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > svg.crm-action-icon--filled {
  fill:currentColor !important;
  stroke:none !important;
}

:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > .crm-action-symbol {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:19px !important;
  height:19px !important;
  color:currentColor !important;
  font-family:Arial,Helvetica,sans-serif !important;
  font-size:19px !important;
  font-weight:700 !important;
  line-height:19px !important;
  text-align:center !important;
  transform:none !important;
  transition:none !important;
}
:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > .crm-action-symbol--check,
:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > .crm-action-symbol--cross{
  font-size:21px !important;
  font-weight:700 !important;
  line-height:18px !important;
}
:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button,.list-add-action,.modal-control-action) > .crm-action-symbol--add {
  font-size:22px !important;
  font-weight:700 !important;
  line-height:18px !important;
}

/* Every neutral action uses the pale amber table-status style on hover. */
:where(a,button,label,summary).crm-icon-button:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).list-add-action:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).modal-control-action:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button:focus-visible,
:where(a,button,label,summary).quick-action:focus-visible,
:where(a,button,label,summary).mini-action:focus-visible,
:where(a,button,label,summary).form-action-icon:focus-visible,
:where(a,button,label,summary).field-icon-button:focus-visible,
:where(a,button,label,summary).list-add-action:focus-visible,
:where(a,button,label,summary).modal-control-action:focus-visible {
  border-color:#ead7a0 !important;
  background:#fff9e8 !important;
  color:#8a6500 !important;
}

/* Neutral actions, including print and document viewing, use pale amber on hover. */
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--attention):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--attention):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--attention):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--attention):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--attention):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action.is-document:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action.is-document-present:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action.is-preview:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button.is-preview:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--attention):focus-visible,
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--attention):focus-visible,
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--attention):focus-visible,
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--attention):focus-visible,
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--attention):focus-visible {
  border-color:#ead7a0 !important;
  background:#fff9e8 !important;
  color:#8a6500 !important;
}

/* Other neutral/cautionary actions use the same pale amber status style. */
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--warning):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--warning):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--warning):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--warning):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--warning):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--warning):focus-visible,
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--warning):focus-visible,
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--warning):focus-visible,
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--warning):focus-visible,
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--warning):focus-visible {
  border-color:#ead7a0 !important;
  background:#fff9e8 !important;
  color:#8a6500 !important;
}

/* Add, save, confirm and edit actions match the pale green table status icons. */
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--confirm):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--confirm):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--confirm):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--confirm):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--confirm):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button.is-payment:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action.is-payment:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--confirm):focus-visible,
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--confirm):focus-visible,
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--confirm):focus-visible,
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--confirm):focus-visible,
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--confirm):focus-visible {
  border-color:#b9dfc6 !important;
  background:#f2faf5 !important;
  color:#287247 !important;
}

/* Cancel and delete actions match the pale red table status icons. */
:where(a,button,label,summary).crm-icon-button.is-danger:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action.is-danger:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action.is-danger:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon.is-danger:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button.is-danger:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button.is-payment-cancel:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action.is-payment-cancel:hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--danger):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--danger):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--danger):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--danger):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--danger):hover:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).crm-icon-button:has(> .crm-action-icon--danger):focus-visible,
:where(a,button,label,summary).quick-action:has(> .crm-action-icon--danger):focus-visible,
:where(a,button,label,summary).mini-action:has(> .crm-action-icon--danger):focus-visible,
:where(a,button,label,summary).form-action-icon:has(> .crm-action-icon--danger):focus-visible,
:where(a,button,label,summary).field-icon-button:has(> .crm-action-icon--danger):focus-visible {
  border-color:#efc5c5 !important;
  background:#fff1f1 !important;
  color:#a13b3b !important;
}

:where(a,button,label,summary).crm-icon-button:active:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).quick-action:active:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).mini-action:active:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).form-action-icon:active:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).field-icon-button:active:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).list-add-action:active:not([disabled]):not(.is-disabled),
:where(a,button,label,summary).modal-control-action:active:not([disabled]):not(.is-disabled) {
  transform:scale(.96);
}

/* Disabled and missing-document actions remain muted and do not react. */
:where(a,button,label,summary).crm-icon-button[disabled],
:where(a,button,label,summary).quick-action[disabled],
:where(a,button,label,summary).mini-action[disabled],
:where(a,button,label,summary).form-action-icon[disabled],
:where(a,button,label,summary).field-icon-button[disabled],
:where(.crm-icon-button,.quick-action,.mini-action,.form-action-icon,.field-icon-button).is-disabled,
:where(.crm-icon-button,.quick-action).is-document-missing {
  border-color:#dfe4ea !important;
  background:#fafbfc !important;
  color:#aeb6bf !important;
  opacity:.48 !important;
  filter:none !important;
  pointer-events:none !important;
  transform:none !important;
}

/* 2026-08-04: configurable columns for the three main registers. */
.list-columns-modal-card{display:flex;flex-direction:column;width:min(980px,calc(100vw - 32px));height:min(760px,calc(100vh - 32px));max-height:calc(100vh - 32px);overflow:hidden}
.list-columns-modal-card>.crm-modal-header,.list-columns-modal-card>.crm-modal-actions{flex:0 0 auto}
.list-columns-modal-body{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow:hidden}
.list-columns-instruction{flex:0 0 auto;margin:0 0 14px;color:var(--muted);font-size:13px}
.list-columns-board{display:grid;min-height:0;flex:1 1 auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.list-columns-box{display:flex;min-width:0;min-height:0;flex-direction:column;border:1px solid var(--border);border-radius:4px;background:#fff;overflow:hidden}
.list-columns-box h3{flex:0 0 auto;margin:0;padding:12px 14px;border-bottom:1px solid var(--border);font-size:14px}
.list-columns-dropzone{display:grid;min-height:0;flex:1 1 auto;align-content:start;gap:6px;padding:10px;background:#fafbfd;overflow-y:auto;overscroll-behavior:contain;transition:background-color .14s ease,box-shadow .14s ease}
.list-columns-dropzone.is-drag-over{background:#f1f6fd;box-shadow:inset 0 0 0 2px #b8cae2}
.list-columns-item{display:flex;align-items:center;gap:9px;min-height:38px;padding:8px 10px;border:1px solid #d3dae3;border-radius:4px;background:#fff;color:var(--text);font-size:13px;font-weight:700;cursor:grab;user-select:none}
.list-columns-item:active{cursor:grabbing}
.list-columns-item.is-dragging{opacity:.45}
.list-columns-item.is-required{background:#f1f4f8;color:#4f5d6e;cursor:default}
.list-columns-item-handle{color:#9aa4b0;font-size:14px;letter-spacing:-3px}
.list-columns-item.is-required .list-columns-item-handle{visibility:hidden}
.list-columns-item small{margin-left:auto;color:var(--muted);font-size:11px;font-weight:400}
.list-columns-fixed-action{flex:0 0 auto;padding:10px;border-top:1px solid var(--border);background:#fafbfd}
.list-columns-actions{border-top:1px solid var(--border);padding-top:14px}
.list-columns-actions .list-columns-default-action{margin-right:auto}
.list-table-scroll-proxy{height:15px;overflow-x:auto;overflow-y:hidden;border:1px solid var(--border);border-bottom:0;background:#fafbfd}
.list-table-scroll-proxy[hidden]{display:none}
.list-table-scroll-proxy>div{height:1px}
.crm-configurable-table{width:max-content!important;min-width:100%!important;table-layout:auto}
.crm-configurable-table th,.crm-configurable-table td{min-width:92px}
.crm-configurable-table [data-column="plate"],.crm-configurable-table [data-column="number"]{min-width:118px}
.crm-configurable-table [data-column="vehicle"],.crm-configurable-table [data-column="vehicle_model"]{min-width:145px}
.crm-configurable-table [data-column="owner"],.crm-configurable-table [data-column="driver_full"],.crm-configurable-table [data-column="driver_compact"]{min-width:170px}
.crm-configurable-table [data-column="vin"]{min-width:190px}
.crm-configurable-table [data-column="phone"]{min-width:132px}
.crm-configurable-table [data-column="pause_reason"],.crm-configurable-table [data-column="tariff"]{min-width:180px;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.crm-configurable-table .list-column-fixed-left{position:sticky;left:0;z-index:3;background:#fff;box-shadow:1px 0 0 var(--border)}
.crm-configurable-table thead .list-column-fixed-left{z-index:5;background:#fafbfd}
.crm-configurable-table .list-table-actions{position:sticky;right:0;z-index:3;background:#fff;box-shadow:-1px 0 0 var(--border)}
.crm-configurable-table thead .list-table-actions{z-index:5;background:#fafbfd}
.crm-configurable-table tbody tr:hover .list-column-fixed-left,.crm-configurable-table tbody tr:hover .list-table-actions{background:#fbfcfd}
@media(max-width:700px){.list-columns-modal-card{width:calc(100vw - 18px);height:calc(100vh - 18px);max-height:calc(100vh - 18px)}.list-columns-modal-body{overflow:auto}.list-columns-board{display:grid;min-height:auto;flex:0 0 auto;grid-template-columns:1fr}.list-columns-box{min-height:260px}.list-columns-dropzone{min-height:170px;max-height:300px}}
@media(max-width:700px){.drivers-table .list-column-fixed-left,.vehicles-list-table .list-column-fixed-left,.contracts-table .list-column-fixed-left,.drivers-table .list-table-actions,.vehicles-list-table .list-table-actions,.contracts-table .list-table-actions{position:static;left:auto;right:auto;z-index:auto;box-shadow:none}}


/* 2026-08-05: interface language switch and bilingual help editor. */
.crm-language-switcher{display:flex;align-items:center;margin:0}
.crm-language-switch{display:inline-flex;align-items:center;gap:5px;min-height:30px;border:0;border-radius:16px;padding:2px 4px;background:transparent;color:var(--muted);cursor:pointer;font:inherit}
.crm-language-switch:hover{background:#f5f8fc}
.crm-language-switch:focus-visible{outline:2px solid rgba(79,122,193,.38);outline-offset:1px}
.crm-language-label{font-size:10px;font-weight:700;line-height:1;letter-spacing:.025em;color:#8a94a1;transition:color .14s ease}
.crm-language-label.is-active{color:#2f66ad}
.crm-language-track{position:relative;display:block;width:34px;height:20px;flex:0 0 34px;border:1px solid #4f78b7;border-radius:999px;background:var(--accent);box-shadow:inset 0 1px 2px rgba(22,45,77,.16);transition:background-color .14s ease,border-color .14s ease}
.crm-language-thumb{position:absolute;top:1px;left:1px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(22,37,55,.32);transform:translateX(0);transition:transform .16s ease}
.crm-language-switch.is-kk .crm-language-thumb{transform:translateX(14px)}
.crm-language-switch:hover .crm-language-track{border-color:#365f9f;background:var(--accent-dark)}
.help-admin-language-tabs{margin:0 0 12px}
.help-admin-language-tabs .section-tab{justify-content:center;min-width:92px}
.help-admin-language-tabs .section-tab.is-disabled{color:#a7afb8;background:#f5f6f8;cursor:not-allowed;pointer-events:none}
@media(max-width:600px){.crm-language-switch{gap:4px;padding-left:2px;padding-right:2px}.crm-language-label{font-size:9px}.crm-language-track{width:32px;flex-basis:32px}.crm-language-switch.is-kk .crm-language-thumb{transform:translateX(12px)}}

/* 2026-08-27: photos inside the existing vehicle inspection workflow. */
.inspection-photo-create{margin-top:18px}
.inspection-photo-counter{color:var(--muted);font-size:12px;white-space:nowrap}
.inspection-photo-pickers{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.inspection-photo-selection,.inspection-photo-upload-list{display:grid;gap:8px}
.inspection-photo-upload-row{display:grid;grid-template-columns:72px minmax(0,1fr) 34px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:5px;padding:8px;background:var(--panel)}
.inspection-photo-upload-row.is-success{border-color:#bfe6ca;background:#effaf3}
.inspection-photo-upload-row.is-error{border-color:#f0baba;background:#fff0f0}
.inspection-photo-upload-row>img{width:72px;height:60px;border-radius:4px;object-fit:cover;background:#eef1f4}
.inspection-photo-upload-fields{display:grid;min-width:0;gap:4px}
.inspection-photo-upload-fields strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.inspection-photo-upload-fields span,.inspection-photo-upload-fields small{color:var(--muted);font-size:11px}
.inspection-photo-upload-fields input{width:100%;min-height:32px}
.inspection-photo-create-progress{display:flex;align-items:center;gap:9px;margin-top:10px;color:var(--muted);font-size:12px;font-weight:700}
.inspection-photo-create-progress[hidden]{display:none}
.inspection-photo-progress-spinner{width:16px;height:16px;flex:0 0 16px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:inspection-photo-spin .75s linear infinite}
.inspection-photo-create.is-submitting .inspection-photo-picker{opacity:.55;cursor:wait;pointer-events:none}
@keyframes inspection-photo-spin{to{transform:rotate(360deg)}}
.inspection-photo-uploader{padding:14px;border-bottom:1px solid var(--border)}
.inspection-photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;padding:14px}
.inspection-photo-gallery>.empty-cell{grid-column:1/-1;margin:0}
.inspection-photo-card{min-width:0;border:1px solid var(--border);border-radius:5px;overflow:hidden;background:var(--panel)}
.inspection-photo-thumbnail{display:block;width:100%;height:154px;border:0;padding:0;background:#edf1f5;cursor:zoom-in}
.inspection-photo-thumbnail img{display:block;width:100%;height:100%;object-fit:cover}
.inspection-photo-meta{display:grid;gap:7px;padding:9px}
.inspection-photo-meta>span{color:var(--muted);font-size:11px;line-height:1.35}
.inspection-photo-meta input{width:100%;min-height:32px}
.inspection-photo-meta .quick-actions{justify-content:flex-end}
.inspection-photo-comment{color:var(--text)!important;font-size:13px!important;white-space:normal}
.inspection-photo-lightbox{z-index:140;padding:0}
.inspection-photo-lightbox-card{position:relative;z-index:1;display:grid;place-items:center;box-sizing:border-box;width:100%;height:100%;min-width:0;padding:56px 72px 64px;overflow:hidden;background:rgba(10,15,22,.96)}
.inspection-photo-lightbox-card>img{display:block;max-width:100%;max-height:calc(100vh - 120px);border-radius:4px;object-fit:contain}
.inspection-photo-lightbox-close.crm-icon-button{--crm-icon-action-size:36px;position:absolute;top:16px;right:18px;z-index:3;color:#fff;border-color:rgba(255,255,255,.42);background:rgba(17,24,34,.78)}
.inspection-photo-lightbox-prev.crm-icon-button,.inspection-photo-lightbox-next.crm-icon-button{--crm-icon-action-size:40px;position:absolute;top:50%;z-index:2;margin-top:-20px!important;color:#fff;border-color:rgba(255,255,255,.42);background:rgba(17,24,34,.78);font-size:30px;line-height:1}
.inspection-photo-lightbox-close.crm-icon-button:hover,.inspection-photo-lightbox-prev.crm-icon-button:hover,.inspection-photo-lightbox-next.crm-icon-button:hover{color:#fff;border-color:rgba(255,255,255,.72);background:rgba(49,65,84,.92)}
.inspection-photo-lightbox-prev{left:18px}.inspection-photo-lightbox-next{right:18px}
.inspection-photo-lightbox-caption{position:absolute;right:70px;bottom:18px;left:70px;color:#fff;text-align:center;font-size:13px;line-height:1.4}
.inspection-photo-strip{display:flex;gap:8px;overflow-x:auto;padding:12px}
.inspection-photo-strip a{display:block;flex:0 0 116px;height:86px;border:1px solid var(--border);border-radius:4px;overflow:hidden}
.inspection-photo-strip img{display:block;width:100%;height:100%;object-fit:cover}
@media(max-width:700px){.inspection-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px}.inspection-photo-thumbnail{height:128px}.inspection-photo-upload-row{grid-template-columns:58px minmax(0,1fr) 34px}.inspection-photo-upload-row>img{width:58px;height:58px}.inspection-photo-lightbox-card{padding:50px 10px 70px}.inspection-photo-lightbox-close.crm-icon-button{--crm-icon-action-size:34px;top:10px;right:10px}.inspection-photo-lightbox-prev.crm-icon-button,.inspection-photo-lightbox-next.crm-icon-button{--crm-icon-action-size:38px;top:auto;bottom:12px;margin-top:0!important}.inspection-photo-lightbox-prev{left:10px}.inspection-photo-lightbox-next{right:10px}.inspection-photo-lightbox-caption{right:58px;bottom:18px;left:58px;max-height:38px;overflow:auto}}
@media(max-width:430px){.inspection-photo-gallery{grid-template-columns:1fr 1fr}.inspection-photo-thumbnail{height:112px}.inspection-photo-meta{padding:7px}}

/* Monthly payment statement: scoped layout over the shared panels, tables and actions. */
.payment-statement{scroll-margin-top:70px}
.payment-statement .panel-header h2{font-size:16px;line-height:1.4}
.payment-statement-totals{display:flex;flex-wrap:wrap;gap:12px 28px;padding:12px 0;font-variant-numeric:tabular-nums}
.payment-statement>.payment-statement-totals{padding-inline:12px}
.payment-statement-totals>div{display:flex;flex-direction:column;gap:4px;min-width:140px}
.payment-statement-totals span{font-weight:400;font-size:12px;color:var(--muted)}
.payment-statement-totals strong{font-size:15px;white-space:nowrap;color:var(--text)}
.payment-statement-remainder{font-weight:700;font-size:15px}
.payment-statement-table{min-width:1020px}
.payment-statement-table th{white-space:normal}
.payment-statement-table td{vertical-align:top}
.payment-statement-table th:nth-child(1){width:110px;min-width:110px}
.payment-statement-table th:nth-child(2){width:28%;min-width:240px}
.payment-statement-description{white-space:normal;overflow-wrap:anywhere}
.payment-statement-description .cell-primary,.payment-statement-description .cell-secondary{white-space:normal;overflow:visible;text-overflow:clip}
.payment-statement-table th:nth-child(4){min-width:230px}
.payment-statement-facts{list-style:none;padding:0;margin:0;display:grid;gap:7px;font-variant-numeric:tabular-nums}
.payment-statement-facts li{display:flex;justify-content:space-between;gap:10px;white-space:nowrap}
.payment-statement-add{display:flex;margin:8px 0 0 auto}
.payment-statement-table tr[id]{scroll-margin-top:90px}
.payment-statement-table .payment-statement-group th{background:var(--toolbar-bg);color:var(--text);text-align:left;position:static}
.payment-statement-group .payment-statement-totals{padding-bottom:0}
.payment-statement-group .payment-statement-totals strong{font-size:13px}
.list-toolbar>.payment-statement-filter:not(:has(>div))>input[type="search"]{order:0;flex:1 1 230px;min-width:190px;max-width:none}
.list-toolbar>.payment-statement-filter input[type="month"]{width:155px;min-width:155px;min-height:34px;padding:6px 9px;border:1px solid var(--border);border-radius:4px;background:var(--panel);color:var(--text);font:inherit;font-size:13px}
.list-toolbar>.payment-statement-filter input[type="month"]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.payment-statement-filter .checkbox-label{display:flex;align-items:center;gap:6px;white-space:nowrap}
.payment-statement-filter .checkbox-label input{width:auto;margin:0}
@media(max-width:700px){
  .payment-statement-totals{gap:10px 16px}
  .payment-statement-totals>div{min-width:125px}
  .payment-statement .list-footer,.payment-statement .list-footer-right{flex-wrap:wrap;gap:8px}
  .payment-statement-table th,.payment-statement-table td{position:static!important}
  .list-toolbar>.payment-statement-filter:not(:has(>div))>input[type="search"]{flex-basis:100%;min-width:0}
}
