:root {
    --bg: #eef3f9;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --surface-alt: #edf2f7;
    --text: #17233c;
    --muted: #73819d;
    --line: rgba(23, 35, 60, 0.08);
    --primary: #1f5eff;
    --secondary: #16233b;
    --accent: #3aa0ff;
    --sidebar-top: #071f52;
    --sidebar-bottom: #03193f;
    --danger: #ef4444;
    --warning: #f59e0b;
    --green: #22c55e;
    --purple: #8b5cf6;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-sidebar: 0 22px 45px rgba(3, 25, 63, 0.28);
    --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --app-page-padding: 24px;
    --topbar-height-estimate: 86px;
    --anchor-offset: calc(var(--app-page-padding) + var(--topbar-height-estimate) + 18px);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    background: linear-gradient(180deg, #f7fafe 0%, var(--bg) 100%);
    color: var(--text);
}

html {
    scrollbar-gutter: stable;
}

[id] {
    scroll-margin-top: var(--anchor-offset);
}

a {
    color: inherit;
    text-decoration: none;
}

input,
select,
textarea,
button {
    font: inherit;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
}

.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: var(--shadow-soft);
}

.auth-card {
    border-radius: var(--radius-xl);
    padding: 32px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2f6fff, #56b6ff);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.auth-card h1,
.auth-card h2 {
    margin-top: 0;
}

.auth-card h1 {
    margin-bottom: 4px;
    font-size: 24px;
}

.muted {
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.auth-divider {
    text-align: center;
    margin: 18px 0;
    color: var(--muted);
}

.demo-users {
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
}

.demo-users ul {
    padding-left: 18px;
    margin-bottom: 0;
}

.auth-logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 6px;
}

.auth-logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.auth-brand-text-only {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.auth-brand-text-only-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.auth-brand-text-only-wrap strong {
    font-size: 22px;
    line-height: 1.1;
    color: inherit;
}

.auth-brand-text-only-wrap span {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.8;
}

.auth-brand-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-centered-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.auth-logo-centered-image {
    max-width: 250px;
    max-height: 90px;
    object-fit: contain;
    display: block;
}

.auth-brand-centered-text span {
    font-size: 14px;
    opacity: 0.85;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 13px 14px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(31, 94, 255, 0.28);
    box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.08);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-size: 15px;
    font-weight: 600;
}

.form-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 13px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
}

.btn-small,
.btn-sm {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.alert {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.app-page {
    min-height: 100vh;
    padding: var(--app-page-padding);
}

.app-frame {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    align-items: start;
    min-height: calc(100vh - 48px);
}

.main-area {
    min-width: 0;
    padding-top: 0;
}

.floating-sidebar {
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    padding: 22px 18px;
    background: linear-gradient(180deg, rgba(13, 44, 108, 0.96) 0%, rgba(3, 25, 63, 0.98) 100%);
    box-shadow: var(--shadow-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    margin-bottom: 18px;
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 6px 12px;
}

.brand-logo-image-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 6px;
}

.brand-logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-brand-text-only {
    padding: 10px 8px 14px;
}

.sidebar-brand-text-only-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.sidebar-brand-text-only-wrap strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}

.sidebar-brand-text-only-wrap span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-brand-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6px 0 14px;
}

.sidebar-logo-centered-wrap {
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 0 12px;
}

.sidebar-logo-centered-image {
    max-width: 100%;
    width: auto;
    max-height: 72px;
    object-fit: contain;
    display: block;
}

.sidebar-brand-centered-text span {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.76);
}

.brand-text strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}

.brand-text span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.sidebar-nav a,
.sidebar-bottom-links a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-bottom-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.sidebar-nav a.active,
.sidebar-bottom-links a.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.sidebar-bottom-links {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 8px;
}

.topbar {
    position: sticky;
    top: var(--app-page-padding);
    z-index: 60;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: 26px;
    padding: 14px 20px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(23, 35, 60, 0.06);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    transform: translateZ(0);
}

.search-wrap {
    flex: 1;
    max-width: 760px;
}

.search-wrap input {
    height: var(--control-height);
    border-radius: 20px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    padding: 0 22px;
    font-size: 16px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-button {
    width: var(--control-height);
    height: var(--control-height);
    border-radius: 18px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.user-menu-shell {
    position: relative;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(23, 35, 60, 0.06);
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.user-meta strong {
    display: block;
    font-size: 15px;
}

.user-meta span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(23, 35, 60, 0.08);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
    display: none;
    z-index: 90;
}

.user-menu-shell.open .profile-dropdown {
    display: grid;
    gap: 10px;
}

.profile-dropdown-link,
.profile-dropdown-section button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
}

.profile-dropdown-link {
    display: grid;
    gap: 3px;
    padding: 12px;
}

.profile-dropdown-link:hover,
.profile-dropdown-section button:hover,
.profile-dropdown-section button.active {
    background: rgba(31, 94, 255, 0.08);
}

.profile-dropdown-link span,
.profile-dropdown-title {
    color: var(--muted);
    font-size: 12px;
}

.profile-dropdown-section {
    display: grid;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid rgba(23, 35, 60, 0.08);
}

.profile-dropdown-title {
    padding: 0 12px 4px;
    font-weight: 700;
}

.profile-dropdown-section button {
    min-height: 38px;
    padding: 0 12px;
    cursor: pointer;
}

.profile-preview-form {
    display: grid;
    gap: 8px;
    padding: 0 8px 6px;
}

.profile-preview-form label {
    display: grid;
    gap: 4px;
}

.profile-preview-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.profile-preview-form select {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
    font-size: 13px;
}

.profile-preview-submit {
    background: rgba(31, 94, 255, 0.10) !important;
    color: var(--primary) !important;
    font-weight: 700;
}

.profile-preview-reset {
    color: var(--primary) !important;
    font-weight: 700;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    margin-top: 4px;
}

.page-head h1 {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.48);
    box-shadow: var(--shadow-soft);
    border-radius: 28px;
    padding: var(--panel-padding);
    margin-bottom: 22px;
}

.hero-card h1 {
    margin: 0 0 10px;
    font-size: var(--hero-title-size);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-card p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid rgba(23, 35, 60, 0.04);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: var(--panel-padding);
}

.stat-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card h3 {
    margin: 0;
    font-size: 20px;
}

.stat-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(31, 94, 255, 0.08);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.08);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.12);
}

.stat-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.stat-value.primary {
    color: var(--primary);
}

.stat-value.danger {
    color: var(--danger);
}

.stat-value.warning {
    color: var(--warning);
}

.stat-subtext {
    color: var(--muted);
    font-size: 17px;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
}

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

.panel-card {
    background: var(--surface);
    border: 1px solid rgba(23, 35, 60, 0.04);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: var(--panel-padding);
    min-height: 390px;
    display: flex;
    flex-direction: column;
}

