:root {
    --bg-main: #f6f9fe;
    --bg-elevated: #ffffff;
    --bg-elevated-soft: #eef3fd;
    --border-subtle: rgba(98, 117, 235, 0.22);
    --accent: #6275eb;
    --accent-soft: #7b8bef;
    --accent-blue: #6275eb;
    --text-main: #444c63;
    --text-muted: rgba(68, 76, 99, 0.68);
    --danger: #e05252;
    --danger-bg: rgba(224, 82, 82, 0.1);
    --danger-border: rgba(224, 82, 82, 0.45);
    --radius-lg: 14px;
    --radius-sm: 8px;
    --shadow-soft: 0 12px 32px rgba(98, 117, 235, 0.16);
    --shadow-accent: 0 10px 26px rgba(98, 117, 235, 0.28);
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:visited {
    color: var(--accent-blue);
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout__header {
    padding: 18px 32px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(98, 117, 235, 0.08);
}

.layout__body {
    display: flex;
    flex: 1;
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
}

.layout__sidebar {
    width: 212px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 10px 8px;
    border-right: none;
    background: var(--bg-main);
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

.sidebar-brand {
    padding: 0 0 10px;
    margin-bottom: 6px;
    border-bottom: none;
    flex-shrink: 0;
}

.brand__logo-wide {
    display: block;
    width: min(100%, 196px);
    height: auto;
    max-height: 88px;
    object-fit: contain;
    object-position: left center;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
    min-height: 0;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    margin-top: auto;
    border-top: none;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.sidebar-link__icon {
    flex-shrink: 0;
    opacity: 0.72;
    color: inherit;
    width: 18px;
    height: 18px;
}

.sidebar-link__label {
    line-height: 1.2;
    color: inherit;
}

a.sidebar-link:link,
a.sidebar-link:visited {
    color: var(--text-main);
}

.sidebar-link:hover:not(.sidebar-link--active),
.sidebar-link--button:hover:not(.sidebar-link--active) {
    background: var(--bg-elevated);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(98, 117, 235, 0.08);
    color: var(--text-main);
}

.sidebar-link:hover:not(.sidebar-link--active) .sidebar-link__icon,
.sidebar-link--button:hover:not(.sidebar-link--active) .sidebar-link__icon {
    opacity: 1;
    color: var(--accent);
}

.layout__sidebar .sidebar-link.sidebar-link--active,
.layout__sidebar a.sidebar-link.sidebar-link--active,
.layout__sidebar .sidebar-link.sidebar-link--active:hover,
.layout__sidebar .sidebar-link.sidebar-link--active:focus-visible,
.layout__sidebar .sidebar-link--button.sidebar-link--active,
.layout__sidebar .sidebar-link--button.sidebar-link--active:hover {
    background: var(--accent);
    border-color: transparent;
    color: #ffffff;
    box-shadow: var(--shadow-accent);
}

.layout__sidebar a.sidebar-link.sidebar-link--active:link,
.layout__sidebar a.sidebar-link.sidebar-link--active:visited,
.layout__sidebar a.sidebar-link.sidebar-link--active:hover,
.layout__sidebar a.sidebar-link.sidebar-link--active:focus {
    color: #ffffff;
}

.layout__sidebar .sidebar-link.sidebar-link--active .sidebar-link__icon,
.layout__sidebar .sidebar-link.sidebar-link--active .sidebar-link__label,
.layout__sidebar .sidebar-link.sidebar-link--active:hover .sidebar-link__icon,
.layout__sidebar .sidebar-link.sidebar-link--active:hover .sidebar-link__label,
.layout__sidebar .sidebar-link.sidebar-link--active:focus-visible .sidebar-link__icon,
.layout__sidebar .sidebar-link.sidebar-link--active:focus-visible .sidebar-link__label {
    opacity: 1;
    color: #ffffff;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

.sidebar-profile__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(98, 117, 235, 0.12);
    color: var(--accent);
    flex-shrink: 0;
}

.sidebar-profile__info {
    min-width: 0;
    flex: 1;
}

.sidebar-profile__name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile__role {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.sidebar-profile__chevron {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
}

.sidebar-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.12s ease;
}

.sidebar-logout:hover {
    color: var(--text-main);
}

.sidebar-logout__icon {
    opacity: 0.75;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: var(--bg-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.modal__title {
    margin: 0 0 12px;
    font-size: 18px;
}

.modal__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.modal__input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
    outline: none;
    box-sizing: border-box;
}

.modal__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal__close {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.modal__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal__hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.modal-msg {
    margin-top: 10px;
    font-size: 13px;
}

.modal-msg.ok {
    color: #86efac;
}

.modal-msg.err {
    color: #fca5a5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand__logo-img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 18px rgba(98, 117, 235, 0.75);
    background: radial-gradient(circle at 30% 30%, #7b8bef, #6275eb);
}

.brand__titles-main {
    font-size: 15px;
    font-weight: 600;
}

.brand__titles-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    flex-wrap: wrap;
}

.header-link {
    padding: 7px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.header-link:hover {
    background: var(--bg-elevated-soft);
    border-color: rgba(148, 163, 184, 0.7);
}

.header-link--active {
    background: rgba(98, 117, 235, 0.12);
    border-color: rgba(98, 117, 235, 0.4);
}

.tag {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
}

.badge-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.45);
    font-size: 11px;
    color: #facc15;
}

.badge-success,
.badge-danger {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.layout__main {
    flex: 1;
    padding: 28px 32px 40px;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
    background: var(--bg-main);
    overflow-y: auto;
    min-height: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
}

.page {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
}

.page--single {
    display: block;
    max-width: none;
    width: 100%;
    min-width: 0;
}

.page--drivers .page__title-row {
    align-items: flex-start;
    margin-bottom: 18px;
}

.page--drivers .page__title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page--drivers .page__subtitle {
    max-width: 560px;
    margin-top: 10px;
}

.page--drivers .table th.table__th-compact {
    font-size: 8px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    white-space: normal;
    text-align: center;
    vertical-align: bottom;
    max-width: 52px;
    padding: 8px 3px;
}

.page--drivers .table td.table__col-status,
.page--drivers .table td.warn-col {
    padding-left: 4px;
    padding-right: 4px;
}

.driver-search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.driver-search-field__icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.driver-search-field__input,
.list-search--with-icon .driver-search-field__input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    box-shadow: 0 4px 14px rgba(98, 117, 235, 0.06);
}

.driver-search-field__input:focus {
    border-color: rgba(98, 117, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(98, 117, 235, 0.12);
}

.card--drivers-table {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}

.card--drivers-table .table-wrap {
    margin-top: 0;
    border-radius: 0;
}

.card--drivers-table .list-bulk-bar {
    padding: 14px 18px 0;
}

.card--drivers-table .list-pagination {
    padding: 0 18px 18px;
}

.page--drivers .page__filters {
    margin-top: 0;
    margin-bottom: 14px;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

.status-dot--active {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.status-dot--inactive {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.pred-none {
    color: #16a34a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.table__col-status {
    width: 44px;
    text-align: center;
}

.btn-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.btn-table + .btn-table {
    margin-left: 8px;
}

.btn-table--edit {
    background: rgba(98, 117, 235, 0.12);
    color: var(--accent);
}

.btn-table--edit:hover {
    background: rgba(98, 117, 235, 0.2);
}

.btn-table--delete {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.btn-table--delete:hover {
    background: rgba(239, 68, 68, 0.16);
}

.page--drivers .table th,
.page--drivers .table td {
    padding: 14px 16px;
}

.page--drivers .table th {
    font-size: 11px;
    font-weight: 600;
    color: rgba(68, 76, 99, 0.55);
    background: var(--bg-elevated);
}

.page--drivers .table tbody tr:last-child td {
    border-bottom: none;
}

.page--drivers .drag-handle {
    width: 36px;
    padding: 0 6px;
    text-align: center;
    overflow: visible;
    vertical-align: middle;
}

.drag-handle__grid {
    display: inline-block;
    width: 10px;
    height: 18px;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
}

.drag-handle__grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(98, 117, 235, 0.42);
    box-shadow:
        6px 0 0 rgba(98, 117, 235, 0.42),
        0 7px 0 rgba(98, 117, 235, 0.42),
        6px 7px 0 rgba(98, 117, 235, 0.42),
        0 14px 0 rgba(98, 117, 235, 0.42),
        6px 14px 0 rgba(98, 117, 235, 0.42);
}

.page--drivers .list-bulk-bar__filter {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

.page--drivers .list-bulk-bar__filter--restrictions,
.page--drivers .list-bulk-bar__filter--warnings,
.page--drivers .list-bulk-bar__filter--active,
.page--drivers .list-bulk-bar__filter--busy {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

.page--drivers .list-bulk-bar__filter.is-active {
    box-shadow: inset 0 0 0 1px rgba(98, 117, 235, 0.25);
}

.page--drivers .list-bulk-bar__filter--select {
    border-color: var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-main);
}

.page--drivers .list-bulk-bar__filter:hover {
    box-shadow: 0 4px 12px rgba(98, 117, 235, 0.1);
}

.page--drivers .list-bulk-bar__filter--restrictions:hover,
.page--drivers .list-bulk-bar__filter--warnings:hover,
.page--drivers .list-bulk-bar__filter--active:hover,
.page--drivers .list-bulk-bar__filter--busy:hover {
    border-color: rgba(98, 117, 235, 0.35);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
}

.page--drivers .list-bulk-bar__filter--select:hover {
    border-color: rgba(98, 117, 235, 0.35);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
}

.page--drivers .list-bulk-bar__filter--restrictions.is-active,
.page--drivers .list-bulk-bar__filter--restrictions.is-active:hover,
.page--drivers .list-bulk-bar__filter--warnings.is-active,
.page--drivers .list-bulk-bar__filter--warnings.is-active:hover,
.page--drivers .list-bulk-bar__filter--active.is-active,
.page--drivers .list-bulk-bar__filter--active.is-active:hover,
.page--drivers .list-bulk-bar__filter--busy.is-active,
.page--drivers .list-bulk-bar__filter--busy.is-active:hover {
    background: var(--bg-elevated-soft);
    border-color: rgba(98, 117, 235, 0.45);
    color: var(--text-main);
}

.page--drivers .list-bulk-bar__filter--select.is-active,
.page--drivers .list-bulk-bar__filter--select.is-active:hover {
    background: rgba(98, 117, 235, 0.12);
    border-color: rgba(98, 117, 235, 0.45);
    color: var(--accent);
}

.layout--drivers .layout__body {
    min-height: 0;
}

.page__header {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

.page__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page__title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.page__add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
}

.page__header-search {
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 480px;
    margin-left: auto;
}

.page__header-search .driver-search__meta,
.list-search--header .list-search__meta {
    color: var(--text-muted);
}

.page__filters {
    margin-top: 12px;
}

.page__filters .list-bulk-bar__filters {
    gap: 14px;
}

.page__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

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

.card {
    background: var(--bg-elevated);
    border-radius: 18px;
    padding: 20px 18px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.card--side {
    background: var(--bg-elevated-soft);
    border-radius: 18px;
    padding: 18px 18px 16px;
    border: 1px solid var(--border-subtle);
}

.card--stretch {
    height: fit-content;
}

.card__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
}

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

.list-total {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 13px;
    color: var(--text-muted);
}

.list-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.list-pagination__info {
    font-size: 13px;
    color: var(--text-muted);
}

.list-pagination__per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.list-pagination__per-page-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.list-pagination__select {
    min-width: 72px;
    padding: 6px 10px;
    font-size: 13px;
}

.list-pagination__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.list-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
}

.list-pagination__link:hover {
    border-color: rgba(98, 117, 235, 0.45);
    color: #6275eb;
}

.list-pagination__link--active {
    background: rgba(98, 117, 235, 0.18);
    border-color: rgba(98, 117, 235, 0.55);
    color: #6275eb;
    font-weight: 600;
}

.list-pagination__gap {
    padding: 0 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.list-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-height: 0;
    margin-bottom: 0;
}

.list-bulk-bar:has(.list-bulk-bar__delete:not([hidden])) {
    min-height: 36px;
    margin-bottom: 10px;
}

.list-bulk-bar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.list-bulk-bar__filters {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.list-bulk-bar__filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.list-bulk-bar__filter--restrictions,
.list-bulk-bar__filter--warnings,
.list-bulk-bar__filter--active,
.list-bulk-bar__filter--busy {
    border-color: rgba(148, 163, 184, 0.28);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
}

.list-bulk-bar__filter--restrictions:hover,
.list-bulk-bar__filter--warnings:hover,
.list-bulk-bar__filter--active:hover,
.list-bulk-bar__filter--busy:hover {
    border-color: rgba(98, 117, 235, 0.35);
    background: var(--bg-elevated);
    color: var(--text-main);
}

.list-bulk-bar__filter--restrictions.is-active,
.list-bulk-bar__filter--warnings.is-active,
.list-bulk-bar__filter--active.is-active,
.list-bulk-bar__filter--busy.is-active {
    background: var(--bg-elevated);
    border-color: rgba(98, 117, 235, 0.45);
    color: var(--text-main);
    box-shadow: inset 0 0 0 1px rgba(98, 117, 235, 0.18);
}

.list-bulk-bar__filter--select {
    border-color: var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-main);
}

.list-bulk-bar__filter--select:hover {
    border-color: rgba(98, 117, 235, 0.35);
    background: var(--bg-elevated-soft);
    color: var(--text-main);
}

.list-bulk-bar__filter--select.is-active {
    border-color: rgba(98, 117, 235, 0.45);
    background: rgba(98, 117, 235, 0.12);
    color: var(--accent);
}

.list-bulk-bar__filter-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    border-radius: 3px;
    background: var(--bg-elevated);
    flex-shrink: 0;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.list-bulk-bar__filter-check::after {
    content: "";
    width: 3px;
    height: 7px;
    margin-top: -1px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.12s ease;
}

.list-bulk-bar__filter--select.is-active .list-bulk-bar__filter-check {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.list-bulk-bar__filter--select.is-active .list-bulk-bar__filter-check::after {
    transform: rotate(45deg) scale(1);
}

.table:not(.is-selection-mode) .table__col-check {
    display: none;
}

.list-bulk-bar__filter-count {
    min-width: 1.1em;
    font-weight: 700;
    text-align: center;
}

.list-bulk-bar__filter--restrictions .list-bulk-bar__filter-count {
    color: #b91c1c;
}

.list-bulk-bar__filter--warnings .list-bulk-bar__filter-count {
    color: #a16207;
}

.list-bulk-bar__filter--active .list-bulk-bar__filter-count {
    color: #15803d;
}

.list-bulk-bar__filter--busy .list-bulk-bar__filter-count {
    color: #c2410c;
}

.list-bulk-bar__filter-label {
    white-space: nowrap;
    color: var(--text-main);
}

.list-bulk-bar__select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.list-bulk-bar__master {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.list-bulk-bar__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
    cursor: pointer;
    padding: 0;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.list-bulk-bar__delete[hidden] {
    display: none !important;
}

.list-bulk-bar__delete:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.22);
    border-color: rgba(248, 113, 113, 0.65);
    color: #fecaca;
}

.list-bulk-bar__delete:disabled {
    opacity: 0.6;
    cursor: wait;
}

.table__col-check {
    width: 36px;
    text-align: center;
    padding: 8px 4px !important;
    vertical-align: middle;
}

.table__col-check .list-bulk-bar__master {
    margin: 0;
}

.list-bulk-row {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
    vertical-align: middle;
}

.list-total strong {
    color: var(--text);
    font-weight: 600;
}

.card__section-title {
    margin: 16px 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
}

.card__header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

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

@media (max-width: 960px) {
    .layout__header {
        padding: 14px 16px;
    }

    .layout__main {
        padding: 18px 16px 24px;
    }

    .page {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

label {
    font-size: 12px;
    color: var(--text-muted);
}

.form-input,
.form-select,
.form-file {
    width: 100%;
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 13px;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px rgba(98, 117, 235, 0.8);
}

.form-file {
    padding: 7px 11px;
    border-radius: 999px;
}

.form-input--readonly {
    background: rgba(98, 117, 235, 0.08);
    color: #6b7280;
    cursor: not-allowed;
}

.password-field {
    position: relative;
    display: block;
}

.password-field__input {
    padding-right: 42px;
}

.password-field__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 2;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.password-field__toggle:hover {
    color: var(--text-main);
    background: rgba(148, 163, 184, 0.12);
}

.password-field__toggle:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.phone-login {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: var(--bg-elevated);
    overflow: hidden;
}

.phone-login:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px rgba(98, 117, 235, 0.8);
}

.phone-login__prefix {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px 8px 12px;
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
    border-right: 1px solid rgba(148, 163, 184, 0.35);
    user-select: none;
}

.phone-login__input {
    flex: 1;
    min-width: 0;
    padding: 8px 11px;
    border: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.searchable-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.searchable-select__list[size] {
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.searchable-select__search::-webkit-search-cancel-button {
    cursor: pointer;
}

.list-search {
    margin-bottom: 14px;
    max-width: 480px;
}

.list-search--header {
    margin-bottom: 0;
    max-width: none;
    width: 100%;
}

.list-search--header .list-search__meta {
    margin: 4px 0 0;
    font-size: 12px;
}

.list-search__meta {
    margin: 8px 0 0;
    min-height: 1.2em;
}

tr.is-hidden {
    display: none;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.alert {
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.alert--error {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #fecaca;
}

.alert--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.75);
    color: #bbf7d0;
}

.alert--warning {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #fde68a;
}

.alert__title {
    font-weight: 600;
    margin-bottom: 6px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.btn-row-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}

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

.btn--primary {
    background: linear-gradient(135deg, #6275eb, #7b8bef);
    color: #ffffff;
    border: 1px solid rgba(98, 117, 235, 0.85);
    box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #5568d8, #6275eb);
    box-shadow: 0 14px 32px rgba(98, 117, 235, 0.38);
}

a.btn--primary:link,
a.btn--primary:visited {
    color: #ffffff;
}

.btn--secondary {
    background: var(--bg-elevated);
    color: var(--accent);
    border: 1px solid var(--border-subtle);
}

.btn--secondary:hover {
    background: var(--bg-elevated-soft);
}

a.btn--secondary:link,
a.btn--secondary:visited {
    color: var(--accent);
}

.btn--danger {
    background: #b91c1c;
    color: #fff;
    border: 1px solid rgba(248, 113, 113, 0.8);
}

.btn--danger:hover {
    background: #991b1b;
}

.btn--white-text {
    color: #fff;
}

.btn--small {
    padding: 6px 10px;
    font-size: 12px;
}

.qr-preview {
    margin-top: 6px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 6px;
    background: var(--bg-elevated);
    display: inline-block;
}

.qr-preview img {
    max-width: 160px;
    display: block;
    border-radius: 8px;
}

.side-section {
    margin-bottom: 14px;
}

.side-label {
    font-size: 12px;
    color: var(--text-muted);
}

.side-value {
    font-size: 13px;
}

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

.table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 10px;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(98, 117, 235, 0.35) var(--bg-elevated);
}

.table-wrap::-webkit-scrollbar {
    height: 12px;
}

.table-wrap::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 6px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 6px;
    border: 2px solid var(--bg-elevated);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.75);
}

.table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}

.table th,
.table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    vertical-align: middle;
    white-space: nowrap;
}

.table th {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.table-sort {
    white-space: nowrap;
}

.table-sort__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.table-sort__link:hover {
    color: var(--accent-blue);
}

.table-sort--active .table-sort__link {
    color: #6275eb;
}

.table-sort__indicator {
    font-size: 11px;
    line-height: 1;
    opacity: 0.9;
}

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

.table-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.table tr:hover {
    background: rgba(98, 117, 235, 0.06);
}

.table tr.dragging {
    opacity: 0.55;
    background: rgba(98, 117, 235, 0.08);
}

.table tr.drop-target {
    outline: 2px dashed rgba(98, 117, 235, 0.75);
    outline-offset: -2px;
}

.table__col-handle {
    width: 34px;
}

.table__col-actions {
    text-align: right;
}

td.actions .btn {
    margin-left: 6px;
}

td.actions .btn:first-child {
    margin-left: 0;
}

.actions,
.table__td-actions {
    text-align: right;
    white-space: nowrap;
}

.drag-handle {
    cursor: grab;
    user-select: none;
    color: rgba(98, 117, 235, 0.45);
}

.actions,
.table__td-actions {
    text-align: right;
    white-space: nowrap;
}

.link-action {
    display: inline-block;
    margin-right: 10px;
    color: var(--accent-blue);
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.link-action:hover {
    text-decoration: underline;
}

.link-action--danger {
    color: #fca5a5;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.badge--muted {
    color: var(--text-muted);
    background: var(--bg-elevated-soft);
}

.badge--accent {
    color: #a7f3d0;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

.table__empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 10px;
}

.layout__footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    padding: 10px 24px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .layout__body {
        flex-direction: column;
        overflow: visible;
    }

    .layout__sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--border-subtle);
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .layout__main {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-footer {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .layout__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right {
        justify-content: flex-start;
    }

    .page__title {
        font-size: 24px;
    }

    .page__header-search {
        flex: 1 1 100%;
        max-width: none;
        margin-left: 0;
    }

    .list-pagination__pages {
        margin-left: 0;
        width: 100%;
    }

    .card {
        padding: 16px 14px;
    }
}