.panel-head {
    margin-bottom: 22px;
}

.panel-head h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.simple-list,
.dashboard-simple-list {
    display: grid;
    gap: 8px;
}

.simple-row {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.simple-row:last-child {
    border-bottom: 0;
}

.simple-row strong {
    font-size: 16px;
}

.simple-row span {
    color: var(--muted);
    font-size: 14px;
}

.bottom-link {
    margin-top: auto;
    padding-top: 18px;
}

.chart-placeholder {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 24px;
    align-items: center;
    margin-top: auto;
    margin-bottom: auto;
}

.donut-ring {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: conic-gradient(#1f5eff 0 40%, #4caf50 40% 62%, #f59e0b 62% 78%, #ef4444 78% 90%, #8b5cf6 90% 100%);
    position: relative;
    margin: 0 auto;
}

.donut-ring::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #fff;
}

.legend-list {
    display: grid;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    font-size: 16px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.dot-blue { background: #1f5eff; }
.dot-green { background: #4caf50; }
.dot-orange { background: #f59e0b; }
.dot-red { background: #ef4444; }
.dot-purple { background: #8b5cf6; }

.task-list {
    display: grid;
    gap: 18px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.task-item strong {
    display: block;
    font-size: 17px;
    margin-bottom: 5px;
}

.task-item span {
    color: var(--muted);
    font-size: 15px;
}

.badge,
.table-badge,
.dashboard-task-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}

.badge-red,
.table-badge-red,
.dashboard-task-pill-red {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.badge-orange,
.table-badge-orange,
.dashboard-task-pill-yellow {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.badge-gray,
.table-badge-gray,
.dashboard-task-pill-gray {
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
}

.table-badge-green {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.table-badge-blue {
    background: rgba(31, 94, 255, 0.12);
    color: #1d4ed8;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 950px;
    font-size: var(--base-font-size);
}

.data-table thead th {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    padding: 16px var(--table-cell-padding-x);
    border-bottom: 1px solid rgba(23, 35, 60, 0.08);
    white-space: nowrap;
}

.data-table thead th.sortable-header {
    cursor: pointer;
    user-select: none;
}

.data-table thead th.sortable-header::after {
    content: "\2195";
    display: inline-block;
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
}

.data-table thead th.sortable-header.is-sorted::after {
    color: var(--primary);
}

.data-table thead th.sortable-header[aria-sort="ascending"]::after {
    content: "\2191";
}

.data-table thead th.sortable-header[aria-sort="descending"]::after {
    content: "\2193";
}

.data-table tbody td {
    padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
    vertical-align: middle;
    font-size: var(--base-font-size);
}

.data-table tbody tr:hover {
    background: rgba(31, 94, 255, 0.03);
}

.empty-cell {
    text-align: center;
    color: var(--muted);
    padding: 28px 14px !important;
}

.table-primary-link {
    color: var(--text);
    text-decoration: none;
}

.table-primary-link:hover {
    color: var(--primary);
}

.vehicle-panel,
.driver-panel,
.users-panel,
.settings-panel,
.vehicle-edit-main,
.vehicle-edit-side,
.vehicle-edit-full,
.user-edit-main,
.user-edit-side,
.user-edit-full,
.branding-main,
.branding-side,
.branding-full,
.admin-card {
    min-height: auto;
}

.filters-row-vehicles {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(5, minmax(160px, 1fr));
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.filters-row-vehicles .filter-search {
    min-width: 0;
}

.filters-row-vehicles .filter-search input,
.filters-row-vehicles select {
    height: var(--control-height);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.filters-row {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.filters-row .filter-search {
    min-width: 0;
}

.filters-row .filter-search input,
.filters-row select {
    height: var(--control-height);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    min-width: 0;
    width: 100%;
}

.filters-row .btn {
    white-space: nowrap;
}

.active-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.14);
}

.active-filter-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.active-filter-label {
    font-size: 14px;
    color: var(--muted);
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(59, 130, 246, 0.10);
    font-size: 13px;
    color: var(--text);
}

.active-filter-chip strong {
    color: var(--primary);
}

.search-select {
    position: relative;
}

.search-select-native {
    display: none;
}

.search-select-input {
    width: 100%;
}

.search-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 70;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(23, 35, 60, 0.08);
    box-shadow: var(--shadow-soft);
    display: none;
}

.search-select.open .search-select-dropdown {
    display: block;
}

.search-select-option {
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.search-select-option:hover,
.search-select-option.is-active {
    background: rgba(31, 94, 255, 0.08);
}

.search-select-option.is-hidden,
.search-select-option.is-location-hidden {
    display: none;
}

.detail-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-subnav a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    color: var(--muted);
    font-weight: 600;
}

.detail-subnav a.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.vehicle-detail-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 18px;
    margin-bottom: 18px;
}

.detail-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.detail-kicker {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.detail-main-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.detail-subtitle {
    color: var(--muted);
    font-size: 17px;
}

.detail-highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detail-highlight-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(23, 35, 60, 0.05);
}

.detail-highlight-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.detail-highlight-card strong {
    font-size: 24px;
    line-height: 1.1;
}

.detail-info-list {
    display: grid;
    gap: 14px;
}

.detail-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.detail-info-row span {
    color: var(--muted);
}

.vehicle-detail-lower-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.detail-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-data-grid.single-column {
    grid-template-columns: 1fr;
}

.detail-data-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.detail-data-item span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.detail-data-item strong {
    font-size: 16px;
}

.detail-notes-block {
    margin-top: 20px;
    padding-top: 8px;
}

.detail-notes-block span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.detail-notes-block p {
    margin: 0;
    line-height: 1.7;
    color: var(--text);
}

.users-alert {
    margin-bottom: 16px;
}

.inline-user-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-user-form select {
    min-width: 180px;
    height: 42px;
    border-radius: 12px;
}

.switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.user-edit-layout,
.vehicle-edit-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 18px;
}

.user-edit-full,
.vehicle-edit-full,
.sticky-actions {
    grid-column: 1 / -1;
}

.user-summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(23, 35, 60, 0.05);
    margin-bottom: 20px;
}

.user-summary-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-summary-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-summary-meta strong {
    font-size: 20px;
}

.user-summary-meta span {
    color: var(--muted);
    font-size: 15px;
}

.user-summary-badges {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-edit-grid {
    margin-top: 8px;
}

.setting-block,
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.setting-block {
    padding: 16px 0 20px;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.setting-block-text strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.setting-block-text p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.toggle-row {
    min-height: 50px;
}

.toggle-row > span {
    font-weight: 600;
    font-size: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 58px;
    height: 34px;
    flex-shrink: 0;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-slider {
    width: 58px;
    height: 34px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.user-side-meta {
    margin-top: 18px;
    display: grid;
    gap: 6px;
}

.section-intro {
    margin: -6px 0 18px;
    color: var(--muted);
    line-height: 1.6;
}

.location-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.location-access-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(23, 35, 60, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-access-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.location-access-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.location-access-indicator {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 2px solid rgba(31, 94, 255, 0.25);
    background: #fff;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.location-access-card input:checked + .location-access-indicator {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
}

.location-access-card input:checked + .location-access-indicator::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.location-access-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-access-content strong {
    font-size: 16px;
}

.location-access-content small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.role-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.user-scope-subnav {
    margin: 0 0 14px;
}

.role-scope-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.role-scope-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.role-scope-head input,
.role-scope-location input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.role-scope-head span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

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

.role-scope-locations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(23, 35, 60, 0.06);
}

.role-scope-location {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.roles-admin-grid {
    display: grid;
    gap: 18px;
}

.roles-admin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-disclosure {
    padding: 0;
}

.admin-disclosure > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-disclosure > summary::-webkit-details-marker {
    display: none;
}

.admin-disclosure > summary::after {
    content: "+";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(31, 94, 255, 0.08);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 800;
    flex-shrink: 0;
}

.admin-disclosure[open] > summary::after {
    content: "-";
}

.admin-disclosure > summary span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-disclosure > summary strong {
    font-size: 16px;
}

.admin-disclosure > summary small {
    color: var(--muted);
    line-height: 1.4;
}

.admin-disclosure > form,
.admin-disclosure > .permissions-category-grid,
.admin-disclosure > .info-card-placement-panel {
    padding: 0 18px 18px;
}

.info-card-section {
    margin-top: 18px;
    border-radius: 18px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    background: rgba(15, 23, 42, 0.025);
}

.builder-workbench-nav {
    position: sticky;
    top: 74px;
    z-index: 20;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(23, 35, 60, 0.06);
    backdrop-filter: blur(14px);
}

.builder-workbench-nav a {
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.builder-workbench-nav a:hover {
    color: var(--primary);
    background: rgba(31, 94, 255, 0.08);
}

.builder-workbench-nav a.active {
    color: #fff;
    background: var(--primary);
}

.builder-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.builder-card-overview {
    padding-bottom: 86px;
}

.roles-admin-list,
.roles-admin-detail,
.role-admin-empty {
    min-height: auto;
}

.role-admin-list-rows {
    display: grid;
    gap: 10px;
}

.role-admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(23, 35, 60, 0.06);
    color: inherit;
    text-decoration: none;
}

.role-admin-row.active {
    border-color: rgba(31, 94, 255, 0.28);
    background: rgba(31, 94, 255, 0.08);
}

.role-admin-row span:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.role-admin-row small {
    color: var(--muted);
    font-size: 12px;
}

.role-admin-card {
    min-height: auto;
}

.role-admin-head {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.role-admin-head label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.role-admin-head small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.permissions-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.permissions-category {
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.permissions-category h4 {
    margin: 0 0 12px;
    font-size: 14px;
}

.builder-add-field {
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.025);
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
    gap: 18px;
    align-items: start;
}

.builder-field-list {
    display: grid;
    gap: 10px;
}

.builder-field-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 44px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.builder-field-row.active {
    border-color: rgba(31, 94, 255, 0.3);
    background: rgba(31, 94, 255, 0.08);
}

.builder-field-row.dragging {
    opacity: 0.55;
}

.builder-drag-handle,
.builder-gear {
    display: grid;
    place-items: center;
}

.builder-drag-handle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(23, 35, 60, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    cursor: grab;
}

.builder-field-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.builder-field-main small {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.builder-field-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.builder-gear {
    width: 40px;
    height: 40px;
    box-shadow: none;
    border-radius: 14px;
}

.builder-settings-panel {
    padding: 16px;
    border: 1px solid rgba(23, 35, 60, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
}

.builder-switch-grid {
    margin-top: 16px;
}

.builder-role-matrix {
    margin-top: 18px;
}

.field-settings-disclosure {
    margin-top: 18px;
    border-radius: 16px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    background: rgba(15, 23, 42, 0.025);
}

.field-settings-note {
    margin: 0;
    padding: 0 18px 12px;
    line-height: 1.5;
}

.field-settings-disclosure .builder-role-list {
    padding: 0 18px 18px;
}

.builder-role-matrix h4 {
    margin: 0 0 10px;
}

.builder-role-matrix > .muted {
    margin: -4px 0 12px;
    line-height: 1.5;
}

.builder-role-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}

.builder-role-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) repeat(3, auto);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.035);
}

.builder-role-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.builder-role-row input {
    width: auto;
}

.builder-role-row-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 250, 252, 0.96);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.builder-overview-panel {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    background: rgba(15, 23, 42, 0.025);
}

.builder-overview-table-wrap {
    overflow-x: auto;
}

.builder-overview-table td:first-child {
    display: grid;
    gap: 3px;
}

.builder-role-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.info-card-placement-panel {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(23, 35, 60, 0.06);
    background: rgba(15, 23, 42, 0.025);
}

.info-card-placement-row {
    grid-template-columns: minmax(180px, 1fr) auto minmax(120px, 160px);
}

.info-card-placement-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.info-card-placement-row input[type="number"] {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
}

.permissions-toggle-list {
    display: grid;
    gap: 8px;
}

.permission-toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 44px;
}

.permission-toggle-row span:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.permission-toggle-row small {
    color: var(--muted);
    font-size: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 6px;
}

.settings-info {
    display: grid;
    gap: 18px;
}

.settings-info-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.settings-info-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.admin-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.admin-card-disabled {
    opacity: 0.7;
    cursor: default;
}

.admin-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(31, 94, 255, 0.08);
    font-size: 24px;
    flex-shrink: 0;
}

.admin-card-content strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.admin-card-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.branding-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
}

.branding-side .form-group {
    margin-bottom: 18px;
}

.branding-preview {
    margin-top: 10px;
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.branding-preview img {
    max-width: 100%;
    max-height: 80px;
    display: block;
}

.branding-preview-dark {
    background: #111827;
}

.branding-colors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.branding-icon-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.branding-icon-preview {
    margin-top: 10px;
    min-height: 74px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(23, 35, 60, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.branding-icon-preview img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.branding-install-toggle {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(23, 35, 60, 0.06);
}

.branding-install-toggle small {
    display: block;
    margin-top: 4px;
}

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input-wrap input[type="color"] {
    width: 56px;
    min-width: 56px;
    height: 44px;
    padding: 4px;
    border-radius: 12px;
    cursor: pointer;
}

.dashboard-stats-grid {
    margin-bottom: 22px;
}

.stat-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: rgba(59, 130, 246, 0.10);
}

.stat-icon-red {
    background: rgba(239, 68, 68, 0.10);
}

.stat-icon-yellow {
    background: rgba(245, 158, 11, 0.12);
}

.stat-icon-lightblue {
    background: rgba(59, 130, 246, 0.08);
}

.stat-card-apk strong {
    color: #ef4444;
}

.stat-card-maintenance strong {
    color: #f59e0b;
}

.stat-card-tasks strong,
.stat-card-vehicles strong {
    color: var(--primary);
}

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

.old-dashboard-stats .stat-card {
    min-height: 170px;
    justify-content: space-between;
}

.old-dashboard-stats .stat-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.old-dashboard-stats .stat-card-head span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.old-dashboard-stats .stat-card strong {
    display: block;
    font-size: 64px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}

.old-dashboard-stats .stat-card small {
    display: block;
    font-size: 15px;
    color: var(--muted);
}

.old-dashboard-stats .stat-card small a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.old-dashboard-stats .stat-card small a:hover {
    text-decoration: underline;
}

.dashboard-grid-old {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 0.9fr;
    gap: 18px;
}

.dashboard-list-row {
    grid-template-columns: 140px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.dashboard-list-row:last-child,
.dashboard-task-row:last-child {
    border-bottom: 0;
}

.dashboard-task-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.dashboard-task-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-task-pill {
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
}

.sticky-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.has-sticky-bottom-actions {
    padding-bottom: 120px;
}

.sticky-bottom-bar {
    position: sticky;
    bottom: 16px;
    z-index: 60;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 22px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(23, 35, 60, 0.06);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
    transform: translateZ(0);
}

.sticky-bottom-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0));
}

.sticky-bottom-bar::after {
    content: "";
    position: absolute;
    top: -8px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(23, 35, 60, 0.08), transparent);
}

body.density-compact {
    --control-height: 46px;
    --panel-padding: 18px;
    --table-cell-padding-y: 12px;
    --table-cell-padding-x: 12px;
    --base-font-size: 14px;
    --hero-title-size: 48px;
}

body.density-default {
    --control-height: 50px;
    --panel-padding: 20px;
    --table-cell-padding-y: 14px;
    --table-cell-padding-x: 12px;
    --base-font-size: 14px;
    --hero-title-size: 48px;
}

body.density-comfortable {
    --control-height: 62px;
    --panel-padding: 28px;
    --table-cell-padding-y: 22px;
    --table-cell-padding-x: 16px;
    --base-font-size: 16px;
    --hero-title-size: 62px;
}

body.theme-dark {
    --bg: #0a1120;
    --surface: rgba(21, 30, 48, 0.92);
    --surface-solid: #162033;
    --surface-alt: #1d2940;
    --text: #e5edf8;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.14);
}

body.theme-dark,
body.theme-dark html {
    background: linear-gradient(180deg, #09111e 0%, #0d1728 100%);
}

body.theme-dark .hero-card,
body.theme-dark .stat-card,
body.theme-dark .panel-card,
body.theme-dark .user-menu,
body.theme-dark .search-wrap input,
body.theme-dark .icon-button {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-dark .profile-dropdown {
    background: rgba(17, 24, 39, 0.98);
    border-color: rgba(148, 163, 184, 0.12);
}

body.theme-dark .profile-dropdown-link:hover,
body.theme-dark .profile-dropdown-section button:hover,
body.theme-dark .profile-dropdown-section button.active {
    background: rgba(96, 165, 250, 0.14);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: rgba(17, 24, 39, 0.92);
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.14);
}

body.theme-dark .data-table thead th,
body.theme-dark .data-table tbody td,
body.theme-dark .simple-row {
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .data-table tbody tr:hover {
    background: rgba(31, 94, 255, 0.08);
}

body.theme-dark .topbar {
    background: rgba(26, 36, 56, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.18);
}

body.theme-dark .active-filter-bar {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.18);
}

body.theme-dark .active-filter-chip {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(96, 165, 250, 0.12);
}

body.theme-dark .search-select-dropdown {
    background: rgba(21, 30, 48, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .search-select-option:hover,
body.theme-dark .search-select-option.is-active {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .detail-highlight-card,
body.theme-dark .user-summary-card,
body.theme-dark .location-access-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .role-scope-card,
body.theme-system .role-scope-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .permissions-category,
body.theme-system .permissions-category {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .role-admin-row,
body.theme-system .role-admin-row {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .role-admin-row.active,
body.theme-system .role-admin-row.active {
    background: rgba(31, 94, 255, 0.14);
    border-color: rgba(96, 165, 250, 0.28);
}

body.theme-dark .builder-add-field,
body.theme-system .builder-add-field,
body.theme-dark .builder-settings-panel,
body.theme-system .builder-settings-panel,
body.theme-dark .builder-overview-panel,
body.theme-system .builder-overview-panel,
body.theme-dark .info-card-section,
body.theme-system .info-card-section,
body.theme-dark .builder-drag-handle,
body.theme-system .builder-drag-handle,
body.theme-dark .builder-field-row,
body.theme-system .builder-field-row,
body.theme-dark .builder-role-row,
body.theme-system .builder-role-row {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .builder-role-row-head,
body.theme-system .builder-role-row-head {
    background: rgba(17, 24, 39, 0.96);
}

body.theme-dark .builder-workbench-nav,
body.theme-system .builder-workbench-nav {
    background: rgba(17, 24, 39, 0.92);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .builder-field-row.active,
body.theme-system .builder-field-row.active {
    background: rgba(31, 94, 255, 0.14);
    border-color: rgba(96, 165, 250, 0.28);
}

body.theme-dark .location-access-indicator {
    background: rgba(17, 24, 39, 0.95);
}

body.theme-dark .sticky-bottom-bar {
    background: rgba(26, 36, 56, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.28);
}

body.theme-dark .sticky-bottom-bar::before {
    background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0));
}

body.auth-page.theme-dark {
    background: linear-gradient(180deg, #09111e 0%, #0d1728 100%);
    color: #e5edf8;
}

body.auth-page.theme-dark .auth-card {
    background: rgba(10, 20, 44, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #e5edf8;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

body.auth-page.theme-dark .auth-card h1,
body.auth-page.theme-dark .auth-card h2,
body.auth-page.theme-dark .auth-card label,
body.auth-page.theme-dark .demo-users strong,
body.auth-page.theme-dark .auth-brand-text-only-wrap strong,
body.auth-page.theme-dark .auth-brand-centered-text span {
    color: #f8fbff;
}

body.auth-page.theme-dark .muted,
body.auth-page.theme-dark .auth-divider,
body.auth-page.theme-dark .demo-users,
body.auth-page.theme-dark .demo-users li,
body.auth-page.theme-dark .auth-card p,
body.auth-page.theme-dark .auth-brand-text-only-wrap span {
    color: #9fb0c9;
}

body.auth-page.theme-dark input,
body.auth-page.theme-dark select,
body.auth-page.theme-dark textarea {
    background: rgba(17, 24, 39, 0.9);
    color: #f8fbff;
    border-color: rgba(148, 163, 184, 0.12);
}

body.auth-page.theme-dark .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e5edf8;
}

body.auth-page.theme-dark .auth-logo-wrap {
    background: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
    body.theme-system {
        --bg: #0b1220;
        --surface: rgba(17, 24, 39, 0.88);
        --surface-solid: #111827;
        --text: #e5edf8;
        --muted: #94a3b8;
        --line: rgba(148, 163, 184, 0.16);
        background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
    }

    body.theme-system .hero-card,
    body.theme-system .stat-card,
    body.theme-system .panel-card,
    body.theme-system .user-menu,
    body.theme-system .search-wrap input,
    body.theme-system .icon-button {
        background: var(--surface);
        color: var(--text);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    body.theme-system .profile-dropdown {
        background: rgba(17, 24, 39, 0.98);
        border-color: rgba(148, 163, 184, 0.12);
    }

    body.theme-system .profile-dropdown-link:hover,
    body.theme-system .profile-dropdown-section button:hover,
    body.theme-system .profile-dropdown-section button.active {
        background: rgba(96, 165, 250, 0.14);
    }

    body.theme-system input,
    body.theme-system select,
    body.theme-system textarea {
        background: rgba(17, 24, 39, 0.92);
        color: var(--text);
        border-color: rgba(148, 163, 184, 0.14);
    }

    body.theme-system .data-table thead th,
    body.theme-system .data-table tbody td,
    body.theme-system .simple-row {
        border-color: rgba(148, 163, 184, 0.08);
    }

    body.theme-system .data-table tbody tr:hover {
        background: rgba(31, 94, 255, 0.08);
    }

    body.theme-system .topbar {
        background: rgba(26, 36, 56, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.18);
    }

    body.theme-system .active-filter-bar {
        background: rgba(37, 99, 235, 0.12);
        border-color: rgba(96, 165, 250, 0.18);
    }

    body.theme-system .active-filter-chip {
        background: rgba(17, 24, 39, 0.72);
        border-color: rgba(96, 165, 250, 0.12);
    }

    body.theme-system .search-select-dropdown {
        background: rgba(21, 30, 48, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    body.theme-system .search-select-option:hover,
    body.theme-system .search-select-option.is-active {
        background: rgba(255, 255, 255, 0.08);
    }

    body.theme-system .detail-highlight-card,
    body.theme-system .user-summary-card,
    body.theme-system .location-access-card {
        background: rgba(17, 24, 39, 0.72);
        border-color: rgba(148, 163, 184, 0.08);
    }

    body.theme-system .location-access-indicator {
        background: rgba(17, 24, 39, 0.95);
    }

    body.theme-system .sticky-bottom-bar {
        background: rgba(26, 36, 56, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 24px 55px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.28);
    }

    body.theme-system .sticky-bottom-bar::before {
        background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0));
    }

    body.auth-page.theme-system {
        background: linear-gradient(180deg, #071225 0%, #0b1730 100%);
        color: #e5edf8;
    }

    body.auth-page.theme-system .auth-card {
        background: rgba(10, 20, 44, 0.88);
        border: 1px solid rgba(148, 163, 184, 0.16);
        color: #e5edf8;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    }

    body.auth-page.theme-system .auth-card h1,
    body.auth-page.theme-system .auth-card h2,
    body.auth-page.theme-system .auth-card label,
    body.auth-page.theme-system .demo-users strong,
    body.auth-page.theme-system .auth-brand-text-only-wrap strong,
    body.auth-page.theme-system .auth-brand-centered-text span {
        color: #f8fbff;
    }

    body.auth-page.theme-system .muted,
    body.auth-page.theme-system .auth-divider,
    body.auth-page.theme-system .demo-users,
    body.auth-page.theme-system .demo-users li,
    body.auth-page.theme-system .auth-card p,
    body.auth-page.theme-system .auth-brand-text-only-wrap span {
        color: #9fb0c9;
    }

    body.auth-page.theme-system input,
    body.auth-page.theme-system select,
    body.auth-page.theme-system textarea {
        background: rgba(17, 24, 39, 0.9);
        color: #f8fbff;
        border-color: rgba(148, 163, 184, 0.12);
    }

    body.auth-page.theme-system .btn-secondary {
        background: rgba(255, 255, 255, 0.08);
        color: #e5edf8;
    }

    body.auth-page.theme-system .auth-logo-wrap {
        background: rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero-card h1 {
        font-size: 44px;
    }

    .filters-row-vehicles {
        grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 1300px) {
    .dashboard-grid-old {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .vehicle-detail-grid,
    .vehicle-detail-lower-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .user-edit-layout,
    .vehicle-edit-layout,
    .branding-layout,
    .admin-grid,
    .branding-colors-grid,
    .branding-icon-grid,
    .settings-grid,
    .roles-admin-layout,
    .builder-layout,
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }

    .location-access-grid {
        grid-template-columns: 1fr;
    }

    .role-scope-grid,
    .role-scope-locations,
    .permissions-category-grid,
    .builder-summary-grid {
        grid-template-columns: 1fr;
    }

    .old-dashboard-stats .stat-card strong {
        font-size: 52px;
    }

    .builder-field-row {
        grid-template-columns: 34px minmax(0, 1fr) 44px;
    }

    .builder-field-badges {
        grid-column: 2 / 4;
        justify-content: flex-start;
    }

    .builder-role-row {
        grid-template-columns: 1fr;
    }

    .dashboard-list-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .filters-row-vehicles {
        grid-template-columns: 1fr 1fr;
    }

    .active-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 980px) {
    .app-page {
        --app-page-padding: 16px;
    }

    .app-frame {
        grid-template-columns: 1fr;
    }

    .floating-sidebar {
        position: static;
        min-height: auto;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrap {
        max-width: none;
    }

    .topbar-actions {
        justify-content: space-between;
    }

    .chart-placeholder {
        grid-template-columns: 1fr;
    }

    .hero-card h1 {
        font-size: 36px;
    }
}

@media (max-width: 900px) {
    .simple-row,
    .dashboard-list-row,
    .dashboard-task-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 760px) {
    .detail-highlight-grid,
    .detail-data-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-top {
        flex-direction: column;
    }

    .detail-main-title {
        font-size: 34px;
    }
}

@media (max-width: 700px) {
    .page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        width: 100%;
    }

    .filters-row-vehicles {
        grid-template-columns: 1fr;
    }

    .user-summary-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-summary-badges {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.filters-row {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.filters-row .filter-search {
    min-width: 0;
}

.filters-row .filter-search input,
.filters-row select {
    height: var(--control-height);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    min-width: 0;
    width: 100%;
}

.filters-row .btn {
    white-space: nowrap;
}

.filters-row.filters-row-vehicles {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(5, minmax(160px, 1fr));
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.filters-row.filters-row-vehicles .filter-search {
    min-width: 0;
}

.filters-row.filters-row-vehicles .filter-search input,
.filters-row.filters-row-vehicles select {
    height: var(--control-height);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    min-width: 0;
    width: 100%;
}

.active-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.14);
}

.active-filter-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.active-filter-label {
    font-size: 14px;
    color: var(--muted);
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(59, 130, 246, 0.10);
    font-size: 13px;
    color: var(--text);
}

.active-filter-chip strong {
    color: var(--primary);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

body.theme-dark .active-filter-bar,
body.theme-system .active-filter-bar {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.18);
}

body.theme-dark .active-filter-chip,
body.theme-system .active-filter-chip {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(96, 165, 250, 0.12);
}

@media (max-width: 1400px) {
    .filters-row.filters-row-vehicles {
        grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 1100px) {
    .filters-row.filters-row-vehicles {
        grid-template-columns: 1fr 1fr;
    }

    .active-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .filters-row,
    .filters-row.filters-row-vehicles {
        grid-template-columns: 1fr;
    }
}

.auth-page {
    position: relative;
    overflow: hidden;
}

.auth-bg-image {
    position: fixed;
    inset: 0;
    z-index: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    pointer-events: none;
}

.auth-shell {
    position: relative;
    z-index: 2;
}

.branding-background-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.branding-background-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.branding-background-card-dark {
    background: rgba(15, 23, 42, 0.92);
    color: #e5edf8;
}

.opacity-input-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.opacity-input-wrap input[type="range"] {
    padding: 0;
}

.branding-bg-preview {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: 18px;
    background: #eef3f9;
    border: 1px solid rgba(23, 35, 60, 0.08);
    display: grid;
    place-items: center;
}

.branding-bg-preview-dark {
    background: #0b1220;
    border-color: rgba(255, 255, 255, 0.12);
}

.branding-bg-preview-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.theme-dark .branding-background-card,
body.theme-system .branding-background-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 900px) {
    .branding-background-grid {
        grid-template-columns: 1fr;
    }
}

.auth-page {
    position: relative;
    overflow: hidden;
}

.auth-bg-image {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.auth-bg-image-dark {
    display: none;
}

.auth-shell {
    position: relative;
    z-index: 2;
}

.auth-logo-centered-wrap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.auth-logo-centered-image {
    max-width: 250px;
    max-height: 90px;
    object-fit: contain;
}

.auth-logo-dark {
    display: none;
}

body.theme-dark .auth-bg-image-light {
    display: none;
}

body.theme-dark .auth-bg-image-dark {
    display: block;
}

body.theme-dark .auth-logo-light {
    display: none;
}

body.theme-dark .auth-logo-dark {
    display: block;
}

@media (prefers-color-scheme: dark) {
    body.theme-system .auth-bg-image-light {
        display: none;
    }

    body.theme-system .auth-bg-image-dark {
        display: block;
    }

    body.theme-system .auth-logo-light {
        display: none;
    }

    body.theme-system .auth-logo-dark {
        display: block;
    }
}

.vehicle-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.vehicle-form-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-form-full {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .vehicle-form-grid {
        grid-template-columns: 1fr;
    }
}

.vehicle-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.vehicle-tabs .tab {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0,0,0,0.05);
    text-decoration: none;
    font-weight: 500;
    color: inherit;
}

.vehicle-tabs .tab.active {
    background: var(--primary-color);
    color: #fff;
}

.vehicle-tabs .tab.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.vehicle-edit-layout-clean {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.vehicle-edit-main-wide {
    min-width: 0;
}

.vehicle-form-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.vehicle-form-section-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(23, 35, 60, 0.05);
}

.vehicle-form-section-card h4 {
    margin: 0 0 16px;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.vehicle-form-section-full {
    grid-column: 1 / -1;
}

.vehicle-form-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.vehicle-form-grid-three {
    grid-template-columns: repeat(3, 1fr);
}

.vehicle-settings-list {
    gap: 18px;
}

.detail-subnav a.disabled {
    opacity: 0.45;
    pointer-events: none;
}

body.theme-dark .vehicle-form-section-card,
body.theme-system .vehicle-form-section-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1300px) {
    .vehicle-edit-layout-clean {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .vehicle-form-sections,
    .vehicle-form-grid-compact,
    .vehicle-form-grid-three {
        grid-template-columns: 1fr;
    }
}

.table-badge-green {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.table-badge-red {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.status-options-list {
    display: grid;
    gap: 14px;
}

.status-option-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.status-option-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 160px 140px 150px auto;
    gap: 12px;
    align-items: end;
}

.status-option-name {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.status-option-name strong {
    font-size: 16px;
}

.status-option-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    font-weight: 600;
}

.status-option-availability {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-option-card .form-group {
    gap: 6px;
}

.status-option-card .form-group label {
    font-size: 13px;
    color: var(--muted);
}

body.theme-dark .status-option-card,
body.theme-system .status-option-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1300px) {
    .status-option-card,
    .status-option-form {
        grid-template-columns: 1fr;
    }

    .status-option-availability {
        justify-content: flex-start;
    }
}

.status-compact-list {
    display: grid;
    gap: 12px;
}

.status-compact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.status-compact-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.status-compact-main strong {
    font-size: 16px;
}

.status-compact-main span {
    color: var(--muted);
    font-size: 13px;
}

.status-compact-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-compact-actions form {
    margin: 0;
}

body.theme-dark .status-compact-row,
body.theme-system .status-compact-row {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 900px) {
    .status-compact-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .status-compact-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.auth-form + .auth-divider + .btn {
    display: flex;
    width: 100%;
    justify-content: center;
}

.task-wizard-shell {
    min-height: auto;
}

.task-wizard-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.task-wizard-step {
    border: 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

.task-wizard-step span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.75);
    color: var(--text);
    font-weight: 700;
}

.task-wizard-step strong {
    font-size: 14px;
}

.task-wizard-step.is-active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.task-wizard-step.is-active span {
    color: var(--primary);
}

.task-wizard-step.is-complete {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.task-wizard-panel {
    display: none;
}

.task-wizard-panel.is-active {
    display: block;
}

.task-wizard-panel-head {
    margin-bottom: 22px;
}

.task-wizard-panel-head h3 {
    margin: 6px 0 8px;
    font-size: 32px;
    letter-spacing: -0.02em;
}

.task-wizard-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.task-wizard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.task-wizard-full {
    grid-column: 1 / -1;
}

.task-wizard-info-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(31, 94, 255, 0.08);
    border: 1px solid rgba(31, 94, 255, 0.12);
}

.task-wizard-info-card strong {
    display: block;
    margin-bottom: 6px;
}

.task-wizard-info-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.task-wizard-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.task-wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(23, 35, 60, 0.06);
}

input.is-invalid {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

body.theme-dark .task-wizard-step,
body.theme-system .task-wizard-step {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .task-wizard-step span,
body.theme-system .task-wizard-step span {
    background: rgba(17, 24, 39, 0.95);
}

body.theme-dark .task-wizard-info-card,
body.theme-system .task-wizard-info-card {
    background: rgba(31, 94, 255, 0.12);
    border-color: rgba(96, 165, 250, 0.16);
}

@media (max-width: 900px) {
    .task-wizard-progress {
        grid-template-columns: 1fr;
    }

    .task-wizard-grid,
    .task-wizard-summary {
        grid-template-columns: 1fr;
    }

    .task-wizard-full {
        grid-column: auto;
    }

    .task-wizard-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.create-flow-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.create-flow-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(23, 35, 60, 0.06);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: var(--text);
    transition: transform .18s ease, box-shadow .18s ease;
}

.create-flow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.create-flow-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: rgba(31, 94, 255, 0.10);
    font-size: 28px;
}

.create-flow-card h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.create-flow-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.create-flow-card-disabled {
    opacity: 0.72;
}

.create-flow-card-disabled:hover {
    transform: none;
}

.topbar-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(31, 94, 255, 0.22);
}

body.theme-dark .create-flow-card,
body.theme-system .create-flow-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 900px) {
    .create-flow-grid {
        grid-template-columns: 1fr;
    }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(31, 94, 255, 0.25);
    transition: transform .15s ease, box-shadow .15s ease;
}

.topbar-create-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(31, 94, 255, 0.35);
}

.topbar-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(31, 94, 255, 0.22);
    white-space: nowrap;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.workflow-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: all .2s ease;
}

.workflow-card:hover {
    transform: translateY(-3px);
}

.workflow-icon {
    font-size: 28px;
}

.workflow-content h3 {
    margin: 0;
}

.workflow-meta {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.badge-success {
    background: #e6f7ec;
    color: #2e7d32;
}

.badge-muted {
    background: #eee;
    color: #777;
}

.toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100vw - 48px));
}

.app-toast {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(23, 35, 60, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    display: grid;
    gap: 4px;
}

.app-toast strong {
    font-size: 15px;
}

.app-toast span {
    color: var(--muted);
    line-height: 1.4;
}

.app-toast-error {
    border-color: rgba(239, 68, 68, 0.22);
}

.app-toast-error strong {
    color: #dc2626;
}

.app-toast-success {
    border-color: rgba(34, 197, 94, 0.22);
}

.app-toast-success strong {
    color: #16a34a;
}

.app-toast-info {
    border-color: rgba(59, 130, 246, 0.22);
}

.app-toast-info strong {
    color: #2563eb;
}

body.theme-dark .app-toast,
body.theme-system .app-toast {
    background: rgba(17, 24, 39, 0.96);
    border-color: rgba(148, 163, 184, 0.12);
}

.pwa-install-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 10000;
    max-width: 520px;
    margin: 0 auto;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(23, 35, 60, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    display: flex;
    align-items: center;
    gap: 14px;
}

.pwa-install-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pwa-install-text strong {
    color: var(--secondary);
    font-size: 15px;
}

.pwa-install-text span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

.pwa-install-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

body.theme-dark .pwa-install-banner,
body.theme-system .pwa-install-banner {
    background: rgba(17, 24, 39, 0.97);
    border-color: rgba(148, 163, 184, 0.14);
}

body.theme-dark .pwa-install-text strong,
body.theme-system .pwa-install-text strong {
    color: #f8fafc;
}

@media (max-width: 640px) {
    .pwa-install-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .pwa-install-actions {
        justify-content: flex-end;
    }
}

.workflow-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.workflow-structure-card {
    margin-top: 18px;
}

.workflow-structure-list {
    display: grid;
    gap: 18px;
}

.workflow-step-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.workflow-step-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(23, 35, 60, 0.06);
}

.workflow-step-number {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.workflow-step-head h4 {
    margin: 0 0 6px;
    font-size: 22px;
}

.workflow-step-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.workflow-step-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-step-actions form,
.workflow-field-row form {
    margin: 0;
}

.workflow-fields-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.workflow-field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.82);
    border: 1px solid rgba(23, 35, 60, 0.05);
}

.workflow-field-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.workflow-field-main span {
    color: var(--muted);
    font-size: 13px;
}

body.theme-dark .workflow-step-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .workflow-field-row {
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1100px) {
    .workflow-edit-grid {
        grid-template-columns: 1fr;
    }

    .workflow-step-head,
    .workflow-field-row {
        grid-template-columns: 1fr;
    }

    .workflow-step-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.workflow-admin-click {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.workflow-list-admin {
    display: grid;
    gap: 14px;
}

.workflow-admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px auto auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.workflow-admin-click {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.workflow-admin-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(31, 94, 255, 0.10);
    font-size: 26px;
}

.workflow-admin-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.workflow-admin-main strong {
    font-size: 17px;
}

.workflow-admin-main span {
    color: var(--muted);
    font-size: 13px;
}

.workflow-admin-order {
    display: grid;
    gap: 5px;
}

.workflow-admin-order label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.workflow-order-input {
    width: 92px;
    height: 40px;
    border-radius: 14px;
    padding: 0 10px;
}

.workflow-admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

body.theme-dark .workflow-admin-row {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1100px) {
    .workflow-admin-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .workflow-admin-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.workflow-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.workflow-overview-card {
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(23, 35, 60, 0.06);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.workflow-overview-main {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.workflow-overview-main h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.workflow-overview-main p {
    margin: 0;
    color: var(--muted);
}

.workflow-overview-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(23, 35, 60, 0.06);
}

.workflow-order-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.workflow-order-input {
    width: 88px;
    height: 40px;
    border-radius: 14px;
    padding: 0 10px;
}

body.theme-dark .workflow-overview-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1000px) {
    .workflow-card-grid {
        grid-template-columns: 1fr;
    }
}

.workflow-tab-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.workflow-form-panel,
.workflow-content-panel {
    min-height: auto;
}

.workflow-section-head {
    margin-bottom: 18px;
}

.workflow-section-head h3 {
    margin: 0 0 6px;
    font-size: 28px;
}

.workflow-section-head p {
    margin: 0;
    color: var(--muted);
}

.workflow-step-card-list,
.workflow-field-card-list {
    display: grid;
    gap: 14px;
}

.workflow-step-overview-card,
.workflow-field-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(23, 35, 60, 0.06);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.workflow-field-card {
    grid-template-columns: minmax(0, 1fr) auto;
}

.workflow-step-index {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(31, 94, 255, 0.10);
    color: var(--primary);
    font-weight: 800;
}

.workflow-step-overview-main h4,
.workflow-field-card h4 {
    margin: 0 0 6px;
    font-size: 20px;
}

.workflow-step-overview-main p,
.workflow-field-card p {
    margin: 0 0 6px;
    color: var(--muted);
    line-height: 1.5;
}

.workflow-step-overview-meta,
.workflow-field-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.workflow-step-overview-meta label,
.workflow-field-card-meta label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.workflow-step-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.workflow-step-filter a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--muted);
    font-weight: 700;
}

.workflow-step-filter a.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

body.theme-dark .workflow-step-overview-card,
body.theme-dark .workflow-field-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

@media (max-width: 1200px) {
    .workflow-tab-layout {
        grid-template-columns: 1fr;
    }

    .workflow-step-overview-card,
    .workflow-field-card {
        grid-template-columns: 1fr;
    }

    .workflow-step-overview-meta,
    .workflow-field-card-meta {
        justify-content: flex-start;
    }
}

.workflow-tab-layout-compact {
    grid-template-columns: minmax(0, 1fr);
}

.workflow-tab-layout-compact .workflow-form-panel {
    margin-top: 18px;
}

.workflow-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.workflow-modal {
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    min-height: auto;
}

.workflow-modal-wide {
    width: min(860px, 100%);
}

.workflow-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.workflow-modal-head h3 {
    margin: 0 0 6px;
    font-size: 28px;
}

.workflow-modal-head p {
    margin: 0;
    color: var(--muted);
}

.workflow-modal-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
}

body.theme-dark .workflow-modal-close {
    background: rgba(255, 255, 255, 0.08);
}

.workflow-section-head-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.workflow-section-head-actions .btn {
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 700px) {
    .workflow-section-head-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-section-head-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.app-toast {
    position: relative;
    overflow: hidden;
}

.app-toast-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.65;
}

.app-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: currentColor;
    opacity: 0.35;
    animation: toastCountdown 10s linear forwards;
}

@keyframes toastCountdown {
    from { width: 100%; }
    to { width: 0%; }
}

.workflow-section-head-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.workflow-section-head-actions .btn {
    flex-shrink: 0;
    margin-top: 2px;
}

.workflow-modal [data-dependency-value-select]:disabled {
    display: none;
}

.workflow-modal [data-dependency-value-select]:not(:disabled) {
    display: block;
}

.workflow-modal input[type="hidden"][data-dependency-value-input] {
    display: none;
}

.workflow-managed-form small.muted {
    line-height: 1.45;
}

@media (max-width: 700px) {
    .workflow-section-head-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-section-head-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

[data-wizard-field-wrap][hidden],
[data-wizard-field-wrap].is-hidden-by-dependency {
    display: none !important;
}

.workflow-action-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.workflow-action-form-main {
    min-width: 0;
}

.workflow-variable-sidebar {
    position: sticky;
    top: 12px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.workflow-variable-sidebar h4 {
    margin-top: 0;
}

.workflow-variable-list {
    display: grid;
    gap: 8px;
}

.workflow-variable-chip {
    display: grid;
    gap: 2px;
    text-align: left;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.workflow-variable-chip strong {
    font-size: 13px;
}

.workflow-variable-chip span {
    color: var(--muted);
    font-size: 12px;
}

body.theme-dark .workflow-variable-sidebar {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

body.theme-dark .workflow-variable-chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

.workflow-variable-chip.copied {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.08);
}

.email-template-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.email-template-list {
    position: sticky;
    top: 18px;
}

.email-template-list-items {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.email-template-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    background: rgba(248, 250, 252, 0.82);
    border: 1px solid rgba(23, 35, 60, 0.05);
}

.email-template-row.active {
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.10);
}

.email-template-row-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.email-template-row-main span,
.email-template-row-main small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-template-row-meta {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.email-template-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.email-template-variable-panel {
    top: 18px;
}

.email-template-empty {
    display: grid;
    gap: 12px;
    justify-items: start;
}

.hidden-form {
    display: none;
}

body.theme-dark .email-template-row {
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .email-template-row.active {
    border-color: rgba(96, 165, 250, 0.36);
}

@media (max-width: 900px) {
    .workflow-action-modal-layout {
        grid-template-columns: 1fr;
    }

    .workflow-variable-sidebar {
        position: static;
        max-height: none;
    }

    .email-template-layout,
    .email-template-editor {
        grid-template-columns: 1fr;
    }

    .email-template-list {
        position: static;
    }
}

.mutations-panel {
    min-height: auto;
}

.mutations-head {
    margin-bottom: 16px;
}

.mutations-filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) minmax(150px, 0.8fr) 150px 150px auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
}

.mutations-filter-row select,
.mutations-filter-row input {
    min-height: 44px;
    border-radius: 14px;
}

.mutations-empty {
    padding: 22px 0 6px;
}

.mutations-timeline {
    position: relative;
    display: grid;
    gap: 16px;
}

.mutation-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 14px;
}

.mutation-item::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 22px;
    bottom: -18px;
    width: 2px;
    background: rgba(23, 35, 60, 0.08);
}

.mutation-item:last-child::before {
    display: none;
}

.mutation-dot {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    margin-top: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 0 5px rgba(31, 94, 255, 0.10);
}

.mutation-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(23, 35, 60, 0.06);
}

.mutation-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mutation-card-head strong {
    display: block;
    font-size: 16px;
}

.mutation-card-head span,
.mutation-description,
.mutation-meta {
    color: var(--muted);
}

.mutation-card-head span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
}

.mutation-source-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 30px;
    margin-top: 0;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.mutation-description {
    margin: 12px 0 0;
    line-height: 1.5;
}

.mutation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 12px;
    font-size: 13px;
}

.mutation-meta strong {
    color: var(--text);
}

.mutation-changes {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mutation-change-row {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.035);
}

.mutation-change-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.mutation-change-row strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

body.theme-dark .mutation-card,
body.theme-system .mutation-card {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

body.theme-dark .mutation-change-row,
body.theme-system .mutation-change-row {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .mutation-source-pill,
body.theme-system .mutation-source-pill {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
    .mutations-filter-row {
        grid-template-columns: 1fr;
    }

    .mutation-card-head,
    .mutation-change-row {
        grid-template-columns: 1fr;
    }
}
