/* Generated by scripts/build_css_bundle.py. Edit source CSS, then regenerate. */

/* Source: css/main.css */

/* Source: css/base/variables.css */
:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dfe6ef;
    --line-soft: #e8edf4;

    --text: #22324d;
    --text-soft: #617089;
    --text-muted: #8d9aae;

    --blue: #2874ea;
    --blue-dark: #1f5fc3;
    --blue-soft: #e8f0ff;

    --yellow: #f2b532;
    --yellow-soft: #fff0cc;

    --red: #ef5146;
    --red-soft: #ffe3df;

    --green: #23b26d;
    --green-soft: #dff7eb;

    --shadow-sm: 0 4px 14px rgba(39, 63, 96, 0.06);
    --shadow-md: 0 10px 30px rgba(39, 63, 96, 0.08);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 22px;
    --radius-xl: 24px;

    --container: 1340px;
    --dark-soft: #5b667a;

    --vehicle-photo-aspect: 3 / 2;
}



/* Source: css/base/reset.css */
@font-face {
    font-family: "Manrope";
    src: url("../fonts/Manrope-VariableFont_wght.ttf") format("truetype");
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-VariableFont_opsz_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
    background: var(--bg);
    color: var(--text);
}

html {
    overflow-y: scroll;
}

body {
    min-height: 100vh;
}

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

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

img {
    max-width: 100%;
    display: block;
}



/* Source: css/base/layout.css */
.app-shell {
    min-height: 100vh;
}

.page-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 22px 34px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 22px;
    display: grid;
    grid-template-columns: 240px 1fr 180px;
    align-items: center;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    display: flex;
    align-items: center;
    color: var(--blue);
    font-size: 42px;
    line-height: 1;
}

.brand-text {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 34px;
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 18px;
    color: var(--text-soft);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    z-index: 0;
    transition:
        color 0.22s ease,
        transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-item::before {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: 4px;
    bottom: 10px;
    border: 1px solid rgba(47, 102, 216, 0.16);
    border-radius: 15px;
    background: rgba(238, 244, 255, 0.78);
    box-shadow: 0 12px 26px rgba(47, 102, 216, 0.08);
    opacity: 0;
    transform: translateY(4px) scale(0.96);
    transition:
        opacity 0.22s ease,
        transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: -1;
}

.nav-item > span,
.nav-item > i {
    position: relative;
    z-index: 1;
}

.nav-item:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.nav-item:hover::before,
.nav-group:hover .nav-item::before,
.nav-group:focus-within .nav-item::before {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.nav-item i {
    font-size: 12px;
    opacity: 0.7;
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease;
}

.nav-item:hover i,
.nav-item.active i {
    opacity: 1;
}

.nav-alert-badge {
    position: relative;
    z-index: 1;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff6b63 0%, #ef4444 100%);
    border: 2px solid #ffffff;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    box-shadow: 0 9px 20px rgba(239, 68, 68, 0.26);
    transform: translateY(-1px);
}

.nav-item.active {
    color: var(--text);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    margin: 0 auto;
    width: 100%;
    max-width: 72px;
    height: 4px;
    border-radius: 999px;
    background: var(--blue);
}

.nav-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-group:hover .nav-item i,
.nav-group:focus-within .nav-item i {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    width: 342px;
    padding: 14px 0;
    border: 1px solid rgba(134, 152, 184, 0.22);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 58px rgba(40, 58, 92, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 14px) scale(0.985);
    transition:
        opacity 0.26s ease,
        transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 0s linear 0.26s;
    z-index: 220;
    will-change: opacity, transform;
}

.nav-dropdown-service {
    width: 356px;
}

.nav-dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 18px;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
    transition-delay: 0.08s, 0.08s, 0s;
}

.nav-dropdown-label {
    padding: 0 18px 9px;
    color: #7b88a3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: #52627b;
    text-decoration: none;
    transform: translateY(2px);
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.24s ease;
}

.nav-group:hover .nav-dropdown-link,
.nav-group:focus-within .nav-dropdown-link {
    transform: translateY(0);
}

.nav-dropdown-link:hover {
    background: #f5f8fd;
    color: #253c63;
}

.nav-dropdown-link.active {
    background: #eef4ff;
    color: #255fcf;
}

.nav-dropdown-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f0f5fc;
    color: #52709c;
    font-size: 18px;
}

.nav-dropdown-link.active .nav-dropdown-icon,
.nav-dropdown-link:hover .nav-dropdown-icon {
    background: #dfeaff;
    color: #255fcf;
}

.nav-dropdown-link strong,
.nav-dropdown-link small {
    display: block;
    letter-spacing: 0;
}

.nav-dropdown-link.is-soon {
    cursor: default;
}

.nav-dropdown-link.is-soon:hover {
    background: #fbfcff;
    color: #52627b;
}

.nav-dropdown-link.is-soon .nav-dropdown-icon {
    background: #f4f7fb;
    color: #7b88a3;
}

.nav-dropdown-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-dropdown-badge {
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-dropdown-link strong {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 800;
}

.nav-dropdown-link small {
    margin-top: 2px;
    color: #7b88a3;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

.nav-dropdown-divider {
    height: 1px;
    margin: 10px 18px;
    background: #e8edf5;
}

.profile-chip {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
    color: #52627b;
    font-weight: 700;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #eef4ff 0%, #dce8ff 100%);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h1,
.page-header h2 {
    margin: 0 0 6px;
}

.page-header p {
    margin: 0;
    color: #666;
}

.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-subtitle {
    color: #7b8aa0;
    font-size: 15px;
    margin-top: 6px;
    font-weight: 600;
}

.actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 10px;
}

.inline-link {
    display: inline-block;
    margin-top: 6px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

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

@media (max-width: 1220px) {
    .topbar-inner {
        grid-template-columns: 220px 1fr 150px;
    }

    .main-nav {
        gap: 26px;
    }
}

@media (max-width: 860px) {
    .topbar-inner {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 14px;
    }

    .main-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 18px;
    }

    .profile-chip {
        justify-self: start;
    }
}

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

@media (max-width: 640px) {
    .page-wrap,
    .topbar-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .brand-text {
        font-size: 22px;
    }
}




/* Source: css/components/buttons.css */
.btn-primary,
.add-btn,
.btn-secondary,
.btn-danger,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-weight: 700;
}

.btn-primary {
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 14px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.add-btn {
    height: 54px;
    padding: 0 28px;
    border-radius: 14px;
    background: linear-gradient(180deg, #2f82f0 0%, #226edb 100%);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 10px 20px rgba(40, 116, 234, 0.2);
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(40, 116, 234, 0.24);
}

.btn-secondary {
    padding: 12px 18px;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    border: 1px solid #dbe3ef;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.btn-danger {
    padding: 12px 18px;
    border-radius: 12px;
    background: #ef4444;
    color: #fff;
    font-size: 14px;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.22);
}

.btn-ghost {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    font-size: 13px;
}

.btn-ghost:hover {
    background: #f8fbff;
}

.btn-ghost-danger {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff5f5;
}

.btn-ghost-danger:hover {
    background: #ffeaea;
}

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

.btn-danger-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #d83b3b 0%, #c92f2f 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-danger-solid:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(201, 47, 47, 0.2);
    filter: brightness(1.02);
}

.btn-danger-solid:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(201, 47, 47, 0.12);
}

.btn-danger-solid:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .add-btn,
    .btn-primary {
        width: 100%;
    }
}



/* Source: css/components/badges.css */
.badge,
.fuel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge.ok,
.fuel-badge.ok {
    background: #e6f7ee;
    color: #21915d;
}

.badge.warning,
.fuel-badge.warning {
    background: #fff4d7;
    color: #c88b09;
}

.badge.danger,
.fuel-badge.danger {
    background: #ffe7e3;
    color: #d95045;
}

.flash-stack {
    position: fixed;
    top: 78px;
    right: 22px;
    z-index: 10040;
    width: min(440px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.flash-notice {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    align-items: start;
    gap: 11px;
    padding: 14px 12px 14px 14px;
    border: 1px solid #cfe2d8;
    border-radius: 15px;
    background: #fff;
    color: #2d405a;
    box-shadow: 0 18px 42px rgba(27, 45, 72, .2);
    pointer-events: auto;
}

.flash-notice.is-warning { border-color: #ead3a7; }
.flash-notice.is-info { border-color: #cbdcf5; }
.flash-notice.is-error { border-color: #efc4c0; }

.flash-notice-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e8f7ef;
    color: #20905d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.flash-notice.is-warning .flash-notice-icon { background: #fff4da; color: #b87a00; }
.flash-notice.is-info .flash-notice-icon { background: #ebf3ff; color: #376dcc; }
.flash-notice.is-error .flash-notice-icon { background: #fff0ee; color: #c4453c; }

.flash-notice-copy { display: grid; gap: 3px; min-width: 0; }
.flash-notice-copy strong { color: #213550; font-size: 13px; }
.flash-notice-copy span {
    color: #596b83;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}
.flash-notice-copy a {
    width: fit-content;
    margin-top: 4px;
    color: #315fbd;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.flash-notice-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #75849a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.flash-notice-close:hover { background: #f1f4f8; color: #354a67; }

@media (max-width: 600px) {
    .flash-stack {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

.flash-error-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    padding: 24px;
    background: rgba(20, 33, 54, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: flash-error-overlay-in 0.16s ease both;
}

.flash-error-dialog {
    position: relative;
    width: min(560px, 100%);
    min-height: 128px;
    padding: 24px 58px 24px 24px;
    border: 1px solid #f0b9b3;
    border-radius: 18px;
    background: #ffffff;
    color: #263850;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    box-shadow: 0 28px 80px rgba(31, 45, 70, 0.28);
    animation: flash-error-dialog-in 0.2s ease both;
}

.flash-error-dialog:focus {
    outline: none;
}

.flash-error-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff0ee;
    color: #d94f45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.flash-error-copy strong {
    display: block;
    margin: 1px 0 9px;
    color: #253650;
    font-size: 17px;
    line-height: 1.3;
}

.flash-error-copy ul {
    margin: 0;
    padding-left: 18px;
    color: #6f4450;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
}

.flash-error-copy li + li {
    margin-top: 5px;
}

.flash-error-item > span {
    display: block;
}

.flash-error-action {
    width: fit-content;
    min-height: 38px;
    margin-top: 13px;
    padding: 8px 13px;
    border-radius: 10px;
    background: #3f68e8;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(63, 104, 232, 0.2);
}

.flash-error-action:hover {
    background: #3157ce;
    color: #ffffff;
    transform: translateY(-1px);
}

.flash-error-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #f5f7fb;
    color: #5e6f86;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
}

.flash-error-close:hover {
    background: #ffecea;
    color: #c94138;
}

@keyframes flash-error-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes flash-error-dialog-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .flash-error-overlay {
        padding: 16px;
    }

    .flash-error-dialog {
        padding: 20px 48px 20px 18px;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 12px;
    }

    .flash-error-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 18px;
    }
}

.alert-badge {
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
}

.alert-badge.warning {
    background: #fff4d7;
    color: #c88b09;
}

.alert-badge.danger {
    background: #ffe7e3;
    color: #d95045;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.stat-badge.warning {
    background: #f6f1df;
    color: #8d7a37;
}

.stat-badge.danger {
    background: #ffe9e6;
    color: #dd5b4e;
}

.status-dot {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid transparent;
}

.status-dot.success {
    color: #17a35a;
    background: #e9f8ef;
    border-color: #cdeed9;
}

.status-dot.warning {
    color: #d39a17;
    background: #fff5db;
    border-color: #fde7ab;
}

.status-dot.danger {
    color: #e14d43;
    background: #ffe9e6;
    border-color: #ffd0cb;
}

.status-dot.neutral {
    color: #64748b;
    background: #f1f5f9;
    border-color: #dbe3ee;
}

.mini-alert {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mini-alert.yellow {
    background: #fff3cf;
    color: #d99f14;
}

.mini-alert.red {
    background: #ffe5e1;
    color: var(--red);
}



/* Source: css/components/forms.css */
.search-box {
    height: 54px;
    padding: 0 14px 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.search-box-inline {
    flex: 1 1 320px;
    min-width: 280px;
    height: 56px;
    border-radius: 18px;
    box-shadow: none;
    background: transparent;
    border: 0;
}

.search-box-icon {
    flex: 0 0 auto;
    font-size: 19px;
    color: #78879d;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 17px;
    color: var(--text);
    appearance: none;
    -webkit-appearance: none;
}

.search-box input::placeholder {
    color: #98a5b8;
}

.search-box input[type="search"]::-webkit-search-cancel-button,
.search-box input[type="search"]::-webkit-search-decoration,
.search-box input[type="search"]::-webkit-search-results-button,
.search-box input[type="search"]::-webkit-search-results-decoration {
    display: none;
    -webkit-appearance: none;
    appearance: none;
}

.search-clear-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d8e2f0;
    border-radius: 999px;
    background: #eef3fb;
    color: #52647d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex: 0 0 30px;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.search-clear-btn span {
    display: block;
    line-height: 1;
    color: inherit;
    transform: translateY(-1px);
}

.search-clear-btn:hover {
    transform: translateY(-1px);
    background: #dfe9f7;
    border-color: #c5d4e9;
    color: #233b5a;
    box-shadow: 0 6px 14px rgba(43, 68, 108, 0.12);
}

.search-clear-btn:active {
    transform: translateY(0);
}

.search-clear-btn[hidden] {
    display: none !important;
}

.attached-file-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.attached-file-link {
    width: fit-content;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dce6f3;
    border-radius: 12px;
    background: #f7faff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.attached-file-link:hover {
    border-color: #9bbcff;
    background: #f3f7ff;
    color: #0f5fe8;
}

.attached-file-remove {
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.attached-file-remove span {
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #ffd0d0;
    border-radius: 12px;
    background: #fff5f5;
    color: #c03636;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 900;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.attached-file-remove:hover span,
.attached-file-remove:focus-visible span {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.edit-vehicle-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.edit-detail-layout {
    align-items: start;
}

.edit-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.edit-vehicle-form {
    display: block;
}

.form-card {
    background: var(--surface);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
}

.edit-form-card {
    min-height: 100%;
}

.card {
    background: var(--surface);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

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

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
}

.section-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: 0;
    color: #22314d;
}

.section-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #8090a6;
    font-weight: 500;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

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

.form-group label {
    display: block;
    margin: 0;
    font-size: 13px;
    color: #6c7a90;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #dfe5ef;
    border-radius: 14px;
    background: #fff;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b9c9e7;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.08);
}

.form-group input[type="file"] {
    padding: 10px 12px;
    background: #fbfcfe;
}

/* Wspólny stan drag & drop dla wszystkich formularzy i importów. */
[data-file-dropzone-ready="true"].is-file-dragover,
input[type="file"].is-file-dragover {
    border-color: #2369eb !important;
    background-color: #eef5ff !important;
    box-shadow: 0 0 0 4px rgba(35, 105, 235, 0.14) !important;
}

[data-file-dropzone-ready="true"].has-selected-file {
    border-color: #5f91ef;
}

.form-group input[type="text"].js-date-picker {
    cursor: pointer;
}

.flatpickr-input[readonly] {
    background: #fff;
    cursor: pointer;
}

.flatpickr-calendar {
    border: 1px solid #dfe5ef;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    font-family: "Manrope", "Inter", sans-serif;
    z-index: 9999;
}

.flatpickr-months {
    padding: 10px 10px 0;
}

.flatpickr-month {
    height: 42px;
}

.flatpickr-current-month {
    padding-top: 6px;
    font-size: 15px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 700;
    color: #22314d;
}

.flatpickr-weekdays {
    background: #fff;
}

span.flatpickr-weekday {
    color: #7a879b;
    font-weight: 700;
    font-size: 12px;
}

.flatpickr-day {
    border-radius: 12px;
    color: #22314d;
    font-weight: 500;
}

.flatpickr-day:hover {
    background: #eef4ff;
    border-color: #eef4ff;
}

.flatpickr-day.today {
    border-color: #cfe0ff;
    background: #f6f9ff;
}

@media (max-width: 1080px) {
    .edit-vehicle-layout,
    .detail-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .document-top,
    .alert-item {
        grid-template-columns: 1fr;
    }

    .document-side,
    .alert-side {
        text-align: left;
        white-space: normal;
    }

    .document-actions {
        justify-content: flex-start;
    }
}

.async-operation-overlay[hidden] {
    display: none;
}

.async-operation-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.46);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.async-operation-card {
    width: min(360px, 100%);
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    color: #22314d;
    text-align: center;
}

.async-operation-spinner {
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border: 5px solid #dce8ff;
    border-top-color: #2f6fed;
    border-radius: 50%;
    animation: async-operation-spin 0.8s linear infinite;
}

.async-operation-card strong {
    font-size: 1rem;
}

.async-operation-card span:last-child {
    color: #6d7b91;
    font-size: 0.86rem;
    line-height: 1.45;
}

body.async-operation-active {
    overflow: hidden;
}

@keyframes async-operation-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .async-operation-spinner {
        animation-duration: 1.6s;
    }
}



/* Source: css/components/cards.css */
.panel-card {
    min-height: 152px;
    padding: 14px 20px 8px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.panel-card h4 {
    margin: 4px 0 16px;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eceff3;
}

.panel-head h3,
.panel-head h4 {
    margin: 0 0 4px;
}

.panel-head p {
    margin: 0;
    color: #7b8798;
    font-size: 14px;
}

.panel-card-wide {
    width: 100%;
}

.panel-subtext {
    font-size: 14px;
    color: #8a97aa;
    font-weight: 500;
    margin-top: 4px;
}

.panel-count {
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5fb;
    color: #617089;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
}

.detail-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    min-height: 220px;
}

.detail-card h3 {
    margin: 0 0 18px;
    font-size: 20px;
    color: #22324d;
}

.dashboard-panel {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.service-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.service-card h3 {
    margin-top: 0;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }
}



/* Source: css/components/tables.css */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

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


/* Source: css/components/chips.css */
.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f3f6fb;
    color: #4a5a75;
    font-size: 15px;
    font-weight: 600;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.filter-chip i {
    font-size: 12px;
    opacity: 0.72;
}

.filter-chip:hover {
    background: #eaf0fb;
    color: #24324a;
}

.filter-chip.active {
    background: #ffffff;
    border-color: #cfd8e6;
    box-shadow: 0 4px 14px rgba(42, 67, 113, 0.08);
    color: #21314d;
}

.vehicle-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef3fb;
    color: #40506a;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.plate-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: #f4f7fb;
    border: 1px solid #ebeff5;
    color: #40506a;
    font-size: 16px;
    font-weight: 700;
}

.mini-inline-chip {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef3fb;
    color: #627289;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.filters-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add-vehicle {
    flex-shrink: 0;
    min-height: 56px;
    padding: 0 22px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown {
    position: relative;
}

.sort-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f3f6fb;
    color: #4a5a75;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sort-dropdown-toggle:hover {
    background: #eaf0fb;
    color: #24324a;
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    padding: 10px;
    display: none;
    z-index: 50;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(31, 45, 90, 0.12);
}

.sort-dropdown.open .sort-dropdown-menu {
    display: block;
}

.sort-dropdown-item {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    color: #33425f;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.sort-dropdown-item:hover {
    background: #f5f8fd;
    color: #1f3050;
}

.sort-dropdown-item.active {
    background: #eef4ff;
    color: #2e63e6;
}

@media (max-width: 1100px) {
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-add-vehicle {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .filters-shell {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-group,
    .sort-dropdown {
        width: 100%;
    }

    .sort-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .sort-dropdown-menu {
        left: 0;
        right: 0;
        min-width: 100%;
    }
}



/* Source: css/components/empty-states.css */
.empty-state {
    text-align: center;
    padding: 30px 10px;
}

.empty-box {
    min-height: 120px;
    border: 1px dashed #d9e2ef;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b97aa;
    background: #f9fbfe;
    text-align: center;
    padding: 20px;
}

.vehicle-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b97aa;
    background: linear-gradient(180deg, #edf3fa 0%, #e4ecf6 100%);
    font-weight: 600;
}

.empty-state-card {
    min-height: 180px;
    border: 1px dashed #d8e1ee;
    border-radius: 22px;
    background: #fbfcfe;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.empty-state-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #eef3fb;
    color: #5b6b84;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.empty-state-card h3 {
    margin: 0;
    font-size: 20px;
    color: #22324d;
}

.empty-state-card p {
    margin: 0;
    max-width: 420px;
    color: #7b8798;
    font-size: 14px;
}


/* Source: css/components/modals.css */
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.confirm-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.confirm-modal-dialog {
    position: relative;
    width: min(100%, 460px);
    background: #fff;
    border: 1px solid #e5ebf3;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
    padding: 24px;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
}

.confirm-modal.is-open .confirm-modal-dialog {
    transform: translateY(0) scale(1);
}

.confirm-modal-head h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: 0;
    color: #22314d;
}

.confirm-modal-head p {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: #6b7a90;
    font-weight: 500;
}

.confirm-modal-options {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.confirm-modal-options[hidden] {
    display: none;
}

.confirm-modal-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    padding: 13px 14px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: #f8fafc;
    color: #263750;
    cursor: pointer;
}

.confirm-modal-option.is-remember {
    background: #fff;
}

.confirm-modal-option input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #2563eb;
}

.confirm-modal-option span {
    display: grid;
    gap: 4px;
}

.confirm-modal-option strong {
    font-size: 14px;
    line-height: 1.35;
}

.confirm-modal-option small {
    color: #6b7a90;
    font-size: 12px;
    line-height: 1.45;
}

.confirm-modal-option:has(input:disabled) {
    opacity: 0.58;
    cursor: not-allowed;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.confirm-modal-actions [hidden] {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .confirm-modal {
        padding: 16px;
    }

    .confirm-modal-dialog {
        width: 100%;
        padding: 20px;
        border-radius: 20px;
    }

    .confirm-modal-actions {
        flex-direction: column-reverse;
    }

    .confirm-modal-actions .btn-secondary,
    .confirm-modal-actions .btn-primary,
    .confirm-modal-actions .btn-danger-solid {
        width: 100%;
        justify-content: center;
    }
}



/* Source: css/components/module-sidebar.css */
.page-wrap-module {
    width: 100%;
    /* Reserve room for the fixed module sidebar on the left, then centre the
       content within the remaining space so wide screens get balanced gutters
       on both sides instead of dumping all the empty room on the right. */
    max-width: calc(var(--module-sidebar-content-offset) + var(--container) + var(--module-content-gutter));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--module-sidebar-content-offset);
    padding-right: var(--module-content-gutter);
    box-sizing: border-box;
}

.module-workspace {
    --module-sidebar-width: 218px;
    --module-sidebar-content-offset: 240px;
    --module-content-gutter: 28px;
}

.module-workspace.is-module-sidebar-collapsed {
    --module-sidebar-width: 66px;
}

.module-sidebar {
    position: fixed;
    left: 0;
    top: 84px;
    z-index: 18;
    width: var(--module-sidebar-width);
    height: auto;
    max-height: calc(100dvh - 104px);
    min-width: 0;
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.module-sidebar-card {
    height: auto;
    max-height: inherit;
    padding: 10px;
    border: 1px solid #e1e9f4;
    border-left: 0;
    border-radius: 0 20px 20px 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(82, 135, 255, 0.09), transparent 31%),
        rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 38px rgba(34, 61, 101, 0.09);
    display: flex;
    flex-direction: column;
    overflow: visible;
    backdrop-filter: blur(16px);
}

.module-sidebar-header {
    min-height: 64px;
    padding: 8px 7px 12px;
    border-bottom: 1px solid #edf1f6;
    display: flex;
    align-items: center;
    gap: 11px;
    transition: gap 0.22s ease, padding 0.22s ease;
}

.module-sidebar-copy {
    min-width: 0;
    max-width: 170px;
    opacity: 1;
    overflow: hidden;
    transition: max-width 0.24s ease, opacity 0.18s ease;
}

.module-sidebar-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid #d7e4fa;
    border-radius: 13px;
    background: linear-gradient(145deg, #f8fbff, #eaf2ff);
    color: #2868e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 7px 17px rgba(47, 102, 216, 0.1);
}

.module-sidebar-heading {
    min-width: 0;
}

.module-sidebar-heading strong,
.module-sidebar-heading small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-sidebar-heading strong {
    color: #22314d;
    font-size: 16px;
    font-weight: 900;
}

.module-sidebar-heading small {
    margin-top: 3px;
    color: #75859c;
    font-size: 11px;
    font-weight: 700;
}

.module-sidebar-body {
    flex: 0 1 auto;
    min-height: 0;
    padding: 10px 0 6px;
    overflow-y: auto;
    overflow-x: clip;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #d8e2f0 transparent;
}

.module-sidebar-section + .module-sidebar-section {
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid #edf1f6;
}

.module-sidebar-label {
    max-height: 24px;
    padding: 0 10px 7px;
    color: #7788a0;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.2s ease, opacity 0.16s ease;
}

.module-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-sidebar-nav a {
    position: relative;
    min-height: 43px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #566982;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, gap 0.22s ease;
}

.module-sidebar-nav a::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #2f6ff0;
    opacity: 0;
    transform: scaleY(0.45);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.module-sidebar-nav a > i {
    width: 22px;
    flex: 0 0 22px;
    color: #71829a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: color 0.18s ease, transform 0.18s ease;
}

.module-sidebar-nav a:hover {
    border-color: #e1e9f6;
    background: #f7faff;
    color: #2e64c8;
    transform: translateX(2px);
}

.module-sidebar-nav a:hover > i {
    color: #2f6fe8;
}

.module-sidebar-nav a.active {
    border-color: #d7e5ff;
    background: linear-gradient(100deg, #eef4ff 0%, #f7faff 100%);
    color: #175fd9;
    box-shadow: 0 7px 18px rgba(47, 102, 216, 0.09);
}

.module-sidebar-nav a.active::before {
    opacity: 1;
    transform: scaleY(1);
}

.module-sidebar-nav a.active > i {
    color: #1f67e5;
    transform: scale(1.04);
}

.module-sidebar-nav a.is-action {
    min-height: 39px;
    color: #536781;
    font-size: 12px;
}

.module-sidebar-nav a.is-action > i {
    width: 21px;
    height: 21px;
    border-radius: 7px;
    background: #edf4ff;
    color: #3473e8;
    font-size: 12px;
}

.module-sidebar-help {
    min-height: 58px;
    margin-top: 7px;
    padding: 9px 8px;
    border-top: 1px solid #edf1f6;
    border-radius: 12px;
    color: #61728a;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, min-height 0.22s ease, padding 0.22s ease, gap 0.22s ease;
}

.module-sidebar-help:hover {
    background: #f5f8ff;
    color: #245fcf;
}

.module-sidebar-help-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #1769e8;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 6px 14px rgba(23, 105, 232, 0.2);
}

.module-sidebar-help-copy {
    min-width: 0;
    transform: none;
}

.module-sidebar-help-copy strong,
.module-sidebar-help-copy small {
    display: block;
}

.module-sidebar-help-copy strong {
    color: #283955;
    font-size: 12px;
    font-weight: 900;
}

.module-sidebar-help-copy small {
    margin-top: 3px;
    color: #71829a;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.module-sidebar-footer {
    padding-top: 8px;
    border-top: 1px solid #edf1f6;
}

.module-sidebar-footer button {
    width: 100%;
    min-height: 39px;
    padding: 0 10px;
    border: 1px solid #dfe7f2;
    border-radius: 11px;
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    color: #61728a;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(40, 65, 100, 0.05);
    transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, gap 0.22s ease, padding 0.22s ease;
}

.module-sidebar-footer button:hover {
    border-color: #b9cdef;
    color: #2868db;
    box-shadow: 0 7px 18px rgba(47, 102, 216, 0.08);
}

.module-sidebar-footer button:focus-visible,
.module-sidebar-nav a:focus-visible,
.module-sidebar-help:focus-visible {
    outline: 3px solid rgba(47, 102, 243, 0.18);
    outline-offset: 2px;
}

.module-sidebar-footer button i {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 1px solid #dce5f1;
    border-radius: 7px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

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

.page-wrap-module .service-shell > .service-sidebar {
    display: none;
}

.is-module-sidebar-collapsed .module-sidebar-card {
    padding-left: 8px;
    padding-right: 8px;
}

.is-module-sidebar-collapsed .module-sidebar-header {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
}

.is-module-sidebar-collapsed .module-sidebar-copy {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
}

.is-module-sidebar-collapsed .module-sidebar-label {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.is-module-sidebar-collapsed .module-sidebar-body {
    overflow: visible;
    scrollbar-gutter: auto;
}

.is-module-sidebar-collapsed .module-sidebar-section + .module-sidebar-section {
    margin-top: 8px;
    padding-top: 8px;
}

.is-module-sidebar-collapsed .module-sidebar-nav a {
    min-height: 42px;
    padding: 0;
    gap: 0;
    justify-content: center;
}

.is-module-sidebar-collapsed .module-sidebar-nav a::before {
    left: -8px;
}

.is-module-sidebar-collapsed .module-sidebar-nav a::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 11px);
    top: 50%;
    z-index: 30;
    padding: 7px 10px;
    border: 1px solid #dbe5f3;
    border-radius: 9px;
    background: #ffffff;
    color: #31445f;
    box-shadow: 0 10px 28px rgba(32, 55, 87, 0.15);
    font-size: 11px;
    font-weight: 850;
    opacity: 0;
    pointer-events: none;
    transform: translate(5px, -50%);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.is-module-sidebar-collapsed .module-sidebar-nav a:hover::after,
.is-module-sidebar-collapsed .module-sidebar-nav a:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.is-module-sidebar-collapsed .module-sidebar-nav a > i {
    width: 28px;
    flex-basis: 28px;
}

.is-module-sidebar-collapsed .module-sidebar-footer button {
    padding: 0;
    gap: 0;
    justify-content: center;
}

.is-module-sidebar-collapsed .module-sidebar-help {
    min-height: 58px;
    padding: 9px 0;
    gap: 0;
    justify-content: center;
}

@media (max-width: 760px) {
    .page-wrap-module {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 14px;
        padding-right: 14px;
    }

    .module-workspace,
    .module-workspace.is-module-sidebar-collapsed {
        --module-sidebar-width: auto;
    }

    .module-sidebar {
        position: static;
        width: auto;
        max-height: none;
        margin-bottom: 14px;
        padding: 14px 14px 0;
    }

    .module-sidebar-card {
        height: auto;
        max-height: none;
        padding: 9px;
        border-left: 1px solid #e1e9f4;
        border-radius: 17px;
    }

    .module-sidebar-header {
        min-height: 54px;
        padding: 4px 5px 9px;
    }

    .module-sidebar-mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 11px;
    }

    .module-sidebar-body {
        padding-top: 8px;
    }

    .is-module-sidebar-collapsed .module-sidebar-body {
        display: none;
    }

    .module-sidebar-footer {
        padding-top: 7px;
    }

    .module-sidebar-footer button,
    .is-module-sidebar-collapsed .module-sidebar-footer button {
        justify-content: center;
    }

    .is-module-sidebar-collapsed .module-sidebar-copy[data-module-sidebar-toggle-label] {
        display: inline;
        max-width: 140px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .is-module-sidebar-collapsed .module-sidebar-header .module-sidebar-copy {
        display: block;
        max-width: 170px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .is-module-sidebar-collapsed .module-sidebar-header {
        justify-content: flex-start;
        gap: 11px;
    }

    .is-module-sidebar-collapsed .module-sidebar-nav a::after {
        display: none;
    }
}

@media (max-width: 860px) and (min-width: 761px) {
    .page-wrap-module {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 22px;
        padding-right: 22px;
    }

    .module-workspace,
    .module-workspace.is-module-sidebar-collapsed {
        --module-sidebar-width: auto;
    }

    .module-sidebar {
        position: static;
        width: auto;
        max-height: none;
        padding: 18px 22px 0;
    }

    .module-sidebar-card {
        height: auto;
        max-height: none;
        border-left: 1px solid #e1e9f4;
        border-radius: 18px;
    }

    .is-module-sidebar-collapsed .module-sidebar-body {
        display: none;
    }

    .is-module-sidebar-collapsed .module-sidebar-header {
        justify-content: flex-start;
        gap: 11px;
    }

    .is-module-sidebar-collapsed .module-sidebar-header .module-sidebar-copy,
    .is-module-sidebar-collapsed .module-sidebar-copy[data-module-sidebar-toggle-label] {
        display: block;
        max-width: 170px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .is-module-sidebar-collapsed .module-sidebar-footer button {
        justify-content: center;
    }
}

@media (max-width: 1120px) and (min-width: 861px) {
    .page-wrap-module {
        max-width: calc(100vw - 108px);
        margin-left: 88px;
        margin-right: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .module-workspace,
    .module-sidebar,
    .module-sidebar-nav a,
    .module-sidebar-nav a::after,
    .module-sidebar-copy,
    .module-sidebar-label,
    .module-sidebar-help,
    .module-sidebar-footer button {
        transition: none;
    }
}



/* Source: css/components/module-header.css */
.app-module-header {
    min-height: 86px;
    padding: 8px 0 2px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.app-module-header-main {
    min-width: 0;
}

.app-module-header h1 {
    margin: 0;
    color: #102144;
    font-size: 34px;
    line-height: 1.08;
    font-weight: 650;
    letter-spacing: 0;
}

.app-module-header p {
    max-width: 800px;
    margin: 8px 0 0;
    color: #4b5f7b;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.app-module-header-actions {
    padding-top: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.app-module-header-actions > .btn-primary,
.app-module-header-actions > .btn-secondary,
.app-module-header-actions > .add-btn {
    flex: 0 0 auto;
    min-width: 118px;
    min-height: 48px;
    height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    gap: 9px;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
}

.app-module-header-actions > .btn-primary,
.app-module-header-actions > .add-btn {
    min-width: 148px;
}

.app-module-header-actions > .btn-primary {
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.17);
}

.app-module-header-actions > .btn-primary i,
.app-module-header-actions > .btn-secondary i,
.app-module-header-actions > .add-btn i {
    font-size: 15px;
    line-height: 1;
}

.app-module-header-actions > .is-disabled,
.app-module-header-actions > .disabled,
.app-module-header-actions > [aria-disabled="true"] {
    border: 1px solid #dbe3ef;
    background: #f4f7fb;
    color: #7b879a;
    cursor: not-allowed;
    opacity: 0.74;
    pointer-events: none;
    box-shadow: none;
}

.asset-export-menu {
    position: relative;
    flex: 0 0 auto;
}

.asset-export-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 118px;
    min-height: 48px;
    padding: 0 18px;
    box-sizing: border-box;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.asset-export-menu > summary::-webkit-details-marker { display: none; }
.asset-export-menu[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.asset-export-menu > summary:focus-visible,
.asset-export-options a:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }

.asset-export-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    min-width: 148px;
    padding: 6px;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(16, 33, 68, 0.15);
}

.asset-export-options a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 9px;
    color: #172846;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.asset-export-options a:hover { background: #eff6ff; color: #2563eb; }

@media (max-width: 760px) {
    .app-module-header {
        min-height: 0;
        flex-direction: column;
        gap: 14px;
    }

    .app-module-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .asset-export-menu { width: 100%; }
    .asset-export-options { left: 0; right: auto; }

    .app-module-header-actions > .btn-primary,
    .app-module-header-actions > .btn-secondary,
    .app-module-header-actions > .add-btn {
        width: 100%;
    }

    .app-module-header h1 {
        font-size: 29px;
    }
}



/* Source: css/components/page-header.css */
/* Wspólny nagłówek podstron (breadcrumbs + tytuł + podtytuł + akcje).
   Jeden wzorzec używany przez makro partials/page_header.html — styl jak
   w "Dodaj leasing". */

.app-page-header {
    min-height: 84px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.app-page-header-main {
    min-width: 0;
}

.app-page-header-breadcrumbs {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #53637f;
    font-size: 13px;
    font-weight: 800;
}

.app-page-header-breadcrumbs a {
    color: #1769e8;
    text-decoration: none;
}

.app-page-header-breadcrumbs a:hover {
    text-decoration: underline;
}

.app-page-header h1 {
    margin: 0;
    color: #17233d;
    font-size: 31px;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: 0;
}

.app-page-header p {
    margin: 8px 0 0;
    max-width: 760px;
    color: #53637f;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 650;
}

.app-page-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.app-page-header-back {
    min-width: 102px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #ffffff;
    color: #263654;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(39, 63, 96, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-page-header-back:hover {
    border-color: #bdd0ea;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(39, 63, 96, 0.08);
}

@media (max-width: 760px) {
    .app-page-header {
        flex-direction: column;
    }

    .app-page-header-actions,
    .app-page-header-back {
        width: 100%;
    }

    .app-page-header h1 {
        font-size: 27px;
    }
}




/* Source: css/pages/dashboard.css */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    min-height: 112px;
    padding: 24px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.blue-soft {
    background: #6c7c96;
}

.yellow-soft {
    background: var(--yellow);
}

.red-soft {
    background: var(--red);
}

.green-soft {
    background: var(--green);
}

.dark-soft {
    background: var(--dark-soft);
}

.stat-label {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
}

.stat-subtext {
    margin-top: 4px;
    font-size: 14px;
    color: #8a97aa;
    font-weight: 500;
}

.stat-counter {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.stat-counter.yellow {
    background: var(--yellow);
}

.stat-counter.red {
    background: var(--red);
}

.stat-counter.green {
    background: var(--green);
}

.list-row {
    min-height: 54px;
    border-top: 1px solid #edf1f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.list-left {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #40506a;
    font-size: 17px;
    font-weight: 500;
}

.list-date,
.doc-date {
    color: #6f7e94;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.alerts-list,
.alert-list,
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.alert-item-row,
.alert-row,
.doc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #edf1f5;
}

.alert-item-row:last-child,
.alert-row:last-child,
.doc-row:last-child {
    border-bottom: 0;
}

.alert-item-left,
.alert-row-left,
.doc-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.alert-copy,
.fuel-meta {
    min-width: 0;
}

.alert-title {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.alert-meta,
.doc-meta {
    font-size: 13px;
    color: #8a97aa;
    font-weight: 600;
}

.alert-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.alert-date,
.alert-row-date,
.doc-row-date {
    color: #6d7b90;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.alert-icon,
.doc-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.alert-icon.warning {
    background: #fff3d6;
    color: #d89b00;
}

.alert-icon.danger {
    background: #ffe4e1;
    color: #d93025;
}

.doc-icon {
    background: #eef3ff;
    color: #4169e1;
    font-size: 16px;
}

.doc-name {
    font-weight: 600;
    color: #1f2a44;
}

@media (max-width: 1220px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    @media (max-width: 768px) {
        .alert-item-row,
        .alert-row,
        .doc-row {
            flex-direction: column;
            align-items: flex-start;
        }

        .alert-item-right {
            width: 100%;
            align-items: flex-start;
        }
    }
}

.filters-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filters-toolbar-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.filters-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filters-search-box {
    flex: 1 1 320px;
    min-width: 280px;
    margin: 0;
}

.filters-search-box input {
    height: 48px;
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #52627b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: #b8c7de;
    color: #24324a;
    background: #f8fbff;
}

.filter-chip.active {
    background: #edf4ff;
    border-color: #bfd4ff;
    color: #2f66f3;
    box-shadow: inset 0 0 0 1px rgba(47, 102, 243, 0.04);
}

.filters-sort-dropdown {
    flex-shrink: 0;
}

.filters-sort-dropdown .sort-dropdown-toggle {
    min-width: 220px;
    height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #24324a;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filters-sort-dropdown .sort-dropdown-toggle:hover {
    border-color: #b8c7de;
    background: #f8fbff;
}

.filters-sort-dropdown .sort-dropdown-toggle:focus {
    outline: none;
    border-color: #4c7cf0;
    box-shadow: 0 0 0 4px rgba(76, 124, 240, 0.10);
}

@media (max-width: 1180px) {
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-toolbar-main {
        width: 100%;
    }

    .filters-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

}

@media (max-width: 640px) {
    .filters-toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 860px) {
    .filters-toolbar-main {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-search-box {
        min-width: 0;
        width: 100%;
    }

    .filters-group {
        width: 100%;
    }

    .filters-sort-dropdown {
        width: 100%;
    }

    .filters-sort-dropdown .sort-dropdown-toggle {
        width: 100%;
        min-width: 0;
    }
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    border: 1px solid rgba(93, 134, 197, 0.35);
    background: linear-gradient(180deg, #f7fbff 0%, #eef4ff 100%);
    color: #2d5387;
    border-radius: 999px;
    min-height: 58px;
    padding: 8px 18px 8px 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(82, 120, 186, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.user-menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(82, 120, 186, 0.16);
}

.user-menu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f6ff, #dce8ff);
    color: #3f679f;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.user-menu-name {
    max-width: 160px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-chevron {
    font-size: 13px;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.user-menu.open .user-menu-chevron {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 300px;
    background: #ffffff;
    border: 1px solid rgba(134, 152, 184, 0.22);
    border-radius: 22px;
    padding: 16px 0;
    box-shadow: 0 30px 60px rgba(40, 58, 92, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 200;
}

.user-menu.open .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-dropdown.is-closing {
    visibility: visible;
    pointer-events: none;
    transition: none;
    animation: dashboard-user-menu-pop-out 0.18s ease both;
}

@keyframes dashboard-user-menu-pop-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
}

.user-menu-section-label {
    padding: 0 22px 12px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7b88a3;
}

.user-menu-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 22px;
    text-decoration: none;
    color: #5c6c8b;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: background 0.16s ease, color 0.16s ease;
}

.user-menu-link i {
    font-size: 22px;
    line-height: 1;
    color: #7080a0;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.user-menu-link:hover {
    background: #f5f8fd;
    color: #33496f;
}

.user-menu-link:hover i,
.user-menu-link.active i {
    color: #4d6794;
}

.user-menu-link.active {
    background: #eef4ff;
    color: #255fcf;
    font-weight: 800;
}

.user-menu-divider {
    height: 1px;
    background: #e8edf5;
    margin: 10px 18px;
}

.user-menu-logout-form {
    margin: 0;
}

.user-menu-link-button {
    font-family: inherit;
}



/* Source: css/pages/vehicles.css */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
    justify-content: stretch;
}

.vehicles-pagination {
    margin-top: 22px;
    padding: 14px 0 2px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    color: #64758f;
    font-size: 13px;
    font-weight: 850;
}

.vehicles-pagination-pages {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vehicles-page-btn,
.vehicles-pagination-ellipsis {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

.vehicles-page-btn {
    border: 1px solid #dce6f3;
    background: #ffffff;
    color: #41516b;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.05);
}

.vehicles-page-btn:hover {
    border-color: #a9c3f8;
    color: #2364d8;
}

.vehicles-page-btn.active {
    border-color: #2f66d8;
    background: #2f66d8;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(47, 102, 216, 0.22);
}

.vehicles-page-btn.disabled {
    color: #a8b4c5;
    background: #f8fbff;
    box-shadow: none;
}

.vehicles-pagination-ellipsis {
    color: #7e8ca4;
}

.vehicles-per-page-form {
    display: flex;
    justify-content: flex-end;
}

.vehicles-per-page-form label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.vehicles-per-page-form select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 78px;
    height: 42px;
    border: 1px solid #dce6f3;
    border-radius: 12px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #60708a 50%),
        linear-gradient(135deg, #60708a 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #22314d;
    padding: 0 38px 0 14px;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.05);
}

.vehicles-per-page-form select:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
}

.vehicle-card-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.vehicle-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(250px, 0.78fr) minmax(330px, 1fr);
    width: 100%;
    height: 264px;
    min-height: 264px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(39, 63, 96, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vehicle-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    color: inherit;
    text-decoration: none;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #dce5f2;
}

.vehicle-info {
    min-width: 0;
    height: 100%;
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    overflow: hidden;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.vehicle-info a,
.vehicle-info button,
.vehicle-info input,
.vehicle-info select {
    pointer-events: auto;
}

.vehicle-topline {
    margin: 0;
    min-width: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicle-topline h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: 0;
    color: #22314d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plate-chip {
    max-width: 100%;
    flex-shrink: 0;
}

.vehicle-divider {
    height: 1px;
    flex-shrink: 0;
    background: #ebeff5;
    margin: 0;
}

.vehicle-main-stats {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 52px;
    flex-shrink: 0;
}

.mileage-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #40506a;
}

.mileage-row i {
    font-size: 16px;
    color: #6c7b90;
}

.vehicle-extra-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-height: 32px;
    overflow: hidden;
}

.vehicle-mini-stat {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 9px;
    background: #f4f7fb;
    border: 1px solid #e8edf5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #465873;
    white-space: nowrap;
}

.vehicle-mini-stat-link {
    position: relative;
    z-index: 3;
    text-decoration: none;
}

.vehicle-mini-stat-link:hover {
    background: #eef4ff;
    border-color: #cfe0ff;
    color: #2364d8;
}

.vehicle-mini-stat i {
    font-size: 13px;
    color: #6d7e94;
}

.vehicle-mini-stat.text {
    background: #f8fafc;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-card-archived {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #65758e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 900;
}

.vehicle-card-archived.is-planned {
    background: #eef4ff;
    color: #2f67c8;
}

.filter-chip-archive {
    margin-left: 4px;
}

.vehicle-deadlines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    padding-bottom: 2px;
}

.meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #53627a;
    margin: 0;
    min-height: 27px;
    flex-shrink: 0;
}

.meta-line span:first-child {
    min-width: 0;
    flex: 1;
    white-space: normal;
    line-height: 1.35;
}

.meta-line strong {
    color: #34445c;
}

.vehicle-image-wrap {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #edf3f9 0%, #dde7f3 100%);
    isolation: isolate;
}

.vehicle-image-wrap::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 96px;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.86) 32%,
        rgba(255, 255, 255, 0.42) 68%,
        rgba(255, 255, 255, 0) 100%
    );
}

.vehicle-image-wrap img {
    --crop-x: 50%;
    --crop-y: 50%;
    --crop-scale: 1;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-scale));
    transform-origin: var(--crop-x) var(--crop-y);
    transition: filter 0.25s ease;
    will-change: transform, object-position;
}

.vehicle-card:hover .vehicle-image-wrap img {
    filter: saturate(1.05) contrast(1.03);
}

.vehicle-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 264px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #7f8da3;
    font-size: 14px;
    font-weight: 600;
}

.vehicle-image-placeholder i {
    font-size: 32px;
    opacity: 0.85;
}

@media (max-width: 1400px) {
    .vehicle-card {
        grid-template-columns: minmax(240px, 0.78fr) minmax(300px, 1fr);
    }
}

@media (max-width: 1240px) and (min-width: 861px) {
    .vehicles-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-card {
        grid-template-columns: minmax(280px, 0.72fr) minmax(380px, 1fr);
    }
}

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

    .vehicles-pagination {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .vehicles-pagination-pages {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .vehicles-per-page-form {
        justify-content: flex-start;
    }

    .vehicle-card {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .vehicle-image-wrap {
        order: -1;
        height: 220px;
        min-height: 220px;
    }

    .vehicle-image-wrap::before {
        inset: auto 0 0 0;
        width: 100%;
        height: 42px;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.82) 100%
        );
    }

    .vehicle-image-placeholder {
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    .vehicle-card {
        border-radius: 18px;
    }

    .vehicle-info {
        padding: 16px;
    }

    .vehicle-topline h3 {
        font-size: 18px;
    }

    .vehicle-image-wrap {
        height: 200px;
        min-height: 200px;
    }

    .vehicle-image-placeholder {
        min-height: 200px;
    }
}



/* Source: css/pages/vehicle-detail.css */
.vehicle-details-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.vehicle-detail-back-btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid #dbe6f5;
    background: #ffffff;
    color: #31506f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(22, 34, 62, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.vehicle-detail-back-btn i {
    color: #3a72e8;
    font-size: 17px;
    line-height: 1;
}

.vehicle-detail-back-btn:hover {
    transform: translateY(-1px);
    border-color: #c5d6ef;
    color: #22314d;
    box-shadow: 0 14px 28px rgba(22, 34, 62, 0.1);
}

.vehicle-details-header h1 {
    margin: 0;
}

.vehicle-details-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.vehicle-details-card {
    background: #ffffff;
    border: 1px solid #e5ebf4;
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(22, 34, 62, 0.08);
    overflow: hidden;
}

.vehicle-details-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 18px 20px 0;
    border-bottom: 1px solid #ebf0f7;
    background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
}

.vehicle-details-tab {
    border: 0;
    background: transparent;
    color: #6f8098;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 12px;
    border-bottom: 3px solid transparent;
    cursor: default;
}

.vehicle-details-tab[href] {
    cursor: pointer;
    text-decoration: none;
}

.vehicle-details-tab[href]:hover {
    color: #31506f;
    border-bottom-color: #d5e1f1;
}

.vehicle-details-tab.is-active {
    color: #3a72e8;
    border-bottom-color: #3a72e8;
}

.vehicle-details-body {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 290px;
    align-items: start;
}

.vehicle-details-media-panel,
.vehicle-details-info-panel,
.vehicle-details-side-panel {
    min-width: 0;
}

.vehicle-details-media-panel,
.vehicle-details-info-panel {
    padding: 28px;
}

.vehicle-details-media-panel {
    border-right: 1px solid #ebf0f7;
}

.vehicle-sale-page {
    gap: 24px;
    max-width: 1440px;
}

.vehicle-sale-cancel-button {
    min-height: 50px;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 900;
    border: 1px solid #ff6b6b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    background: #fff8f8;
    color: #f02929;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.vehicle-sale-cancel-button:hover {
    transform: translateY(-1px);
    background: #fff1f1;
    box-shadow: 0 12px 24px rgba(240, 41, 41, 0.12);
}

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

.vehicle-sale-main,
.vehicle-sale-sidebar {
    display: grid;
    gap: 18px;
}

.vehicle-sale-panel,
.vehicle-sale-side-card {
    border: 1px solid #dde6f2;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(31, 45, 71, 0.08);
}

.vehicle-sale-panel {
    padding: 24px;
}

.vehicle-sale-section-head,
.vehicle-sale-side-head,
.vehicle-sale-current-file,
.vehicle-sale-current-file a {
    display: flex;
    align-items: center;
}

.vehicle-sale-section-head {
    gap: 16px;
    margin-bottom: 22px;
}

.vehicle-sale-step {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: linear-gradient(135deg, #2f83ff 0%, #185be8 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 950;
    box-shadow: 0 12px 24px rgba(29, 91, 232, 0.25);
}

.vehicle-sale-section-head h2,
.vehicle-sale-side-head h3 {
    margin: 0;
    color: #182743;
    line-height: 1.15;
    letter-spacing: 0;
}

.vehicle-sale-section-head h2 {
    font-size: 19px;
}

.vehicle-sale-section-head p {
    margin: 7px 0 0;
    color: #66758e;
    font-size: 13px;
    font-weight: 750;
}

.vehicle-sale-summary-card {
    display: grid;
    grid-template-columns: 168px minmax(190px, 1fr) repeat(3, minmax(118px, 0.62fr));
    align-items: center;
    gap: 20px;
    min-height: 132px;
    padding: 16px;
    border: 1px solid #dce5f1;
    border-radius: 14px;
    background: #ffffff;
}

.vehicle-sale-photo,
.vehicle-sale-preview-photo {
    position: relative;
    overflow: hidden;
    border: 1px solid #e1e8f2;
    background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%);
}

.vehicle-sale-photo {
    width: 156px;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
}

.vehicle-sale-photo img,
.vehicle-sale-preview-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.vehicle-sale-photo span,
.vehicle-sale-preview-photo span {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2d6dea;
}

.vehicle-sale-photo span {
    font-size: 42px;
}

.vehicle-sale-summary-title h3 {
    margin: 0 0 12px;
    color: #182743;
    font-size: 18px;
    line-height: 1.2;
}

.vehicle-sale-summary-title p {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 7px 0 0;
    color: #52637e;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 800;
}

.vehicle-sale-summary-title i {
    color: #6c80a3;
    font-size: 14px;
}

.vehicle-sale-summary-stat {
    min-height: 74px;
    padding-left: 18px;
    border-left: 1px solid #dce5f1;
    display: grid;
    align-content: center;
    gap: 8px;
}

.vehicle-sale-summary-stat span {
    color: #64728a;
    font-size: 12px;
    font-weight: 850;
}

.vehicle-sale-summary-stat strong {
    color: #182743;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 950;
}

.vehicle-sale-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vehicle-sale-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #23b26d;
}

.vehicle-sale-status.is-warning i {
    background: #f59e0b;
}

.vehicle-sale-status.is-done i {
    background: #2563eb;
}

.vehicle-sale-form {
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(320px, 1.1fr);
    gap: 20px;
}

.vehicle-sale-form span,
.vehicle-sale-upload-field > span {
    display: block;
}

.vehicle-sale-date-field > span,
.vehicle-sale-upload-field > span {
    margin-bottom: 10px;
    color: #263a59;
    font-size: 13px;
    font-weight: 950;
}

.vehicle-sale-form b,
.vehicle-sale-upload-field b {
    color: #f02929;
}

.vehicle-sale-date-control {
    position: relative;
    display: block;
}

.vehicle-sale-date-control input,
.vehicle-sale-date-control .flatpickr-input {
    width: 100%;
    min-height: 48px;
    padding: 0 44px 0 16px;
    border: 1px solid #d9e3f1;
    border-radius: 8px;
    background: #ffffff;
    color: #21314d;
    font-size: 15px;
    font-weight: 750;
}

.vehicle-sale-date-control i {
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 1;
    color: #516582;
    transform: translateY(-50%);
    pointer-events: none;
}

.vehicle-sale-upload-drop {
    position: relative;
    min-height: 176px;
    padding: 28px 22px;
    border: 1px dashed #b9c9df;
    border-radius: 10px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 13px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.vehicle-sale-upload-drop:hover {
    border-color: #2d72ee;
    background: #f8fbff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.08);
}

.vehicle-sale-upload-drop input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.vehicle-sale-upload-drop > i {
    color: #1769f5;
    font-size: 34px;
}

.vehicle-sale-upload-drop strong {
    max-width: 380px;
    color: #1f2e49;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 800;
}

.vehicle-sale-upload-drop em {
    min-width: 190px;
    min-height: 48px;
    border: 1px solid #d6e0ef;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #172743;
    font-size: 14px;
    font-style: normal;
    font-weight: 950;
}

.vehicle-sale-upload-field small {
    display: block;
    margin-top: 12px;
    color: #65758e;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 750;
}

.vehicle-sale-current-file {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 9px 10px 9px 14px;
    border: 1px solid #dce6f3;
    border-radius: 8px;
    background: #f7faff;
}

.vehicle-sale-current-file a {
    min-width: 0;
    gap: 9px;
    color: #315178;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.vehicle-sale-current-file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-sale-current-file button {
    width: 34px;
    height: 34px;
    border: 1px solid #f0caca;
    border-radius: 8px;
    background: #fff8f8;
    color: #d24040;
    cursor: pointer;
}

.vehicle-sale-buyer {
    grid-column: 1 / -1;
    padding-top: 18px;
    border-top: 1px dashed #dce6f3;
    display: grid;
    gap: 14px;
}

.vehicle-sale-buyer-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vehicle-sale-buyer-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 18px;
}

.vehicle-sale-buyer-head strong {
    display: block;
    color: #263a59;
    font-size: 14px;
    font-weight: 950;
}

.vehicle-sale-buyer-head div > span {
    display: block;
    margin-top: 2px;
    color: #65758e;
    font-size: 12px;
    font-weight: 750;
}

.vehicle-sale-buyer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.vehicle-sale-field {
    display: block;
}

.vehicle-sale-field.vehicle-sale-field-wide {
    grid-column: 1 / -1;
}

.vehicle-sale-field > span {
    display: block;
    margin-bottom: 7px;
    color: #354761;
    font-size: 12px;
    font-weight: 850;
}

.vehicle-sale-field input {
    width: 100%;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #d6e0ec;
    border-radius: 8px;
    background: #ffffff;
    color: #253650;
    font-size: 13px;
    font-weight: 700;
}

.vehicle-sale-field input:focus {
    border-color: #93b8f6;
    outline: 3px solid rgba(47, 102, 216, 0.12);
}

.vehicle-sale-optional {
    color: #8595ad;
    font-style: normal;
    font-weight: 750;
}

@media (max-width: 760px) {
    .vehicle-sale-buyer-grid {
        grid-template-columns: 1fr;
    }
}

.vehicle-sale-save {
    grid-column: 1 / -1;
    min-height: 56px;
    border-radius: 8px;
    justify-content: center;
    font-size: 16px;
    font-weight: 950;
}

.vehicle-sale-readonly {
    padding: 16px;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    background: #f7faff;
}

.vehicle-sale-readonly span,
.vehicle-sale-readonly strong {
    display: block;
}

.vehicle-sale-readonly span {
    color: #70809a;
    font-size: 12px;
    font-weight: 850;
}

.vehicle-sale-readonly strong {
    margin-top: 5px;
    color: #263754;
}

.vehicle-sale-sidebar {
    align-self: start;
    position: sticky;
    top: 110px;
}

.vehicle-sale-side-card {
    padding: 20px;
}

.vehicle-sale-side-head {
    gap: 12px;
    margin-bottom: 16px;
}

.vehicle-sale-side-head h3 {
    font-size: 18px;
}

.vehicle-sale-side-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    font-size: 17px;
}

.vehicle-sale-side-icon.is-warm {
    background: #fff3df;
    color: #f29a1f;
}

.vehicle-sale-side-icon.is-blue {
    background: #e9f1ff;
    color: #1c6ff0;
}

.vehicle-sale-tip-list {
    display: grid;
}

.vehicle-sale-tip-list div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid #e7eef7;
}

.vehicle-sale-tip-list div:first-child {
    border-top: 0;
}

.vehicle-sale-tip-list i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f7ff;
    color: #4f6689;
}

.vehicle-sale-tip-list p {
    margin: 0;
    color: #51627d;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 700;
}

.vehicle-sale-side-button {
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    border-radius: 8px;
    justify-content: center;
}

.vehicle-sale-preview-card {
    padding: 16px;
}

.vehicle-sale-preview-identity {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 11px;
    border: 1px solid #dfe7f2;
    border-radius: 10px 10px 0 0;
    background: #ffffff;
}

.vehicle-sale-preview-photo {
    width: 112px;
    aspect-ratio: 16 / 9;
    border-radius: 7px;
}

.vehicle-sale-preview-photo span {
    font-size: 28px;
}

.vehicle-sale-preview-identity strong,
.vehicle-sale-preview-identity span {
    display: block;
}

.vehicle-sale-preview-identity strong {
    color: #182743;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 950;
}

.vehicle-sale-preview-identity span {
    margin-top: 7px;
    color: #53647f;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-sale-preview-list {
    border: 1px solid #dfe7f2;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    background: #ffffff;
}

.vehicle-sale-preview-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 47px;
    padding: 0 12px;
    border-top: 1px solid #e8eef6;
}

.vehicle-sale-preview-list > div:first-child {
    border-top: 0;
}

.vehicle-sale-preview-list span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #40516d;
    font-size: 12px;
    font-weight: 850;
}

.vehicle-sale-preview-list span i {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    background: #edf4ff;
    color: #1f6df0;
}

.vehicle-sale-preview-list strong {
    color: #182743;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 950;
    white-space: nowrap;
}

.vehicle-sale-mini-pill,
.vehicle-sale-date-pill {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}

.vehicle-sale-mini-pill.is-active,
.vehicle-sale-date-pill.is-ok {
    background: #e6f7ed;
    color: #167342;
}

.vehicle-sale-mini-pill.is-warning {
    background: #fff4df;
    color: #bd6d13;
}

.vehicle-sale-mini-pill.is-done {
    background: #e9f1ff;
    color: #1d61db;
}

.vehicle-sale-date-pill.is-danger {
    background: #ffe9e9;
    color: #ed2f2f;
}

.vehicle-sale-date-pill.is-missing {
    background: #eef2f7;
    color: #64748b;
}

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

    .vehicle-sale-sidebar {
        position: static;
    }

    .vehicle-sale-summary-card {
        grid-template-columns: 150px minmax(200px, 1fr) repeat(3, minmax(120px, 1fr));
    }
}

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

    .vehicle-sale-photo {
        width: 100%;
        max-width: 260px;
    }

    .vehicle-sale-summary-stat {
        min-height: auto;
        padding: 12px 0 0;
        border-top: 1px solid #dce5f1;
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .vehicle-sale-cancel-button {
        width: 100%;
    }

    .vehicle-sale-panel,
    .vehicle-sale-side-card {
        padding: 16px;
    }

    .vehicle-sale-section-head {
        align-items: flex-start;
    }

    .vehicle-sale-preview-identity {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .vehicle-sale-preview-photo {
        width: 96px;
    }
}

/* Osobna kartoteka okresów numerów rejestracyjnych. */
.vehicle-registration-history-page {
    display: grid;
    gap: 18px;
}

.registration-history-current-card,
.registration-history-add-card,
.registration-history-list-card,
.registration-history-errors {
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(23, 35, 61, 0.06);
}

.registration-history-current-card {
    min-height: 104px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.registration-history-current-card > div {
    display: grid;
    gap: 5px;
}

.registration-history-current-card span {
    color: #61718a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.registration-history-current-card strong {
    color: #17233d;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1;
    letter-spacing: 0.06em;
}

.registration-history-current-card p {
    max-width: 650px;
    margin: 0;
    display: flex;
    gap: 10px;
    color: #50617a;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 650;
}

.registration-history-current-card p i {
    color: #1769e8;
    font-size: 18px;
}

.registration-history-errors {
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    border-color: #f4b8b8;
    background: #fff7f7;
    color: #a12828;
}

.registration-history-errors > i {
    font-size: 20px;
}

.registration-history-errors p {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 750;
}

.registration-history-errors p:last-child {
    margin-bottom: 0;
}

.registration-history-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.55fr);
    align-items: start;
    gap: 18px;
}

.registration-history-add-card,
.registration-history-list-card {
    padding: 22px;
}

.registration-history-add-card {
    position: sticky;
    top: 18px;
}

.registration-history-section-head {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.registration-history-section-head > span {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    background: #eaf2ff;
    color: #1769e8;
    font-size: 20px;
}

.registration-history-section-head h2,
.registration-history-section-head p {
    margin: 0;
}

.registration-history-section-head h2 {
    color: #17233d;
    font-size: 17px;
    font-weight: 900;
}

.registration-history-section-head p {
    margin-top: 3px;
    color: #687991;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 650;
}

.registration-history-form {
    display: grid;
    gap: 14px;
}

.registration-history-form label {
    display: grid;
    gap: 7px;
}

.registration-history-form label > span {
    color: #344763;
    font-size: 12px;
    font-weight: 850;
}

.registration-history-form label b {
    color: #d44343;
}

.registration-history-form label em {
    color: #8492a6;
    font-style: normal;
    font-weight: 650;
}

.registration-history-form input,
.registration-history-form select,
.registration-history-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccd7e5;
    border-radius: 10px;
    background: #fff;
    color: #17233d;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.registration-history-form textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.5;
}

.registration-history-form input:focus,
.registration-history-form select:focus,
.registration-history-form textarea:focus {
    outline: none;
    border-color: #1769e8;
    box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.12);
}

.registration-history-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.registration-history-save-button,
.registration-history-update-button {
    min-height: 44px;
    justify-content: center;
}

.registration-history-entries {
    display: grid;
    gap: 14px;
}

.registration-history-entry {
    padding: 18px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: #fbfcfe;
}

.registration-history-entry.is-latest {
    border-color: #9ec1f5;
    background: #f6f9ff;
    box-shadow: inset 4px 0 0 #1769e8;
}

.registration-history-entry-top {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.registration-history-plate {
    min-height: 44px;
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 2px solid #17233d;
    border-radius: 7px;
    background: #fff;
}

.registration-history-plate span {
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    background: #145cc5;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.registration-history-plate strong {
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    color: #121c30;
    font-size: 20px;
    letter-spacing: 0.06em;
}

.registration-history-latest-badge {
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e5f6ec;
    color: #13824a;
    font-size: 11px;
    font-weight: 850;
}

.registration-history-edit-form {
    grid-template-columns: minmax(150px, 1fr) minmax(210px, 1.2fr);
    align-items: end;
}

.registration-history-edit-form .registration-history-date-grid {
    grid-column: 2;
    grid-row: 1;
}

.registration-history-edit-form .registration-history-update-button {
    align-self: end;
}

.registration-history-delete-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e8f1;
    display: flex;
    justify-content: flex-end;
}

.registration-history-delete-form button {
    border: 0;
    background: transparent;
    color: #b53737;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.registration-history-delete-form button:disabled {
    color: #a7b0bd;
    cursor: not-allowed;
}

.registration-history-readonly {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.registration-history-readonly div {
    display: grid;
    gap: 3px;
}

.registration-history-readonly dt {
    color: #718198;
    font-size: 11px;
    font-weight: 750;
}

.registration-history-readonly dd {
    margin: 0;
    color: #17233d;
    font-size: 13px;
    font-weight: 800;
}

.registration-history-empty {
    min-height: 180px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    color: #75859b;
}

.registration-history-empty i {
    font-size: 32px;
}

.registration-history-empty p {
    margin: 0;
    font-size: 13px;
    font-weight: 750;
}

@media (max-width: 1050px) {
    .registration-history-layout {
        grid-template-columns: 1fr;
    }

    .registration-history-add-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .registration-history-current-card,
    .registration-history-entry-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .registration-history-edit-form {
        grid-template-columns: 1fr;
    }

    .registration-history-edit-form .registration-history-date-grid {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 480px) {
    .registration-history-date-grid,
    .registration-history-readonly {
        grid-template-columns: 1fr;
    }

    .registration-history-current-card,
    .registration-history-add-card,
    .registration-history-list-card {
        padding: 16px;
    }
}

.vehicle-details-info-panel {
    border-right: 1px solid #ebf0f7;
}

.vehicle-details-media-panel h2,
.vehicle-details-info-panel h2,
.vehicle-side-box h3 {
    margin: 0 0 22px;
    font-size: 22px;
    line-height: 1.15;
    color: #22314d;
    letter-spacing: 0;
}

.vehicle-details-image-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #edf3fa 0%, #dfe8f3 100%);
    border: 1px solid #e3ebf5;
    aspect-ratio: var(--vehicle-photo-aspect);
    margin-bottom: 18px;
}

.vehicle-details-image-card img {
    --crop-x: 50%;
    --crop-y: 50%;
    --crop-scale: 1;

    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-scale));
    transform-origin: var(--crop-x) var(--crop-y);
}

.vehicle-documents-card {
    border: 1px solid #e4ebf5;
    border-radius: 20px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.vehicle-documents-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.vehicle-documents-head h3 {
    margin: 0;
    font-size: 18px;
    color: #22314d;
}

.vehicle-documents-add {
    width: 100%;
    justify-content: center;
}

.vehicle-documents-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vehicle-document-row {
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-document-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.vehicle-document-row-linked {
    border: 1px solid #d8e5fb;
    border-radius: 14px;
    padding: 12px;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0) 70%),
        #f8fbff;
    box-shadow: inset 3px 0 0 #7ba7ff;
}

.vehicle-document-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vehicle-document-title {
    font-size: 15px;
    font-weight: 700;
    color: #22314d;
}

.vehicle-document-meta,
.vehicle-document-date,
.vehicle-document-link,
.vehicle-documents-empty,
.vehicle-driver-meta,
.vehicle-side-note,
.vehicle-side-empty {
    font-size: 14px;
    line-height: 1.5;
    color: #73839a;
}

.vehicle-document-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vehicle-document-link {
    color: #3a72e8;
    font-weight: 700;
    text-decoration: none;
}

.vehicle-document-type-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf4ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.vehicle-document-source-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #52657e;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.vehicle-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vehicle-document-delete-form {
    margin: 0;
}

.vehicle-details-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.vehicle-details-registration-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #dde6f3;
    background: #f9fbff;
    color: #5c6e87;
    font-size: 14px;
    font-weight: 700;
}

.vehicle-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 22px;
}

.vehicle-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vehicle-info-item span {
    font-size: 14px;
    color: #667890;
    font-weight: 600;
}

.vehicle-info-item strong {
    font-size: 18px;
    line-height: 1.45;
    color: #22314d;
    font-weight: 700;
}

.vehicle-info-item-wide {
    grid-column: 1 / -1;
}

.vehicle-info-item-compact strong {
    white-space: nowrap;
    font-size: 18px;
    line-height: 1.45;
}

.vehicle-technical-detail {
    margin-top: 34px;
    border-top: 1px solid #e5ebf4;
    border-bottom: 1px solid #e5ebf4;
    scroll-margin-top: 130px;
}

.vehicle-technical-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.vehicle-technical-detail-head::-webkit-details-marker {
    display: none;
}

.vehicle-technical-detail-head:hover h3 {
    color: #2e68d0;
}

.vehicle-technical-detail-head span {
    color: #71829a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.vehicle-technical-detail-head h3 {
    margin: 5px 0 0;
    color: #22314d;
    font-size: 18px;
    transition: color 0.18s ease;
}

.vehicle-technical-detail-actions,
.vehicle-technical-detail-toggle {
    display: inline-flex;
    align-items: center;
}

.vehicle-technical-detail-actions {
    justify-content: flex-end;
    gap: 10px;
}

.vehicle-technical-detail-toggle {
    gap: 8px;
    min-width: 76px;
    justify-content: flex-end;
    color: #356bd0;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-technical-detail-toggle i {
    transition: transform 0.18s ease;
}

.vehicle-technical-detail-toggle-open {
    display: none;
}

.vehicle-technical-detail[open] .vehicle-technical-detail-toggle-closed {
    display: none;
}

.vehicle-technical-detail[open] .vehicle-technical-detail-toggle-open {
    display: inline;
}

.vehicle-technical-detail[open] .vehicle-technical-detail-toggle i {
    transform: rotate(180deg);
}

.vehicle-technical-detail-body {
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.22s ease,
        padding 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.vehicle-technical-detail[open] .vehicle-technical-detail-body {
    max-height: 900px;
    padding: 4px 0 24px;
    opacity: 1;
}

.vehicle-technical-detail[open].is-animated-open .vehicle-technical-detail-body {
    max-height: none;
}

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

.vehicle-technical-detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e4ebf5;
    border-radius: 16px;
    background: #f9fbfe;
}

.vehicle-technical-detail-grid span {
    color: #6b7d95;
    font-size: 12px;
    font-weight: 700;
}

.vehicle-technical-detail-grid span small {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 5px;
    border-radius: 6px;
    background: #e8eef8;
    color: #4d6484;
    font-size: 9px;
    font-weight: 900;
}

.vehicle-technical-detail-grid strong {
    color: #263752;
    font-size: 15px;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .vehicle-technical-detail-head {
        align-items: flex-start;
    }

    .vehicle-technical-detail-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .vehicle-technical-detail-grid {
        grid-template-columns: 1fr;
    }
}

.vehicle-details-side-panel {
    padding: 0;
    background: #fbfcff;
}

.vehicle-side-box {
    padding: 28px;
    border-bottom: 1px solid #ebf0f7;
}

.vehicle-side-box:last-of-type {
    border-bottom: 0;
}

.vehicle-driver-card,
.vehicle-deadline-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vehicle-driver-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-driver-stack .vehicle-driver-card {
    padding: 10px;
    border: 1px solid #e3eaf4;
    border-radius: 18px;
    background: #ffffff;
}

.vehicle-driver-card-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.vehicle-driver-card-link::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, transparent 16%, rgba(225, 237, 255, 0.8) 48%, transparent 76%);
    content: "";
    opacity: 0;
    transform: translateX(-70%);
    transition: opacity 0.24s ease, transform 0.44s ease;
}

.vehicle-driver-card-link:hover {
    border-color: #aac7ff;
    background: #fbfdff;
    box-shadow: 0 12px 24px rgba(44, 104, 221, 0.12);
    transform: translateY(-3px);
}

.vehicle-driver-card-link:hover::after {
    opacity: 1;
    transform: translateX(70%);
}

.vehicle-driver-card-link:hover .vehicle-driver-name {
    color: #2874ea;
    transform: translateX(2px);
}

.vehicle-driver-avatar,
.vehicle-deadline-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #3366e8;
    background: #eaf1ff;
    flex-shrink: 0;
    overflow: hidden;
}

.vehicle-driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-driver-card-link .vehicle-driver-avatar {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.vehicle-driver-card-link:hover .vehicle-driver-avatar {
    box-shadow: 0 8px 18px rgba(42, 102, 218, 0.16);
    transform: scale(1.06) rotate(-3deg);
}

.vehicle-driver-name,
.vehicle-deadline-label {
    font-size: 18px;
    font-weight: 700;
    color: #22314d;
}

.vehicle-driver-card-link .vehicle-driver-name {
    transition: color 0.18s ease, transform 0.18s ease;
}

.vehicle-driver-meta {
    margin-top: 3px;
    font-size: 15px;
    font-weight: 700;
}

.vehicle-deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vehicle-deadline-date {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #22314d;
}

.vehicle-side-note {
    margin-top: 18px;
}

.vehicle-side-actions-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px;
}

.vehicle-side-actions-detail .btn-primary,
.vehicle-side-actions-detail .btn-secondary,
.vehicle-side-actions-detail form {
    width: 100%;
}

.vehicle-side-actions-detail .btn-primary,
.vehicle-side-actions-detail .btn-secondary {
    justify-content: center;
}

.vehicle-details-media-back {
    width: 100%;
    margin-top: auto;
}

.vehicle-details-tips {
    position: sticky;
    top: 24px;
}

@media (max-width: 1380px) {
    .vehicle-details-shell {
        grid-template-columns: 1fr;
    }

    .vehicle-details-tips {
        position: static;
    }
}

@media (max-width: 1180px) {
    .vehicle-details-body {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .vehicle-details-side-panel {
        grid-column: 1 / -1;
        border-top: 1px solid #ebf0f7;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vehicle-side-box {
        border-bottom: 0;
        border-right: 1px solid #ebf0f7;
    }

    .vehicle-side-box:last-of-type {
        border-right: 0;
    }

    .vehicle-side-actions-detail {
        grid-column: 1 / -1;
        border-top: 1px solid #ebf0f7;
    }
}

@media (max-width: 980px) {
    .vehicle-details-body {
        grid-template-columns: 1fr;
    }

    .vehicle-details-media-panel,
    .vehicle-details-info-panel {
        border-right: 0;
        border-bottom: 1px solid #ebf0f7;
    }

    .vehicle-details-side-panel {
        display: block;
    }
}

.document-current-file-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f6f8fc;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.document-current-file-inline.empty {
    justify-content: flex-start;
    color: #8a97ad;
}

.vehicle-page-layout-detail {
    display: grid;
    grid-template-columns: minmax(980px, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.vehicle-details-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.vehicle-details-shell {
    display: block;
}

.vehicle-details-card {
    width: 100%;
    min-width: 0;
}

.vehicle-details-body {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 300px;
    align-items: start;
}

.vehicle-details-tips {
    align-self: start;
    position: sticky;
    top: 110px;
}

@media (max-width: 1320px) {
    .vehicle-details-body {
        grid-template-columns: 280px minmax(0, 1fr) 270px;
    }
}

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

    .vehicle-details-tips {
        position: static;
    }
}

@media (max-width: 980px) {
    .vehicle-details-body {
        grid-template-columns: 1fr;
    }

    .vehicle-details-media-panel,
    .vehicle-details-info-panel {
        border-right: 0;
        border-bottom: 1px solid #ebf0f7;
    }

    .vehicle-details-side-panel {
        border-top: 0;
    }
}

@media (max-width: 640px) {
    .vehicle-detail-back-btn {
        width: 100%;
    }
}

.vehicle-details-media-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
}

.vehicle-documents-card {
    display: flex;
    flex-direction: column;
    max-height: 370px;
    min-height: 370px;
}

.vehicle-documents-list-scroll {
    overflow-y: auto;
    max-height: 220px;
    padding-right: 6px;
}

.vehicle-documents-head {
    flex-shrink: 0;
}

.vehicle-documents-list-scroll::-webkit-scrollbar {
    width: 8px;
}

.vehicle-documents-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(120, 136, 168, 0.35);
    border-radius: 999px;
}

.vehicle-documents-list-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.vehicle-document-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

/* ======================================================================
   Vehicle details - visual match for the compact reference
   ====================================================================== */

.vehicle-detail-shell {
    max-width: 1392px;
    gap: 18px;
}

.vehicle-detail-shell.vehicle-page-shell {
    max-width: 1392px;
}

.module-workspace:has(.vehicle-detail-shell) .page-wrap-module {
    max-width: calc(var(--module-sidebar-content-offset) + 1392px + var(--module-content-gutter));
}

.vehicle-detail-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.vehicle-detail-header-row .vehicle-page-header {
    flex: 1 1 auto;
}

.vehicle-detail-header-back {
    flex: 0 0 auto;
    min-width: 112px;
    min-height: 44px;
    margin-top: 36px;
    border-radius: 8px;
    box-shadow: none;
}

.vehicle-detail-shell.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-page-layout-detail {
    display: grid;
    grid-template-columns: minmax(0, 1068px) 304px;
    justify-content: center;
    gap: 22px;
    align-items: start;
}

.vehicle-detail-main-column,
.vehicle-detail-right-rail,
.vehicle-detail-side-stack {
    min-width: 0;
}

.vehicle-detail-main-column,
.vehicle-detail-right-rail {
    display: grid;
    gap: 16px;
}

.vehicle-detail-right-rail {
    align-self: start;
    position: sticky;
    top: 94px;
}

.vehicle-details-tabs-card,
.vehicle-detail-card,
.vehicle-detail-shell .vehicle-details-tips {
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(38, 60, 92, 0.06);
}

.vehicle-details-tabs-card {
    min-height: 58px;
    overflow: hidden;
}

.vehicle-detail-shell .vehicle-details-tabs {
    min-height: 58px;
    padding: 0 16px;
    border: 0;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 18px;
    background: #ffffff;
}

.vehicle-detail-shell .vehicle-details-tab {
    min-height: 58px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    border-bottom-width: 3px;
    color: #586987;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.vehicle-detail-shell .vehicle-details-tab.is-active {
    color: #1769e8;
    border-bottom-color: #1769e8;
}

.vehicle-detail-core-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 338px;
    gap: 16px;
    align-items: stretch;
}

.vehicle-overview-card {
    min-height: 544px;
    padding: 22px;
}

.vehicle-overview-card > h2,
.vehicle-card-head h3,
.vehicle-documents-card h2,
.vehicle-quick-preview-head h3 {
    margin: 0;
    color: #17233d;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
}

.vehicle-overview-main {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 20px;
}

.vehicle-details-image-card {
    width: 100%;
    height: 254px;
    margin: 0;
    border: 1px solid #dfe6f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #f2f5f9 0%, #e8edf4 100%);
}

.vehicle-details-image-frame {
    position: relative;
    flex: 1 1 auto;
    min-height: 204px;
    overflow: hidden;
}

.vehicle-details-image-frame img {
    --crop-x: 50%;
    --crop-y: 50%;
    --crop-scale: 1;

    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-scale));
    transform-origin: var(--crop-x) var(--crop-y);
}

.vehicle-details-image-card figcaption {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #17233d;
    font-size: 16px;
    font-weight: 900;
}

.vehicle-image-placeholder {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2f72ee;
    font-size: 62px;
}

.vehicle-overview-info {
    min-width: 0;
    display: grid;
    gap: 24px;
}

.vehicle-registration-plate {
    width: fit-content;
    min-height: 42px;
    margin: -3px 0 1px;
    padding: 0 16px 0 0;
    border-radius: 8px;
    gap: 13px;
    overflow: hidden;
    background: #ffffff;
    color: #17233d;
    box-shadow: none;
}

.vehicle-registration-plate span {
    align-self: stretch;
    width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1b63db;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.vehicle-registration-plate strong {
    color: #17233d;
    font-size: 17px;
    line-height: 1;
    font-weight: 950;
}

.vehicle-overview-card .vehicle-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 38px;
}

.vehicle-overview-card .vehicle-info-item {
    gap: 5px;
}

.vehicle-overview-card .vehicle-info-item span {
    color: #61728e;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
}

.vehicle-overview-card .vehicle-info-item strong {
    color: #17233d;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.vehicle-overview-card .vehicle-info-item-compact strong {
    white-space: normal;
}

.vehicle-overview-card .vehicle-technical-detail {
    margin-top: 24px;
    border: 1px solid #e1e8f2;
    border-radius: 0;
    scroll-margin-top: 120px;
}

.vehicle-overview-card .vehicle-technical-detail-head {
    min-height: 64px;
    padding: 0 16px;
}

.vehicle-overview-card .vehicle-technical-detail-head span {
    color: #60718d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
}

.vehicle-overview-card .vehicle-technical-detail-head h3 {
    margin-top: 4px;
    color: #17233d;
    font-size: 14px;
    font-weight: 900;
}

.vehicle-overview-card .vehicle-technical-detail-toggle {
    color: #17233d;
    font-size: 13px;
    font-weight: 900;
}

.vehicle-overview-card .vehicle-technical-detail-body {
    background: #fbfdff;
}

.vehicle-overview-card .vehicle-technical-detail[open] .vehicle-technical-detail-body {
    padding: 14px 16px 16px;
}

.vehicle-detail-side-stack {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 16px;
    height: 100%;
}

.vehicle-side-box {
    padding: 22px;
    border-bottom: 0;
    background: #ffffff;
}

.vehicle-card-head,
.vehicle-documents-head,
.vehicle-quick-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.vehicle-panel-menu {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #102044;
    font-size: 18px;
}

.vehicle-panel-actions {
    position: relative;
}

.vehicle-panel-actions > summary {
    list-style: none;
    cursor: pointer;
    border-radius: 8px;
}

.vehicle-panel-actions > summary::-webkit-details-marker {
    display: none;
}

.vehicle-panel-actions > summary:hover,
.vehicle-panel-actions > summary:focus-visible,
.vehicle-panel-actions[open] > summary {
    background: #eef4ff;
    color: #1463f3;
    outline: none;
}

.vehicle-panel-actions-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    min-width: 142px;
    padding: 6px;
    border: 1px solid #dce5f3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(20, 39, 74, 0.14);
}

.vehicle-panel-actions-menu a,
.vehicle-panel-actions-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 7px;
    color: #17233d;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.vehicle-panel-actions-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.vehicle-panel-actions-menu a:hover,
.vehicle-panel-actions-menu a:focus-visible,
.vehicle-panel-actions-menu button:hover,
.vehicle-panel-actions-menu button:focus-visible {
    background: #eef4ff;
    color: #1463f3;
    outline: none;
}

.vehicle-driver-assignment-page {
    max-width: 1220px;
}

.vehicle-driver-assignment-card {
    display: grid;
    gap: 16px;
}

.vehicle-driver-assignment-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border: 1px solid #dce5f3;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(20, 39, 74, 0.06);
}

.vehicle-driver-assignment-vehicle,
.vehicle-driver-assignment-safety {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.vehicle-driver-assignment-vehicle-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #e8f0ff, #f2f6ff);
    color: #2766da;
    font-size: 1.25rem;
}

.vehicle-driver-assignment-vehicle > div,
.vehicle-driver-assignment-safety > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.vehicle-driver-assignment-vehicle span:not(.vehicle-driver-assignment-vehicle-icon),
.vehicle-driver-assignment-vehicle small {
    color: #70809a;
    font-size: 0.74rem;
    font-weight: 700;
}

.vehicle-driver-assignment-vehicle strong {
    overflow: hidden;
    color: #17233d;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-driver-assignment-safety {
    max-width: 455px;
    padding: 11px 14px;
    border: 1px solid #cfeadd;
    border-radius: 12px;
    background: #f2fbf7;
}

.vehicle-driver-assignment-safety > i {
    color: #168259;
    font-size: 1.25rem;
}

.vehicle-driver-assignment-safety strong {
    color: #155f46;
    font-size: 0.8rem;
}

.vehicle-driver-assignment-safety span {
    color: #4f7568;
    font-size: 0.72rem;
    line-height: 1.4;
}

.vehicle-driver-assignment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 16px;
}

.vehicle-driver-assignment-main,
.vehicle-driver-assignment-summary-inner {
    overflow: hidden;
    border: 1px solid #dce5f3;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(20, 39, 74, 0.06);
}

.vehicle-driver-assignment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid #e5ebf5;
}

.vehicle-driver-assignment-head h2 {
    margin: 3px 0 6px;
    color: #17233d;
    font-size: 1.18rem;
}

.vehicle-driver-assignment-head p {
    margin: 0;
    max-width: 630px;
    color: #657694;
    font-size: 0.82rem;
    line-height: 1.55;
}

.vehicle-driver-assignment-eyebrow {
    color: #3971d5;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vehicle-driver-assignment-filters {
    padding: 16px 24px 18px;
    border-bottom: 1px solid #e5ebf5;
    background: #f8faff;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
}

.vehicle-driver-assignment-filters label {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: #52637f;
    font-size: 0.68rem;
    font-weight: 800;
}

.vehicle-driver-assignment-filters input,
.vehicle-driver-assignment-filters select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #cfdbed;
    border-radius: 10px;
    background: #ffffff;
    color: #17233d;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.76rem;
}

.vehicle-driver-assignment-control {
    position: relative;
    min-width: 0;
}

.vehicle-driver-assignment-control > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 11px;
    color: #3971d5;
    transform: translateY(-50%);
}

.vehicle-driver-assignment-control input,
.vehicle-driver-assignment-control input.flatpickr-input {
    padding-left: 34px;
}

.vehicle-driver-assignment-filters input:focus,
.vehicle-driver-assignment-filters select:focus {
    border-color: #3977e6;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.vehicle-driver-assignment-results {
    min-height: 220px;
}

.vehicle-driver-assignment-results.htmx-request {
    opacity: 0.62;
    pointer-events: none;
}

.vehicle-driver-assignment-results-head {
    min-height: 40px;
    padding: 9px 24px;
    border-bottom: 1px solid #edf1f7;
    color: #6a7d9a;
    background: #fcfdff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.72rem;
    font-weight: 750;
}

.vehicle-driver-assignment-results-head strong {
    color: #213451;
}

.vehicle-driver-assignment-results-head i {
    margin-right: 4px;
    color: #217452;
}

.vehicle-driver-assignment-selected-total {
    color: #247152;
}

.vehicle-driver-assignment-list {
    display: grid;
    gap: 8px;
    padding: 16px 18px 20px;
}

.vehicle-driver-assignment-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 11px 13px;
    border: 1px solid #dce5f3;
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.vehicle-driver-assignment-option:hover {
    border-color: #b9cbed;
    box-shadow: 0 6px 16px rgba(35, 64, 112, 0.07);
}

.vehicle-driver-assignment-option.is-selected {
    border-color: #8aaff5;
    background: #f5f8ff;
    box-shadow: inset 3px 0 #2f6fed, 0 5px 16px rgba(35, 84, 171, 0.08);
}

.vehicle-driver-assignment-option.is-pinned-selection {
    border-style: dashed;
}

.vehicle-driver-assignment-select {
    display: grid;
    grid-template-columns: 24px 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-width: 0;
    cursor: pointer;
}

.vehicle-driver-assignment-select > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vehicle-driver-assignment-check {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #b9c7da;
    border-radius: 7px;
    background: #ffffff;
    color: transparent;
    font-size: 0.9rem;
    transition: 0.16s ease;
}

.vehicle-driver-assignment-select > input:focus-visible + .vehicle-driver-assignment-check {
    outline: 3px solid rgba(47, 111, 237, 0.2);
    outline-offset: 2px;
}

.vehicle-driver-assignment-select > input:checked + .vehicle-driver-assignment-check {
    border-color: #2f6fed;
    background: #2f6fed;
    color: #ffffff;
}

.vehicle-driver-assignment-avatar {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: #eaf1ff;
    color: #1463f3;
    font-size: 0.78rem;
    font-weight: 800;
}

.vehicle-driver-assignment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-driver-assignment-person {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vehicle-driver-assignment-person strong,
.vehicle-driver-assignment-person small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-driver-assignment-person strong {
    color: #17233d;
    font-size: 0.88rem;
}

.vehicle-driver-assignment-name-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.vehicle-driver-assignment-name-row em {
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef2f8;
    color: #63738c;
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}

.vehicle-driver-assignment-name-row em.is-available {
    background: #e4f7ee;
    color: #18704d;
}

.vehicle-driver-assignment-name-row em.is-inactive,
.vehicle-driver-assignment-name-row em.is-not-employed,
.vehicle-driver-assignment-name-row em.is-absent {
    background: #fff0e7;
    color: #a65320;
}

.vehicle-driver-assignment-name-row em.is-pinned {
    background: #eaf1ff;
    color: #2b61b9;
}

.vehicle-driver-assignment-person small {
    color: #6d7e9b;
    font-size: 0.72rem;
}

.vehicle-driver-assignment-option-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.vehicle-driver-assignment-selected-badge {
    display: none;
    align-items: center;
    gap: 3px;
    color: #277252;
    font-size: 0.66rem;
    font-weight: 800;
}

.vehicle-driver-assignment-option.is-selected .vehicle-driver-assignment-selected-badge {
    display: inline-flex;
}

.vehicle-driver-assignment-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.vehicle-driver-assignment-primary > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vehicle-driver-assignment-primary > span {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #d4deec;
    border-radius: 9px;
    background: #ffffff;
    color: #65748c;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.vehicle-driver-assignment-primary .bi-star-fill {
    display: none;
}

.vehicle-driver-assignment-primary > input:checked + span {
    border-color: #e6bd55;
    background: #fff9e9;
    color: #8a6415;
}

.vehicle-driver-assignment-primary > input:checked + span .bi-star {
    display: none;
}

.vehicle-driver-assignment-primary > input:checked + span .bi-star-fill {
    display: inline-block;
}

.vehicle-driver-assignment-primary > input:focus-visible + span {
    outline: 3px solid rgba(47, 111, 237, 0.2);
    outline-offset: 2px;
}

.vehicle-driver-assignment-primary:has(input:disabled) {
    opacity: 0.38;
    cursor: default;
}

.vehicle-driver-assignment-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 52px 24px;
    color: #657694;
    text-align: center;
}

.vehicle-driver-assignment-empty > i {
    margin-bottom: 6px;
    color: #9bb0ce;
    font-size: 2rem;
}

.vehicle-driver-assignment-empty strong {
    color: #17233d;
}

.vehicle-driver-assignment-empty p {
    margin: 0;
    font-size: 0.88rem;
}

.vehicle-driver-assignment-empty.is-filtered {
    min-height: 180px;
    box-sizing: border-box;
}

.vehicle-driver-assignment-summary {
    position: sticky;
    top: 18px;
}

.vehicle-driver-assignment-summary-inner {
    padding: 20px;
}

.vehicle-driver-assignment-summary-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.vehicle-driver-assignment-summary-head > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #eaf1ff;
    color: #2d68d3;
}

.vehicle-driver-assignment-summary-head h2 {
    margin: 2px 0 0;
    color: #17233d;
    font-size: 1rem;
}

.vehicle-driver-assignment-count-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #dfe7f3;
    border-radius: 12px;
    background: #f8faff;
}

.vehicle-driver-assignment-count {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #2f6fed;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 850;
}

.vehicle-driver-assignment-count-card > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vehicle-driver-assignment-count-card strong {
    color: #243451;
    font-size: 0.77rem;
}

.vehicle-driver-assignment-count-card small {
    overflow: hidden;
    color: #71819a;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-driver-primary-choice {
    min-width: 0;
    margin: 20px 0 0;
    padding: 0;
    border: 0;
}

.vehicle-driver-primary-choice legend {
    width: 100%;
    margin-bottom: 9px;
    color: #334661;
    font-size: 0.74rem;
    font-weight: 850;
}

.vehicle-driver-primary-choice legend span {
    float: right;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2f8;
    color: #71809a;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vehicle-driver-primary-none {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 11px;
    border: 1px solid #dfe6f1;
    border-radius: 11px;
    background: #ffffff;
    cursor: pointer;
}

.vehicle-driver-primary-none:has(input:checked) {
    border-color: #9eb9ec;
    background: #f6f9ff;
}

.vehicle-driver-primary-none input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #2f6fed;
}

.vehicle-driver-primary-none > span {
    display: grid;
    gap: 3px;
}

.vehicle-driver-primary-none strong {
    color: #33435d;
    font-size: 0.73rem;
}

.vehicle-driver-primary-none small {
    color: #74839a;
    font-size: 0.66rem;
    line-height: 1.4;
}

.vehicle-driver-primary-current {
    display: none;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin-top: 8px;
    padding: 10px 11px;
    border: 1px solid #efd995;
    border-radius: 11px;
    background: #fff9e9;
}

.vehicle-driver-primary-current.has-primary {
    display: grid;
}

.vehicle-driver-primary-current > i {
    color: #c78e12;
    font-size: 1rem;
}

.vehicle-driver-primary-current > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.vehicle-driver-primary-current span {
    color: #8c762f;
    font-size: 0.6rem;
    font-weight: 750;
}

.vehicle-driver-primary-current strong {
    overflow: hidden;
    color: #654d10;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-driver-assignment-info {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    margin-top: 18px;
    padding: 11px;
    border-radius: 11px;
    background: #f2f6fb;
    color: #61728c;
}

.vehicle-driver-assignment-info > i {
    color: #3971d5;
}

.vehicle-driver-assignment-info p {
    margin: 0;
    font-size: 0.67rem;
    line-height: 1.5;
}

.vehicle-driver-assignment-info strong {
    color: #3f526e;
}

.vehicle-driver-assignment-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e6ebf3;
}

.vehicle-driver-assignment-actions > * {
    min-width: 0;
    justify-content: center;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.72rem;
}

@media (max-width: 1040px) {
    .vehicle-driver-assignment-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .vehicle-driver-assignment-summary {
        position: static;
    }

    .vehicle-driver-assignment-summary-inner {
        display: grid;
        grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1fr);
        gap: 16px 20px;
    }

    .vehicle-driver-assignment-summary-head {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .vehicle-driver-primary-choice {
        grid-row: span 2;
        margin-top: 0;
    }

    .vehicle-driver-assignment-info,
    .vehicle-driver-assignment-actions {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .vehicle-driver-assignment-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .vehicle-driver-assignment-safety {
        max-width: none;
    }

    .vehicle-driver-assignment-head {
        align-items: stretch;
        flex-direction: column;
    }

    .vehicle-driver-assignment-filters {
        grid-template-columns: 1fr 1fr;
        padding: 16px;
    }

    .vehicle-driver-assignment-search {
        grid-column: 1 / -1;
    }

    .vehicle-driver-assignment-results-head {
        padding: 9px 16px;
    }

    .vehicle-driver-assignment-option {
        grid-template-columns: minmax(0, 1fr);
    }

    .vehicle-driver-assignment-option-actions {
        justify-content: space-between;
        padding-left: 35px;
    }

    .vehicle-driver-assignment-summary-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .vehicle-driver-assignment-summary-head,
    .vehicle-driver-primary-choice {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 520px) {
    .vehicle-driver-assignment-intro,
    .vehicle-driver-assignment-head,
    .vehicle-driver-assignment-summary-inner {
        padding: 16px;
    }

    .vehicle-driver-assignment-filters {
        grid-template-columns: 1fr;
    }

    .vehicle-driver-assignment-search {
        grid-column: auto;
    }

    .vehicle-driver-assignment-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .vehicle-driver-assignment-list {
        padding: 12px;
    }

    .vehicle-driver-assignment-select {
        grid-template-columns: 24px 38px minmax(0, 1fr);
        gap: 8px;
    }

    .vehicle-driver-assignment-avatar {
        width: 38px;
        height: 38px;
    }

    .vehicle-driver-assignment-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .vehicle-driver-assignment-filters {
        grid-template-columns: 1fr;
    }

    .vehicle-driver-assignment-option {
        grid-template-columns: minmax(0, 1fr);
    }

    .vehicle-driver-assignment-option-actions {
        justify-content: space-between;
        padding-left: 35px;
    }
}

.vehicle-drivers-card {
    min-height: 188px;
}

.vehicle-driver-stack {
    gap: 12px;
    margin-top: 20px;
}

.vehicle-driver-stack .vehicle-driver-card,
.vehicle-drivers-card > .vehicle-driver-card {
    min-height: 106px;
    padding: 14px;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    background: #ffffff;
}

.vehicle-driver-avatar,
.vehicle-deadline-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.vehicle-driver-name,
.vehicle-deadline-label {
    color: #17233d;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
}

.vehicle-driver-meta {
    margin-top: 6px;
    color: #53647f;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 800;
}

.vehicle-driver-badge {
    min-height: 24px;
    margin-top: 8px;
    padding: 0 11px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: #eaf2ff;
    color: #1769e8;
    font-size: 11px;
    font-weight: 900;
}

.vehicle-drivers-card .vehicle-driver-stack {
    gap: 8px;
    margin-top: 14px;
}

.vehicle-drivers-card .vehicle-driver-card,
.vehicle-drivers-card > .vehicle-driver-card {
    min-width: 0;
    min-height: 64px;
    padding: 9px 11px;
    gap: 11px;
    border-radius: 10px;
}

.vehicle-drivers-card .vehicle-driver-card.is-primary,
.vehicle-drivers-card > .vehicle-driver-card.is-primary {
    border-color: #cfe0fb;
    background: #f7faff;
}

.vehicle-drivers-card .vehicle-driver-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 14px;
}

.vehicle-driver-content {
    min-width: 0;
    flex: 1 1 auto;
}

.vehicle-drivers-card .vehicle-driver-name {
    font-size: 13px;
    line-height: 1.2;
}

.vehicle-drivers-card .vehicle-driver-meta {
    margin-top: 3px;
    overflow: hidden;
    color: #60718c;
    font-size: 11.5px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-drivers-card .vehicle-driver-badge {
    min-height: 19px;
    margin-top: 5px;
    padding: 0 8px;
    font-size: 9.5px;
}

.vehicle-driver-more {
    overflow: hidden;
    border: 1px solid #dfe6f0;
    border-radius: 10px;
    background: #ffffff;
}

.vehicle-driver-more-toggle {
    min-height: 50px;
    padding: 7px 10px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 9px;
    color: #1b2d4b;
    cursor: pointer;
    list-style: none;
}

.vehicle-driver-more-toggle::-webkit-details-marker {
    display: none;
}

.vehicle-driver-more-toggle:hover {
    background: #f7faff;
}

.vehicle-driver-more-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf1ff;
    color: #2e6bda;
    font-size: 14px;
}

.vehicle-driver-more-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.vehicle-driver-more-copy strong {
    overflow: hidden;
    font-size: 11.5px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-driver-more-copy small {
    color: #70809a;
    font-size: 10px;
    font-weight: 750;
}

.vehicle-driver-more-open {
    display: none;
}

.vehicle-driver-more[open] .vehicle-driver-more-closed {
    display: none;
}

.vehicle-driver-more[open] .vehicle-driver-more-open {
    display: block;
}

.vehicle-driver-more-count {
    min-width: 28px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #2664cd;
    font-size: 10.5px;
    font-weight: 900;
}

.vehicle-driver-more-chevron {
    color: #70809a;
    font-size: 11px;
    transition: transform 0.18s ease;
}

.vehicle-driver-more[open] .vehicle-driver-more-chevron {
    transform: rotate(180deg);
}

.vehicle-driver-more-list {
    padding: 8px;
    border-top: 1px solid #e8edf5;
    display: grid;
    gap: 7px;
    background: #fbfcff;
}

.vehicle-driver-more-list .vehicle-driver-card {
    background: #ffffff;
}

.vehicle-deadlines-card {
    min-height: 338px;
}

.vehicle-deadlines-list {
    gap: 20px;
    margin-top: 20px;
}

.vehicle-deadline-row {
    gap: 16px;
}

.vehicle-deadline-icon {
    background: #eef4ff;
    color: #1769e8;
    font-size: 18px;
}

.vehicle-deadline-date {
    margin-top: 4px;
    color: #17233d;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 850;
}

.vehicle-side-note {
    margin-top: 20px;
    color: #60718d;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 750;
}

.vehicle-documents-card {
    min-height: 168px;
    max-height: none;
    padding: 20px 22px 16px;
    display: grid;
    gap: 12px;
}

.vehicle-documents-head {
    flex-direction: row;
    flex-wrap: wrap;
    flex-shrink: 1;
    margin: 0;
}

.vehicle-documents-add {
    width: fit-content;
    min-width: 170px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 7px;
    justify-self: start;
    gap: 9px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    font-size: 13px;
    font-weight: 900;
}

.vehicle-documents-list {
    display: grid;
    gap: 0;
}

.vehicle-documents-history {
    border-top: 1px solid #e1e8f2;
    padding-top: 12px;
}

.vehicle-documents-history summary {
    cursor: pointer;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-documents-history summary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

.vehicle-documents-history[open] .vehicle-documents-list {
    margin-top: 12px;
}

.vehicle-document-row,
.vehicle-document-row:first-child {
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid #e1e8f2;
    border-radius: 4px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    background: #ffffff;
}

.vehicle-document-row-linked {
    box-shadow: inset 3px 0 0 #7ba7ff;
}

.vehicle-document-icon {
    width: 38px;
    height: 38px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #1769e8;
    font-size: 18px;
}

.vehicle-document-main {
    min-width: 0;
    display: grid;
    gap: 4px;
    overflow-wrap: anywhere;
}

.vehicle-document-title {
    color: #17233d;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
    text-decoration: none;
}

a.vehicle-document-title:hover,
a.vehicle-document-title:focus-visible {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.vehicle-document-meta,
.vehicle-documents-empty {
    color: #6b7a93;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.vehicle-document-actions {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.vehicle-document-actions .btn-ghost {
    min-width: 78px;
    min-height: 34px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 900;
}

.vehicle-detail-actions-bar {
    min-height: 68px;
    padding: 12px 16px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(38, 60, 92, 0.06);
}

.vehicle-detail-actions-bar form {
    margin: 0;
}

.vehicle-detail-actions-bar .btn-primary,
.vehicle-detail-actions-bar .btn-secondary {
    min-width: 144px;
    min-height: 42px;
    border-radius: 8px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 900;
}

.vehicle-detail-actions-bar .btn-primary {
    min-width: 144px;
}

.vehicle-detail-actions-bar .btn-secondary {
    min-width: 206px;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips {
    position: static;
    overflow: hidden;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips .vehicle-create-tips-head {
    min-height: 70px;
    padding: 16px 18px 14px;
    gap: 14px;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips .vehicle-create-tips-head i {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    font-size: 18px;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips .vehicle-create-tips-head h3 {
    color: #17233d;
    font-size: 17px;
    font-weight: 900;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips .vehicle-tip {
    min-height: 118px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 18px;
    align-items: start;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips .vehicle-tip i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1769e8;
    font-size: 22px;
    margin: 0;
}

.vehicle-detail-shell.vehicle-page-shell .vehicle-details-tips .vehicle-tip p {
    color: #344763;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 750;
}

.vehicle-quick-preview-card {
    padding: 16px 18px;
}

.vehicle-quick-preview-head {
    min-height: 46px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e6edf5;
    justify-content: flex-start;
}

.vehicle-quick-preview-head span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    background: #eaf2ff;
    color: #1769e8;
    font-size: 20px;
}

.vehicle-quick-preview-list {
    margin: 0;
    padding: 0;
}

.vehicle-quick-preview-list div {
    min-height: 44px;
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.vehicle-quick-preview-list div:last-child {
    border-bottom: 0;
}

.vehicle-quick-preview-list dt,
.vehicle-quick-preview-list dd {
    margin: 0;
}

.vehicle-quick-preview-list dt {
    color: #40536e;
    font-size: 12px;
    font-weight: 800;
}

.vehicle-quick-preview-list dd {
    max-width: 150px;
    color: #17233d;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-quick-status {
    min-height: 28px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 900;
}

.vehicle-quick-status.is-active {
    background: #e6f7ed;
    color: #167342;
}

.vehicle-quick-status.is-muted {
    background: #eef2f7;
    color: #64748b;
}

.vehicle-mileage-card {
    position: relative;
    min-width: 0;
    padding: 24px;
    overflow: hidden;
}

.vehicle-mileage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.vehicle-mileage-eyebrow {
    color: #1769e8;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.vehicle-mileage-head h2 {
    margin: 5px 0 0;
    color: #17233d;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 950;
}

.vehicle-mileage-head p {
    margin: 6px 0 0;
    color: #6c7d96;
    font-size: 12px;
    font-weight: 750;
}

.vehicle-mileage-ranges {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    background: #f6f8fc;
}

.vehicle-mileage-range {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #60728d;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.vehicle-mileage-range:hover {
    color: #1769e8;
    background: #ffffff;
}

.vehicle-mileage-range.is-active {
    color: #ffffff;
    background: #1769e8;
    box-shadow: 0 7px 16px rgba(23, 105, 232, 0.22);
}

.vehicle-mileage-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.vehicle-mileage-summary-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-mileage-summary > div {
    min-width: 0;
    min-height: 82px;
    padding: 15px 16px;
    border: 1px solid #e3eaf4;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    background: #fbfcfe;
}

.vehicle-mileage-summary span {
    color: #71819a;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 800;
}

.vehicle-mileage-summary strong {
    color: #17233d;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-mileage-chart {
    position: relative;
    min-width: 0;
    border: 1px solid #e2eaf4;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    overflow: hidden;
}

.vehicle-mileage-chart svg {
    width: 100%;
    height: auto;
    min-height: 286px;
    display: block;
    overflow: visible;
    touch-action: pan-y;
}

.vehicle-mileage-chart [hidden] {
    display: none;
}

.vehicle-mileage-data-table,
.vehicle-cost-data-table {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.vehicle-mileage-chart-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 18px 0;
    color: #52627a;
    font-size: 11px;
    font-weight: 750;
}

.vehicle-mileage-chart-caption > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vehicle-mileage-chart-caption i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1769e8;
}

.vehicle-mileage-latest-point {
    fill: #1769e8;
    stroke: #ffffff;
    stroke-width: 2;
    pointer-events: none;
}

.vehicle-mileage-latest-label {
    fill: #1d4ed8;
    font-family: inherit;
    font-size: 12px;
    font-weight: 850;
    pointer-events: none;
}

.vehicle-mileage-grid-line {
    stroke: #e8eef6;
    stroke-width: 1;
}

.vehicle-mileage-axis-tick {
    fill: #7a8aa2;
    font-family: inherit;
    font-size: 11px;
    font-weight: 750;
}

.vehicle-mileage-date-tick {
    font-size: 10px;
}

.vehicle-mileage-line {
    fill: none;
    stroke: #1769e8;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 5px 8px rgba(23, 105, 232, 0.16));
}

.vehicle-mileage-point {
    fill: #ffffff;
    stroke: #1769e8;
    stroke-width: 2;
}

.vehicle-mileage-hover-guide {
    stroke: #8aa8d4;
    stroke-width: 1;
    stroke-dasharray: 4 4;
    pointer-events: none;
}

.vehicle-mileage-hover-marker {
    fill: #ffffff;
    stroke: #1769e8;
    stroke-width: 3;
    pointer-events: none;
}

.vehicle-mileage-hover-overlay {
    fill: transparent;
    cursor: crosshair;
}

.vehicle-mileage-tooltip {
    position: absolute;
    z-index: 3;
    width: max-content;
    max-width: 210px;
    padding: 10px 12px;
    border: 1px solid rgba(31, 72, 133, 0.16);
    border-radius: 9px;
    display: grid;
    gap: 3px;
    color: #17233d;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 28px rgba(31, 55, 91, 0.16);
    pointer-events: none;
}

.vehicle-mileage-tooltip strong {
    font-size: 11px;
    color: #667993;
}

.vehicle-mileage-tooltip span {
    font-size: 16px;
    font-weight: 950;
}

.vehicle-mileage-tooltip small {
    color: #1769e8;
    font-size: 11px;
    font-weight: 800;
}

.vehicle-mileage-note {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #60728d;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.vehicle-mileage-note i {
    margin-top: 1px;
    color: #1769e8;
}

.vehicle-mileage-empty {
    min-height: 330px;
    padding: 44px 20px;
    border: 1px dashed #ccdaed;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fbfdff;
}

.vehicle-mileage-empty > span {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1769e8;
    background: #eaf2ff;
    font-size: 26px;
}

.vehicle-mileage-empty h3 {
    margin: 16px 0 0;
    color: #17233d;
    font-size: 18px;
    font-weight: 950;
}

.vehicle-mileage-empty p {
    max-width: 440px;
    margin: 8px 0 18px;
    color: #6d7e96;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 700;
}

@media (max-width: 1540px) {
    .vehicle-detail-shell.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-page-layout-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .vehicle-detail-right-rail {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .vehicle-detail-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .vehicle-detail-header-row,
    .vehicle-overview-main,
    .vehicle-detail-side-stack,
    .vehicle-detail-right-rail {
        grid-template-columns: 1fr;
    }

    .vehicle-detail-header-row {
        display: grid;
    }

    .vehicle-detail-header-back {
        width: fit-content;
        margin-top: 0;
    }

    .vehicle-detail-shell .vehicle-details-tabs {
        overflow-x: auto;
    }

    .vehicle-details-image-card {
        max-width: 320px;
    }

    .vehicle-document-row,
    .vehicle-document-row:first-child {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .vehicle-document-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .vehicle-mileage-card {
        padding: 18px;
    }

    .vehicle-mileage-head {
        flex-direction: column;
        gap: 16px;
    }

    .vehicle-mileage-ranges {
        width: 100%;
        overflow-x: auto;
    }

    .vehicle-mileage-range {
        flex: 1 0 auto;
    }

    .vehicle-mileage-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .vehicle-overview-card,
    .vehicle-side-box,
    .vehicle-documents-card,
    .vehicle-quick-preview-card {
        padding: 16px;
    }

    .vehicle-overview-card .vehicle-details-grid,
    .vehicle-technical-detail-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-details-image-card {
        max-width: none;
        height: 238px;
    }

    .vehicle-detail-actions-bar,
    .vehicle-detail-actions-bar .btn-primary,
    .vehicle-detail-actions-bar .btn-secondary,
    .vehicle-detail-actions-bar form {
        width: 100%;
    }

    .vehicle-detail-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .vehicle-mileage-card {
        padding: 14px;
    }

    .vehicle-mileage-summary > div {
        min-height: 72px;
        padding: 12px;
    }

    .vehicle-mileage-summary strong {
        font-size: 16px;
    }

    .vehicle-mileage-chart {
        margin-inline: -4px;
    }
}

.vehicle-section-card {
    min-width: 0;
    padding: 24px;
}

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

.vehicle-section-head h2 {
    margin: 5px 0 0;
    font-size: 22px;
    line-height: 1.3;
}

.vehicle-section-head p {
    margin: 7px 0 0;
    color: #52627a;
    font-size: 13px;
    line-height: 1.5;
}

.vehicle-section-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #2563eb;
    font-size: 22px;
}

.vehicle-registration-panel .registration-history-current-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 0;
    border-radius: 12px;
    background: #f3f7ff;
    box-shadow: none;
}

.vehicle-registration-panel .registration-history-current-card strong {
    font-size: 24px;
}

.vehicle-registration-panel .registration-history-layout {
    grid-template-columns: minmax(0, 1fr);
}

.vehicle-registration-panel .registration-history-add-card,
.vehicle-registration-panel .registration-history-list-card {
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.vehicle-history-add-toggle,
.registration-history-entry-editor > summary {
    width: fit-content;
    list-style: none;
}

.vehicle-history-add-toggle::-webkit-details-marker,
.registration-history-entry-editor > summary::-webkit-details-marker {
    display: none;
}

.registration-history-entry-editor {
    margin-top: 14px;
}

.registration-history-entry-editor > summary {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    background: #ffffff;
    color: #234f91;
    font-size: 12px;
    font-weight: 800;
}

.registration-history-entry-editor[open] > form,
.vehicle-registration-panel .registration-history-add-card[open] > .registration-history-section-head {
    margin-top: 18px;
}

.vehicle-registration-panel .registration-history-readonly dd {
    overflow-wrap: anywhere;
}

.vehicle-registration-panel .registration-history-readonly > div:nth-child(4) {
    grid-column: 1 / -1;
}

.vehicle-fuel-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 18px;
}

.vehicle-fuel-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #e1e8f2;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.vehicle-fuel-card-visual {
    display: grid;
    place-items: center;
    padding: 18px 12px;
    border-radius: 10px;
    background: #f4f7fc;
    margin-bottom: 18px;
}

.vehicle-fuel-card-visual .fuel-card-art {
    max-width: 220px;
    justify-self: center;
}

.vehicle-fuel-card-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vehicle-fuel-card-heading h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.vehicle-fuel-card-operator {
    margin: 7px 0 18px;
    color: #52627a;
    font-size: 12px;
}

.vehicle-fuel-card-status {
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f6ee;
    color: #166534;
    font-size: 11px;
    font-weight: 800;
}

.vehicle-fuel-card-status.is-expired {
    background: #fff4dd;
    color: #854d0e;
}

.vehicle-fuel-card-status.is-blocked {
    background: #fff0f0;
    color: #b91c1c;
}

.vehicle-fuel-card-facts {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
    font-size: 12px;
}

.vehicle-fuel-card-facts > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.vehicle-fuel-card-facts dt {
    color: #52627a;
}

.vehicle-fuel-card-facts dd {
    margin: 0;
    color: #17233d;
    font-weight: 800;
}

.vehicle-fuel-card-link {
    margin-top: auto;
    min-height: 40px;
    border-radius: 9px;
    font-size: 12px;
}

[data-vehicle-cost-frame] { min-width: 0; }
.vehicle-cost-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.vehicle-detail-shell:has([data-vehicle-cost-frame]) .vehicle-details-tabs { overflow-x: auto; }
@media (min-width: 861px) and (max-width: 1120px) {
    .module-workspace:has([data-vehicle-cost-frame]) .page-wrap-module { max-width: calc(100% - 108px); padding-left: 0; }
}
.vehicle-costs-panel { position: relative; overflow: visible; min-width: 0; }
.vehicle-costs-panel [hidden] { display: none; }
.vehicle-cost-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.vehicle-cost-categories { position: relative; display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; padding: 4px; border: 1px solid #e1e8f2; border-radius: 12px; background: #f5f8fc; }
.vehicle-cost-category { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 8px; color: #52627a; font-size: 12px; font-weight: 800; text-decoration: none; transition: color .16s, background .16s, box-shadow .16s; }
.vehicle-cost-category:hover { color: #2563eb; background: #ffffff; }
.vehicle-cost-category.is-active { color: #ffffff; background: #2563eb; box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2); }
.vehicle-cost-category.is-pending { box-shadow: inset 0 0 0 2px #8bb5ff; }
.vehicle-cost-month-control { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 6px; width: 294px; max-width: 100%; margin: 0; }
.vehicle-cost-month-control > .btn-ghost { display: grid; place-items: center; width: 38px; height: 44px; padding: 0; border: 1px solid #e1e8f2; border-radius: 10px; color: #234f91; background: #ffffff; }
.vehicle-cost-month-control .is-disabled { opacity: .35; }
.vehicle-cost-period { min-width: 0; }
.vehicle-cost-period > summary { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 8px 12px; border: 1px solid #ccd8ea; border-radius: 10px; background: #ffffff; color: #17233d; font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; white-space: nowrap; }
.vehicle-cost-period > summary::-webkit-details-marker { display: none; }
.vehicle-cost-period > summary > .bi-calendar3 { color: #2563eb; font-size: 15px; }
.vehicle-cost-period > summary > .bi-chevron-down { color: #64748b; font-size: 10px; transition: transform .16s ease; }
.vehicle-cost-period[open] > summary { border-color: #7eaafa; box-shadow: 0 0 0 3px #e9f1ff; }
.vehicle-cost-period[open] > summary > .bi-chevron-down { transform: rotate(180deg); }
.vehicle-cost-calendar { position: absolute; top: calc(100% + 9px); right: 0; z-index: 12; box-sizing: border-box; width: min(310px, 100%); padding: 14px; border: 1px solid #dce5f2; border-radius: 15px; background: #ffffff; box-shadow: 0 18px 45px rgba(23, 35, 61, .18); }
.vehicle-cost-year-control { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 10px; margin-bottom: 14px; }
.vehicle-cost-year-control > a, .vehicle-cost-year-control > span { display: grid; place-items: center; height: 34px; border: 1px solid #e1e8f2; border-radius: 8px; color: #234f91; text-decoration: none; }
.vehicle-cost-year-control label { display: grid; gap: 3px; text-align: center; }
.vehicle-cost-year-control label > span { color: #64748b; font-size: 10px; font-weight: 750; }
.vehicle-cost-year-control input { box-sizing: border-box; min-width: 0; width: 100%; height: 32px; padding: 2px 6px; border: 1px solid #dce5f2; border-radius: 7px; background: #f8faff; color: #17233d; text-align: center; font: inherit; font-size: 16px; font-weight: 800; }
.vehicle-cost-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.vehicle-cost-month-grid a { display: grid; place-items: center; min-width: 0; min-height: 38px; border-radius: 8px; color: #52627a; font-size: 11px; font-weight: 750; text-decoration: none; }
.vehicle-cost-month-grid a:hover { background: #eff5ff; color: #1d4ed8; }
.vehicle-cost-month-grid a.is-selected { background: #2563eb; color: #ffffff; }
.vehicle-cost-today { display: block; margin-top: 12px; padding: 10px 4px 0; border-top: 1px solid #e8eef6; color: #2563eb; text-align: center; text-decoration: none; font-size: 11px; font-weight: 800; }
.vehicle-cost-controls a:focus-visible, .vehicle-cost-controls summary:focus-visible, .vehicle-cost-controls input:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
.vehicle-cost-error { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid #f1d5a0; border-radius: 10px; background: #fff9ec; color: #815512; font-size: 12px; }
.vehicle-cost-error button { border: 0; background: transparent; color: #234f91; font: inherit; font-weight: 800; cursor: pointer; }
[data-vehicle-cost-frame].is-loading .vehicle-section-icon { animation: vehicle-cost-loading 1.2s ease-in-out infinite; }
@keyframes vehicle-cost-loading { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { [data-vehicle-cost-frame].is-loading .vehicle-section-icon { animation: none; } .vehicle-cost-category, .vehicle-cost-period > summary > .bi-chevron-down { transition: none; } }
.vehicle-cost-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.vehicle-cost-summary > div { display: grid; align-content: center; gap: 8px; padding: 18px; border: 1px solid #e1e8f2; border-radius: 12px; background: #fbfcff; }
.vehicle-cost-summary .is-main { border-color: #c9dcff; background: #f1f6ff; }
.vehicle-cost-summary span, .vehicle-cost-summary small { color: #52627a; font-size: 12px; line-height: 1.4; }
.vehicle-cost-summary strong { color: #17233d; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.vehicle-cost-summary .is-main strong { color: #1d4ed8; }
.vehicle-cost-summary small { font-size: 11px; }
.vehicle-cost-chart { position: relative; border: 1px solid #e1e8f2; border-radius: 12px; background: linear-gradient(180deg, #ffffff, #fbfcff); overflow: hidden; }
.vehicle-cost-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 16px 18px 0; color: #17233d; font-size: 13px; }
.vehicle-cost-chart-head > span { color: #52627a; font-size: 11px; }
.vehicle-cost-chart-scroll { width: 100%; overflow-x: auto; }
.vehicle-cost-chart svg { display: block; min-width: 640px; height: 320px; }
.vehicle-cost-chart [hidden] { display: none; }
.vehicle-cost-grid-line { stroke: #e8eef6; stroke-width: 1; }
.vehicle-cost-zero-line { stroke: #a0aec2; stroke-width: 1; }
.vehicle-cost-axis, .vehicle-cost-month-label { fill: #52627a; font-family: inherit; font-size: 11px; }
.vehicle-cost-bar { fill: #94b6f4; transition: fill 0.16s ease; }
.vehicle-cost-column.is-future .vehicle-cost-bar { fill: #eff5ff; stroke: #a8c4f5; stroke-dasharray: 4 3; }
.vehicle-cost-column.is-selected .vehicle-cost-bar, .vehicle-cost-column:hover .vehicle-cost-bar { fill: #2563eb; }
.vehicle-cost-column.is-credit .vehicle-cost-bar { fill: #d97706; }
.vehicle-cost-column.is-selected .vehicle-cost-month-label { fill: #1d4ed8; font-weight: 900; }
.vehicle-cost-column:focus-visible { outline: none; }
.vehicle-cost-column:focus-visible .vehicle-cost-bar { stroke: #17233d; stroke-width: 2; }
.vehicle-cost-tooltip { position: absolute; z-index: 2; display: grid; gap: 5px; max-width: 220px; padding: 11px 13px; border: 1px solid #d8e2f1; border-radius: 9px; background: #ffffff; box-shadow: 0 10px 28px rgba(23, 35, 61, 0.15); pointer-events: none; }
.vehicle-cost-tooltip span { color: #52627a; font-size: 11px; }
.vehicle-cost-tooltip strong { color: #17233d; font-size: 17px; }
.vehicle-cost-chart-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 0 18px 16px; color: #52627a; font-size: 11px; }
.vehicle-cost-chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.vehicle-cost-chart-legend i { width: 9px; height: 9px; border-radius: 3px; background: #2563eb; }
.vehicle-cost-chart-legend .is-future { border: 1px dashed #a8c4f5; background: #eff5ff; }
.vehicle-cost-chart-legend .is-credit { background: #d97706; }
.vehicle-cost-zero-note { margin: 0; padding: 0 18px 16px; color: #52627a; font-size: 12px; }
.vehicle-cost-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.vehicle-cost-breakdown-item { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 16px; border: 1px solid #e1e8f2; border-radius: 10px; color: #17233d; text-decoration: none; background: #ffffff; }
.vehicle-cost-breakdown-item:hover, .vehicle-cost-breakdown-item.is-active { border-color: #90b4ff; background: #f5f8ff; }
.vehicle-cost-breakdown-item > i { color: #2563eb; font-size: 19px; }
.vehicle-cost-breakdown-item.tone-leasing > i { color: #7c3aed; }
.vehicle-cost-breakdown-item.tone-policies > i { color: #15803d; }
.vehicle-cost-breakdown-item.tone-buyout > i { color: #b45309; }
.vehicle-cost-breakdown-item > span { color: #52627a; font-size: 12px; }
.vehicle-cost-breakdown-item > strong { grid-column: 1 / -1; font-size: 17px; overflow-wrap: anywhere; }
.vehicle-cost-method { margin-top: 18px; color: #52627a; font-size: 12px; line-height: 1.6; }
.vehicle-cost-method summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 750; }
.vehicle-cost-method summary::-webkit-details-marker { display: none; }
.vehicle-cost-method ul { padding-left: 18px; }

@media (max-width: 700px) {
    .vehicle-cost-summary { grid-template-columns: minmax(0, 1fr); }
    .vehicle-cost-summary > div { padding: 14px; }
    .vehicle-cost-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicle-cost-categories { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
    .vehicle-cost-month-control { width: 100%; }
    .vehicle-cost-calendar { width: min(310px, 100%); }
    .vehicle-cost-breakdown-item { padding: 12px; }
}

@media (max-width: 640px) {
    .vehicle-section-card {
        padding: 16px;
    }

    .vehicle-registration-panel .registration-history-current-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .vehicle-registration-panel .registration-history-entry-top {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}



/* Source: css/pages/vehicle-form.css */
.vehicle-create-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.vehicle-create-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vehicle-create-breadcrumbs {
    color: #6f7f97;
    font-size: 15px;
    font-weight: 500;
}

.vehicle-create-header h1 {
    margin: 0;
    font-size: 54px;
    line-height: 1.02;
    letter-spacing: 0;
    color: #22314d;
}

.vehicle-create-header p {
    margin: 0;
    color: #6e7f97;
    font-size: 18px;
    line-height: 1.55;
    max-width: 920px;
}

.vehicle-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 20px;
    align-items: start;
}

.vehicle-create-card {
    background: #ffffff;
    border: 1px solid #e5ebf4;
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(22, 34, 62, 0.08);
    overflow: hidden;
}

.vehicle-create-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.95fr);
}

.vehicle-create-section {
    padding: 30px 32px;
}

.vehicle-create-section-left {
    border-right: 1px solid #ebf0f7;
}

.vehicle-create-section h2 {
    margin: 0 0 28px;
    font-size: 22px;
    line-height: 1.15;
    color: #22314d;
    letter-spacing: 0;
}

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

.vehicle-mileage-setting {
    align-content: start;
}

.vehicle-mileage-toggle {
    position: relative;
    width: 100%;
    min-height: 70px;
    padding: 11px 12px;
    border: 1px solid #d9e4f2;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbfdff 0%, #f4f8ff 100%);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

/* Nadpisuje bazowe `display: block` dla etykiet wewnątrz .form-group. */
.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .vehicle-mileage-setting .vehicle-mileage-toggle {
    display: grid;
}

.vehicle-mileage-toggle:hover {
    border-color: #aac5ee;
    box-shadow: 0 5px 15px rgba(35, 93, 179, 0.08);
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .vehicle-mileage-setting .vehicle-mileage-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    clip-path: inset(50%);
}

.vehicle-mileage-toggle-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e7eef9;
    color: #6981a6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.16s ease, color 0.16s ease;
}

.vehicle-mileage-toggle-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.vehicle-mileage-toggle-copy strong {
    color: #2a3c5b;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 850;
}

.vehicle-mileage-toggle-copy small {
    margin: 0;
    color: #71819a;
    font-size: 10.5px;
    line-height: 1.35;
    font-weight: 650;
}

.vehicle-mileage-toggle-track {
    display: block;
    position: relative;
    width: 40px;
    height: 22px;
    justify-self: end;
    border-radius: 999px;
    background: #b9c5d6;
    box-shadow: inset 0 0 0 1px rgba(47, 67, 97, 0.08);
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.vehicle-mileage-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(29, 52, 84, 0.24);
    transition: transform 0.16s ease;
}

.vehicle-mileage-toggle input:checked ~ .vehicle-mileage-toggle-icon {
    background: #e3efff;
    color: #2872e7;
}

.vehicle-mileage-toggle input:checked ~ .vehicle-mileage-toggle-track {
    background: #2f73df;
    box-shadow: inset 0 0 0 1px rgba(10, 79, 177, 0.18);
}

.vehicle-mileage-toggle input:checked ~ .vehicle-mileage-toggle-track::after {
    transform: translateX(18px);
}

.vehicle-mileage-toggle:has(input:checked) {
    border-color: #b7d1f7;
    background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
}

.vehicle-mileage-toggle:focus-within {
    border-color: #7caceb;
    box-shadow: 0 0 0 3px rgba(47, 115, 223, 0.14);
}

.vehicle-inspection-setting {
    align-content: start;
}

.vehicle-indefinite-toggle {
    position: relative;
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid #d9e4f2;
    border-radius: 10px;
    background: #f8faff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .vehicle-inspection-setting .vehicle-indefinite-toggle {
    display: flex;
}

.vehicle-indefinite-toggle:hover {
    border-color: #aac5ee;
    box-shadow: 0 4px 12px rgba(35, 93, 179, 0.07);
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .vehicle-inspection-setting .vehicle-indefinite-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    clip-path: inset(50%);
}

.vehicle-indefinite-toggle-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #526887;
}

.vehicle-indefinite-toggle-copy > i {
    color: #3578df;
    font-size: 18px;
}

.vehicle-indefinite-toggle-copy > span {
    display: grid;
    gap: 1px;
}

.vehicle-indefinite-toggle-copy strong {
    color: #2a3c5b;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 850;
}

.vehicle-indefinite-toggle-copy small {
    color: #526887;
    font-size: 9.5px;
    line-height: 1.3;
    font-weight: 650;
}

.vehicle-indefinite-toggle-track {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #b9c5d6;
    transition: background 0.16s ease;
}

.vehicle-indefinite-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(29, 52, 84, 0.24);
    transition: transform 0.16s ease;
}

.vehicle-indefinite-toggle input:checked ~ .vehicle-indefinite-toggle-track {
    background: #2f73df;
}

.vehicle-indefinite-toggle input:checked ~ .vehicle-indefinite-toggle-track::after {
    transform: translateX(16px);
}

.vehicle-indefinite-toggle:has(input:checked) {
    border-color: #b7d1f7;
    background: #edf5ff;
}

.vehicle-indefinite-toggle:focus-within {
    border-color: #7caceb;
    box-shadow: 0 0 0 3px rgba(47, 115, 223, 0.14);
}

.field-required {
    color: #ea5a65;
    font-weight: 700;
}

.vehicle-create-card .form-group {
    gap: 10px;
}

.vehicle-create-card .form-group label {
    font-size: 13px;
    color: #465873;
    font-weight: 600;
}

.vehicle-create-card .form-group input,
.vehicle-create-card .form-group select,
.vehicle-create-card .form-group textarea {
    min-height: 56px;
    border: 1px solid #dce5f1;
    border-radius: 16px;
    background: #ffffff;
    padding: 14px 16px;
    font-size: 16px;
    color: #22314d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.vehicle-create-card .form-group input:focus,
.vehicle-create-card .form-group select:focus,
.vehicle-create-card .form-group textarea:focus {
    border-color: #bfd2f3;
    box-shadow: 0 0 0 4px rgba(52, 112, 232, 0.08);
}

.vehicle-technical-enrichment-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid #dbe8fa;
    border-radius: 18px;
    background: #f7faff;
}

.vehicle-technical-enrichment-copy {
    display: grid;
    gap: 4px;
}

.vehicle-technical-enrichment-copy strong {
    color: #22314d;
    font-size: 14px;
}

.vehicle-technical-enrichment-copy p {
    margin: 0;
    color: #687b96;
    font-size: 13px;
    line-height: 1.5;
}

.vehicle-technical-enrichment-copy .vehicle-technical-enrichment-source,
.vehicle-technical-result-source {
    color: #60718a;
    font-size: 11px;
    line-height: 1.45;
}

.vehicle-technical-enrichment-source a,
.vehicle-technical-result-source a {
    color: #2e65c7;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vehicle-technical-result-source {
    margin: 0;
}

.vehicle-technical-enrichment-button {
    flex: 0 0 auto;
    min-height: 46px;
    gap: 9px;
    border-color: #bcd2f7;
    color: #2e65c7;
    font-weight: 800;
}

.vehicle-technical-form-section {
    padding: 0;
    border-top: 1px solid #ebf0f7;
    background: #fbfcff;
    scroll-margin-top: 24px;
}

.vehicle-technical-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 32px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.vehicle-technical-form-heading::-webkit-details-marker {
    display: none;
}

.vehicle-technical-form-heading:hover {
    background: #f5f8fd;
}

.vehicle-technical-form-heading h2 {
    margin: 3px 0 0;
    color: #22314d;
    font-size: 19px;
}

.vehicle-technical-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #356bd0;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-technical-toggle i {
    transition: transform 0.18s ease;
}

.vehicle-technical-toggle-open {
    display: none;
}

.vehicle-technical-form-section[open] .vehicle-technical-toggle-closed {
    display: none;
}

.vehicle-technical-form-section[open] .vehicle-technical-toggle-open {
    display: inline;
}

.vehicle-technical-form-section[open] .vehicle-technical-toggle i {
    transform: rotate(180deg);
}

.vehicle-technical-form-section[open] .vehicle-technical-form-heading {
    border-bottom: 1px solid #ebf0f7;
}

.vehicle-technical-form-body {
    padding: 24px 32px 30px;
}

.vehicle-technical-eyebrow {
    color: #73849c;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vehicle-technical-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.vehicle-registration-field-ref {
    color: #6d7f99;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.4;
}

.vehicle-technical-result-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 32px;
    border-top: 1px solid #e2eaf5;
    background: #ffffff;
}

.vehicle-technical-result-summary > div {
    display: grid;
    gap: 4px;
}

.vehicle-technical-result-summary strong {
    color: #22314d;
    font-size: 14px;
}

.vehicle-technical-result-open {
    flex: 0 0 auto;
    gap: 8px;
}

.vehicle-technical-result-modal[hidden] {
    display: none;
}

.vehicle-technical-result-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    overscroll-behavior: contain;
}

.vehicle-technical-result-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 39, 0.48);
    backdrop-filter: blur(3px);
}

.vehicle-technical-result-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    max-height: min(86vh, 820px);
    max-height: min(86dvh, 820px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.vehicle-technical-result-head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #e6edf7;
}

.vehicle-technical-result-head h2 {
    margin: 4px 0 0;
    color: #22314d;
    font-size: 22px;
}

.vehicle-technical-result-head time {
    display: inline-block;
    margin-top: 6px;
    color: #75849a;
    font-size: 12px;
    font-weight: 700;
}

.vehicle-technical-result-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #f1f5fb;
    color: #52637d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vehicle-technical-result-close:hover {
    background: #e8eef8;
    color: #24344f;
}

.vehicle-technical-result-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 22px 28px 26px;
}

.vehicle-technical-result-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    padding: 16px 28px 22px;
    border-top: 1px solid #e6edf7;
}

.vehicle-technical-match-message,
.vehicle-technical-match-warning {
    margin: 16px 0 0;
    line-height: 1.55;
}

.vehicle-technical-match-message {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 13px 15px;
    border-radius: 14px;
    background: #eef5ff;
    color: #375579;
    font-size: 13px;
    font-weight: 700;
}

.vehicle-technical-match-message i {
    margin-top: 2px;
    color: #3470e6;
}

.vehicle-technical-match-warning {
    color: #8a5b13;
    font-size: 12px;
    font-weight: 750;
}

.vehicle-technical-candidates-heading {
    margin: 18px 0 0;
    color: #22314d;
    font-size: 15px;
}

.vehicle-technical-candidate-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.vehicle-technical-candidate-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 15px;
    padding: 18px;
    border: 1px solid #dce6f3;
    border-radius: 18px;
    background: #fbfcff;
}

.vehicle-technical-candidate-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.vehicle-technical-candidate-title > div {
    display: grid;
    gap: 3px;
}

.vehicle-technical-candidate-title strong {
    color: #22314d;
    font-size: 16px;
}

.vehicle-technical-candidate-title span,
.vehicle-technical-candidate-title small {
    color: #6e8099;
    font-size: 11px;
    font-weight: 750;
}

.vehicle-technical-candidate-title small {
    max-width: 48%;
    text-align: right;
}

.vehicle-technical-candidate-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.vehicle-technical-candidate-card dl > div {
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
    background: #f0f4fa;
}

.vehicle-technical-candidate-card dt {
    color: #73849b;
    font-size: 10px;
    font-weight: 800;
}

.vehicle-technical-candidate-card dd {
    margin: 3px 0 0;
    color: #293b57;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-technical-candidate-select {
    width: 100%;
    margin-top: auto;
}

body.vehicle-technical-modal-open {
    overflow: hidden;
}

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

    .vehicle-technical-candidate-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .vehicle-technical-form-section {
        padding: 0;
    }

    .vehicle-technical-form-heading {
        padding: 19px 20px;
    }

    .vehicle-technical-form-body {
        padding: 20px;
    }

    .vehicle-technical-form-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-technical-result-summary {
        align-items: stretch;
        flex-direction: column;
        padding: 18px 20px;
    }

    .vehicle-technical-result-open {
        width: 100%;
        justify-content: center;
    }

    .vehicle-technical-result-modal {
        padding: 10px;
        align-items: end;
    }

    .vehicle-technical-result-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }

    .vehicle-technical-result-head,
    .vehicle-technical-result-body,
    .vehicle-technical-result-actions {
        padding-left: 20px;
        padding-right: 20px;
    }

    .vehicle-technical-result-head,
    .vehicle-technical-candidate-title {
        flex-direction: column;
    }

    .vehicle-technical-candidate-title small {
        max-width: none;
        text-align: left;
    }

    .vehicle-technical-candidate-card dl {
        grid-template-columns: 1fr;
    }

    .vehicle-technical-enrichment-box {
        align-items: stretch;
        flex-direction: column;
    }

    .vehicle-technical-enrichment-button {
        width: 100%;
    }
}

.form-group-disabled {
    opacity: 0.58;
}

.form-group-disabled input {
    background: #f3f6fb !important;
    color: #8b98aa !important;
    border-color: #dfe6f0 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.form-group-disabled label,
.form-group-disabled .field-helper-text {
    color: #8b98aa !important;
}

.form-group-enabled {
    opacity: 1;
}

.field-helper-text {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: #75849a;
}

.vehicle-driver-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.vehicle-driver-label-row a {
    color: #2874ea;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.vehicle-driver-picker-shell {
    display: grid;
    gap: 10px;
}

.vehicle-driver-picker-toggle {
    width: fit-content;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #ffffff;
    color: #33445f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.vehicle-driver-picker-toggle:hover,
.vehicle-driver-picker-toggle[aria-expanded="true"] {
    border-color: #a9c2f4;
    background: #f2f7ff;
    color: #2469da;
}

.vehicle-driver-picker-summary {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f4f7fb;
    color: #62728a;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.vehicle-driver-picker-panel[hidden] {
    display: none;
}

.vehicle-driver-picker {
    max-height: 286px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #dce5f1;
    border-radius: 18px;
    background: #fbfcff;
    display: grid;
    gap: 10px;
    scrollbar-color: #cbd6e6 transparent;
}

.vehicle-driver-option {
    min-height: 82px;
    padding: 12px;
    border: 1px solid #e2eaf5;
    border-radius: 16px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 26px 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    cursor: pointer;
    position: relative;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.vehicle-driver-option:hover,
.vehicle-driver-option.is-selected {
    border-color: #9dbdff;
    background: #f2f7ff;
    box-shadow: 0 8px 18px rgba(47, 111, 230, 0.08);
}

.vehicle-driver-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.vehicle-driver-option-check {
    margin-top: 12px;
    width: 24px;
    height: 24px;
    border: 1px solid #cfdbea;
    border-radius: 9px;
    background: #ffffff;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.vehicle-driver-option.is-selected .vehicle-driver-option-check {
    background: #2874ea;
    border-color: #2874ea;
}

.vehicle-driver-option-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2364d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 13px;
    font-weight: 900;
}

.vehicle-driver-option-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-driver-option-body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.vehicle-driver-option-body strong,
.vehicle-driver-option-body small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-driver-option-body strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.vehicle-driver-option-body small,
.vehicle-driver-picker-empty {
    color: #75849a;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 800;
}

.vehicle-driver-picker-empty {
    padding: 12px;
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix input {
    padding-right: 62px !important;
}

.input-with-suffix span {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #5d6f88;
    font-size: 16px;
    font-weight: 500;
    padding-left: 12px;
    border-left: 1px solid #dbe4f0;
}

.upload-box {
    position: relative;
    min-height: 258px;
    border: 1.5px dashed #d7e1ef;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fe 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 28px 20px;
    margin-bottom: 14px;
}

.upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-box-icon {
    position: relative;
    font-size: 52px;
    color: #bfd0ec;
    line-height: 1;
    margin-bottom: 6px;
}

.upload-plus {
    position: absolute;
    right: -8px;
    bottom: -4px;
    font-size: 22px;
    color: #4d84eb;
    background: #fff;
    border-radius: 50%;
}

.upload-box-title {
    font-size: 20px;
    font-weight: 700;
    color: #22314d;
}

.upload-box-subtitle {
    color: #6d7c94;
    font-size: 16px;
    line-height: 1.5;
}

.upload-box-subtitle span {
    color: #4b7fe8;
    font-weight: 700;
}

.upload-box-note {
    color: #7f8ea3;
    font-size: 14px;
}

.upload-box-file-name {
    margin-top: 4px;
    min-height: 22px;
    font-size: 14px;
    color: #4b6285;
    font-weight: 600;
}

.upload-success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #cfead8;
    background: #eefaf2;
    color: #1d8a4d;
    font-size: 14px;
    font-weight: 700;
}

.upload-success i {
    font-size: 18px;
    color: #1d8a4d;
}

.upload-success[hidden] {
    display: none !important;
}

.vehicle-create-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 26px;
    border-top: 1px solid #ebf0f7;
    background: #ffffff;
}

.btn-create-cancel {
    min-width: 118px;
    min-height: 50px;
    border-radius: 16px;
    font-size: 16px;
    padding: 0 22px;
}

.btn-create-submit {
    min-width: 272px;
    min-height: 54px;
    border-radius: 18px;
    font-size: 17px;
    padding: 0 26px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
}

.vehicle-edit-actions-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-left: auto;
}

.btn-create-delete {
    min-width: 132px;
    min-height: 54px;
    border-radius: 18px;
    font-size: 17px;
    padding: 0 24px;
}

.vehicle-edit-delete-form {
    display: none;
}

.vehicle-create-tips {
    background: #ffffff;
    border: 1px solid #e5ebf4;
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(22, 34, 62, 0.06);
    overflow: hidden;
}

.vehicle-create-tips-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 28px 22px;
    border-bottom: 1px solid #edf2f8;
}

.vehicle-create-tips-head i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff3d7;
    color: #dba324;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.vehicle-create-tips-head h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: #22314d;
    letter-spacing: 0;
}

.vehicle-tip {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 16px;
    padding: 24px 28px;
}

.vehicle-tip + .vehicle-tip {
    border-top: 1px solid #f0f3f8;
}

.vehicle-tip i {
    color: #5872a3;
    font-size: 22px;
    margin-top: 2px;
}

.vehicle-tip p {
    margin: 0;
    color: #52627b;
    font-size: 16px;
    line-height: 1.65;
}

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

    .vehicle-create-main {
        grid-template-columns: 1fr;
    }

    .vehicle-create-section-left {
        border-right: 0;
        border-bottom: 1px solid #ebf0f7;
    }
}

@media (max-width: 860px) {
    .vehicle-create-header h1 {
        font-size: 40px;
    }

    .vehicle-create-header p {
        font-size: 16px;
    }

    .vehicle-create-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-create-section {
        padding: 22px 20px;
    }

    .vehicle-create-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-create-submit,
    .btn-create-cancel,
    .btn-create-delete {
        width: 100%;
        min-width: 0;
    }

    .vehicle-edit-actions-right {
        width: 100%;
        flex-direction: column-reverse;
        align-items: stretch;
        margin-left: 0;
    }

    .vehicle-tip {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.document-create-page .vehicle-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.document-create-card {
    background: #ffffff;
    border: 1px solid #e5ebf4;
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(22, 34, 62, 0.08);
    padding: 28px;
}

.document-create-page .vehicle-create-header p {
    margin: 8px 0 0;
    color: #73839a;
    font-size: 15px;
}

.document-create-page .vehicle-create-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.document-create-page .vehicle-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.document-create-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

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

.document-create-page .form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #22314d;
}

.document-create-page .form-control {
    width: 100%;
    min-height: 52px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #f9fbff;
    padding: 0 16px;
    font-size: 15px;
    color: #22314d;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.document-create-page select.form-control {
    appearance: none;
}

.document-create-page .form-control:focus {
    border-color: #3a72e8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 114, 232, 0.08);
}

.document-create-page .form-control:disabled {
    background: #f1f5fb;
    color: #6d7d94;
    cursor: not-allowed;
}

.document-create-page .form-textarea {
    min-height: 130px;
    resize: vertical;
    padding: 14px 16px;
}

.document-upload-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e4ebf5;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%);
}

.document-upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #eaf1ff;
    color: #3a72e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.document-upload-content h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #22314d;
}

.document-upload-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #73839a;
}

.document-create-page .vehicle-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.document-create-page .btn-primary,
.document-create-page .btn-secondary {
    min-width: 170px;
    justify-content: center;
}

@media (max-width: 1180px) {
    .document-create-page .vehicle-create-layout {
        grid-template-columns: 1fr;
    }

    .document-create-page .vehicle-create-tips {
        position: static;
    }
}

@media (max-width: 820px) {
    .document-create-page .vehicle-create-grid {
        grid-template-columns: 1fr;
    }

    .document-create-card {
        padding: 22px;
        border-radius: 24px;
    }

    .document-upload-box {
        align-items: flex-start;
    }

    .document-create-page .vehicle-create-actions {
        flex-direction: column;
    }

    .document-create-page .btn-primary,
    .document-create-page .btn-secondary {
        width: 100%;
    }
}

.document-editor-page.vehicle-page-shell {
    max-width: 1280px;
}

.document-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.document-editor-card,
.document-side-card {
    border: 1px solid #e1e9f4;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(35, 56, 92, 0.08);
}

.document-editor-card {
    overflow: hidden;
}

.document-editor-form {
    display: flex;
    flex-direction: column;
}

.document-editor-section {
    padding: 22px 24px;
    border-bottom: 1px solid #e8eef7;
}

.document-section-head {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.document-section-head > span {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f73ea, #1769e8);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(47, 115, 234, 0.2);
}

.document-section-head h2 {
    margin: 0;
    color: #17233d;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

.document-section-head p {
    margin: 4px 0 0;
    color: #5e6f88;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 750;
}

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

.document-validity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
    gap: 18px 22px;
    align-items: end;
}

.document-editor-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.document-editor-page .form-group label {
    color: #22314d;
    font-size: 12px;
    font-weight: 900;
}

.document-editor-page .form-group label b {
    color: #e24545;
    font-weight: 900;
}

.document-editor-page input,
.document-editor-page select,
.document-editor-page textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d8e3f1;
    border-radius: 8px;
    background: #ffffff;
    color: #22314d;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.document-editor-page input,
.document-editor-page select {
    padding: 0 13px;
}

.document-editor-page textarea {
    min-height: 84px;
    padding: 13px;
    resize: vertical;
}

.document-editor-page input::placeholder,
.document-editor-page textarea::placeholder {
    color: #8a9ab3;
}

.document-editor-page input:focus,
.document-editor-page select:focus,
.document-editor-page textarea:focus {
    border-color: #6ea0ff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(47, 115, 234, 0.1);
}

.document-editor-page input:disabled,
.document-editor-page select:disabled,
.document-editor-page .flatpickr-input.is-disabled {
    background: #f5f7fb;
    color: #6e7f98;
    cursor: not-allowed;
}

.document-wide-field {
    width: 100%;
}

.document-locked-select {
    min-height: 48px;
    border: 1px solid #d8e3f1;
    border-radius: 8px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
}

.document-locked-select i {
    color: #2f73ea;
    text-align: center;
}

.document-locked-select input {
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.document-type-warning,
.document-deadline-note {
    margin: 2px 0 0;
    color: #8a5a00;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.document-deadline-note {
    color: #1f67d8;
}

.document-editor-section[hidden],
.document-toggle[hidden],
[data-document-preview-validity-row][hidden] {
    display: none !important;
}

.document-toggle {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 44px auto;
    gap: 7px 12px;
    align-items: center;
    color: #22314d;
    cursor: pointer;
}

.document-toggle-inline {
    min-height: 48px;
    margin-top: 0;
    padding: 0 12px;
    border: 1px solid #d8e3f1;
    border-radius: 8px;
    background: #ffffff;
}

.document-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.document-toggle > span {
    width: 44px;
    height: 24px;
    grid-row: span 2;
    border-radius: 999px;
    background: #dbe6f5;
    position: relative;
    transition: background 0.18s ease;
}

.document-toggle > span::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(32, 49, 78, 0.2);
    transition: transform 0.18s ease;
}

.document-toggle input:checked + span {
    background: #2f73ea;
}

.document-toggle input:checked + span::after {
    transform: translateX(20px);
}

.document-toggle input:disabled + span {
    opacity: 0.55;
}

.document-toggle strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.document-toggle small {
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

.document-file-drop {
    min-height: 104px;
    border: 1px dashed #6d94ff;
    border-radius: 8px;
    background: #fbfdff;
    color: #263654;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.document-file-drop.is-dragging,
.document-file-drop:hover {
    border-color: #2f73ea;
    background: #f4f8ff;
    box-shadow: inset 0 0 0 1px rgba(47, 115, 234, 0.12);
}

.document-file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.document-file-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.document-file-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 1 auto;
}

.document-file-copy strong {
    color: #263654;
    font-size: 12px;
    font-weight: 900;
}

.document-file-copy em {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #d8e3f1;
    border-radius: 8px;
    background: #ffffff;
    color: #22314d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.document-file-copy small {
    flex-basis: 100%;
    color: #71819a;
    font-size: 11px;
    font-weight: 750;
}

.document-editor-actions {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.document-editor-actions .btn-primary,
.document-editor-actions .btn-secondary {
    min-height: 46px;
    border-radius: 8px;
    justify-content: center;
}

.document-editor-actions .btn-primary {
    min-width: 148px;
}

.document-editor-aside {
    position: sticky;
    top: 108px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.document-side-card {
    padding: 16px;
}

.document-side-head {
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eef7;
    display: flex;
    align-items: center;
    gap: 12px;
}

.document-side-head > span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff5df;
    color: #f0a11f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.document-preview-card .document-side-head > span {
    background: #eef4ff;
    color: #2f73ea;
}

.document-side-head h3 {
    margin: 0;
    color: #17233d;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
}

.document-tip-row,
.document-preview-list > div {
    min-height: 56px;
    border-bottom: 1px solid #e8eef7;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.document-tip-row i,
.document-preview-list i {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #eef4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.document-tip-row p {
    margin: 0;
    color: #53637f;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 750;
}

.document-preview-list > div {
    grid-template-columns: 30px minmax(0, 1fr) minmax(48px, auto);
}

.document-preview-list span,
.document-preview-list strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-preview-list span {
    color: #31415e;
    font-size: 12px;
    font-weight: 900;
}

.document-preview-list strong {
    max-width: 150px;
    color: #53637f;
    text-align: right;
    font-size: 12px;
    font-weight: 900;
}

.document-preview-card p {
    margin: 14px 0 0;
    color: #71819a;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .document-editor-layout {
        grid-template-columns: 1fr;
    }

    .document-editor-aside {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .document-editor-grid,
    .document-validity-row,
    .document-editor-aside {
        grid-template-columns: 1fr;
    }

    .document-editor-section,
    .document-editor-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .document-editor-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .document-file-drop {
        align-items: center;
        flex-direction: column;
    }

    .document-preview-list > div {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .document-preview-list strong {
        grid-column: 2;
        max-width: none;
        text-align: left;
    }
}

.vehicle-page-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.vehicle-page-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 132px;
    justify-content: flex-start;
}

.vehicle-page-layout {
    display: grid;
    grid-template-columns: minmax(980px, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.vehicle-page-card {
    min-width: 0;
    width: 100%;
}

.vehicle-page-aside {
    min-width: 0;
    align-self: start;
    position: sticky;
    top: 110px;
}

.vehicle-create-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.vehicle-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 20px;
    align-items: start;
}

.vehicle-create-card {
    width: 100%;
}

/* ======================================================================
   Kompaktowy formularz pojazdu
   ====================================================================== */

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-page-layout {
    grid-template-columns: minmax(0, 1020px) 300px;
    justify-content: center;
    gap: 22px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card,
.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-tips {
    border-radius: 12px;
    border-color: #dfe7f2;
    box-shadow: 0 12px 30px rgba(38, 60, 92, 0.06);
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-main {
    display: block;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-section {
    padding: 20px 22px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-section-left {
    border-right: 0;
    border-bottom: 1px solid #e7edf6;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-section-right,
.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-drivers-section {
    border-bottom: 1px solid #e7edf6;
}

.vehicle-form-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.vehicle-step-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f7bff 0%, #0f5bea 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(18, 92, 234, 0.22);
}

.vehicle-form-section-heading h2 {
    margin: 0;
    color: #17233d;
    font-size: 18px;
    line-height: 1.18;
    font-weight: 900;
}

.vehicle-form-section-heading p {
    margin: 5px 0 0;
    color: #60708a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-section > h2 {
    display: none;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-grid {
    gap: 11px 16px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .form-group {
    gap: 6px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .form-group label {
    color: #263959;
    font-size: 12px;
    font-weight: 850;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .form-group input,
.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .form-group select,
.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-card .form-group textarea {
    min-height: 42px;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 650;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .input-with-suffix input {
    padding-right: 52px !important;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .input-with-suffix span {
    right: 12px;
    font-size: 12px;
    font-weight: 850;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .upload-box {
    min-height: 160px;
    border-radius: 10px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .upload-box-title {
    font-size: 14px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .upload-box-subtitle,
.vehicle-page-shell:not(.fuel-form-page-shell) .upload-box-note,
.vehicle-page-shell:not(.fuel-form-page-shell) .upload-box-file-name,
.vehicle-page-shell:not(.fuel-form-page-shell) .field-helper-text {
    font-size: 12px;
}

.vehicle-drivers-section .form-group {
    max-width: 760px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-section {
    padding: 0;
    border-top: 0;
    background: #ffffff;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-heading {
    cursor: default;
    padding: 20px 22px 14px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-heading:hover {
    background: transparent;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-toggle {
    display: none;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-body {
    padding: 0 22px 20px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 14px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-actions {
    padding: 14px 22px;
    border-top: 1px solid #e7edf6;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .btn-create-cancel,
.vehicle-page-shell:not(.fuel-form-page-shell) .btn-create-delete {
    min-height: 42px;
    border-radius: 8px;
    font-size: 13px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .btn-create-submit {
    min-width: 170px;
    min-height: 42px;
    border-radius: 8px;
    font-size: 13px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-tips-head {
    padding: 20px 20px 16px;
    gap: 12px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-tips-head i {
    width: 34px;
    height: 34px;
    font-size: 16px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-create-tips-head h3 {
    font-size: 18px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-tip {
    grid-template-columns: 24px 1fr;
    gap: 12px;
    padding: 17px 20px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-tip i {
    color: #1769e8;
    font-size: 18px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-tip p {
    font-size: 13px;
    line-height: 1.55;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker-toggle {
    width: 100%;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 8px;
    justify-content: space-between;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker-toggle > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker-toggle[aria-expanded="true"] .vehicle-driver-picker-chevron {
    transform: rotate(180deg);
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker-chevron {
    transition: transform 160ms ease;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker-summary {
    width: 100%;
    min-height: 34px;
    border-radius: 8px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker {
    max-height: 250px;
    border-radius: 10px;
    padding: 8px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-option {
    min-height: 68px;
    border-radius: 9px;
    grid-template-columns: 24px 38px minmax(0, 1fr);
    padding: 10px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-option-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-option-check {
    margin-top: 7px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-option-body strong {
    font-size: 13px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-option-body small,
.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-driver-picker-empty {
    font-size: 11.5px;
}

.vehicle-form-quick-preview {
    border-top: 0;
}

.vehicle-form-sidebar {
    top: 94px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-form-side-card {
    border-radius: 12px;
    border-color: #dfe7f2;
    box-shadow: 0 10px 26px rgba(38, 60, 92, 0.06);
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-form-sidebar .subscription-side-card-head h3 {
    font-size: 17px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-form-sidebar .subscription-tip-row {
    min-height: 76px;
}

.vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-form-sidebar .subscription-tip-row p {
    font-size: 12px;
}

.vehicle-form-preview-list {
    margin: 0;
    padding: 0;
}

.vehicle-form-preview-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    border-bottom: 1px solid #e6edf5;
}

.vehicle-form-preview-list dt {
    min-width: 0;
    color: #40536e;
    font-size: 12px;
    font-weight: 800;
}

.vehicle-form-preview-list dd {
    max-width: 130px;
    margin: 0;
    color: #1d2b45;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-form-status-pill {
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #365fb8;
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 900;
}

.vehicle-form-quick-preview > p {
    margin: 16px 0 4px;
    color: #7c899c;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 750;
}

@media (max-width: 1200px) {
    .vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-page-layout {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .vehicle-page-layout {
        grid-template-columns: 1fr;
    }

    .vehicle-page-aside {
        position: static;
    }

    .vehicle-create-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehicle-create-main {
        grid-template-columns: 1fr;
    }

    .vehicle-create-section-left {
        border-right: 0;
        border-bottom: 1px solid #ebf0f7;
    }
}

@media (max-width: 640px) {
    .vehicle-page-shell:not(.fuel-form-page-shell) .vehicle-technical-form-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-page-header {
        min-height: auto;
    }
}

.vehicle-crop-launcher {
    margin: 14px 0 18px;
}

.vehicle-crop-open-btn {
    width: 100%;
    min-height: 54px;
    border-radius: 18px;
    border: 1px solid #dfe8f4;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(22, 34, 62, 0.06);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.vehicle-crop-open-btn:hover {
    border-color: #c9d8ef;
    box-shadow: 0 14px 30px rgba(22, 34, 62, 0.1);
    transform: translateY(-1px);
}

.vehicle-crop-open-btn span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.vehicle-crop-open-btn span i {
    color: #3a72e8;
    font-size: 17px;
}

.vehicle-crop-open-btn small {
    flex-shrink: 0;
    border-radius: 999px;
    background: #eef4ff;
    border: 1px solid #dbe8ff;
    color: #4367a5;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.vehicle-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.vehicle-crop-modal.is-open {
    display: flex;
}

.vehicle-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(6px);
}

.vehicle-crop-dialog {
    position: relative;
    z-index: 2;
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid #dfe8f4;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.vehicle-crop-modal-head {
    padding: 22px 24px 18px;
    border-bottom: 1px solid #eef3f9;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.vehicle-crop-modal-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: 0;
}

.vehicle-crop-modal-head p {
    margin: 7px 0 0;
    color: #76869e;
    font-size: 14px;
    line-height: 1.45;
}

.vehicle-crop-close-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e1e8f2;
    border-radius: 14px;
    background: #f8fafc;
    color: #50617a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vehicle-crop-close-btn:hover {
    background: #eef4ff;
    color: #254a94;
}

.vehicle-crop-modal-body {
    padding: 22px 24px;
}

.vehicle-crop-preview {
    position: relative;
    width: 100%;
    aspect-ratio: var(--vehicle-photo-aspect);
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #eef4fb 0%, #dfe9f5 100%);
    border: 1px solid #e2eaf5;
}

.vehicle-crop-preview img {
    --crop-x: 50%;
    --crop-y: 50%;
    --crop-scale: 1;

    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-scale));
    transform-origin: var(--crop-x) var(--crop-y);
    display: block;
    transition: object-position 0.06s linear, transform 0.06s linear, transform-origin 0.06s linear;
    will-change: transform, object-position;
}

.vehicle-crop-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8391a6;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.vehicle-crop-placeholder[hidden],
.vehicle-crop-preview img[hidden] {
    display: none !important;
}

.vehicle-crop-placeholder i {
    font-size: 42px;
}

.vehicle-crop-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
}

.vehicle-crop-control {
    display: grid;
    gap: 8px;
}

.vehicle-crop-control label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #41516c;
    font-size: 13px;
    font-weight: 900;
}

.vehicle-crop-control label span {
    color: #7b8aa1;
    font-weight: 900;
}

.vehicle-crop-control input[type="range"] {
    width: 100%;
    min-height: 34px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    accent-color: #3a72e8;
}

.vehicle-crop-hint {
    margin: 16px 0 0;
    color: #7b8aa1;
    font-size: 13px;
    line-height: 1.5;
}

.vehicle-crop-modal-actions {
    padding: 18px 24px;
    border-top: 1px solid #eef3f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #fbfdff;
}

.vehicle-crop-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .vehicle-crop-modal {
        padding: 14px;
    }

    .vehicle-crop-dialog {
        border-radius: 22px;
    }

    .vehicle-crop-modal-head,
    .vehicle-crop-modal-body,
    .vehicle-crop-modal-actions {
        padding-left: 16px;
        padding-right: 16px;
    }

    .vehicle-crop-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .vehicle-crop-modal-actions .btn-secondary,
    .vehicle-crop-modal-actions .btn-primary {
        width: 100%;
    }
}

/* --- Sekcja "Zdjęcie i terminy": zdjęcie po lewej, terminy w dwóch kolumnach po prawej --- */
.vehicle-media-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 6px 28px;
    align-items: start;
}

.vehicle-media-photo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vehicle-page-shell .vehicle-media-photo .upload-box {
    min-height: 148px;
    margin-bottom: 10px;
    padding: 16px 14px;
    gap: 4px;
}

.vehicle-page-shell .vehicle-media-photo .upload-box-icon {
    font-size: 34px;
    margin-bottom: 2px;
}

.vehicle-page-shell .vehicle-media-photo .upload-plus {
    right: -6px;
    bottom: -3px;
    font-size: 16px;
}

.vehicle-page-shell .vehicle-media-photo .upload-box-file-name {
    margin-top: 0;
    min-height: 0;
}

.vehicle-page-shell .vehicle-media-photo .upload-success {
    margin-bottom: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
}

.vehicle-page-shell .vehicle-media-photo .field-error {
    min-height: 0;
    margin-top: 0;
}

.vehicle-page-shell .vehicle-media-photo .vehicle-crop-launcher {
    margin: 0;
}

.vehicle-page-shell .vehicle-media-photo .vehicle-crop-open-btn {
    min-height: 42px;
    border-radius: 10px;
    padding: 0 12px;
}

.vehicle-page-shell .vehicle-media-photo .vehicle-crop-open-btn span {
    font-size: 12px;
}

.vehicle-page-shell .vehicle-media-photo .vehicle-crop-open-btn small {
    padding: 4px 8px;
    font-size: 11px;
}

.vehicle-media-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 16px;
    align-content: start;
    min-width: 0;
}

.vehicle-page-shell .vehicle-media-dates .field-error {
    min-height: 0;
    margin-top: 0;
}

.vehicle-page-shell .vehicle-media-dates .field-error:not(:empty) {
    margin-top: 4px;
}

.vehicle-page-shell .vehicle-media-dates .field-helper-text {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.4;
}

@media (max-width: 860px) {
    .vehicle-media-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

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

/* Lease dates apply only to the Leasing ownership type. */
#lease-end-group[hidden] { display: none; }



/* Source: css/pages/machines.css */
.machines-page,
.machines-form-page,
.machines-detail-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Lista maszyn korzysta z tego samego rytmu i tych samych kart co dashboard pojazdów. */
.machines-page {
    display: block;
}

.machines-dashboard-grid {
    margin: 0;
}

.machine-dashboard-card .machine-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    color: inherit;
    text-decoration: none;
}

.machine-dashboard-info {
    gap: 6px;
    padding-top: 16px;
    padding-bottom: 14px;
}

.machine-dashboard-info .plate-chip {
    min-height: 34px;
    font-size: 14px;
}

.machine-dashboard-info .vehicle-main-stats {
    min-height: 48px;
    gap: 5px;
}

.machine-dashboard-hours {
    min-width: 0;
}

.machine-dashboard-info .vehicle-extra-chips {
    flex-wrap: nowrap;
}

.machine-dashboard-info .vehicle-mini-stat {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.machine-dashboard-deadlines {
    gap: 3px;
}

.machine-dashboard-deadlines .meta-line {
    min-height: 24px;
    font-size: 13px;
}

.machine-dashboard-deadlines .status-dot {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.machine-dashboard-image {
    pointer-events: none;
}

.machine-archive-notice {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.machine-archive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.machine-archive-actions form {
    margin: 0;
}

.machines-form-page {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    gap: 18px;
    overflow-x: clip;
}

.machines-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1020px) 300px;
    justify-content: center;
    gap: 22px;
    align-items: start;
    width: 100%;
}

.machines-hero,
.machines-toolbar,
.machines-panel,
.machines-stat-card,
.machines-attention-panel,
.machines-form-card,
.machines-form-side-card,
.machines-danger-zone,
.machines-deadline-card {
    background: #ffffff;
    border: 1px solid #dde7f3;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.055);
}

.machines-hero {
    min-height: 106px;
    padding: 24px 26px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.machines-hero h1 {
    margin: 0;
    color: #102144;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: 0;
}

.machines-hero p {
    margin: 7px 0 0;
    color: #4f5f7a;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 750;
}

.machines-page {
    gap: 16px;
}

.machines-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.machines-stat-card {
    min-height: 96px;
    padding: 16px 16px 14px 82px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.machines-stat-card i {
    position: absolute;
    left: 17px;
    top: 50%;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 21px;
}

.machines-stat-card.is-blue i {
    background: #e8f0ff;
    color: #2563eb;
}

.machines-stat-card.is-green i {
    background: #dcf7e9;
    color: #139258;
}

.machines-stat-card.is-warning i {
    background: #fff3d5;
    color: #db8500;
}

.machines-stat-card.is-danger i {
    background: #ffe4e1;
    color: #e0312f;
}

.machines-stat-card.is-purple i {
    background: #f1edff;
    color: #7657d8;
}

.machines-stat-card span,
.machines-stat-card strong,
.machines-stat-card small {
    display: block;
}

.machines-stat-card span {
    color: #4c5f7b;
    font-size: 12px;
    font-weight: 850;
}

.machines-stat-card strong {
    margin-top: 6px;
    color: #102144;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
}

.machines-stat-card small {
    margin-top: 8px;
    color: #64758f;
    font-size: 11px;
    font-weight: 850;
}

.machines-toolbar {
    padding: 14px 16px;
    border-radius: 14px;
}

.machines-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: center;
}

.machines-search-box {
    width: 100%;
    min-width: 0;
}

.machines-filter-selects {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.machines-toolbar-add {
    grid-column: 2;
    grid-row: 1;
    min-height: 44px;
    padding: 0 18px;
    justify-self: end;
    white-space: nowrap;
}

@media (min-width: 1580px) {
    .machines-filter-form {
        grid-template-columns: minmax(360px, 1fr) auto auto;
    }

    .machines-filter-selects {
        grid-column: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
}

.machines-select-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 152px;
}

.machines-select-shell.is-type {
    flex: 0 0 148px;
    min-width: 0;
}

.machines-select-shell.is-sort {
    flex: 0 0 186px;
    min-width: 0;
}

/* Chip archiwum wygląda jak pozostałe „shelle", ale jest linkiem (toggle). */
.machines-select-shell.is-archive {
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #d6e1ef;
    border-radius: 9px;
    background-color: #ffffff;
    color: #182944;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 7px 16px rgba(39, 63, 96, 0.035);
    white-space: nowrap;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.machines-select-shell.is-archive > i {
    position: static;
    color: inherit;
}

.machines-select-shell.is-archive:hover {
    border-color: #9bbcff;
    color: #1f4fb0;
}

.machines-select-shell.is-archive.active {
    border-color: #2f66d8;
    background-color: #eaf1ff;
    color: #1f4fb0;
}

.machines-select-shell > i {
    position: absolute;
    left: 14px;
    color: #50617c;
    font-size: 15px;
    z-index: 1;
    pointer-events: none;
}

.machines-select-shell select,
.machines-pagination select,
.machines-document-form select {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    width: 100%;
    min-width: 0;
    border: 1px solid #d6e1ef;
    border-radius: 9px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #52637d 50%),
        linear-gradient(135deg, #52637d 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 50%,
        calc(100% - 11px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #182944;
    padding: 0 36px 0 40px;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 7px 16px rgba(39, 63, 96, 0.035);
}

.machines-pagination select,
.machines-document-form select {
    width: auto;
    padding-left: 13px;
}

.machines-select-shell select:focus,
.machines-pagination select:focus,
.machines-document-form select:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
}

.machines-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.machines-results {
    min-width: 0;
}

.machines-panel {
    border-radius: 16px;
    padding: 16px;
    min-width: 0;
}

.machines-panel-head {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.machines-panel-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.machines-panel-head p {
    margin: 5px 0 0;
    color: #74839a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.machines-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
}

.machine-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dce6f3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(39, 63, 96, 0.07);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.machine-card:hover {
    transform: translateY(-1px);
    border-color: #b7cef5;
    box-shadow: 0 18px 38px rgba(39, 63, 96, 0.12);
}

.machine-card-visual {
    position: relative;
    min-height: 168px;
    background: #edf3f9;
}

.machine-thumb {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    overflow: hidden;
    background: #eef4ff;
    color: #2f66d8;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: inset 0 0 0 1px rgba(47, 102, 216, 0.08);
}

.machine-thumb.large {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    font-size: 34px;
}

.machine-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.machine-photo-link {
    display: block;
    height: 100%;
    min-height: inherit;
    color: inherit;
    text-decoration: none;
}

.machine-photo {
    position: relative;
    height: 100%;
    min-height: 168px;
    overflow: hidden;
    background: #edf3f9;
}

.machine-photo::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    background: linear-gradient(180deg, rgba(16, 33, 68, 0) 0%, rgba(16, 33, 68, 0.16) 100%);
    pointer-events: none;
}

.machine-photo img {
    --crop-x: 50%;
    --crop-y: 50%;
    --crop-scale: 1;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-scale));
    transform-origin: var(--crop-x) var(--crop-y);
    transition: filter 180ms ease;
    will-change: transform, object-position;
}

.machine-card:hover .machine-photo img {
    filter: saturate(1.06) contrast(1.03);
}

.machine-photo-placeholder {
    min-height: 168px;
    height: 100%;
    padding: 18px;
    background:
        linear-gradient(160deg, rgba(255, 196, 77, 0.9) 0%, rgba(255, 196, 77, 0.12) 42%),
        linear-gradient(180deg, #edf3f9 0%, #dce7f1 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    color: #24324a;
}

.machine-photo-placeholder i {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    box-shadow: 0 12px 28px rgba(39, 63, 96, 0.11);
}

.machine-photo-placeholder span {
    width: fit-content;
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: #24324a;
    font-size: 12px;
    font-weight: 900;
}

.machine-card-body {
    padding: 13px 14px 12px;
}

.machine-card-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.machine-card-title {
    min-width: 0;
}

.machine-card-title h2 {
    margin: 0;
    color: #102144;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machine-card-title p {
    margin: 3px 0 0;
    color: #6a7a92;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machine-details-btn {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #d8e3f1;
    border-radius: 8px;
    background: #ffffff;
    color: #18365f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 7px 14px rgba(39, 63, 96, 0.045);
    transition:
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.machine-details-btn:hover {
    color: #0f5fe8;
    border-color: #b9cdf4;
    box-shadow: 0 9px 18px rgba(39, 63, 96, 0.09);
    transform: translateY(-1px);
}

.machine-card-meta {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.machine-card-meta span {
    min-width: 0;
    color: #4f5f7a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 850;
}

.machine-card-meta i {
    color: #71819a;
    font-size: 12px;
}

.machine-card-dates {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.machine-date-badge,
.machines-deadline-card {
    border-radius: 14px;
    border: 1px solid #e1eaf6;
    background: #f8fbff;
}

.machine-date-badge {
    min-height: 42px;
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.machine-date-badge small {
    color: #7d8ba0;
    font-size: 10px;
    font-weight: 900;
}

.machine-date-badge strong {
    color: #102144;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.machine-date-badge.ok,
.machines-deadline-card.ok {
    border-color: #c8efdb;
    background: #f2fbf6;
}

.machine-date-badge.warning,
.machines-deadline-card.warning {
    border-color: #f6dc9a;
    background: #fff9ed;
}

.machine-date-badge.danger,
.machines-deadline-card.danger {
    border-color: #ffc9c5;
    background: #fff4f3;
}

.machine-date-badge.muted,
.machines-deadline-card.muted {
    color: #78879e;
    background: #f6f8fb;
}

.machine-date-badge.ok strong,
.machines-deadline-card.ok strong {
    color: #11844e;
}

.machine-date-badge.warning strong,
.machines-deadline-card.warning strong {
    color: #c17300;
}

.machine-date-badge.danger strong,
.machines-deadline-card.danger strong {
    color: #d13b33;
}

.machine-card-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.machine-soft-pill {
    min-height: 27px;
    padding: 0 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
}

.machine-soft-pill {
    color: #235dd1;
    background: #edf4ff;
    border-radius: 8px;
}

.machine-soft-pill.muted {
    color: #64758f;
    background: #f5f8fc;
}

.machine-soft-pill i {
    font-size: 12px;
}

.machine-more-button {
    margin-left: auto;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    color: #385273;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.machine-more-button:hover {
    background: #eef4ff;
    color: #0f5fe8;
}

.machines-page .machines-workspace {
    display: block;
}

.machines-page .machines-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 20px;
}

.machines-page .machine-card {
    height: 100%;
    min-height: 242px;
    border-radius: 9px;
    isolation: isolate;
}

.machines-page .machine-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    color: inherit;
    text-decoration: none;
    touch-action: manipulation;
}

.machines-page .machine-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffffff 42%,
        rgba(255, 255, 255, 0.96) 54%,
        rgba(255, 255, 255, 0.72) 66%,
        rgba(255, 255, 255, 0.16) 84%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.machines-page .machine-card-image {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 0;
    width: 56%;
    color: inherit;
    text-decoration: none;
    pointer-events: none;
}

.machines-page .machine-card-image .machine-photo,
.machines-page .machine-card-image .machine-photo-placeholder {
    min-height: 100%;
    height: 100%;
}

.machines-page .machine-card-image .machine-photo {
    background: #eaf1f8;
}

.machines-page .machine-card-image .machine-photo-placeholder {
    padding: 18px;
    background: linear-gradient(180deg, #edf3f9 0%, #dde7f3 100%);
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #7f8da3;
}

.machines-page .machine-card-image .machine-photo-placeholder i {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 32px;
    box-shadow: none;
    opacity: 0.85;
}

.machines-page .machine-card-image .machine-photo-placeholder span {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
}

.machines-page .machine-card-image .machine-photo::after {
    display: none;
}

.machines-page .machine-card-content {
    position: relative;
    z-index: 2;
    width: 60%;
    min-height: 242px;
    padding: 18px 15px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
}

.machines-page .machine-card-content a,
.machines-page .machine-card-content button,
.machines-page .machine-card-content input,
.machines-page .machine-card-content select {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.machines-page .machine-card-title-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.machines-page .machine-card-title-row h2 {
    margin: 0;
    min-width: 0;
    flex: 1;
    max-width: 100%;
    color: #102144;
    font-size: 19px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machines-page .machine-card:hover .machine-card-title-row h2 {
    color: #0f5fe8;
}

.machines-page .machine-card-archived {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #65758e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.machines-page .machine-id-chip {
    margin-top: 6px;
    max-width: 100%;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #dce6f3;
    border-radius: 8px;
    background: #f5f9fe;
    color: #213a5f;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
}

.machines-page .machine-id-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machines-page .machine-id-chip i {
    color: #7b8aa1;
    font-size: 11px;
}

.machines-page .machine-card-badges {
    margin-top: 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.machines-page .machine-soft-pill {
    min-height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 11px;
}

.machines-page .machine-card-meta {
    width: 100%;
    margin-top: 11px;
    flex-direction: column;
    gap: 8px;
}

.machines-page .machine-card-meta span {
    max-width: 100%;
    color: #53657f;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machines-page .machine-card-dates {
    width: 100%;
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid #e6edf6;
    gap: 0;
}

.machines-page .machine-date-badge {
    min-height: 35px;
    padding: 0 8px 0 0;
    border: 0;
    border-right: 1px solid #e6edf6;
    border-radius: 0;
    background: transparent;
}

.machines-page .machine-date-badge:not(:first-child) {
    padding-left: 9px;
}

.machines-page .machine-date-badge:last-child {
    border-right: 0;
}

.machines-page .machine-date-badge small {
    font-size: 10px;
}

.machines-page .machine-date-badge strong {
    font-size: 11px;
}

.machines-page .machine-card-documents {
    width: 100%;
    margin-top: 8px;
    color: #63748d;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 850;
}

.machines-page .machine-card-documents span,
.machines-page .machine-card-documents strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.machines-page .machine-card-documents strong {
    color: #485b76;
}

.machines-page .machines-page-button,
.machines-page .machines-page-ellipsis {
    min-width: 36px;
    height: 36px;
    border: 1px solid #d8e3f1;
    border-radius: 10px;
    background: #ffffff;
    color: #20324d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 7px 14px rgba(39, 63, 96, 0.045);
}

.machines-page .machines-page-button:hover {
    border-color: #a9c4f5;
    color: #0f5fe8;
    box-shadow: 0 9px 18px rgba(39, 63, 96, 0.09);
}

.machines-page .machines-page-ellipsis {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #7f8ca2;
}

.machines-attention-panel {
    position: sticky;
    top: 88px;
    border-radius: 14px;
    padding: 18px 18px 16px;
}

.machines-attention-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8edf4;
}

.machines-attention-head h2 {
    margin: 0;
    color: #102144;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.machines-attention-head h2 span {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff4d4f;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    vertical-align: middle;
}

.machines-attention-head p {
    margin: 5px 0 0;
    color: #64758f;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 800;
}

.machines-attention-list {
    display: flex;
    flex-direction: column;
}

.machines-attention-item {
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid #e8edf4;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.machines-attention-item:hover .machines-attention-action {
    border-color: #a9c4f5;
    color: #0f5fe8;
}

.machines-attention-icon {
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.machines-attention-item.danger .machines-attention-icon {
    color: #ef4444;
}

.machines-attention-item.ok .machines-attention-icon {
    color: #16a34a;
}

.machines-attention-copy {
    min-width: 0;
}

.machines-attention-copy strong,
.machines-attention-copy small,
.machines-attention-copy em {
    display: block;
}

.machines-attention-copy strong {
    color: #162744;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 900;
}

.machines-attention-copy small {
    margin-top: 3px;
    color: #4f5f7a;
    font-size: 12px;
    font-weight: 850;
}

.machines-attention-copy em {
    margin-top: 7px;
    color: #64758f;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.machines-attention-copy em i {
    margin-right: 6px;
}

.machines-attention-action {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #d8e3f1;
    border-radius: 8px;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

.machines-attention-empty {
    min-height: 154px;
    padding: 18px;
    border-bottom: 1px solid #e8edf4;
    color: #64758f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 7px;
}

.machines-attention-empty i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #e7f8ef;
    color: #139258;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.machines-attention-empty strong {
    color: #102144;
    font-size: 14px;
    font-weight: 900;
}

.machines-attention-empty span {
    font-size: 12px;
    font-weight: 800;
}

.machines-attention-all {
    margin-top: 16px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d8e3f1;
    border-radius: 9px;
    color: #102144;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.machines-attention-all:hover {
    border-color: #a9c4f5;
    color: #0f5fe8;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.08);
}

.machines-empty-card {
    min-height: 300px;
}

.machines-pagination {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.machines-pagination > span,
.machines-pagination label {
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.machines-pagination > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.machines-pagination form {
    justify-self: end;
}

.machines-pagination label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.machines-page-pill {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2467df;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
}

.machines-form-card {
    padding: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.machines-form-section {
    border: 0;
    border-bottom: 1px solid #e7edf6;
    border-radius: 0;
    padding: 20px 22px;
    background: #ffffff;
}

.machines-form-section-head {
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.machines-form-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f7bff 0%, #0f5bea 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(18, 92, 234, 0.22);
    flex: 0 0 auto;
}

.machines-form-section-head h2 {
    margin: 0;
    color: #17233d;
    font-size: 18px;
    line-height: 1.18;
    letter-spacing: 0;
    font-weight: 900;
}

.machines-form-section-head p {
    margin: 5px 0 0;
    color: #60708a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.machines-form-section .form-grid {
    gap: 11px 16px;
}

.machines-form-section .form-group {
    gap: 6px;
}

.machines-form-section .form-group label {
    color: #263959;
    font-size: 12px;
    font-weight: 850;
}

.machines-form-section .form-group input,
.machines-form-section .form-group select,
.machines-form-section .form-group textarea {
    min-height: 42px;
    border-radius: 8px;
    padding: 10px 12px;
    color: #17233d;
    font-size: 13px;
    font-weight: 650;
}

.machines-form-section .form-group textarea {
    min-height: 106px;
    resize: vertical;
}

.machines-form-section .field-helper-text {
    color: #6f7f98;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.machines-form-media-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: start;
}

.machines-upload-drop {
    position: relative;
    min-height: 78px;
    padding: 15px 18px 15px 76px;
    border: 1.5px dashed #cfdbee;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    color: #40536e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.machines-upload-drop:hover,
.machines-upload-drop:has(input:focus-visible) {
    border-color: #9fbcf5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(47, 102, 216, 0.08);
}

.machines-upload-drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.machines-upload-drop > i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #28406a;
    font-size: 28px;
}

.machines-upload-drop span,
.machines-upload-drop small,
.machines-upload-drop em {
    position: relative;
    z-index: 1;
    overflow-wrap: anywhere;
}

.machines-upload-drop span {
    color: #263959;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 760;
}

.machines-upload-drop strong {
    color: #0f5fe8;
    font-weight: 900;
}

.machines-upload-drop small,
.machines-upload-drop em {
    color: #708099;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.machines-form-section .form-group.is-disabled label {
    color: #9aa9bd;
}

.machines-form-section .form-group.is-disabled input,
.machines-form-section .form-group.is-disabled .flatpickr-input,
.machines-form-section .form-group.is-disabled .form-control {
    background: #f2f6fb;
    color: #9aa9bd;
    border-color: #dfe7f2;
    cursor: not-allowed;
}

.machines-form-actions {
    padding: 14px 22px;
    border-top: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.machines-form-actions .btn-secondary,
.machines-form-actions .btn-primary {
    min-height: 42px;
    border-radius: 8px;
    font-size: 13px;
}

.machines-form-actions .machines-delete-action {
    margin-right: auto;
    color: #b42318;
    border-color: #f3c7c3;
    background: #fff7f6;
}

.machines-form-actions .btn-primary {
    min-width: 170px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.machines-form-sidebar {
    position: sticky;
    top: 94px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.machines-form-side-card {
    border-radius: 12px;
    overflow: hidden;
}

.machines-form-side-head {
    min-height: 66px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #edf2f8;
    display: flex;
    align-items: center;
    gap: 12px;
}

.machines-form-side-head span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 16px;
}

.machines-form-side-head span.is-warm {
    background: #fff3d7;
    color: #dba324;
}

.machines-form-side-head span.is-blue {
    background: #eef4ff;
    color: #1769e8;
}

.machines-form-side-head h3 {
    margin: 0;
    color: #17233d;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 900;
}

.machines-form-tip-row {
    min-height: 76px;
    padding: 17px 20px;
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: start;
    gap: 12px;
}

.machines-form-tip-row + .machines-form-tip-row {
    border-top: 1px solid #f0f3f8;
}

.machines-form-tip-row i {
    margin-top: 2px;
    color: #1769e8;
    font-size: 18px;
}

.machines-form-tip-row p {
    margin: 0;
    color: #52627b;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 720;
}

.machines-form-preview-list {
    margin: 0;
    padding: 0 20px;
}

.machines-form-preview-list div {
    min-height: 52px;
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.machines-form-preview-list dt {
    color: #40536e;
    font-size: 12px;
    font-weight: 800;
}

.machines-form-preview-list dd {
    max-width: 135px;
    margin: 0;
    color: #1d2b45;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machines-form-preview-card > p {
    margin: 14px 20px 18px;
    color: #7c899c;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 750;
}

.machines-form-preview-card > p i {
    margin-top: 1px;
    color: #64758f;
    flex: 0 0 auto;
}

.machines-detail-hero {
    align-items: center;
}

.machines-detail-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.machines-detail-title h1 {
    overflow-wrap: anywhere;
}

.machines-detail-badges,
.machines-hero-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.machines-hero-actions {
    margin-top: 0;
    justify-content: flex-end;
}

.machines-hero-actions form {
    margin: 0;
}

.machines-deadline-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.machines-deadline-card {
    min-height: 84px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.machines-deadline-card > span {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex: 0 0 auto;
}

.machines-deadline-card.ok > span {
    background: #dcf8eb;
    color: #15935a;
}

.machines-deadline-card.warning > span {
    background: #fff2d2;
    color: #d88300;
}

.machines-deadline-card.danger > span {
    background: #ffe1df;
    color: #d13b33;
}

.machines-deadline-card small,
.machines-deadline-card strong {
    display: block;
}

.machines-deadline-card small {
    color: #65768e;
    font-size: 12px;
    font-weight: 850;
}

.machines-deadline-card strong {
    margin-top: 5px;
    color: #22314d;
    font-size: 17px;
    font-weight: 900;
}

.machines-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.machines-detail-main,
.machines-detail-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.machines-detail-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.machines-detail-grid div {
    min-height: 68px;
    padding: 12px;
    border: 1px solid #e5edf7;
    border-radius: 14px;
    background: #f9fbff;
}

.machines-detail-grid dt {
    margin: 0 0 5px;
    color: #71819a;
    font-size: 12px;
    font-weight: 900;
}

.machines-detail-grid dd {
    margin: 0;
    color: #22314d;
    font-size: 14px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.machines-note-box,
.machines-muted-box,
.machines-danger-zone {
    border-radius: 16px;
    padding: 14px;
}

.machines-note-box {
    margin-top: 12px;
    background: #f8fbff;
    border: 1px solid #e5edf7;
}

.machines-note-box h3,
.machines-danger-zone h2 {
    margin: 0 0 7px;
    color: #22314d;
    font-size: 16px;
    letter-spacing: 0;
}

.machines-note-box p,
.machines-danger-zone p {
    margin: 0;
    color: #64758f;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.machines-muted-box {
    border: 1px dashed #d8e4f2;
    background: #f8fbff;
    color: #6f7f98;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.machines-document-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.machines-document-card {
    padding: 12px;
    border: 1px solid #e2ebf6;
    border-radius: 16px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.machines-document-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.machines-document-icon.ok {
    background: #dcf8eb;
    color: #15935a;
}

.machines-document-icon.warning {
    background: #fff2d2;
    color: #d88300;
}

.machines-document-icon.danger {
    background: #ffe1df;
    color: #d13b33;
}

.machines-document-copy {
    min-width: 0;
}

.machines-document-copy strong,
.machines-document-copy small {
    display: block;
}

.machines-document-copy strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.machines-document-copy small {
    margin-top: 3px;
    color: #64758f;
    font-size: 12px;
    font-weight: 800;
}

.machines-document-copy p {
    margin: 7px 0 0;
    color: #64758f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.machines-document-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-danger-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #ffd0d0;
    border-radius: 12px;
    background: #fff5f5;
    color: #d13b33;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.btn-danger-icon:hover,
.btn-danger-icon:focus-visible {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.machines-document-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.machines-document-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.machines-document-form label > span {
    color: #64758f;
    font-size: 12px;
    font-weight: 900;
}

.machines-document-form input,
.machines-document-form textarea {
    width: 100%;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #ffffff;
    color: #22314d;
    padding: 11px 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
}

.machines-document-form input:focus,
.machines-document-form textarea:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
}

.machines-inline-action {
    color: #2467df;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.machines-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.machines-history article {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.machines-history article > span {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.machines-history strong,
.machines-history small {
    display: block;
}

.machines-history strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 900;
}

.machines-history small {
    margin-top: 3px;
    color: #64758f;
    font-size: 12px;
    font-weight: 750;
}

.machines-danger-zone {
    border-color: #ffd0d0;
    background: #fffafa;
}

.machines-danger-zone form {
    margin-top: 12px;
}

.btn-secondary.danger {
    border-color: #ffd0d0;
    color: #c03636;
    background: #fff5f5;
}

.machine-detail-shell {
    max-width: 1392px;
    gap: 18px;
}

.machine-page-layout {
    width: 100%;
}

.machine-detail-main-column,
.machine-detail-right-rail,
.machine-detail-side-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.machine-detail-right-rail {
    gap: 16px;
}

.machine-details-tabs-card {
    min-height: 58px;
}

.machine-detail-terms-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.machine-detail-term-card {
    min-height: 76px;
    padding: 14px;
    border: 1px solid #dde7f3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.055);
    display: flex;
    align-items: center;
    gap: 12px;
}

.machine-detail-term-card > span,
.machine-deadline-row > span {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.machine-detail-term-card.ok {
    border-color: #c9f1dc;
    background: #f1fcf6;
}

.machine-detail-term-card.ok > span,
.machine-deadline-row.ok > span {
    background: #dcf8eb;
    color: #15935a;
}

.machine-detail-term-card.warning > span,
.machine-deadline-row.warning > span {
    background: #fff2d2;
    color: #d88300;
}

.machine-detail-term-card.danger > span,
.machine-deadline-row.danger > span {
    background: #ffe1df;
    color: #d13b33;
}

.machine-detail-term-card.muted > span,
.machine-deadline-row.muted > span {
    background: #eef4ff;
    color: #2f66d8;
}

.machine-detail-term-card small,
.machine-detail-term-card strong {
    display: block;
    min-width: 0;
}

.machine-detail-term-card small {
    color: #60708a;
    font-size: 11px;
    font-weight: 900;
}

.machine-detail-term-card strong {
    margin-top: 4px;
    color: #17233d;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 950;
}

.machine-detail-term-card.ok strong {
    color: #0b7b47;
}

.machine-detail-core-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 338px;
    gap: 16px;
    align-items: stretch;
}

.machine-overview-card,
.machine-responsibility-card,
.machine-deadlines-card,
.machine-documents-card,
.machine-history-card {
    border-radius: 12px;
    border-color: #dfe7f2;
    box-shadow: 0 12px 30px rgba(38, 60, 92, 0.06);
}

.machine-overview-card,
.machine-documents-card {
    padding: 22px;
}

.machine-overview-card h2,
.machine-documents-head h2,
.machine-card-head h3,
.machine-side-section-head h3,
.machine-danger-card h3 {
    margin: 0;
    color: #17233d;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
}

.machine-overview-main {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(230px, 318px) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.machine-details-image-card {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    text-align: center;
}

.machine-details-image-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1.16;
    overflow: hidden;
    border-radius: 12px;
    background: #eef4fb;
}

.machine-details-image-frame img {
    --crop-x: 50%;
    --crop-y: 50%;
    --crop-scale: 1;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-scale));
    transform-origin: var(--crop-x) var(--crop-y);
}

.machine-image-placeholder {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2f66d8;
    font-size: 52px;
    background:
        linear-gradient(145deg, rgba(47, 102, 216, 0.12), rgba(47, 102, 216, 0.02)),
        #eef4fb;
}

.machine-details-image-card figcaption {
    margin: 14px 10px 8px;
    color: #17233d;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.machine-image-badges {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.machine-overview-info {
    min-width: 0;
}

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

.machine-info-item {
    min-height: 64px;
    padding: 8px 0 10px;
    border-bottom: 1px solid #dfe7f2;
}

.machine-info-item span,
.machine-info-item strong {
    display: block;
    min-width: 0;
}

.machine-info-item span {
    color: #60708a;
    font-size: 12px;
    font-weight: 800;
}

.machine-info-item strong {
    margin-top: 5px;
    color: #17233d;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.machine-status-pill {
    min-height: 26px;
    padding: 0 10px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
    white-space: nowrap;
}

.machine-status-pill.is-active {
    background: #dff8e9;
    color: #0b7b47;
}

.machine-status-pill.is-muted {
    background: #eef2f7;
    color: #64748b;
}

.machine-status-pill.is-warning {
    background: #fff2d2;
    color: #996000;
}

.machine-extra-detail {
    margin-top: 16px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    background: #ffffff;
}

.machine-extra-detail summary {
    min-height: 42px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    color: #17233d;
    font-size: 14px;
    font-weight: 900;
}

.machine-extra-detail summary::-webkit-details-marker {
    display: none;
}

.machine-extra-detail summary strong {
    color: #17233d;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
}

.machine-extra-detail[open] summary strong i {
    transform: rotate(180deg);
}

.machine-extra-detail > div {
    padding: 0 16px 16px;
}

.machine-extra-detail p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 750;
}

.machine-extra-grid {
    margin: 14px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
}

.machine-extra-grid dt {
    color: #60708a;
    font-size: 12px;
    font-weight: 800;
}

.machine-extra-grid dd {
    margin: 4px 0 0;
    color: #17233d;
    font-size: 13px;
    font-weight: 900;
}

.machine-responsibility-card,
.machine-deadlines-card {
    padding: 22px;
}

.machine-responsibility-card .vehicle-driver-name {
    overflow-wrap: anywhere;
}

.machine-history-card {
    padding: 18px;
}

.machine-card-head,
.machine-documents-head,
.machine-side-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.machine-card-head > span {
    color: #17233d;
    font-size: 18px;
}

.machine-responsible-dialog {
    width: min(460px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    margin: auto;
    padding: 26px;
    border: 1px solid #e1e8f2;
    border-radius: 20px;
    background: #ffffff;
    color: #17233d;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.machine-responsible-dialog::backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.machine-responsible-dialog form {
    margin: 0;
}

.machine-responsible-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.machine-responsible-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 23px;
}

.machine-responsible-dialog-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: #f3f6fb;
    color: #60718d;
    cursor: pointer;
}

.machine-responsible-dialog-close:hover {
    background: #e7effc;
    color: #2563eb;
}

.machine-responsible-dialog h2 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.3;
}

.machine-responsible-dialog p {
    margin: 0 0 22px;
    color: #60718d;
    font-size: 14px;
    line-height: 1.5;
}

.machine-responsible-dialog label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
}

.machine-responsible-dialog input[type="text"] {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #ccd8ea;
    border-radius: 10px;
    color: #17233d;
    background: #ffffff;
    font: inherit;
    font-size: 16px;
}

.machine-responsible-dialog input[type="text"]:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.machine-responsible-dialog small {
    display: block;
    margin-top: 9px;
    color: #60718d;
    font-size: 12px;
    line-height: 1.5;
}

.machine-responsible-errors p {
    margin: 12px 0 0;
    color: #b91c1c;
    font-size: 13px;
}

.machine-responsible-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.machine-responsible-person {
    margin-top: 16px;
    min-height: 74px;
    padding: 14px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.machine-responsible-person > span,
.machine-side-section-head > div > i,
.machine-documents-empty > span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 950;
}

.machine-responsible-person strong,
.machine-responsible-person em {
    display: block;
}

.machine-responsible-person strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 950;
}

.machine-responsible-person em {
    margin-top: 6px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 7px;
    background: #dfe8ff;
    color: #2563eb;
    font-size: 11px;
    line-height: 1;
    font-style: normal;
    font-weight: 950;
}

.machine-deadline-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.machine-deadline-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.machine-deadline-row strong,
.machine-deadline-row small {
    display: block;
}

.machine-deadline-row strong {
    color: #17233d;
    font-size: 13px;
    font-weight: 950;
}

.machine-deadline-row small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.machine-deadline-row.ok small {
    color: #0b7b47;
    font-weight: 950;
}

.machine-side-note {
    margin-top: 18px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.machine-documents-head h2 {
    font-size: 18px;
}

.machine-documents-head p {
    margin: 6px 0 0;
    color: #60708a;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 750;
}

.machine-document-adder {
    position: relative;
    flex: 0 0 auto;
}

.machine-document-adder summary {
    list-style: none;
    cursor: pointer;
}

.machine-document-adder summary::-webkit-details-marker {
    display: none;
}

.machine-document-adder[open] summary {
    border-color: #2f66d8;
    color: #2f66d8;
}

.machine-document-adder .machines-document-form {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 20;
    width: min(360px, calc(100vw - 48px));
    padding: 16px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 22px 50px rgba(39, 63, 96, 0.18);
}

.machine-document-adder .machines-document-form select {
    width: 100%;
}

.machine-documents-card .machines-document-list,
.machine-documents-empty {
    margin-top: 16px;
}

.machine-documents-empty {
    min-height: 104px;
    border: 1px dashed #d6e1ef;
    border-radius: 12px;
    background: #fbfdff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: left;
}

.machine-documents-empty strong,
.machine-documents-empty small {
    display: block;
}

.machine-documents-empty strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 950;
}

.machine-documents-empty small {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.machine-detail-actions-bar {
    margin-top: 0;
}

.machine-details-tips {
    border-radius: 12px;
    border-color: #dfe7f2;
    box-shadow: 0 12px 30px rgba(38, 60, 92, 0.06);
}

.machine-quick-preview-card,
.machine-history-card {
    padding: 18px;
}

.machine-side-section-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.machine-side-section-head > div > i {
    border-radius: 12px;
    font-size: 18px;
}

.machine-side-section-head a {
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.machine-danger-card {
    padding: 18px;
    border: 1px solid #ffc7c7;
    border-radius: 12px;
    background: #fffafa;
    box-shadow: 0 12px 30px rgba(140, 44, 44, 0.05);
}

.machine-danger-card > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.machine-danger-card > div > i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #fff0f0;
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.machine-danger-card p {
    margin: 14px 0 0;
    color: #5f6f88;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 750;
}

.machine-danger-card form {
    margin-top: 16px;
}

.machine-danger-card .btn-secondary.danger {
    min-height: 42px;
    border-radius: 8px;
    color: #dc2626;
    font-weight: 900;
}

@media (max-width: 1320px) {
    .machine-detail-core-grid {
        grid-template-columns: 1fr;
    }

    .machine-detail-side-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1540px) {
    .machine-detail-right-rail {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .machine-detail-right-rail {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .machine-details-tips,
    .machine-danger-card {
        align-self: start;
    }
}

@media (max-width: 900px) {
    .machine-detail-terms-grid,
    .machine-detail-side-stack,
    .machine-detail-right-rail {
        grid-template-columns: 1fr;
    }

    .machine-overview-main {
        grid-template-columns: 1fr;
    }

    .machine-details-image-card {
        max-width: 420px;
    }

    .machine-documents-head {
        align-items: stretch;
        flex-direction: column;
    }

    .machine-document-adder {
        width: 100%;
    }

    .machine-document-adder summary,
    .machine-document-adder .machines-document-form {
        width: 100%;
    }

    .machine-document-adder .machines-document-form {
        position: static;
        margin-top: 12px;
        box-shadow: 0 14px 32px rgba(39, 63, 96, 0.12);
    }
}

@media (max-width: 640px) {
    .machine-overview-card,
    .machine-documents-card,
    .machine-responsibility-card,
    .machine-deadlines-card,
    .machine-quick-preview-card,
    .machine-history-card,
    .machine-danger-card {
        padding: 16px;
    }

    .machine-detail-terms-grid,
    .machine-details-grid,
    .machine-extra-grid {
        grid-template-columns: 1fr;
    }

    .machine-detail-term-card {
        min-height: 68px;
    }

    .machine-details-image-card figcaption {
        font-size: 21px;
    }

    .machine-documents-empty {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .machine-side-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

.btn-secondary.danger:hover {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
}

@media (max-width: 1220px) {
    .machines-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .machines-filter-selects {
        flex-wrap: wrap;
    }

    .machines-workspace {
        grid-template-columns: 1fr;
    }

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

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

    .machines-attention-panel {
        position: static;
    }

    .machines-detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .machines-form-layout {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .machines-form-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .machines-hero,
    .machines-detail-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .machines-filter-form {
        grid-template-columns: 1fr;
    }

    .machines-filter-selects {
        width: 100%;
        justify-content: flex-start;
    }

    .machines-select-shell {
        flex: 1 1 190px;
    }

    .machines-stats-grid,
    .machines-deadline-grid,
    .machines-card-grid,
    .machines-detail-grid {
        grid-template-columns: 1fr;
    }

    .machines-page .machines-card-grid {
        grid-template-columns: 1fr;
    }

    .machines-hero-actions,
    .machines-form-actions {
        justify-content: flex-start;
    }

    .machines-toolbar-add {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
    }

    .machines-pagination {
        grid-template-columns: 1fr;
    }

    .machines-pagination form {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .machines-hero,
    .machines-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .machines-form-card {
        border-radius: 12px;
    }

    .machines-form-section {
        padding: 14px;
    }

    .machines-form-actions {
        padding: 14px;
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .machines-form-actions .btn-secondary,
    .machines-form-actions .btn-primary {
        width: 100%;
    }

    .machines-upload-drop {
        padding: 70px 14px 14px;
        text-align: center;
    }

    .machines-upload-drop > i {
        left: 50%;
        top: 18px;
        transform: translateX(-50%);
    }

    .machines-stats-grid {
        grid-template-columns: 1fr;
    }

    .machines-stat-card {
        padding-left: 76px;
    }

    .machine-card-title-row,
    .machines-pagination {
        grid-template-columns: 1fr;
    }

    .machine-details-btn,
    .machines-hero-actions,
    .machines-hero-actions form,
    .machines-hero-actions .btn-primary,
    .machines-hero-actions .btn-secondary,
    .machines-filter-selects,
    .machines-select-shell {
        width: 100%;
    }

    .machine-card-dates {
        grid-template-columns: 1fr;
    }

    .machines-page .machine-card {
        min-height: auto;
    }

    .machines-page .machine-card::before {
        display: none;
    }

    .machines-page .machine-card-image {
        position: relative;
        inset: auto;
        width: 100%;
        height: 178px;
        display: block;
    }

    .machines-page .machine-card-content {
        width: 100%;
        min-height: auto;
    }

    .machines-page .machine-card-dates {
        grid-template-columns: 1fr;
    }

    .machines-document-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .machines-document-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}



/* Source: css/pages/drivers.css */
/* Driver styles. Import order is part of the cascade contract.
   Edit the owning component instead of appending a new version layer here. */

/* Source: css/pages/drivers/shared.css */
/* Shared styles. Cascade position 1 of 10. */
.drivers-page,
.drivers-form-page,
.drivers-detail-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.drivers-panel,
.drivers-detail-side-card,
.drivers-sidebar-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.drivers-add-btn {
    flex-shrink: 0;
}

.drivers-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.drivers-stat-card {
    min-height: 106px;
    padding: 18px;
    border: 1px solid #e5ebf4;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(39, 63, 96, 0.06);
    display: flex;
    align-items: center;
    gap: 14px;
}

.drivers-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.drivers-stat-card.is-success .drivers-stat-icon {
    background: #dcf8eb;
    color: #169458;
}

.drivers-stat-card.is-linked .drivers-stat-icon {
    background: #fff2cc;
    color: #b98000;
}

.drivers-stat-card.is-vehicle .drivers-stat-icon {
    background: #edf1f7;
    color: #5d6b7f;
}

.drivers-stat-card.is-unassigned .drivers-stat-icon {
    background: #fff2dc;
    color: #b86b00;
}

.drivers-stat-card span {
    display: block;
    margin-bottom: 5px;
    color: #53647d;
    font-size: 13px;
    font-weight: 800;
}

.drivers-stat-card strong {
    color: #22314d;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.drivers-stat-card small {
    display: block;
    margin-top: 6px;
    color: #53647d;
    font-size: 12px;
    font-weight: 800;
}

.drivers-panel {
    border-radius: 24px;
    overflow: hidden;
}

.drivers-filters {
    padding: 18px;
    border-bottom: 1px solid #edf2f7;
    background: #fbfcff;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 210px;
    gap: 14px;
    align-items: end;
}

.drivers-search-box {
    height: 52px;
    box-shadow: none;
    border-color: #dfe7f2;
}

.drivers-filter-select {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.drivers-filter-select label {
    color: #53647d;
    font-size: 12px;
    font-weight: 900;
}

.drivers-filter-select select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
    color: #34445c;
    font-size: 14px;
    font-weight: 800;
}

.drivers-detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.drivers-detail-avatar,
.drivers-photo-preview {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef4ff, #dbe8ff);
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-weight: 900;
}

.drivers-detail-avatar img,
.drivers-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drivers-detail-badges {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.driver-chip {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #e1e8f2;
    background: #f7f9fc;
    color: #52647d;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.driver-chip.is-muted {
    background: #edf1f7;
    border-color: #dde5ef;
    color: #5d6b7f;
}

.drivers-detail-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
}

.drivers-form .form-card,
.drivers-detail-page .form-card {
    border-radius: 22px;
}

.drivers-sync-check {
    margin-top: 10px;
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    color: #617089;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.drivers-sync-check input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: #2874ea;
}

.drivers-photo-editor {
    display: flex;
    align-items: center;
    gap: 18px;
}

.drivers-photo-preview {
    width: 104px;
    height: 104px;
    border-radius: 28px;
    font-size: 34px;
}

.drivers-photo-controls {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drivers-photo-controls input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.drivers-file-btn {
    width: fit-content;
}

.drivers-photo-controls p {
    margin: 0;
    color: #7c8aa1;
    font-size: 13px;
    font-weight: 700;
}

.drivers-remove-photo-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    border: 1px solid #ffd0cd;
    border-radius: 999px;
    background: #ffffff;
    color: #d93f3a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(217, 63, 58, 0.16);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.drivers-remove-photo-btn:hover {
    background: #fff1f0;
    border-color: #ffaaa5;
    transform: translateY(-1px);
}

.drivers-license-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.drivers-license-chip {
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid #dfe7f2;
    border-radius: 999px;
    background: #f8fbff;
    color: #465873;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.drivers-license-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.drivers-license-chip.is-selected {
    border-color: #9dbdff;
    background: #eef4ff;
    color: #2469da;
}

.drivers-vehicle-assignment-list {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    scrollbar-color: #cbd6e6 transparent;
}

.drivers-vehicle-assignment-list-v2 {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.drivers-vehicle-assignment-option[hidden] {
    display: none;
}

.drivers-vehicle-list-toggle {
    min-height: 42px;
    margin: 16px auto 0;
    padding: 0 16px;
    border: 1px solid #d5e2f5;
    border-radius: 13px;
    background: #f7faff;
    color: #2f66d8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.drivers-vehicle-list-toggle:hover {
    border-color: #afc8f1;
    background: #eef4ff;
    transform: translateY(-1px);
}

.drivers-vehicle-assignment-option {
    min-width: 0;
    min-height: 92px;
    padding: 12px;
    border: 1px solid #e0e8f4;
    border-radius: 18px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.drivers-vehicle-assignment-option:hover,
.drivers-vehicle-assignment-option.is-selected {
    border-color: #9dbdff;
    background: #f5f9ff;
    box-shadow: 0 14px 30px rgba(47, 102, 216, 0.08);
}

.drivers-vehicle-assignment-option.is-selected {
    transform: translateY(-1px);
}

.drivers-vehicle-assignment-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.drivers-vehicle-assignment-media {
    width: 64px;
    height: 52px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 22px;
}

.drivers-vehicle-assignment-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drivers-vehicle-assignment-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.drivers-vehicle-assignment-copy strong,
.drivers-vehicle-assignment-copy small,
.drivers-vehicle-assignment-copy em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-vehicle-assignment-copy strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.drivers-vehicle-assignment-copy small {
    color: #60718c;
    font-size: 12px;
    font-weight: 800;
}

.drivers-vehicle-assignment-copy em {
    color: #8592a7;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.drivers-vehicle-assignment-check {
    width: 26px;
    height: 26px;
    border: 1px solid #dbe5f2;
    border-radius: 999px;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.drivers-vehicle-assignment-option.is-selected .drivers-vehicle-assignment-check {
    border-color: #2f66d8;
    background: #2f66d8;
    color: #ffffff;
}

.drivers-form-empty {
    min-height: 92px;
    border: 1px dashed #d8e3f1;
    border-radius: 18px;
    color: #74839a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 900;
}

.drivers-qualification-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.drivers-qualification-card {
    min-height: 78px;
    padding: 14px;
    border: 1px solid #e3eaf4;
    border-radius: 18px;
    background: #fbfcff;
}

.drivers-qualification-card span,
.drivers-qualification-card strong {
    display: block;
    min-width: 0;
}

.drivers-qualification-card span {
    margin-bottom: 6px;
    color: #7c8aa1;
    font-size: 12px;
    font-weight: 900;
}

.drivers-qualification-card strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

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

.drivers-document-slot {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e3eaf4;
    border-radius: 18px;
    background: #fbfcff;
}

.drivers-document-slot-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.drivers-document-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.drivers-document-slot strong,
.drivers-document-slot small {
    display: block;
    min-width: 0;
}

.drivers-document-slot strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;
}

.drivers-document-slot small {
    margin-top: 3px;
    color: #75849a;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 750;
}

.drivers-current-documents {
    margin-top: 12px;
    display: grid;
    gap: 7px;
}

.drivers-current-document-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: center;
}

.drivers-current-documents a {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    background: #f2f6fb;
    color: #33445f;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 850;
}

.drivers-document-delete-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #f0c4c4;
    border-radius: 11px;
    background: #fff5f5;
    color: #d33a32;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drivers-document-delete-btn:hover {
    border-color: #ee9d9d;
    background: #ffe8e6;
}

.drivers-current-documents span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-document-upload {
    margin-top: 12px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #ffffff;
    color: #33445f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.drivers-document-upload:hover {
    border-color: #aac2ee;
    background: #f4f8ff;
    color: #2469da;
}

.drivers-document-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.drivers-sidebar-card {
    position: sticky;
    top: 110px;
}

.drivers-sidebar-card h3,
.drivers-detail-side-card h3 {
    margin: 0 0 14px;
    color: #22314d;
    font-size: 18px;
}

.drivers-tip {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf2f7;
}

.drivers-tip i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drivers-tip p {
    margin: 0;
    color: #617089;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.drivers-inline-create {
    position: relative;
    flex: 0 0 auto;
}

.drivers-inline-create summary {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cfe0fa;
    border-radius: 10px;
    background: #f7faff;
    color: #2563d9;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    list-style: none;
    font-size: 12px;
    font-weight: 900;
}

.drivers-inline-create summary::-webkit-details-marker {
    display: none;
}

.drivers-inline-create[open] summary,
.drivers-inline-create summary:hover {
    border-color: #9cbcf4;
    background: #eef5ff;
}

.drivers-inline-create form {
    position: absolute;
    top: 44px;
    right: 0;
    z-index: 8;
    width: min(640px, 78vw);
    padding: 14px;
    border: 1px solid #d9e4f3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(37, 64, 112, 0.16);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.drivers-inline-create label {
    min-width: 0;
}

.drivers-inline-create label span {
    display: block;
    margin-bottom: 5px;
    color: #617089;
    font-size: 11px;
    font-weight: 900;
}

.drivers-inline-create label b {
    color: #e04848;
}

.drivers-inline-create input,
.drivers-inline-create select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #d8e2f0;
    border-radius: 9px;
    color: #243653;
    background: #ffffff;
    font-size: 12px;
    font-weight: 750;
}

.drivers-inline-create-wide {
    grid-column: 1 / -1;
}

.drivers-inline-create .btn-primary {
    justify-content: center;
    grid-column: 1 / -1;
}

.drivers-workforce-list {
    display: grid;
    gap: 8px;
}

.drivers-workforce-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 32px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e9f3;
    border-radius: 12px;
    background: #fbfcff;
}

.drivers-workforce-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drivers-workforce-row.is-employment .drivers-workforce-icon {
    color: #178252;
    background: #e7f8ef;
}

.drivers-workforce-row.is-absence .drivers-workforce-icon {
    color: #cf6420;
    background: #fff4e7;
}

.drivers-workforce-row strong,
.drivers-workforce-row small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.drivers-workforce-row strong {
    color: #253653;
    font-size: 13px;
}

.drivers-workforce-row small {
    margin-top: 3px;
    color: #71819b;
    font-size: 12px;
    font-weight: 750;
}

.drivers-workforce-delete {
    width: 32px;
    height: 32px;
    border: 1px solid #f1cece;
    border-radius: 9px;
    background: #fff8f8;
    color: #cd4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drivers-workforce-delete:hover {
    border-color: #eea9a9;
    background: #fff0f0;
}

.drivers-detail-avatar {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    font-size: 22px;
}

.drivers-detail-grid {
    display: grid;
    gap: 24px;
    align-items: start;
}

.drivers-detail-info-item {
    padding: 16px;
    border: 1px solid #e3eaf4;
    border-radius: 18px;
    background: #fbfcff;
}

.drivers-detail-info-item span {
    display: block;
    margin-bottom: 6px;
    color: #7c8aa1;
    font-size: 12px;
    font-weight: 900;
}

.drivers-detail-info-item strong {
    color: #22314d;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.section-head:has(.drivers-license-help) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.drivers-license-help {
    position: relative;
    flex: 0 0 auto;
}

.drivers-license-help summary {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #ffffff;
    color: #33445f;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.drivers-license-help summary::-webkit-details-marker {
    display: none;
}

.drivers-license-help[open] summary,
.drivers-license-help summary:hover {
    border-color: #aac2ee;
    background: #f4f8ff;
    color: #2469da;
}

.drivers-license-help-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    width: min(520px, 86vw);
    padding: 14px;
    border: 1px solid #dce6f3;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(39, 63, 96, 0.16);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.drivers-license-help-panel div {
    padding: 9px;
    border-radius: 12px;
    background: #f7faff;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.drivers-license-help-panel strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.drivers-license-help-panel span,
.drivers-license-help-panel p {
    margin: 0;
    color: #607089;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 750;
}

.drivers-license-help-panel p {
    grid-column: 1 / -1;
    padding: 10px;
    border-radius: 12px;
    background: #fff8e6;
    color: #8a5b00;
}

.drivers-audit-empty {
    margin: 0;
    color: #617089;
    line-height: 1.55;
    font-weight: 700;
}

.drivers-audit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drivers-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drivers-audit-row {
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

.drivers-audit-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.drivers-audit-row strong {
    color: #22314d;
    font-size: 14px;
}

.drivers-audit-row p {
    margin: 5px 0;
    color: #617089;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-line;
}

.drivers-audit-row span {
    color: #8a98ad;
    font-size: 12px;
    font-weight: 800;
}



/* Source: css/pages/drivers/directory.css */
/* Directory styles. Cascade position 2 of 10. */
.drivers-directory-filters {
    grid-template-columns: minmax(300px, 1fr) 190px 210px auto;
    align-items: end;
}

.drivers-clear-filters {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
    color: #34445c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.drivers-clear-filters:hover {
    border-color: #bcd0f4;
    color: #2867df;
    background: #f7faff;
}

.drivers-board {
    padding: 18px;
    background: #ffffff;
}

.drivers-directory-layout {
    display: grid;
    grid-template-columns: minmax(420px, 0.85fr) minmax(0, 1.2fr);
    gap: 18px;
    align-items: start;
}

.drivers-list-shell,
.drivers-preview-card {
    border: 1px solid #e2eaf5;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(39, 63, 96, 0.055);
}

.drivers-list-shell {
    overflow: hidden;
}

.drivers-list-head {
    min-height: 70px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid #eef3f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.drivers-list-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
}

.drivers-list-head p {
    margin: 5px 0 0;
    color: #53647d;
    font-size: 13px;
    font-weight: 800;
}

.drivers-list-scroll {
    overflow-y: auto;
    padding: 12px;
    display: grid;
    gap: 10px;
    scrollbar-color: #cbd6e6 transparent;
}

.driver-list-card {
    border: 1px solid #e3ebf6;
    border-radius: 18px;
    background: #ffffff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    align-items: stretch;
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.driver-list-card:hover,
.driver-list-card.is-selected {
    border-color: #3777f0;
    box-shadow: 0 12px 30px rgba(47, 105, 229, 0.12);
}

.driver-list-card.is-selected {
    background: linear-gradient(90deg, #ffffff, #f7fbff);
}

.driver-list-main {
    min-height: 106px;
    padding: 14px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(130px, 170px);
    gap: 14px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.driver-list-avatar,
.drivers-preview-avatar {
    border-radius: 24px;
    background: linear-gradient(135deg, #eef4ff, #dbe8ff);
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-weight: 900;
}

.driver-list-avatar {
    width: 58px;
    height: 58px;
}

.drivers-preview-avatar {
    width: 110px;
    height: 110px;
    border-radius: 30px;
    font-size: 34px;
}

.driver-list-avatar img,
.drivers-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.driver-list-content {
    min-width: 0;
}

.driver-list-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.driver-list-title-row h3 {
    min-width: 120px;
    margin: 0;
    color: #22314d;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 900;
}

.driver-list-contact {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.driver-list-contact span {
    min-width: 0;
    color: #64758d;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
}

.driver-list-contact i {
    color: #7f90a8;
}

.driver-list-vehicles {
    min-width: 0;
    display: grid;
    gap: 2px;
    justify-items: start;
    color: #62738c;
    font-size: 12px;
    font-weight: 800;
}

.driver-list-vehicles strong {
    max-width: 100%;
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-list-vehicles strong.is-unassigned {
    color: #ef4444;
}

.driver-list-vehicles em {
    color: #2f66d8;
    font-style: normal;
}

.driver-list-actions {
    padding: 12px;
    border-left: 1px solid #edf2f7;
    background: #fbfdff;
    display: grid;
    align-content: center;
    gap: 8px;
}

.driver-list-action {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #ffffff;
    color: #34445c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.driver-list-action:hover {
    border-color: #bfd1f3;
    background: #f3f7ff;
    color: #2867df;
    transform: translateY(-1px);
}

.drivers-preview-card {
    padding: 20px;
}

.drivers-preview-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.drivers-preview-title {
    min-width: 0;
}

.drivers-preview-name-row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.drivers-preview-name-row h2 {
    margin: 0;
    color: #172846;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 900;
}

.drivers-preview-meta {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 16px;
}

.drivers-preview-meta span {
    min-width: 0;
    color: #5f7088;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-preview-meta i {
    color: #7b8ca4;
    flex-shrink: 0;
}

.drivers-preview-summary {
    margin-top: 18px;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.drivers-preview-summary div {
    min-height: 92px;
    padding: 16px;
    border-right: 1px solid #edf2f7;
    display: grid;
    align-content: center;
    gap: 4px;
}

.drivers-preview-summary div:last-child {
    border-right: 0;
}

.drivers-preview-summary i {
    color: #2f66d8;
    font-size: 19px;
}

.drivers-preview-summary strong {
    color: #172846;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 900;
}

.drivers-preview-summary span {
    color: #53647d;
    font-size: 12px;
    font-weight: 800;
}

.drivers-preview-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
    gap: 14px;
}

.drivers-preview-section {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    background: #ffffff;
}

.drivers-documents-section {
    grid-column: 1 / -1;
}

.drivers-activity-section {
    grid-column: 1 / -1;
    align-self: start;
}

.drivers-section-head {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drivers-section-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 16px;
    font-weight: 900;
}

.drivers-section-head a {
    color: #2f66d8;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.drivers-assigned-vehicle {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.driver-vehicle-thumb {
    width: 98px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #edf4ff, #eaf0f8);
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 28px;
}

.driver-vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drivers-assigned-vehicle strong,
.drivers-assigned-vehicle span,
.drivers-assigned-vehicle small {
    display: block;
}

.drivers-assigned-vehicle strong {
    color: #172846;
    font-size: 16px;
    font-weight: 900;
}

.drivers-assigned-vehicle span {
    margin-top: 4px;
    color: #4f6280;
    font-size: 13px;
    font-weight: 800;
}

.drivers-assigned-vehicle small {
    margin-top: 8px;
    color: #7c8aa1;
    font-size: 12px;
    font-weight: 800;
}

.drivers-license-card {
    display: grid;
    gap: 14px;
}

.drivers-fake-license {
    min-height: 118px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drivers-fake-license img {
    width: 100%;
    height: 100%;
    max-height: 150px;
    object-fit: contain;
    display: block;
}

.drivers-fake-license span,
.drivers-fake-license strong,
.drivers-fake-license small {
    display: block;
}

.drivers-fake-license span {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    opacity: 0.82;
}

.drivers-fake-license strong {
    margin-top: 7px;
    font-size: 18px;
    font-weight: 900;
}

.drivers-fake-license small {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 800;
    opacity: 0.92;
}

.drivers-license-card dl {
    min-width: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.drivers-license-card dl div {
    min-width: 0;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.drivers-license-card dt {
    color: #53647d;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 900;
}

.drivers-license-card dd {
    min-width: 0;
    margin: 0;
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
    text-align: left;
    overflow-wrap: anywhere;
}

.drivers-document-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.drivers-document-tile {
    min-height: 96px;
    padding: 13px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: #f9fbff;
    color: #34445c;
    display: grid;
    gap: 4px;
    text-decoration: none;
}

.drivers-document-tile i {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drivers-document-tile strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.drivers-document-tile span,
.drivers-document-tile small {
    color: #53647d;
    font-size: 12px;
    font-weight: 800;
}

.drivers-document-tile.is-success i {
    background: #dff8ed;
    color: #15945a;
}

.drivers-document-tile.is-warning i {
    background: #fff1cf;
    color: #d98500;
}

.drivers-document-tile.is-danger i {
    background: #ffe1e1;
    color: #e03b3b;
}

.drivers-document-tile.is-missing i {
    background: #edf1f7;
    color: #53647d;
}

.drivers-activity-list {
    display: grid;
    gap: 10px;
}

.drivers-activity-list div {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.drivers-activity-list i,
.drivers-preview-empty i {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drivers-activity-list p {
    margin: 0;
    min-width: 0;
}

.drivers-activity-list strong,
.drivers-activity-list span {
    display: block;
}

.drivers-activity-list strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.drivers-activity-list span {
    margin-top: 3px;
    color: #53647d;
    font-size: 12px;
    font-weight: 800;
}

.drivers-preview-empty {
    min-height: 82px;
    padding: 14px;
    border: 1px dashed #dbe5f2;
    border-radius: 16px;
    background: #fbfdff;
    color: #53647d;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1120px) {
    .drivers-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drivers-directory-layout,
    .drivers-detail-grid {
        grid-template-columns: 1fr;
    }

    .drivers-directory-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drivers-sidebar-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .drivers-filters,
    .drivers-photo-editor {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .drivers-stats-grid,
    .drivers-directory-filters,
    .driver-list-card,
    .driver-list-main,
    .drivers-preview-head,
    .drivers-preview-summary,
    .drivers-preview-grid,
    .drivers-document-tiles,
    .drivers-documents-grid,
    .drivers-qualification-cards {
        grid-template-columns: 1fr;
    }

    .driver-list-actions {
        padding: 10px 14px 14px;
        border-top: 1px solid #edf2f7;
        border-left: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .driver-list-vehicles {
        padding-top: 10px;
        border-top: 1px solid #edf2f7;
    }

    .drivers-preview-summary div {
        border-right: 0;
        border-bottom: 1px solid #edf2f7;
    }

    .drivers-preview-summary div:last-child {
        border-bottom: 0;
    }
}



/* Source: css/pages/drivers/editor.css */
/* Editor styles. Cascade position 3 of 10. */
.drivers-form-page-v2 {
    --driver-blue: #2f73ea;
    --driver-ink: #172846;
    --driver-muted: #6f8098;
    --driver-line: #e2eaf5;
}

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

.drivers-profile-editor-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.3fr);
    gap: 26px;
    align-items: start;
}

.drivers-profile-identity {
    padding-right: 26px;
    border-right: 1px solid var(--driver-line);
    display: grid;
    align-content: start;
    gap: 20px;
    align-self: stretch;
}

.drivers-photo-editor-v2 {
    align-items: center;
    gap: 16px;
    padding: 4px 0 2px;
}

.drivers-photo-preview-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
}

.drivers-photo-editor-v2 .drivers-photo-preview {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(42, 84, 145, 0.12);
}

.drivers-photo-editor-v2 .drivers-file-btn {
    min-height: 38px;
    padding: 0 12px;
}

.drivers-photo-editor-v2 .drivers-photo-controls {
    align-items: flex-start;
    gap: 8px;
}

.drivers-photo-editor-v2 .drivers-photo-controls p {
    max-width: 170px;
    font-size: 11px;
    line-height: 1.4;
}

.drivers-photo-editor-v2 .drivers-remove-photo-btn {
    top: -6px;
    right: -6px;
    width: 32px;
    height: 32px;
    box-shadow: 0 8px 20px rgba(217, 63, 58, 0.16);
}

.drivers-profile-live-name {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.drivers-profile-live-name h2 {
    margin: 0;
    color: var(--driver-ink);
    font-size: 24px;
    line-height: 1.15;
    font-weight: 900;
}

.drivers-profile-live-name p,
.drivers-field-hint {
    margin: 0;
    color: #7a8aa1;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 700;
}

.drivers-license-field-number {
    display: inline-flex;
    margin-left: 0.25rem;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    background: var(--surface-muted, #eef2f7);
    color: var(--text-muted, #64748b);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.drivers-account-match-status {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
}

.drivers-create-account-button {
    align-self: flex-start;
    margin-top: 0.15rem;
}

.drivers-profile-live-name p i {
    margin-right: 5px;
    color: #2f73ea;
}

.drivers-profile-fields {
    align-content: start;
}

.drivers-license-workbench-head,
.drivers-license-workbench-head > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drivers-license-workbench-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: minmax(205px, 0.58fr) minmax(420px, 1.12fr) minmax(335px, 0.82fr);
    align-items: stretch;
}

.drivers-license-common,
.drivers-license-categories-manager,
.drivers-license-live-preview {
    min-width: 0;
    padding: 0 20px;
}

.drivers-license-common {
    padding-left: 0;
}

.drivers-license-categories-manager,
.drivers-license-live-preview {
    border-left: 1px solid var(--driver-line);
}

.drivers-license-live-preview {
    grid-column: auto;
    margin-top: 0;
    padding: 0 0 0 18px;
    border-top: 0;
    display: block;
}

.drivers-license-live-preview > h3,
.drivers-license-live-preview > p {
    grid-column: auto;
}

.drivers-license-common h3,
.drivers-license-categories-manager h3,
.drivers-license-live-preview h3 {
    margin: 0 0 15px;
    color: var(--driver-ink);
    font-size: 15px;
    font-weight: 900;
}

.drivers-license-common .form-group {
    margin-bottom: 14px;
}

.drivers-license-common .form-group label,
.drivers-license-category-row .form-group label,
.drivers-professional-dates .form-group label {
    font-size: 11px;
}

.drivers-common-note {
    margin-top: 18px;
    padding: 12px;
    border: 1px solid #cfe0ff;
    border-radius: 13px;
    background: #f3f7ff;
    color: #3364b9;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.drivers-common-note p {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 750;
}

.drivers-category-manager-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.drivers-category-manager-title h3 {
    margin-bottom: 3px;
}

.drivers-category-manager-title p,
.drivers-license-live-preview > p {
    margin: 0;
    color: #7c8ba1;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
}

.drivers-license-grid-v2 {
    margin: 14px 0;
    gap: 7px;
}

.drivers-license-grid-v2 .drivers-license-chip {
    min-width: 42px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: #ffffff;
}

.drivers-license-grid-v2 .drivers-license-chip.is-selected {
    border-color: #2f73ea;
    background: #2f73ea;
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(47, 115, 234, 0.22);
}

.drivers-license-category-list {
    border: 1px solid var(--driver-line);
    border-radius: 15px;
    overflow: hidden;
}

.drivers-license-category-row {
    position: relative;
    padding: 11px;
    display: grid;
    grid-template-columns: 42px repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    background: #ffffff;
}

.drivers-license-category-row + .drivers-license-category-row {
    border-top: 1px solid #edf2f7;
}

.drivers-license-category-row[hidden] {
    display: none;
}

.drivers-license-category-code {
    width: 38px;
    min-height: 38px;
    border: 1px solid #cddcf2;
    border-radius: 10px;
    background: #f6f9ff;
    color: #2d66c8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
}

.drivers-license-category-row .form-group {
    min-width: 0;
    gap: 5px;
}

.drivers-license-category-row input {
    min-height: 38px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 11px;
}

.drivers-category-age-message {
    grid-column: 2 / -1;
    margin: 0;
    color: #73839a;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 750;
}

.drivers-category-age-message.is-valid {
    color: #15834d;
}

.drivers-category-age-message.is-error {
    color: #cf3c36;
}

.drivers-category-empty {
    min-height: 126px;
    padding: 18px;
    color: #7b8ba2;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    text-align: center;
}

.drivers-category-empty[hidden] {
    display: none;
}

.drivers-category-empty i {
    color: #2f73ea;
    font-size: 20px;
}

.drivers-category-empty strong {
    color: #34465f;
    font-size: 12px;
}

.drivers-category-empty span {
    font-size: 10px;
}

.drivers-license-rule-notes {
    margin-top: 12px;
    padding: 11px 13px;
    border: 1px solid #d7e5fb;
    border-radius: 13px;
    background: #f7faff;
    display: grid;
    gap: 8px;
}

.drivers-license-rule-notes div {
    color: #41618f;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 7px;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 750;
}

.drivers-license-rule-notes i {
    color: #2f73ea;
    font-size: 13px;
}

.drivers-license-side-label {
    margin: 14px 0 7px;
    color: #647792;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.drivers-license-front-card,
.drivers-license-back-card {
    position: relative;
    width: 100%;
    min-height: 0;
    aspect-ratio: 85.6 / 53.98;
    border: 1px solid #e1b9c8;
    border-radius: clamp(14px, 1.6vw, 22px);
    background: repeating-linear-gradient(118deg, transparent 0 10px, rgba(77, 103, 168, 0.045) 11px 12px, transparent 13px 23px),
        linear-gradient(120deg, #fff8f4 0%, #f7dce6 39%, #f9edf0 64%, #f3d9e4 100%);
    box-shadow: 0 18px 38px rgba(85, 55, 76, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.48);
    overflow: hidden;
    container-type: inline-size;
    isolation: isolate;
}

.drivers-license-front-card::before,
.drivers-license-back-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 58% 54%, transparent 0 25%, rgba(185, 68, 120, 0.07) 25.5% 26%, transparent 26.5% 43%, rgba(255, 255, 255, 0.28) 43.5% 44%, transparent 44.5%);
    pointer-events: none;
}

.drivers-license-front-card::after {
    content: "WZÓR UNII EUROPEJSKIEJ   PRAWO JAZDY   DRIVING LICENCE";
    position: absolute;
    z-index: 0;
    top: 31%;
    left: 37%;
    width: 49%;
    color: rgba(157, 52, 103, 0.12);
    font-size: 3.1cqw;
    line-height: 1.25;
    font-weight: 950;
    text-align: center;
    transform: rotate(-15deg);
    pointer-events: none;
}

.drivers-license-front-card {
    padding: 0;
}

.drivers-license-flag {
    position: absolute;
    z-index: 2;
    top: 5.2cqw;
    left: 4.8cqw;
    width: 20cqw;
    height: 11.5cqw;
    border-radius: 0.9cqw;
    border: 0.2cqw solid rgba(255, 255, 255, 0.68);
    background: linear-gradient(145deg, #17499e, #0d5ac9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.8cqw 1.8cqw rgba(29, 70, 152, 0.22);
    font-size: 3.1cqw;
    font-weight: 950;
    letter-spacing: 0.05em;
}

.drivers-license-flag::before {
    content: "✦  ✦  ✦";
    position: absolute;
    top: 0.65cqw;
    color: #f5df56;
    font-size: 1.5cqw;
    letter-spacing: 0.35cqw;
}

.drivers-license-flag::after {
    content: "✦  ✦  ✦";
    position: absolute;
    bottom: 0.5cqw;
    color: #f5df56;
    font-size: 1.5cqw;
    letter-spacing: 0.35cqw;
}

.drivers-license-heading {
    position: absolute;
    z-index: 2;
    top: 5.6cqw;
    left: 27.2cqw;
    display: grid;
    gap: 0.35cqw;
}

.drivers-license-heading strong {
    color: #174e8d;
    font-size: 4.1cqw;
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0.01em;
    border-bottom: 0.45cqw solid rgba(20, 84, 148, 0.54);
}

.drivers-license-heading span {
    color: #5f6980;
    font-size: 1.7cqw;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.drivers-license-country-mark {
    position: absolute;
    z-index: 1;
    top: 4.6cqw;
    right: 4.4cqw;
    color: rgba(114, 165, 92, 0.28);
    font-size: 3.3cqw;
    line-height: 0.92;
    font-weight: 950;
    text-align: right;
    letter-spacing: 0.05em;
}

.drivers-license-card-photo {
    position: absolute;
    z-index: 2;
    left: 4.8cqw;
    top: 19.5cqw;
    width: 27cqw;
    height: 35.5cqw;
    border: 0.3cqw solid rgba(255, 255, 255, 0.7);
    border-radius: 1.3cqw;
    background: rgba(255, 255, 255, 0.5);
    color: #9a7180;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1cqw 2.4cqw rgba(90, 58, 74, 0.11);
    font-size: 10cqw;
}

.drivers-license-card-photo img,
.drivers-license-card-photo-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drivers-license-card-data {
    position: absolute;
    z-index: 2;
    top: 17.8cqw;
    left: 34cqw;
    right: 7cqw;
    bottom: 11.5cqw;
    display: grid;
    align-content: start;
    gap: 0.65cqw;
}

.drivers-license-card-data div {
    min-width: 0;
    display: grid;
    grid-template-columns: 4.2cqw minmax(0, 1fr);
    gap: 0.7cqw;
    color: #222936;
    font-size: 2.15cqw;
    line-height: 1.08;
}

.drivers-license-card-data b {
    padding-top: 1.2cqw;
    color: #51586a;
    font-size: 2.15cqw;
    font-weight: 950;
}

.drivers-license-card-data span {
    min-width: 0;
    display: grid;
    gap: 0.12cqw;
}

.drivers-license-card-data small {
    color: rgba(69, 72, 84, 0.72);
    font-size: 1.35cqw;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.025em;
}

.drivers-license-card-data strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 2.45cqw;
    line-height: 1.05;
    font-weight: 950;
}

.drivers-license-card-data .drivers-license-card-data-split {
    grid-template-columns: 4.2cqw minmax(0, 1fr) 4.2cqw minmax(0, 1fr);
}

.drivers-license-signature {
    position: absolute;
    z-index: 3;
    right: 19cqw;
    bottom: 7.6cqw;
    color: #3f4350;
    display: grid;
    gap: 0.25cqw;
}

.drivers-license-signature small {
    color: rgba(60, 64, 76, 0.72);
    font-family: inherit;
    font-size: 1.2cqw;
    font-weight: 900;
}

.drivers-license-signature span {
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: 3.8cqw;
    line-height: 1;
    transform: rotate(-6deg);
}

.drivers-license-card-photo-secondary {
    position: absolute;
    z-index: 2;
    right: 5.2cqw;
    bottom: 10.3cqw;
    width: 10.5cqw;
    height: 14.2cqw;
    border-radius: 0.7cqw;
    background: rgba(255, 255, 255, 0.48);
    color: rgba(112, 83, 95, 0.56);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    filter: grayscale(1) contrast(0.82);
    opacity: 0.74;
    font-size: 4cqw;
}

.drivers-license-front-categories {
    position: absolute;
    z-index: 3;
    left: 4.8cqw;
    bottom: 3.2cqw;
    color: #343b4b;
    display: flex;
    gap: 1.2cqw;
    font-size: 2.8cqw;
    font-weight: 950;
}

.drivers-license-back-card {
    padding: 4% 5% 4% 4%;
    display: grid;
    grid-template-columns: 24% minmax(0, 1fr);
    gap: 3%;
}

.drivers-license-back-card::after {
    content: "1. Nazwisko  2. Imię  3. Data urodzenia  4a. Data wydania  4b. Ważne do  4c. Organ wydający  5. Numer prawa jazdy";
    position: absolute;
    z-index: 1;
    top: 5cqw;
    right: 1.2cqw;
    height: 53cqw;
    color: rgba(50, 45, 52, 0.6);
    font-size: 1.25cqw;
    line-height: 1.2;
    font-weight: 800;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.drivers-license-back-sidebar,
.drivers-license-back-table {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.drivers-license-back-sidebar {
    padding-top: 1cqw;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 1.2cqw;
}

.drivers-license-back-sidebar > strong {
    justify-self: start;
    color: #343b49;
    font-size: 2.2cqw;
}

.drivers-license-barcode {
    width: 18cqw;
    height: 10.5cqw;
    background: repeating-linear-gradient(90deg, #20222a 0 0.55cqw, transparent 0.55cqw 0.95cqw, #20222a 0.95cqw 1.2cqw, transparent 1.2cqw 1.75cqw);
    opacity: 0.88;
}

.drivers-license-back-sidebar small {
    max-width: 19cqw;
    color: #343a49;
    font-size: 1.55cqw;
    line-height: 1;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-license-map {
    width: 18cqw;
    height: 22cqw;
    margin-top: 3cqw;
    color: rgba(196, 80, 126, 0.22);
    display: grid;
    place-items: center;
    font-size: 8cqw;
    font-weight: 950;
    clip-path: polygon(14% 12%, 75% 6%, 94% 30%, 82% 61%, 63% 92%, 26% 84%, 8% 58%);
    background: rgba(220, 127, 158, 0.12);
}

.drivers-license-back-table {
    display: grid;
    align-content: start;
}

.drivers-license-back-head,
.drivers-license-back-row {
    display: grid;
    grid-template-columns: 12cqw 1fr 1fr 0.82fr;
    gap: 0.8cqw;
    align-items: center;
}

.drivers-license-back-head {
    min-height: 5cqw;
    padding: 0 1cqw;
    border-top: 0.25cqw solid rgba(88, 71, 82, 0.46);
    border-bottom: 0.25cqw solid rgba(88, 71, 82, 0.46);
    color: #454955;
    font-size: 1.55cqw;
    line-height: 1.1;
    font-weight: 950;
}

.drivers-license-back-row {
    min-height: 4cqw;
    padding: 0 1cqw;
    border-bottom: 0.16cqw solid rgba(94, 75, 86, 0.32);
    color: #666170;
    font-size: 1.9cqw;
    line-height: 1;
    font-weight: 800;
}

.drivers-license-back-row.is-active {
    background: rgba(255, 255, 255, 0.52);
    color: #222733;
}

.drivers-license-back-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-license-category-cell {
    display: grid;
    grid-template-columns: 4.5cqw minmax(0, 1fr);
    align-items: center;
    gap: 0.7cqw;
}

.drivers-license-category-cell strong {
    color: inherit;
    font-size: 1.95cqw;
    font-weight: 950;
}

.drivers-license-category-cell i {
    color: #302e34;
    font-size: 2.3cqw;
}

.drivers-license-back-code {
    min-height: 4.2cqw;
    padding: 0.7cqw 1cqw;
    color: #373943;
    display: flex;
    gap: 1.2cqw;
    font-size: 1.7cqw;
    font-weight: 900;
}

.drivers-professional-dates {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--driver-line);
    display: grid;
    grid-template-columns: minmax(170px, 0.9fr) repeat(4, minmax(145px, 1fr));
    gap: 12px;
    align-items: end;
}

.drivers-professional-dates-intro {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drivers-professional-dates-intro > i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #edf4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drivers-professional-dates-intro strong,
.drivers-professional-dates-intro span {
    display: block;
}

.drivers-professional-dates-intro strong {
    color: #233754;
    font-size: 12px;
    font-weight: 900;
}

.drivers-professional-dates-intro span {
    margin-top: 2px;
    color: #7a8aa1;
    font-size: 9px;
    line-height: 1.35;
    font-weight: 700;
}

.drivers-professional-dates input {
    min-height: 40px;
    padding: 0 10px;
    font-size: 11px;
}

.drivers-form-sidebar-v2 {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 14px;
}

.drivers-summary-list {
    margin-top: 13px;
    display: grid;
}

.drivers-summary-list > div {
    min-height: 43px;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.drivers-summary-list > div:last-child {
    border-bottom: 0;
}

.drivers-summary-list i {
    color: #4d7ed0;
}

.drivers-summary-list span,
.drivers-summary-list strong {
    font-size: 10px;
    font-weight: 850;
}

.drivers-detail-license-table {
    margin-top: 14px;
    border: 1px solid #e3ebf5;
    border-radius: 14px;
    overflow: hidden;
}

.drivers-detail-license-row {
    min-height: 42px;
    padding: 7px 12px;
    border-top: 1px solid #edf2f7;
    display: grid;
    grid-template-columns: 0.6fr repeat(3, 1fr);
    align-items: center;
    gap: 10px;
    color: #52647d;
    font-size: 11px;
    font-weight: 800;
}

.drivers-detail-license-row.is-head {
    border-top: 0;
    background: #f7faff;
    color: #7a8aa1;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.drivers-detail-license-row strong {
    color: #2f66d8;
    font-size: 12px;
}

.drivers-license-document-sides {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(470px, 100%), 590px));
    align-items: start;
    justify-content: center;
    gap: clamp(20px, 2.4vw, 34px);
}

.drivers-license-document-sides > div {
    min-width: 0;
    width: 100%;
    max-width: 590px;
    justify-self: center;
}

.drivers-license-document-sides .drivers-license-side-label {
    display: block;
}

.drivers-summary-list span {
    color: #53667f;
}

.drivers-summary-list strong {
    max-width: 104px;
    color: #2f73ea;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1540px) {
    .drivers-form-layout-v2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-form-sidebar-v2 {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .drivers-license-workbench-grid {
        grid-template-columns: minmax(180px, 0.58fr) minmax(390px, 1.12fr) minmax(300px, 0.82fr);
    }

    .drivers-professional-dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drivers-professional-dates-intro {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1280px) {
    .drivers-license-workbench-grid {
        grid-template-columns: minmax(190px, 0.65fr) minmax(400px, 1.35fr);
    }

    .drivers-license-live-preview {
        grid-column: 1 / -1;
        margin-top: 20px;
        padding: 20px 0 0;
        border-top: 1px solid var(--driver-line);
        border-left: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }

    .drivers-license-live-preview > h3,
    .drivers-license-live-preview > p {
        grid-column: 1 / -1;
    }

    .drivers-license-side-label.is-front,
    .drivers-license-side-label.is-back,
    .drivers-license-front-card,
    .drivers-license-back-card {
        grid-column: 1;
        grid-row: auto;
    }

    .drivers-license-front-card,
    .drivers-license-back-card {
        max-width: 720px;
    }
}

@media (max-width: 1120px) {
    .drivers-form-layout-v2,
    .drivers-profile-editor-card {
        grid-template-columns: 1fr;
    }

    .drivers-form-sidebar-v2 {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drivers-profile-identity {
        padding: 0 0 20px;
        border-right: 0;
        border-bottom: 1px solid var(--driver-line);
        grid-template-columns: auto 1fr;
        align-items: center;
    }
}

@media (max-width: 760px) {
    .drivers-profile-identity,
    .drivers-form-sidebar-v2,
    .drivers-license-workbench-grid,
    .drivers-license-live-preview,
    .drivers-professional-dates {
        grid-template-columns: 1fr;
    }

    .drivers-license-common,
    .drivers-license-categories-manager,
    .drivers-license-live-preview {
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid var(--driver-line);
    }

    .drivers-license-common {
        padding-top: 0;
        border-top: 0;
    }

    .drivers-license-category-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .drivers-license-category-row .form-group {
        grid-column: 2;
    }

    .drivers-category-age-message {
        grid-column: 1 / -1;
    }

    .drivers-license-live-preview > *,
    .drivers-license-side-label.is-front,
    .drivers-license-side-label.is-back,
    .drivers-license-front-card,
    .drivers-license-back-card {
        grid-column: 1;
        grid-row: auto;
    }

    .drivers-photo-editor-v2 {
        display: grid;
        grid-template-columns: 90px 1fr;
    }

    .drivers-photo-editor-v2 .drivers-photo-preview {
        width: 90px;
        height: 90px;
    }

    .drivers-photo-editor-v2 .drivers-photo-preview-wrap {
        width: 90px;
        height: 90px;
        flex-basis: 90px;
    }
}



/* Source: css/pages/drivers/form.css */
/* Form styles. Cascade position 4 of 10. */
.drivers-form-page-v2 {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    gap: 18px;
}

.drivers-form-page-v2 .drivers-form {
    width: 100%;
}

.drivers-form-page-v2 .drivers-form-layout-v2 {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 952px) 306px;
    justify-content: center;
    gap: 22px;
    align-items: start;
}

.drivers-form-page-v2 .drivers-step-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drivers-form-page-v2 .drivers-step-panel {
    min-width: 0;
    padding: 0;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(38, 60, 92, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drivers-form-page-v2 .drivers-step-panel[hidden] {
    display: none;
}

.drivers-form-page-v2 .drivers-profile-editor-card {
    gap: 0;
}

.drivers-form-page-v2 .drivers-vehicles-step {
    min-height: 0;
}

.drivers-step-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.drivers-step-panel > .drivers-step-heading,
.drivers-step-panel > .section-head {
    padding: 24px 26px 0;
}

.drivers-step-panel > .section-head {
    border-bottom: 0;
}

.drivers-step-panel > .section-head .drivers-step-heading {
    padding: 0;
}

.drivers-step-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f7bff 0%, #0f5bea 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    font-size: 18px;
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(20, 91, 234, 0.28);
}

.drivers-step-heading h2,
.drivers-step-heading .section-title {
    margin: 0;
    color: #162640;
    font-size: 22px;
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: 0;
}

.drivers-step-heading p,
.drivers-step-heading .section-subtitle {
    margin: 7px 0 0;
    color: #647693;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 750;
}

.drivers-profile-editor-body {
    padding: 22px 26px 24px;
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    gap: 26px;
    align-items: stretch;
}

.drivers-profile-editor-body .drivers-profile-identity {
    min-width: 0;
    padding: 0 26px 0 0;
    border-right: 1px solid #dfe7f2;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 18px;
    text-align: center;
}

.drivers-profile-editor-body .drivers-photo-editor-v2 {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 13px;
    padding: 0;
}

.drivers-profile-editor-body .drivers-photo-preview-wrap,
.drivers-profile-editor-body .drivers-photo-editor-v2 .drivers-photo-preview {
    width: 148px;
    height: 148px;
    flex-basis: 148px;
}

.drivers-profile-editor-body .drivers-photo-editor-v2 .drivers-photo-preview {
    border-radius: 50%;
    font-size: 42px;
    box-shadow: 0 14px 34px rgba(42, 84, 145, 0.14);
}

.drivers-profile-editor-body .drivers-photo-editor-v2 .drivers-photo-controls {
    align-items: center;
    gap: 8px;
}

.drivers-profile-editor-body .drivers-file-btn {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
}

.drivers-profile-editor-body .drivers-photo-controls p {
    max-width: none;
    color: #7b8ba4;
    font-size: 12px;
    font-weight: 750;
}

.drivers-profile-editor-body .drivers-profile-live-name {
    justify-items: center;
    text-align: center;
    gap: 11px;
}

.drivers-profile-editor-body .drivers-profile-live-name h2 {
    font-size: 24px;
}

.drivers-profile-editor-body .drivers-profile-live-name p {
    max-width: 220px;
    margin-top: 12px;
    color: #536681;
    font-size: 12px;
    line-height: 1.5;
}

.drivers-form-page-v2 .drivers-profile-fields {
    align-content: start;
    gap: 18px 22px;
}

.drivers-form-page-v2 .form-group label {
    color: #34465f;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
}

.drivers-form-page-v2 .form-group input,
.drivers-form-page-v2 .form-group select,
.drivers-form-page-v2 .form-group textarea {
    min-height: 46px;
    border: 1px solid #d6e0ec;
    border-radius: 10px;
    background: #ffffff;
    color: #253650;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(35, 51, 75, 0.02);
}

.drivers-form-page-v2 .form-group textarea {
    min-height: 104px;
    resize: vertical;
}

.drivers-form-page-v2 .form-group input::placeholder,
.drivers-form-page-v2 .form-group textarea::placeholder {
    color: #96a4ba;
}

.drivers-form-page-v2 .form-group .drivers-sync-check {
    position: relative;
    width: 100%;
    min-height: 70px;
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid #d8e4f2;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbfdff 0%, #f3f8ff 100%);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
    color: #536681;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.drivers-form-page-v2 .form-group .drivers-sync-check:hover {
    border-color: #aac6ed;
    box-shadow: 0 5px 15px rgba(36, 97, 183, 0.08);
}

.drivers-form-page-v2 .form-group .drivers-sync-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    clip-path: inset(50%);
}

.drivers-sync-check-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e3efff;
    color: #2872e7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.16s ease, color 0.16s ease;
}

.drivers-sync-check-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.drivers-sync-check-copy strong {
    color: #2a3d5b;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 850;
}

.drivers-sync-check-copy small {
    margin: 0;
    color: #72829a;
    font-size: 10.5px;
    line-height: 1.35;
    font-weight: 650;
}

.drivers-sync-check:has(input:checked) {
    border-color: #b6d1f7;
    background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
}

.drivers-sync-check:focus-within {
    border-color: #7caeeb;
    box-shadow: 0 0 0 3px rgba(47, 115, 223, 0.14);
}

.drivers-form-page-v2 .drivers-license-workbench-grid {
    margin: 22px 26px 0;
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) minmax(330px, 1fr) minmax(270px, 0.86fr);
    align-items: stretch;
}

.drivers-form-page-v2 .drivers-license-common,
.drivers-form-page-v2 .drivers-license-categories-manager,
.drivers-form-page-v2 .drivers-license-live-preview {
    min-width: 0;
    padding: 0 20px;
}

.drivers-form-page-v2 .drivers-license-common {
    padding-left: 0;
}

.drivers-form-page-v2 .drivers-license-categories-manager,
.drivers-form-page-v2 .drivers-license-live-preview {
    border-left: 1px solid #dfe7f2;
}

.drivers-form-page-v2 .drivers-license-live-preview {
    padding-right: 0;
}

.drivers-form-page-v2 .drivers-license-common h3,
.drivers-form-page-v2 .drivers-license-categories-manager h3,
.drivers-form-page-v2 .drivers-license-live-preview h3 {
    margin-bottom: 11px;
    font-size: 14px;
}

.drivers-form-page-v2 .drivers-license-grid-v2 {
    margin: 12px 0 14px;
    gap: 7px;
}

.drivers-form-page-v2 .drivers-license-grid-v2 .drivers-license-chip {
    min-width: 38px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12px;
}

.drivers-form-page-v2 .drivers-license-category-list {
    border-style: dashed;
    border-color: #cfe0fa;
    border-radius: 13px;
}

.drivers-form-page-v2 .drivers-category-empty {
    min-height: 174px;
}

.drivers-form-page-v2 .drivers-license-rule-notes {
    padding: 12px;
    border-radius: 12px;
}

.drivers-form-page-v2 .drivers-license-front-card,
.drivers-form-page-v2 .drivers-license-back-card {
    max-width: 306px;
    margin-right: auto;
}

.drivers-form-page-v2 .drivers-professional-dates {
    margin: 22px 26px 0;
    padding: 18px 0 0;
    grid-template-columns: minmax(170px, 0.8fr) repeat(4, minmax(126px, 1fr));
    border-top: 1px solid #dfe7f2;
}

.drivers-form-page-v2 .drivers-vehicle-assignment-list,
.drivers-form-page-v2 .drivers-form-empty,
.drivers-form-page-v2 .drivers-documents-grid,
.drivers-form-page-v2 .drivers-documents-note {
    margin-left: 26px;
    margin-right: 26px;
}

.drivers-form-page-v2 .drivers-vehicle-assignment-list {
    margin-top: 22px;
}

.drivers-form-page-v2 .drivers-documents-grid {
    margin-top: 22px;
    gap: 12px 16px;
}

.drivers-form-page-v2 .drivers-document-slot {
    padding: 16px;
    border-radius: 13px;
    background: #ffffff;
}

.drivers-form-page-v2 .drivers-document-slot-head {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
}

.drivers-form-page-v2 .drivers-document-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.drivers-form-page-v2 .drivers-document-slot strong {
    font-size: 15px;
}

.drivers-form-page-v2 .drivers-document-upload {
    width: 100%;
    min-height: 56px;
    margin-top: 18px;
    border: 1px dashed #c9d9f4;
    border-radius: 12px;
    background: #fbfdff;
}

.drivers-documents-note {
    min-height: 48px;
    margin-top: 14px;
    padding: 0 14px;
    border: 1px solid #dce6f4;
    border-radius: 10px;
    background: #fbfdff;
    color: #687993;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 750;
}

.drivers-documents-note i {
    color: #2f73ea;
    font-size: 18px;
}

.drivers-step-actions {
    width: 100%;
    min-height: 78px;
    margin-top: 22px;
    padding: 16px 26px;
    border-top: 1px solid #e7edf5;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drivers-step-actions .btn-secondary,
.drivers-step-actions .add-btn {
    min-height: 46px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
}

.drivers-step-actions .add-btn {
    min-width: 118px;
}

.drivers-form-page-v2 .drivers-form-sidebar-v2 {
    position: sticky;
    top: 92px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.drivers-form-page-v2 .drivers-sidebar-card {
    position: static;
    padding: 18px;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(38, 60, 92, 0.06);
}

.drivers-side-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.drivers-side-card-head h3 {
    margin: 0;
    color: #162640;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 950;
}

.drivers-side-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #edf4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    font-size: 18px;
}

.drivers-side-icon.is-warm {
    background: #fff2d9;
    color: #e79a13;
}

.drivers-side-panel {
    margin-top: 14px;
}

.drivers-side-panel[hidden] {
    display: none;
}

.drivers-form-page-v2 .drivers-tip {
    min-height: 76px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
}

.drivers-form-page-v2 .drivers-tip i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f73ea;
}

.drivers-form-page-v2 .drivers-tip p {
    color: #3f526f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
}

.drivers-form-page-v2 .drivers-summary-list {
    margin-top: 16px;
}

.drivers-form-page-v2 .drivers-summary-list > div {
    min-height: 42px;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 9px;
}

.drivers-form-page-v2 .drivers-summary-list > div[hidden] {
    display: none;
}

.drivers-form-page-v2 .drivers-summary-list i {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #edf4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.drivers-form-page-v2 .drivers-summary-list span,
.drivers-form-page-v2 .drivers-summary-list strong {
    font-size: 12px;
}

.drivers-form-page-v2 .drivers-summary-list strong {
    max-width: 118px;
    color: #15243c;
    text-align: right;
}

.drivers-form-page-v2 [data-completion-value] {
    min-width: 52px;
    padding: 4px 9px;
    border-radius: 9px;
    background: #e4f8ec;
    color: #10904d !important;
}

.drivers-preview-note {
    margin: 14px 0 0;
    color: #687993;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 750;
}

.drivers-form-page-v2 .drivers-delete-card {
    border-color: #f0caca;
    background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
}

.drivers-delete-card .drivers-side-card-head {
    align-items: flex-start;
}

.drivers-delete-card .drivers-side-card-head > div {
    min-width: 0;
}

.drivers-delete-card .drivers-side-card-head p {
    margin: 4px 0 0;
    color: #9a3f47;
    font-size: 12px;
    font-weight: 800;
}

.drivers-side-icon.is-danger {
    background: #ffe8e8;
    color: #c93743;
}

.drivers-delete-warning {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #f4d2a5;
    border-radius: 10px;
    background: #fff8e9;
    color: #744b12;
    font-size: 12px;
    line-height: 1.45;
}

.drivers-delete-warning > i {
    color: #de8c14;
}

.drivers-delete-warning strong {
    display: block;
    color: #613b08;
}

.drivers-delete-impact-list {
    margin-top: 10px;
    border: 1px solid #e6ebf2;
    border-radius: 10px;
    overflow: hidden;
}

.drivers-delete-impact-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f6;
}

.drivers-delete-impact-row:last-child {
    border-bottom: 0;
}

.drivers-delete-impact-row span,
.drivers-delete-impact-row strong,
.drivers-delete-impact-row small {
    display: block;
}

.drivers-delete-impact-row strong {
    color: #243650;
    font-size: 12px;
}

.drivers-delete-impact-row small {
    margin-top: 3px;
    color: #6c7d94;
    font-size: 11px;
    line-height: 1.4;
}

.drivers-delete-impact-row > b {
    min-width: 28px;
    padding: 3px 7px;
    border-radius: 8px;
    background: #f1f4f8;
    color: #263a56;
    font-size: 12px;
    text-align: center;
}

.drivers-delete-empty,
.drivers-delete-account-note,
.drivers-delete-profile-note {
    margin: 12px 0 0;
    color: #5c6d83;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.drivers-delete-account-note {
    color: #285f48;
}

.drivers-delete-account-note i {
    margin-right: 4px;
    color: #15925d;
}

.drivers-delete-button {
    width: 100%;
    min-height: 42px;
    margin-top: 16px;
    border: 1px solid #c92f3c;
    border-radius: 10px;
    background: #d63b48;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.drivers-delete-button:hover {
    border-color: #a9222e;
    background: #b92835;
    transform: translateY(-1px);
}

@media (max-width: 1320px) {
    .drivers-form-page-v2 .drivers-form-layout-v2 {
        grid-template-columns: 1fr;
    }

    .drivers-form-page-v2 .drivers-form-sidebar-v2 {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .drivers-profile-editor-body,
    .drivers-form-page-v2 .drivers-license-workbench-grid {
        grid-template-columns: 1fr;
    }

    .drivers-profile-editor-body .drivers-profile-identity {
        padding: 0 0 22px;
        border-right: 0;
        border-bottom: 1px solid #dfe7f2;
    }

    .drivers-form-page-v2 .drivers-license-common,
    .drivers-form-page-v2 .drivers-license-categories-manager,
    .drivers-form-page-v2 .drivers-license-live-preview {
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid #dfe7f2;
    }

    .drivers-form-page-v2 .drivers-license-common {
        padding-top: 0;
        border-top: 0;
    }

    .drivers-form-page-v2 .drivers-professional-dates,
    .drivers-form-page-v2 .drivers-documents-grid,
    .drivers-form-page-v2 .drivers-vehicle-assignment-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .drivers-form-page-v2 .drivers-form-sidebar-v2,
    .drivers-form-page-v2 .drivers-profile-fields,
    .drivers-form-page-v2 .drivers-professional-dates,
    .drivers-form-page-v2 .drivers-documents-grid {
        grid-template-columns: 1fr;
    }

    .drivers-step-panel > .drivers-step-heading,
    .drivers-step-panel > .section-head,
    .drivers-profile-editor-body,
    .drivers-form-page-v2 .drivers-license-workbench-grid,
    .drivers-form-page-v2 .drivers-professional-dates,
    .drivers-step-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .drivers-form-page-v2 .drivers-vehicle-assignment-list,
    .drivers-form-page-v2 .drivers-form-empty,
    .drivers-form-page-v2 .drivers-documents-grid,
    .drivers-form-page-v2 .drivers-documents-note {
        margin-left: 18px;
        margin-right: 18px;
    }

    .drivers-step-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .drivers-step-actions .btn-secondary,
    .drivers-step-actions .add-btn {
        width: 100%;
    }
}



/* Source: css/pages/drivers/preview.css */
/* Preview styles. Cascade position 5 of 10. */
.drivers-directory-layout {
    grid-template-columns: minmax(520px, 0.98fr) minmax(560px, 1.02fr);
}

.drivers-list-scroll {
    max-height: 478px;
}

.drivers-compact-preview {
    padding: 16px;
}

.drivers-compact-head {
    grid-template-columns: 104px minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: center;
}

.drivers-compact-preview .drivers-preview-avatar {
    width: 104px;
    height: 104px;
    border-radius: 18px;
}

.drivers-compact-preview .drivers-preview-name-row h2 {
    font-size: 22px;
}

.drivers-compact-preview .drivers-preview-meta {
    margin-top: 10px;
    grid-template-columns: 1fr;
    gap: 7px;
}

.drivers-compact-preview .drivers-preview-summary {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 14px;
}

.drivers-compact-preview .drivers-preview-summary div {
    min-height: 62px;
    padding: 10px 12px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 2px 8px;
    align-content: center;
}

.drivers-compact-preview .drivers-preview-summary i {
    grid-row: span 2;
    align-self: center;
    font-size: 16px;
}

.drivers-compact-preview .drivers-preview-summary strong {
    font-size: 16px;
}

.drivers-compact-preview .drivers-preview-summary span {
    font-size: 11px;
}

.drivers-compact-preview .drivers-preview-grid {
    margin-top: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.95fr);
    gap: 12px;
}

.drivers-compact-preview .drivers-preview-section {
    padding: 14px;
    border-radius: 14px;
}

.drivers-compact-preview .drivers-documents-section,
.drivers-compact-preview .drivers-activity-section {
    grid-column: auto;
}

.drivers-compact-preview .drivers-activity-section {
    align-self: start;
}

.drivers-compact-preview .drivers-section-head {
    margin-bottom: 10px;
}

.drivers-assigned-list {
    max-height: 88px;
    overflow-y: auto;
    padding-right: 4px;
    display: grid;
    gap: 10px;
    scrollbar-color: #cbd6e6 transparent;
}

.drivers-compact-preview .drivers-assigned-vehicle {
    min-height: 78px;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 12px;
}

.drivers-compact-preview .driver-vehicle-thumb {
    width: 92px;
    height: 66px;
    border-radius: 12px;
}

.drivers-compact-preview .drivers-assigned-vehicle a,
.drivers-license-preview-link {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #ffffff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.drivers-compact-preview .drivers-assigned-vehicle a:hover,
.drivers-license-preview-link:hover {
    border-color: #bdd0f4;
    background: #f6f9ff;
}

.drivers-compact-preview .drivers-license-card {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
}

.drivers-compact-preview .drivers-fake-license {
    grid-row: 1 / span 2;
    min-height: 70px;
    padding: 5px;
    border-radius: 12px;
}

.drivers-compact-preview .drivers-fake-license img {
    max-height: 82px;
}

.drivers-compact-preview .drivers-fake-license strong {
    font-size: 13px;
}

.drivers-compact-preview .drivers-fake-license small {
    font-size: 10px;
}

.drivers-compact-preview .drivers-license-card dl {
    gap: 5px;
}

.drivers-compact-preview .drivers-license-card dl div {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 7px;
}

.drivers-compact-preview .drivers-license-card dt,
.drivers-compact-preview .drivers-license-card dd {
    font-size: 11px;
}

.drivers-compact-preview .drivers-license-preview-link {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    margin-top: 2px;
}

.drivers-compact-preview .drivers-document-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.drivers-compact-preview .drivers-document-tile {
    min-height: 72px;
    padding: 10px;
    border-radius: 12px;
}

.drivers-compact-preview .drivers-document-tile i {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 12px;
}

.drivers-compact-preview .drivers-document-tile strong,
.drivers-compact-preview .drivers-document-tile span,
.drivers-compact-preview .drivers-document-tile small {
    font-size: 11px;
}

.drivers-compact-preview .drivers-activity-list {
    gap: 9px;
}

.drivers-license-preview-page {
    display: grid;
    gap: 22px;
}

.drivers-license-preview-card {
    padding: clamp(20px, 2.4vw, 34px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1500px) {
    .drivers-compact-head {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .drivers-compact-preview .drivers-preview-summary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1180px) {
    .drivers-directory-layout,
    .drivers-compact-preview .drivers-preview-grid,
    .drivers-license-preview-card {
        grid-template-columns: 1fr;
    }

    .drivers-compact-head {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .drivers-compact-preview .drivers-preview-summary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .drivers-inline-create {
        margin-top: 10px;
    }

    .drivers-inline-create form {
        position: static;
        width: 100%;
        margin-top: 8px;
        grid-template-columns: 1fr;
    }

    .drivers-compact-head,
    .drivers-compact-preview .drivers-license-card,
    .drivers-compact-preview .drivers-assigned-vehicle,
    .drivers-vehicle-assignment-list,
    .drivers-license-document-sides {
        grid-template-columns: 1fr;
    }

    .drivers-compact-preview .drivers-document-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drivers-compact-preview .drivers-fake-license,
    .drivers-compact-preview .drivers-license-preview-link {
        grid-column: auto;
        grid-row: auto;
    }

    .drivers-compact-preview .drivers-license-preview-link {
        justify-self: stretch;
    }
}



/* Source: css/pages/drivers/detail.css */
/* Detail styles. Cascade position 6 of 10. */
.drivers-detail-page-v3 {
    --detail-ink: #172846;
    --detail-muted: #71819a;
    --detail-line: #dde6f2;
    --detail-blue: #2f73ea;
    gap: 16px;
}

.drivers-detail-page-v3 .form-card {
    padding: 18px;
    border: 1px solid rgba(215, 225, 239, 0.95);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(35, 60, 99, 0.055);
}

.drivers-detail-avatar-v3 {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid #dce7f7;
    background: linear-gradient(145deg, #e6efff, #f7faff);
    color: #2465d8;
    box-shadow: 0 10px 24px rgba(47, 115, 234, 0.1);
}

.drivers-detail-page-v3 .drivers-detail-badges {
    margin-top: 10px;
}

.drivers-detail-page-v3 .driver-chip {
    min-height: 25px;
    padding: 0 9px;
    font-size: 10px;
}

.drivers-detail-grid-v3 {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
}

.drivers-detail-main-column-v3 {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.drivers-detail-panel-v3 {
    min-width: 0;
}

.drivers-panel-heading-v3 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.drivers-panel-heading-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #eef4ff;
    color: #2f6bd8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: 15px;
}

.drivers-panel-heading-icon.is-green {
    background: #e9f8ef;
    color: #178252;
}

.drivers-panel-heading-icon.is-orange {
    background: #fff2e4;
    color: #d66a20;
}

.drivers-panel-heading-icon.is-blue {
    background: #edf4ff;
    color: #2469df;
}

.drivers-panel-heading-v3 h2 {
    margin: 0;
    color: var(--detail-ink);
    font-size: 15px;
    line-height: 1.25;
}

.drivers-panel-heading-v3 p {
    margin: 3px 0 0;
    color: var(--detail-muted);
    font-size: 10px;
    line-height: 1.4;
    font-weight: 700;
}

.drivers-detail-page-v3 .drivers-workforce-section {
    margin-top: 0;
}

.drivers-detail-page-v3 .drivers-inline-create summary {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cfdef4;
    border-radius: 10px;
    background: #ffffff;
    color: #2767d7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.drivers-detail-page-v3 .drivers-inline-create form {
    width: min(700px, 82vw);
}

.drivers-absence-create-v3 form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drivers-timeline-list-v3 {
    position: relative;
}

.drivers-detail-page-v3 .drivers-workforce-row {
    grid-template-columns: 38px minmax(0, 1fr) auto 32px;
    min-height: 62px;
    padding: 9px 10px;
    border-radius: 11px;
    background: #ffffff;
}

.drivers-workforce-title-v3 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.drivers-workforce-title-v3 > span,
.drivers-workforce-badge {
    min-height: 21px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f4f8;
    color: #63748b;
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.drivers-workforce-badge.is-active {
    background: #e7f7ed;
    color: #16804f;
}

.drivers-detail-page-v3 .drivers-workforce-row.is-absence .drivers-workforce-icon {
    color: #bd651d;
    background: #fff2e4;
}

.drivers-detail-page-v3 .drivers-workforce-row.absence-tone-sick .drivers-workforce-icon {
    color: #d33f4d;
    background: #ffeaed;
}

.drivers-detail-page-v3 .drivers-workforce-row.absence-tone-family .drivers-workforce-icon {
    color: #8a51c7;
    background: #f2eafd;
}

.drivers-detail-page-v3 .drivers-workforce-row.absence-tone-neutral .drivers-workforce-icon {
    color: #54708d;
    background: #edf2f7;
}

.drivers-detail-page-v3 .drivers-workforce-row.absence-tone-danger .drivers-workforce-icon {
    color: #c72f38;
    background: #ffe7e9;
}

.drivers-detail-page-v3 .drivers-workforce-row.absence-tone-sick .drivers-workforce-badge {
    background: #ffeaed;
    color: #bd3441;
}

.drivers-detail-page-v3 .drivers-workforce-row.absence-tone-family .drivers-workforce-badge {
    background: #f2eafd;
    color: #7947b0;
}

.drivers-detail-page-v3 .drivers-workforce-delete {
    border: 0;
    background: transparent;
    color: #8190a4;
}

.drivers-detail-page-v3 .drivers-workforce-delete:hover {
    background: #fff0f0;
    color: #cf3f47;
}

.drivers-empty-state-v3 {
    min-height: 76px;
    padding: 12px;
    border: 1px dashed #d7e1ef;
    border-radius: 12px;
    background: #fbfdff;
    color: #8090a7;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    column-gap: 11px;
}

.drivers-empty-state-v3 > i {
    grid-row: 1 / 3;
    font-size: 24px;
    justify-self: center;
}

.drivers-empty-state-v3 strong {
    color: #53647d;
    font-size: 11px;
}

.drivers-empty-state-v3 span {
    font-size: 10px;
    font-weight: 700;
}

.drivers-qualification-cards-v3 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}

.drivers-qualification-cards-v3 .drivers-qualification-card {
    min-height: 68px;
    padding: 10px;
    border-radius: 11px;
    position: relative;
}

.drivers-qualification-cards-v3 .drivers-qualification-card > i {
    position: absolute;
    top: 11px;
    left: 10px;
    color: #4c6588;
    font-size: 14px;
}

.drivers-qualification-cards-v3 .drivers-qualification-card span,
.drivers-qualification-cards-v3 .drivers-qualification-card strong {
    padding-left: 21px;
}

.drivers-qualification-cards-v3 .drivers-qualification-card span {
    margin-bottom: 4px;
    font-size: 9px;
}

.drivers-qualification-cards-v3 .drivers-qualification-card strong {
    font-size: 11px;
}

.drivers-detail-page-v3 .drivers-detail-license-table {
    margin-top: 12px;
}

.drivers-detail-page-v3 .drivers-detail-license-row {
    min-height: 36px;
    font-size: 10px;
}

.drivers-detail-sidebar-v3 {
    gap: 14px;
}

.drivers-side-card-v3 h3 {
    margin-bottom: 14px;
    color: var(--detail-ink);
    font-size: 15px;
}

.drivers-audit-list-v3 {
    gap: 0;
}

.drivers-audit-list-v3 .drivers-audit-row {
    position: relative;
    padding: 0 0 13px 19px;
    border: 0;
}

.drivers-audit-list-v3 .drivers-audit-row::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2f73ea;
    box-shadow: 0 0 0 3px #edf4ff;
}

.drivers-audit-list-v3 .drivers-audit-row:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 3px;
    left: 5px;
    width: 1px;
    background: #dce5f2;
}

.drivers-audit-list-v3 .drivers-audit-row strong {
    font-size: 10px;
}

.drivers-audit-list-v3 .drivers-audit-row p {
    margin: 3px 0;
    font-size: 9px;
    line-height: 1.45;
}

.drivers-audit-list-v3 .drivers-audit-row span {
    font-size: 9px;
}

@media (max-width: 1500px) {
    .drivers-qualification-cards-v3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .drivers-detail-sidebar-v3 {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 760px) {
    .drivers-qualification-cards-v3,
    .drivers-detail-sidebar-v3 {
        grid-template-columns: 1fr;
    }

    .drivers-detail-page-v3 .drivers-inline-create form {
        width: 100%;
    }

    .drivers-detail-page-v3 .drivers-workforce-row {
        grid-template-columns: 38px minmax(0, 1fr) 32px;
    }

    .drivers-detail-page-v3 .drivers-workforce-badge {
        display: none;
    }
}

.drivers-detail-page-v4 {
    gap: 16px;
}

.drivers-detail-grid-v4 {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
}

.drivers-detail-main-column-v4 {
    gap: 16px;
}

.drivers-detail-page-v4 .form-card {
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(35, 60, 99, 0.055);
}

.drivers-detail-hero-v4 {
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.drivers-detail-hero-v4 .drivers-detail-title-wrap {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.drivers-detail-avatar-v4 {
    position: relative;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
}

.drivers-detail-avatar-v4 > a {
    position: absolute;
    right: -2px;
    bottom: 0;
    width: 29px;
    height: 29px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #2f73ea;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    box-shadow: 0 5px 12px rgba(47, 115, 234, 0.24);
}

.drivers-detail-name-row-v4 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.drivers-detail-name-row-v4 h1 {
    margin: 0;
    color: #172846;
    font-size: 28px;
    line-height: 1.1;
}

.drivers-detail-name-row-v4 .drivers-detail-badges {
    margin: 0;
}

.drivers-detail-page-v4 .driver-chip {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
}

.drivers-detail-panel-v4 > h2 {
    margin: 0;
    color: #172846;
    font-size: 16px;
}

.drivers-panel-heading-v4 {
    margin-bottom: 15px;
}

.drivers-panel-heading-v4 .drivers-panel-heading-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    font-size: 17px;
}

.drivers-panel-heading-v4 h2 {
    font-size: 18px;
}

.drivers-panel-heading-v4 p {
    margin-top: 3px;
    font-size: 12px;
}

.drivers-timeline-list-v4 {
    gap: 9px;
}

.drivers-timeline-list-v4.is-scrollable {
    max-height: 417px;
    padding-right: 7px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b9c9df #f3f6fb;
}

.drivers-timeline-list-v4.is-scrollable::-webkit-scrollbar {
    width: 8px;
}

.drivers-timeline-list-v4.is-scrollable::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #f3f6fb;
}

.drivers-timeline-list-v4.is-scrollable::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #b9c9df;
}

.drivers-timeline-list-v4 .drivers-workforce-row {
    min-height: 62px;
    padding: 9px 10px;
    grid-template-columns: 40px minmax(0, 1fr) auto 30px;
    gap: 10px;
    border-radius: 11px;
}

.drivers-timeline-list-v4 .drivers-workforce-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 17px;
}

.drivers-timeline-list-v4 .drivers-workforce-row strong {
    font-size: 13px;
}

.drivers-timeline-list-v4 .drivers-workforce-row small {
    margin-top: 3px;
    font-size: 11px;
}

.drivers-timeline-list-v4 .drivers-workforce-title-v3 {
    gap: 6px;
}

.drivers-timeline-list-v4 .drivers-workforce-title-v3 > span,
.drivers-timeline-list-v4 .drivers-workforce-badge {
    min-height: 22px;
    padding: 0 8px;
    font-size: 9px;
}

.drivers-timeline-list-v4 .drivers-workforce-delete {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.drivers-inline-create-v4 {
    width: 100%;
    margin-top: 10px;
}

.drivers-inline-create-v4 > summary {
    width: 100%;
    min-height: 38px;
    border-style: dashed;
    background: #ffffff;
    justify-content: center;
    font-size: 11px;
}

.drivers-detail-page-v4 .drivers-inline-create-v4 form {
    top: auto;
    right: 0;
    bottom: 42px;
    width: min(620px, 80vw);
}

.drivers-absence-weekend-hint {
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #d8e5f8;
    border-radius: 10px;
    background: #f5f8ff;
    color: #41618f;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
}

.drivers-absence-weekend-hint[hidden] {
    display: none;
}

.drivers-qualifications-v4 .drivers-panel-heading-v4 {
    margin-bottom: 11px;
}

.drivers-qualification-cards-v4 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.drivers-qualification-cards-v4 .drivers-qualification-card {
    min-height: 74px;
    padding: 11px;
    border-radius: 11px;
}

.drivers-qualification-cards-v4 .drivers-qualification-card > i {
    top: 12px;
    left: 11px;
    font-size: 16px;
}

.drivers-qualification-cards-v4 .drivers-qualification-card span {
    font-size: 11px;
}

.drivers-qualification-cards-v4 .drivers-qualification-card strong {
    font-size: 13px;
}

.drivers-detail-page-v4 .drivers-detail-license-table {
    margin-top: 13px;
    border-radius: 11px;
}

.drivers-detail-page-v4 .drivers-detail-license-row {
    min-height: 38px;
    font-size: 10px;
}

.drivers-detail-page-v4 .drivers-detail-license-row .is-expired {
    color: #ef4c31;
    font-weight: 950;
}

.drivers-documents-overview-v4 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.drivers-document-overview-card-v4 {
    min-width: 0;
    min-height: 96px;
    padding: 11px;
    border: 1px solid #e0e8f3;
    border-radius: 11px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.drivers-document-overview-icon-v4 {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #edf3fc;
    color: #567295;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.drivers-panel-heading-icon i,
.drivers-document-overview-icon-v4 i,
.drivers-workforce-icon i,
.drivers-qualification-card > i {
    width: 1em;
    height: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.drivers-panel-heading-icon i::before,
.drivers-document-overview-icon-v4 i::before,
.drivers-workforce-icon i::before,
.drivers-qualification-card > i::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.drivers-document-overview-card-v4.has-document .drivers-document-overview-icon-v4 {
    background: #e6f8ed;
    color: #218150;
}

.drivers-document-overview-card-v4 > div > strong,
.drivers-document-overview-card-v4 > div > a,
.drivers-document-overview-card-v4 > div > small,
.drivers-document-overview-card-v4 > div > span,
.drivers-document-overview-card-v4 > div > em {
    min-width: 0;
    display: block;
}

.drivers-document-overview-card-v4 strong {
    color: #2b3f5d;
    font-size: 12px;
}

.drivers-document-overview-card-v4 a,
.drivers-document-overview-card-v4 > div > span {
    margin-top: 4px;
    color: #324968;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.drivers-document-overview-card-v4 small {
    margin-top: 2px;
    color: #7c8ba0;
    font-size: 10px;
}

.drivers-document-overview-card-v4 em {
    width: fit-content;
    min-height: 21px;
    margin-top: 5px;
    padding: 0 6px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    color: #66768b;
    font-size: 9px;
    font-style: normal;
    font-weight: 850;
    line-height: 19px;
}

.drivers-document-overview-card-v4.has-document em {
    border-color: #cdeedb;
    background: #eaf9f0;
    color: #278556;
}

.drivers-document-overview-card-v4 .drivers-document-preview-link-v4 {
    width: fit-content;
    min-height: 30px;
    margin-top: 8px;
    padding: 0 10px;
    border: 1px solid #bcd1f5;
    border-radius: 9px;
    background: #edf4ff;
    color: #245fc7;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow: visible;
    white-space: nowrap;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(47, 115, 234, 0.08);
}

.drivers-document-overview-card-v4 .drivers-document-preview-link-v4:hover {
    border-color: #8eb2ed;
    background: #e4efff;
    color: #174fae;
}

.drivers-document-preview-link-v4 i:last-child {
    font-size: 9px;
}

.drivers-document-overview-card-v4 .drivers-document-filename-v4 {
    max-width: 100%;
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #5f718b;
}

.drivers-vehicle-overview-v4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.drivers-vehicle-overview-card-v4 {
    min-width: 0;
    min-height: 82px;
    padding: 9px;
    border: 1px solid #e0e8f3;
    border-radius: 11px;
    background: #ffffff;
    color: #263b59;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    text-decoration: none;
}

.drivers-vehicle-overview-media-v4 {
    width: 76px;
    height: 60px;
    border-radius: 10px;
    background: #eef3fa;
    color: #6680a1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drivers-vehicle-overview-media-v4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drivers-vehicle-overview-card-v4 strong,
.drivers-vehicle-overview-card-v4 small {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-vehicle-overview-card-v4 strong {
    font-size: 11px;
}

.drivers-vehicle-overview-card-v4 small {
    margin-top: 2px;
    color: #73839a;
    font-size: 9px;
}

.drivers-vehicle-overview-card-v4 > em {
    min-height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e9f8ef;
    color: #208152;
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
    line-height: 21px;
}

.drivers-see-all-v4 {
    margin-top: 10px;
    color: #2f6ddc;
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
}

.drivers-detail-sidebar-v4 {
    gap: 16px;
}

.drivers-side-card-v4 h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.drivers-history-card-v4 {
    min-height: 390px;
}

.drivers-audit-list-v4 .drivers-audit-row {
    padding-bottom: 12px;
}

.drivers-audit-list-v4 .drivers-audit-row strong {
    font-size: 12px;
}

.drivers-audit-list-v4 .drivers-audit-row p,
.drivers-audit-list-v4 .drivers-audit-row span {
    font-size: 10px;
}

.drivers-history-link-v4 {
    min-height: 38px;
    margin-top: 4px;
    border: 1px solid #dce5f0;
    border-radius: 8px;
    color: #405673;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 10px;
    font-weight: 900;
}

@media (max-width: 1350px) {
    .drivers-qualification-cards-v4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .drivers-detail-sidebar-v4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .drivers-detail-grid-v4,
    .drivers-detail-sidebar-v4,
    .drivers-qualification-cards-v4,
    .drivers-documents-overview-v4,
    .drivers-vehicle-overview-v4 {
        grid-template-columns: 1fr;
    }

    .drivers-detail-hero-v4,
    .drivers-detail-hero-v4 .drivers-detail-title-wrap,
    .drivers-detail-name-row-v4 {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* Source: css/pages/drivers/tabs.css */
/* Tabs styles. Cascade position 7 of 10. */
.drivers-detail-page-v5 {
    gap: 16px;
}

.drivers-detail-page-v5 .app-page-header {
    margin-bottom: 0;
}

.drivers-detail-grid-v5 {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.drivers-detail-main-column-v5 {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.drivers-detail-page-v5 .form-card {
    border-radius: 12px;
}

.drivers-detail-hero-v5 {
    min-height: 116px;
    padding: 18px;
    justify-content: flex-start;
}

.drivers-detail-hero-v5 .drivers-detail-title-wrap {
    gap: 20px;
}

.drivers-detail-hero-v5 .drivers-detail-avatar-v4 {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
    border-radius: 50%;
}

.drivers-detail-hero-v5 .drivers-detail-name-row-v4 h1 {
    font-size: 25px;
}

.drivers-detail-tabs-v5 {
    min-height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: stretch;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.drivers-detail-tabs-v5 button {
    position: relative;
    min-height: 58px;
    padding: 0 3px;
    border: 0;
    background: transparent;
    color: #536781;
    flex: 0 0 auto;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.drivers-detail-tabs-v5 button::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: transparent;
}

.drivers-detail-tabs-v5 button:hover,
.drivers-detail-tabs-v5 button.is-active {
    color: #1f63dd;
}

.drivers-detail-tabs-v5 button.is-active::after {
    background: #2f73ea;
}

.drivers-tab-panel-v5[hidden] {
    display: none;
}

.drivers-tab-panel-v5 {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.drivers-workforce-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.drivers-workforce-heading-row .drivers-panel-heading-v4 {
    min-width: 0;
    margin-bottom: 15px;
}



/* Source: css/pages/drivers/hr-import.css */
/* Hr import styles. Cascade position 8 of 10. */
.drivers-hr-import-link {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #cddcf0;
    border-radius: 10px;
    background: #fff;
    color: #285da9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(31, 76, 139, 0.06);
}

.drivers-hr-import-link:hover {
    border-color: #8fb1e4;
    background: #f6f9ff;
    color: #164e9f;
}

.drivers-hr-import-page {
    width: min(1220px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.drivers-hr-person-card {
    padding: 17px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.drivers-hr-person-icon,
.drivers-hr-upload-copy > span {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #edf4ff;
    color: #2867cf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    font-size: 20px;
}

.drivers-hr-person-card > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.drivers-hr-person-card small,
.drivers-hr-person-card span {
    color: #687b94;
    font-size: 11px;
    font-weight: 750;
}

.drivers-hr-person-card strong {
    color: #1e304b;
    font-size: 17px;
}

.drivers-hr-upload-card {
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 20px;
    align-items: center;
}

.drivers-hr-upload-copy {
    display: flex;
    align-items: center;
    gap: 14px;
}

.drivers-hr-upload-copy h2,
.drivers-hr-guide-card h2,
.drivers-hr-section-head h2 {
    margin: 0;
    color: #1e304b;
    font-size: 17px;
}

.drivers-hr-upload-copy p,
.drivers-hr-section-head p {
    margin: 4px 0 0;
    color: #687b94;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 650;
}

.drivers-hr-file-field {
    min-width: 0;
    padding: 14px;
    border: 1px dashed #b9cce7;
    border-radius: 13px;
    background: #f8faff;
    display: grid;
    gap: 7px;
}

.drivers-hr-file-field > span {
    color: #344b6a;
    font-size: 11px;
    font-weight: 900;
}

.drivers-hr-file-field b {
    color: #d14343;
}

.drivers-hr-file-field input {
    width: 100%;
    color: #344b6a;
    font-size: 12px;
}

.drivers-hr-file-field small {
    color: #7a8ca3;
    font-size: 10px;
    line-height: 1.4;
}

.drivers-hr-upload-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.drivers-hr-guide-card {
    padding: 20px;
}

.drivers-hr-guide-card h2 {
    display: flex;
    align-items: center;
    gap: 9px;
}

.drivers-hr-guide-card h2 i {
    color: #2a70da;
}

.drivers-hr-guide-card > div {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
}

.drivers-hr-guide-card p {
    margin: 0;
    color: #546981;
    display: flex;
    gap: 9px;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 700;
}

.drivers-hr-guide-card p i {
    margin-top: 2px;
    color: #1c9a64;
}

.drivers-hr-identity-check {
    padding: 14px 17px;
    border: 1px solid #bae4ce;
    border-radius: 13px;
    background: #f3fbf7;
    color: #237653;
    display: flex;
    align-items: center;
    gap: 11px;
}

.drivers-hr-identity-check.is-warning {
    border-color: #ead0a2;
    background: #fff9ef;
    color: #936017;
}

.drivers-hr-identity-check > i {
    font-size: 21px;
}

.drivers-hr-identity-check > div {
    display: grid;
    gap: 2px;
}

.drivers-hr-identity-check strong {
    font-size: 12px;
}

.drivers-hr-identity-check span {
    font-size: 10px;
    font-weight: 700;
}

.drivers-hr-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.drivers-hr-stats article {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e1e8f2;
    border-radius: 13px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 11px;
    box-shadow: 0 4px 14px rgba(31, 62, 104, 0.04);
}

.drivers-hr-stats article > span,
.drivers-hr-section-head > div > span {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
}

.drivers-hr-stats .is-green,
.drivers-hr-section-head .is-green {
    background: #e8f7ef;
    color: #17875a;
}

.drivers-hr-stats .is-orange,
.drivers-hr-section-head .is-orange {
    background: #fff1df;
    color: #bf701d;
}

.drivers-hr-stats .is-blue {
    background: #edf4ff;
    color: #2d6bd1;
}

.drivers-hr-stats .is-red {
    background: #fff0ee;
    color: #c24d43;
}

.drivers-hr-stats article > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    align-items: baseline;
}

.drivers-hr-stats small,
.drivers-hr-stats em {
    color: #718299;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

.drivers-hr-stats strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: #20344f;
    font-size: 21px;
}

.drivers-hr-stats em {
    grid-column: 1;
}

.drivers-hr-issues-card {
    padding: 15px 18px;
    border-color: #ecd5ac;
    background: #fffaf1;
}

.drivers-hr-issues-card > div {
    color: #885a17;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.drivers-hr-issues-card ul {
    margin: 10px 0 0 22px;
    padding: 0;
    color: #795f3c;
    font-size: 11px;
    line-height: 1.55;
}

.drivers-hr-preview-form {
    display: grid;
    gap: 16px;
}

.drivers-hr-section-card {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.drivers-hr-section-head {
    padding: 16px 18px;
    border-bottom: 1px solid #e5ebf3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.drivers-hr-section-head > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.drivers-hr-section-head > label {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #d5e0ee;
    border-radius: 9px;
    color: #405775;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}

.drivers-hr-section-head input,
.drivers-hr-mismatch-confirm input {
    accent-color: #2469d7;
}

.drivers-hr-table-wrap {
    max-height: 330px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.drivers-hr-table-wrap.is-tall {
    max-height: 520px;
}

.drivers-hr-table {
    width: 100%;
    border-collapse: collapse;
    color: #435974;
    font-size: 10px;
}

.drivers-hr-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 13px;
    border-bottom: 1px solid #dfe7f1;
    background: #f7f9fc;
    color: #6a7e97;
    text-align: left;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.drivers-hr-table td {
    padding: 10px 13px;
    border-bottom: 1px solid #edf1f6;
    vertical-align: top;
    line-height: 1.4;
}

.drivers-hr-table tr:last-child td {
    border-bottom: 0;
}

.drivers-hr-table tr.is-duplicate,
.drivers-hr-table tr.is-conflict {
    background: #fbfcfe;
    color: #7b899b;
}

.drivers-hr-table td > span:not(.drivers-hr-status),
.drivers-hr-table td > small {
    display: block;
    margin-top: 2px;
}

.drivers-hr-table td > small {
    color: #9b6d31;
}

.drivers-hr-status {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e9f7ef;
    color: #187a54;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 900;
}

.is-duplicate .drivers-hr-status {
    background: #edf2f8;
    color: #60748d;
}

.is-conflict .drivers-hr-status {
    background: #fff0e2;
    color: #a6601c;
}

.drivers-hr-empty {
    margin: 0;
    padding: 25px 18px;
    color: #72839a;
    text-align: center;
    font-size: 11px;
    font-weight: 750;
}

.drivers-hr-mismatch-confirm {
    padding: 15px 18px;
    border-color: #ecd5ac;
    background: #fffaf1;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.drivers-hr-mismatch-confirm > span {
    display: grid;
    gap: 2px;
    color: #634b2c;
    font-size: 11px;
}

.drivers-hr-mismatch-confirm small {
    color: #8d7455;
}

.drivers-hr-commit-bar {
    position: sticky;
    bottom: 12px;
    z-index: 3;
    padding: 14px 17px;
    border-color: #d8e2ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 12px 30px rgba(34, 61, 99, 0.13);
}

.drivers-hr-commit-bar > div:first-child {
    display: grid;
    gap: 2px;
}

.drivers-hr-commit-bar strong {
    color: #263c59;
    font-size: 12px;
}

.drivers-hr-commit-bar span {
    color: #74869c;
    font-size: 10px;
    font-weight: 700;
}

.drivers-hr-commit-bar > div:last-child {
    display: flex;
    gap: 9px;
}

@media (max-width: 900px) {
    .drivers-hr-upload-card,
    .drivers-hr-guide-card > div {
        grid-template-columns: 1fr;
    }

    .drivers-hr-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .drivers-workforce-heading-row,
    .drivers-hr-section-head,
    .drivers-hr-commit-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .drivers-hr-import-link,
    .drivers-hr-section-head > label {
        width: 100%;
    }

    .drivers-hr-stats {
        grid-template-columns: 1fr;
    }

    .drivers-hr-upload-card,
    .drivers-hr-person-card,
    .drivers-hr-guide-card {
        padding: 16px;
    }

    .drivers-hr-upload-actions,
    .drivers-hr-commit-bar > div:last-child {
        display: grid;
        grid-template-columns: 1fr;
    }

    .drivers-hr-upload-actions .btn-primary,
    .drivers-hr-upload-actions .btn-secondary,
    .drivers-hr-commit-bar .btn-primary,
    .drivers-hr-commit-bar .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}



/* Source: css/pages/drivers/detail-content.css */
/* Detail content styles. Cascade position 9 of 10. */
.drivers-info-summary-grid-v5 {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
    gap: 16px;
    align-items: stretch;
}

.drivers-data-panel-v5,
.drivers-deadlines-panel-v5,
.drivers-license-summary-panel-v5,
.drivers-documents-summary-panel-v5,
.drivers-mini-section-v5 {
    min-width: 0;
}

.drivers-data-panel-v5,
.drivers-deadlines-panel-v5 {
    min-height: 276px;
    display: grid;
    align-content: start;
    gap: 18px;
}

.drivers-data-panel-v5 > h2,
.drivers-deadlines-panel-v5 > h2,
.drivers-license-summary-panel-v5 > h2,
.drivers-documents-summary-panel-v5 > h2 {
    margin: 0;
    color: #172846;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 950;
}

.drivers-data-body-v5 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 26px;
}

.drivers-data-column-v5 {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 18px;
}

.drivers-data-column-v5 + .drivers-data-column-v5 {
    padding-left: 28px;
    border-left: 1px solid #e1e8f2;
}

.drivers-data-column-v5 .drivers-detail-info-item {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 2px 12px;
    align-items: center;
}

.drivers-data-column-v5 .drivers-detail-info-item > i {
    grid-row: 1 / 3;
    color: #7b8da8;
    font-size: 20px;
}

.drivers-data-column-v5 .drivers-detail-info-item span {
    margin: 0;
    color: #70829c;
    font-size: 11px;
    font-weight: 850;
}

.drivers-data-column-v5 .drivers-detail-info-item strong {
    min-width: 0;
    color: #172846;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.drivers-data-column-v5 .drivers-detail-info-item small {
    grid-column: 2;
    color: #7b8ba2;
    font-size: 10px;
    font-weight: 750;
}

.drivers-deadline-tiles-v5 {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.drivers-deadline-tiles-v5 > div {
    min-width: 0;
    min-height: 66px;
    padding: 10px;
    border: 1px solid #e0e8f3;
    border-radius: 10px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 2px 8px;
    align-content: center;
}

.drivers-deadline-tiles-v5 span {
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #edf4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drivers-deadline-tiles-v5 strong,
.drivers-deadline-tiles-v5 em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drivers-deadline-tiles-v5 strong {
    color: #53667f;
    font-size: 10px;
    font-weight: 850;
}

.drivers-deadline-tiles-v5 em {
    color: #172846;
    font-size: 13px;
    font-style: normal;
    font-weight: 950;
}

.drivers-deadline-list-v5 {
    margin-top: 4px;
    display: grid;
    gap: 11px;
}

.drivers-deadline-list-v5 div {
    min-height: 38px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.drivers-deadline-list-v5 span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #edf4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.drivers-deadline-list-v5 strong {
    color: #182744;
    font-size: 12px;
    font-weight: 900;
}

.drivers-deadline-list-v5 em {
    color: #182744;
    font-size: 12px;
    font-style: normal;
    font-weight: 950;
}

.drivers-panel-note-v5 {
    margin: auto 0 0;
    color: #6e7f98;
    font-size: 11px;
    font-weight: 800;
}

.drivers-reference-row-v5 {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 16px;
    align-items: stretch;
}

.drivers-license-summary-panel-v5,
.drivers-documents-summary-panel-v5 {
    display: grid;
    align-content: start;
    gap: 13px;
}

.drivers-license-summary-table-v5 {
    margin-top: 0;
}

.drivers-license-summary-table-v5 .drivers-detail-license-row {
    min-height: 36px;
}

.drivers-documents-overview-compact-v5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.drivers-documents-overview-compact-v5 .drivers-document-overview-card-v4 {
    min-height: 58px;
    padding: 10px;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
}

.drivers-documents-overview-compact-v5 .drivers-document-overview-icon-v4 {
    width: 34px;
    height: 34px;
}

.drivers-documents-overview-compact-v5 .drivers-document-overview-card-v4 strong {
    font-size: 11px;
}

.drivers-documents-overview-compact-v5 .drivers-document-overview-card-v4 small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6f8098;
    font-size: 10px;
    font-weight: 800;
}

.drivers-documents-overview-compact-v5 .drivers-document-overview-card-v4.has-document small {
    color: #248154;
}

.drivers-compact-row-v5 {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 0.88fr) minmax(0, 1.38fr);
    gap: 16px;
    align-items: stretch;
}

.drivers-mini-section-v5 {
    display: grid;
    align-content: start;
    gap: 12px;
}

.drivers-mini-heading-v5 {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.drivers-mini-heading-v5 > span {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
}

.drivers-mini-heading-v5.is-green > span {
    background: #e8f8ee;
    color: #178252;
}

.drivers-mini-heading-v5.is-orange > span {
    background: #fff2e4;
    color: #d66a20;
}

.drivers-mini-heading-v5.is-blue > span {
    background: #edf4ff;
    color: #2f73ea;
}

.drivers-mini-heading-v5 h2 {
    margin: 0;
    color: #172846;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 950;
}

.drivers-mini-heading-v5 p {
    margin: 2px 0 0;
    color: #71829a;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 750;
}

.drivers-mini-empty-v5,
.drivers-mini-filled-v5 {
    min-height: 70px;
    padding: 11px;
    border: 1px dashed #d6e1ef;
    border-radius: 10px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.drivers-mini-filled-v5 {
    border-style: solid;
    background: #ffffff;
}

.drivers-mini-empty-v5 > i,
.drivers-mini-filled-v5 > i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f0f5fc;
    color: #6380a5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drivers-mini-empty-v5 strong,
.drivers-mini-empty-v5 span,
.drivers-mini-filled-v5 strong,
.drivers-mini-filled-v5 small {
    min-width: 0;
    display: block;
}

.drivers-mini-empty-v5 strong,
.drivers-mini-filled-v5 strong {
    color: #2e405d;
    font-size: 11px;
    font-weight: 950;
}

.drivers-mini-empty-v5 span,
.drivers-mini-filled-v5 small {
    margin-top: 2px;
    color: #71829a;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 750;
}

.drivers-mini-action-v5 {
    min-height: 34px;
    border: 1px solid #d8e3f1;
    border-radius: 9px;
    background: #ffffff;
    color: #1f63dd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}

.drivers-mini-action-v5:hover {
    border-color: #adc5ee;
    background: #f4f8ff;
}

.drivers-mini-vehicles-v5 .drivers-vehicle-overview-v5 .drivers-vehicle-overview-card-v4 {
    min-height: 68px;
}

.drivers-detail-bottom-actions-v5 {
    min-height: 62px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.drivers-detail-bottom-actions-v5 .btn-primary,
.drivers-detail-bottom-actions-v5 .btn-secondary {
    min-width: 170px;
    min-height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.drivers-documents-overview-v5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.drivers-vehicle-overview-v5 {
    grid-template-columns: 1fr;
}

.drivers-vehicle-overview-v5.is-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drivers-vehicle-overview-v5 .drivers-vehicle-overview-card-v4 {
    min-height: 76px;
}

.drivers-see-all-v5,
.drivers-tab-action-v5 {
    min-height: 38px;
    margin-top: 12px;
    border: 1px solid #d8e3f1;
    border-radius: 9px;
    background: #ffffff;
    color: #1f63dd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.drivers-see-all-v5:hover,
.drivers-tab-action-v5:hover {
    border-color: #adc5ee;
    background: #f4f8ff;
}

.drivers-detail-sidebar-v5 {
    display: grid;
    gap: 16px;
}

.drivers-detail-sidebar-v5 .drivers-detail-side-card {
    padding: 18px;
}

.drivers-side-title-v5 {
    min-height: 42px;
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.drivers-side-title-v5 span {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff4dc;
    color: #e49b20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.drivers-side-title-v5.is-blue span {
    background: #edf4ff;
    color: #2f73ea;
}

.drivers-side-title-v5 h3 {
    margin: 0;
}

.drivers-tip-list-v5 {
    display: grid;
}

.drivers-tip-list-v5 p {
    margin: 0;
    padding: 15px 0;
    border-top: 1px solid #edf2f8;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    color: #263654;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.45;
}

.drivers-tip-list-v5 i {
    color: #2f73ea;
    font-size: 20px;
}

.drivers-quick-card-v5 dl {
    margin: 0;
    display: grid;
}

.drivers-quick-card-v5 dl > div {
    min-height: 42px;
    border-top: 1px solid #edf2f8;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.drivers-quick-card-v5 dt,
.drivers-quick-card-v5 dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 850;
}

.drivers-quick-card-v5 dt {
    color: #667993;
}

.drivers-quick-card-v5 dd {
    color: #172846;
    text-align: right;
    font-weight: 950;
}

@media (max-width: 1350px) {
    .drivers-info-summary-grid-v5,
    .drivers-reference-row-v5,
    .drivers-compact-row-v5 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1120px) {
    .drivers-detail-grid-v5 {
        grid-template-columns: 1fr;
    }

    .drivers-detail-sidebar-v5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .drivers-detail-page-v5 .app-page-header-actions,
    .drivers-detail-hero-v5 .drivers-detail-title-wrap {
        align-items: stretch;
        flex-direction: column;
    }

    .drivers-data-body-v5,
    .drivers-deadline-tiles-v5,
    .drivers-documents-overview-v5,
    .drivers-vehicle-overview-v5.is-full,
    .drivers-detail-sidebar-v5 {
        grid-template-columns: 1fr;
    }

    .drivers-data-column-v5 + .drivers-data-column-v5 {
        padding-left: 0;
        padding-top: 16px;
        border-left: 0;
        border-top: 1px solid #e1e8f2;
    }

    .drivers-detail-bottom-actions-v5 {
        align-items: stretch;
        flex-direction: column;
    }

    .drivers-detail-bottom-actions-v5 .btn-primary,
    .drivers-detail-bottom-actions-v5 .btn-secondary {
        width: 100%;
    }

    .drivers-quick-card-v5 dl > div {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 8px 0;
    }

    .drivers-quick-card-v5 dd {
        text-align: left;
    }
}



/* Source: css/pages/drivers/layout.css */
/* Layout styles. Cascade position 10 of 10. */
.drivers-page {
    container: drivers-directory / inline-size;
}

.drivers-form-page-v2 {
    container: drivers-editor / inline-size;
}

.drivers-detail-page-v5 {
    container: driver-detail / inline-size;
}

.drivers-detail-main-column-v5 {
    container: driver-main / inline-size;
}

.drivers-preview-shell {
    container: driver-preview / inline-size;
}

.drivers-list-shell {
    container: driver-list / inline-size;
    contain: size;
    display: flex;
    flex-direction: column;
}

.drivers-list-head {
    flex: none;
}

.drivers-form-page-v2 .drivers-step-stack {
    container: driver-editor-main / inline-size;
}

.drivers-page,
.drivers-form-page-v2,
.drivers-detail-page-v5,
.drivers-hr-import-page,
.drivers-directory-layout > *,
.drivers-detail-grid-v5 > *,
.drivers-form-layout-v2 > *,
.drivers-stat-card > div,
.drivers-document-overview-card-v4 > div,
.drivers-mini-heading-v5 > div,
.drivers-mini-empty-v5 > div,
.drivers-mini-filled-v5 > div {
    min-width: 0;
}

.drivers-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.drivers-directory-layout {
    grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
    align-items: stretch;
}

.drivers-page .drivers-list-scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
    align-content: start;
    grid-auto-rows: max-content;
}

.drivers-page .driver-list-title-row h3,
.drivers-page .drivers-preview-name-row h2,
.drivers-page .driver-list-contact span,
.drivers-page .drivers-preview-meta span,
.drivers-detail-identity-v4,
.drivers-detail-name-row-v4 h1,
.drivers-workforce-copy-v3,
.drivers-mini-empty-v5,
.drivers-mini-filled-v5,
.drivers-document-overview-card-v4 strong,
.drivers-hr-person-card strong,
.drivers-profile-live-name h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.drivers-page .driver-list-contact span,
.drivers-page .drivers-preview-meta span {
    white-space: normal;
}

.drivers-page .drivers-assigned-list {
    max-height: 320px;
}

.drivers-page .drivers-document-tiles {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
}

.drivers-page .drivers-document-tile > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.drivers-page .drivers-section-head {
    flex-wrap: wrap;
}

.drivers-detail-page-v5 .drivers-deadline-tiles-v5 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.drivers-detail-page-v5 .drivers-deadline-tiles-v5 strong {
    white-space: normal;
    overflow-wrap: anywhere;
}

.drivers-detail-page-v5 .drivers-documents-overview-v5 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.drivers-detail-page-v5 .drivers-reference-row-v5 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.drivers-detail-page-v5 .drivers-compact-row-v5 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.drivers-detail-page-v5 .drivers-detail-license-row {
    grid-template-columns: minmax(0, 0.6fr) repeat(3, minmax(0, 1fr));
}

.drivers-detail-page-v5 .drivers-detail-license-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.drivers-detail-page-v5 .drivers-inline-create-v4 form {
    position: static;
    width: 100%;
    margin-top: 12px;
    box-shadow: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drivers-form-page-v2 .form-group,
.drivers-form-page-v2 .form-group > *,
.drivers-detail-page-v5 .drivers-inline-create input,
.drivers-detail-page-v5 .drivers-inline-create select,
.drivers-hr-import-page input {
    min-width: 0;
    max-width: 100%;
}

.drivers-form-page-v2 .drivers-profile-fields {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.drivers-form-page-v2 .drivers-professional-dates {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.drivers-profile-editor-body .drivers-photo-editor-v2 {
    grid-template-columns: minmax(0, 1fr);
}

.drivers-profile-editor-body .drivers-photo-controls p {
    white-space: normal;
    overflow-wrap: anywhere;
}

.drivers-form-page-v2 .drivers-create-account-button,
.drivers-detail-page-v5 .drivers-inline-create summary {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    white-space: normal;
    overflow-wrap: anywhere;
}

@container drivers-directory (max-width: 1250px) {
    .drivers-directory-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-list-shell {
        contain: none;
    }

    .drivers-page .drivers-list-scroll {
        flex: none;
        max-height: 760px;
    }
}

@container drivers-directory (max-width: 1000px) {
    .drivers-directory-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drivers-search-box,
    .drivers-clear-filters {
        grid-column: 1 / -1;
    }
}

@container drivers-directory (max-width: 440px) {
    .drivers-directory-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-board,
    .drivers-filters {
        padding: 12px;
    }
}

@container driver-list (max-width: 680px) {
    .driver-list-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .driver-list-main {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .driver-list-vehicles {
        grid-column: 2;
        padding-top: 10px;
        border-top: 1px solid #edf2f7;
    }

    .driver-list-actions {
        padding: 10px 14px 14px;
        border-top: 1px solid #edf2f7;
        border-left: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container driver-list (max-width: 360px) {
    .driver-list-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .driver-list-vehicles {
        grid-column: 1;
    }
}

@container driver-preview (max-width: 950px) {
    .drivers-compact-preview .drivers-preview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container driver-preview (max-width: 600px) {
    .drivers-compact-preview .drivers-assigned-vehicle {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .drivers-compact-preview .driver-vehicle-thumb {
        width: 76px;
        height: 56px;
    }

    .drivers-compact-preview .drivers-assigned-vehicle a {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .drivers-compact-preview .drivers-license-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-compact-preview .drivers-fake-license,
    .drivers-compact-preview .drivers-license-preview-link {
        grid-column: 1;
        grid-row: auto;
    }
}

@container driver-preview (max-width: 400px) {
    .drivers-compact-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-compact-preview .drivers-preview-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container driver-detail (max-width: 1300px) {
    .drivers-detail-grid-v5 {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-detail-sidebar-v5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container driver-main (max-width: 950px) {
    .drivers-info-summary-grid-v5 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container driver-main (max-width: 650px) {
    .drivers-data-body-v5,
    .drivers-vehicle-overview-v5.is-full,
    .drivers-detail-page-v5 .drivers-inline-create-v4 form {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-data-column-v5 + .drivers-data-column-v5 {
        padding-left: 0;
        padding-top: 16px;
        border-left: 0;
        border-top: 1px solid #e1e8f2;
    }

    .drivers-workforce-heading-row {
        flex-wrap: wrap;
    }

    .drivers-detail-page-v5 .drivers-workforce-row {
        grid-template-columns: 38px minmax(0, 1fr) 32px;
    }

    .drivers-workforce-row > .drivers-workforce-icon {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .drivers-workforce-row > .drivers-workforce-copy-v3 {
        grid-column: 2;
        grid-row: 1;
    }

    .drivers-workforce-row > .drivers-workforce-badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }

    .drivers-workforce-row > form {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .drivers-detail-page-v5 .drivers-detail-license-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 14px;
        align-items: start;
        font-size: 12px;
    }

    .drivers-detail-page-v5 .drivers-detail-license-row.is-head {
        display: none;
    }

    .drivers-detail-license-row [data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #70829c;
        font-size: 10px;
        font-weight: 750;
    }
}

@container driver-detail (max-width: 650px) {
    .drivers-detail-sidebar-v5 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container drivers-editor (max-width: 1200px) {
    .drivers-form-page-v2 .drivers-form-layout-v2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-form-page-v2 .drivers-form-sidebar-v2 {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    }
}

@container driver-editor-main (max-width: 1000px) {
    .drivers-profile-editor-body,
    .drivers-form-page-v2 .drivers-license-workbench-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-profile-editor-body .drivers-profile-identity {
        padding: 0 0 22px;
        border-right: 0;
        border-bottom: 1px solid #dfe7f2;
    }

    .drivers-form-page-v2 .drivers-license-common,
    .drivers-form-page-v2 .drivers-license-categories-manager,
    .drivers-form-page-v2 .drivers-license-live-preview {
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid #dfe7f2;
    }

    .drivers-form-page-v2 .drivers-license-common {
        padding-top: 0;
        border-top: 0;
    }
}

.drivers-page .driver-list-vehicles em {
    margin-top: 3px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #edf4ff;
    font-size: 11px;
    line-height: 1.3;
}

.drivers-form-page-v2 .drivers-profile-editor-card {
    align-items: stretch;
}

.drivers-form-page-v2 .drivers-profile-editor-body {
    box-sizing: border-box;
    width: 100%;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding: 22px 24px 24px;
}

.drivers-form-page-v2 .drivers-profile-editor-body .drivers-profile-identity {
    grid-template-columns: minmax(0, 1fr);
    align-self: start;
    padding: 0 20px 0 0;
    border-right: 1px solid #dfe7f2;
    border-bottom: 0;
}

.drivers-form-page-v2 .drivers-profile-fields {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drivers-form-page-v2 .drivers-license-workbench-grid {
    grid-template-columns: minmax(210px, .65fr) minmax(0, 1.35fr);
    gap: 22px;
    align-items: start;
    margin: 22px 24px 0;
}

.drivers-form-page-v2 .drivers-license-common {
    padding: 0;
    border: 0;
}

.drivers-form-page-v2 .drivers-license-categories-manager {
    padding: 0 0 0 22px;
    border-top: 0;
    border-left: 1px solid #dfe7f2;
}

.drivers-form-page-v2 .drivers-license-live-preview {
    display: block;
    grid-column: 1 / -1;
    margin: 0;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid #dfe7f2;
}

.drivers-license-live-sides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.drivers-license-live-side {
    min-width: 0;
}

.drivers-form-page-v2 .drivers-license-live-preview .drivers-license-side-label {
    margin: 10px 0 8px;
}

.drivers-form-page-v2 .drivers-license-live-preview .drivers-license-front-card,
.drivers-form-page-v2 .drivers-license-live-preview .drivers-license-back-card {
    width: 100%;
    max-width: none;
    grid-column: auto;
    grid-row: auto;
    margin: 0;
}

.drivers-form-page-v2 .drivers-professional-dates {
    margin: 20px 24px 26px;
    padding: 16px 0 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.drivers-form-page-v2 .drivers-professional-dates .form-group {
    margin: 0;
    align-content: start;
}

.drivers-form-page-v2 .drivers-professional-dates-intro {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.drivers-license-preview-page {
    min-width: 0;
    container: driver-license-page / inline-size;
}

.drivers-license-preview-page .drivers-license-document-sides {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.drivers-license-preview-page .drivers-license-document-sides > div {
    width: 100%;
    min-width: 0;
    max-width: none;
}

@container driver-license-page (max-width: 800px) {
    .drivers-license-preview-page .drivers-license-document-sides {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container driver-editor-main (max-width: 760px) {
    .drivers-form-page-v2 .drivers-profile-editor-body,
    .drivers-form-page-v2 .drivers-license-workbench-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-form-page-v2 .drivers-profile-editor-body .drivers-profile-identity {
        grid-template-columns: 180px minmax(0, 1fr);
        align-items: center;
        padding: 0 0 20px;
        border-right: 0;
        border-bottom: 1px solid #dfe7f2;
    }

    .drivers-form-page-v2 .drivers-profile-live-name,
    .drivers-form-page-v2 .drivers-profile-live-name p {
        justify-items: start;
        text-align: left;
    }

    .drivers-form-page-v2 .drivers-license-common {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 18px;
    }

    .drivers-form-page-v2 .drivers-license-common > h3,
    .drivers-form-page-v2 .drivers-license-common .drivers-common-note {
        grid-column: 1 / -1;
    }

    .drivers-form-page-v2 .drivers-license-categories-manager {
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid #dfe7f2;
    }

    .drivers-form-page-v2 .drivers-professional-dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container driver-editor-main (max-width: 640px) {
    .drivers-license-live-sides {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container driver-editor-main (max-width: 480px) {
    .drivers-form-page-v2 .drivers-profile-editor-body {
        padding: 18px;
    }

    .drivers-form-page-v2 .drivers-profile-editor-body .drivers-profile-identity,
    .drivers-form-page-v2 .drivers-profile-fields,
    .drivers-form-page-v2 .drivers-license-common,
    .drivers-form-page-v2 .drivers-professional-dates {
        grid-template-columns: minmax(0, 1fr);
    }

    .drivers-form-page-v2 .drivers-profile-editor-body .drivers-profile-identity {
        justify-items: center;
    }

    .drivers-form-page-v2 .drivers-profile-live-name,
    .drivers-form-page-v2 .drivers-profile-live-name p {
        justify-items: center;
        text-align: center;
    }

    .drivers-form-page-v2 .drivers-license-workbench-grid,
    .drivers-form-page-v2 .drivers-professional-dates {
        margin-left: 18px;
        margin-right: 18px;
    }
}

@container drivers-directory (max-width: 600px) {
    .drivers-page .drivers-list-scroll {
        max-height: 600px;
    }
}





/* Source: css/pages/fuel-cards.css */
.fuel-cards-page {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-x: clip;
}

.fuel-cards-stat-card,
.fuel-cards-toolbar,
.fuel-cards-list-panel,
.fuel-card-inspector {
    border: 1px solid #e3eaf4;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.065);
}

.fuel-cards-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fuel-cards-stat-card {
    min-height: 108px;
    padding: 18px 18px 16px 84px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.fuel-cards-stat-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -34px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #edf4ff;
    opacity: 0.55;
}

.fuel-cards-stat-card > i {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 50px;
    height: 50px;
    border-radius: 17px;
    background: #e8f1ff;
    color: #2868e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 22px;
}

.fuel-cards-stat-card.is-green > i { background: #dff8ec; color: #14945a; }
.fuel-cards-stat-card.is-warning > i { background: #fff1d4; color: #e09109; }
.fuel-cards-stat-card.is-danger > i { background: #ffe2e2; color: #dc3b3b; }
.fuel-cards-stat-card.is-green::after { background: #e5f8ef; }
.fuel-cards-stat-card.is-warning::after { background: #fff5df; }
.fuel-cards-stat-card.is-danger::after { background: #ffeded; }

.fuel-cards-stat-card span,
.fuel-cards-stat-card strong,
.fuel-cards-stat-card small {
    position: relative;
    z-index: 1;
    display: block;
}

.fuel-cards-stat-card span {
    color: #62738e;
    font-size: 13px;
    font-weight: 800;
}

.fuel-cards-stat-card strong {
    margin-top: 6px;
    color: #20304d;
    font-size: 25px;
    line-height: 1;
}

.fuel-cards-stat-card small {
    margin-top: 7px;
    color: #8a98ad;
    font-size: 11px;
    font-weight: 700;
}

.fuel-cards-toolbar.filters-toolbar {
    margin: 0;
    padding: 10px;
    border-radius: 18px;
    gap: 10px;
}

.fuel-cards-toolbar .filters-toolbar-main {
    flex-wrap: wrap;
    gap: 10px;
}

.fuel-cards-toolbar .filters-search-box {
    flex: 1 1 340px;
    min-width: 230px;
}

.fuel-cards-toolbar .filters-search-box input,
.fuel-cards-toolbar .filters-sort-dropdown .sort-dropdown-toggle,
.fuel-cards-toolbar .btn-add-vehicle {
    height: 46px;
}

.fuel-cards-toolbar .filters-group {
    gap: 6px;
    flex-wrap: nowrap;
}

.fuel-cards-toolbar .filter-chip {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
}

.fuel-cards-toolbar .filter-chip.active {
    border-color: #7fa8ff;
    background: #f7faff;
    color: #145bd7;
    box-shadow: 0 5px 16px rgba(37, 99, 235, 0.08);
}

.fuel-cards-toolbar .filters-sort-dropdown .sort-dropdown-toggle {
    min-width: 240px;
    border-radius: 13px;
    font-size: 13px;
}

.fuel-cards-toolbar .btn-add-vehicle {
    border-radius: 13px;
    padding: 0 18px;
    font-size: 14px;
}

.fuel-cards-toolbar .filters-toolbar-actions {
    gap: 10px;
    margin-left: 8px;
}

.fuel-cards-import-form {
    margin: 0;
}

.fuel-cards-toolbar .btn-add-vehicle i {
    margin-right: 5px;
}

.fuel-cards-results,
.fuel-cards-workspace {
    width: 100%;
    min-width: 0;
}

.mileage-import-sheet-grid.fuel-card-import-sheet-grid {
    min-width: 620px;
    grid-template-columns: 42px 190px 130px 110px 145px;
}

.mileage-import-mapping-grid.fuel-card-import-mapping-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mileage-import-preview-head.fuel-card-import-preview-head,
.mileage-import-preview-row.fuel-card-import-preview-row {
    grid-template-columns: 1.05fr 1.2fr 0.72fr 0.62fr 0.85fr 1fr;
}

.fuel-card-import-difference-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.fuel-card-import-difference-list label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dce6f3;
    border-radius: 9px;
    background: #f9fbff;
    cursor: pointer;
}

.fuel-card-import-difference-list input {
    margin-top: 3px;
}

.fuel-card-import-difference-list span,
.fuel-card-import-difference-list small {
    display: block;
}

.fuel-card-import-difference-list small {
    margin-top: 3px;
    color: #66758d;
}

.fuel-card-legacy-import {
    background: #fbfdff;
}

.fuel-cards-workspace {
    display: grid;
    grid-template-columns: minmax(660px, 1fr) minmax(420px, 540px);
    gap: 14px;
    align-items: start;
}

.fuel-cards-list-panel,
.fuel-card-inspector {
    border-radius: 20px;
}

.fuel-cards-list-panel {
    min-width: 0;
    padding: 10px;
}

.fuel-cards-list-head,
.fuel-cards-list-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.fuel-cards-list-head {
    min-height: 50px;
    padding: 4px 8px 11px;
    border-bottom: 1px solid #edf1f6;
}

.fuel-cards-list-head > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.fuel-cards-list-head strong {
    color: #23324d;
    font-size: 15px;
}

.fuel-cards-list-head span,
.fuel-cards-list-head small,
.fuel-cards-list-foot {
    color: #8290a6;
    font-size: 11px;
    font-weight: 700;
}

.fuel-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 672px;
    padding: 10px 6px 10px 0;
    overflow-y: auto;
    overflow-x: clip;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b9c9df #f2f6fb;
}

.fuel-cards-list::-webkit-scrollbar {
    width: 8px;
}

.fuel-cards-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #f2f6fb;
}

.fuel-cards-list::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 2px solid #f2f6fb;
    border-radius: 999px;
    background: linear-gradient(180deg, #c8d6e8, #aebfd7);
}

.fuel-card-list-row {
    width: 100%;
    min-width: 0;
    min-height: 124px;
    padding: 10px 12px;
    border: 1px solid #e3e9f2;
    border-radius: 16px;
    background: #ffffff;
    color: #263550;
    overflow: hidden;
    display: grid;
    grid-template-columns: 26px minmax(150px, 190px) minmax(128px, 1.05fr) minmax(132px, 0.82fr) minmax(118px, 0.66fr);
    align-items: center;
    gap: 12px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.fuel-card-row-data.fuel-card-pin-data {
    display: none;
}

.fuel-card-list-row:hover {
    border-color: #b9cce9;
    background: #fbfdff;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(38, 72, 124, 0.07);
}

.fuel-card-list-row:focus-visible {
    outline: 3px solid rgba(47, 102, 243, 0.18);
    outline-offset: 2px;
}

.fuel-card-list-row.is-selected {
    border-color: #4380ff;
    background: linear-gradient(90deg, #f9fbff 0%, #ffffff 72%);
    box-shadow: 0 8px 24px rgba(46, 106, 230, 0.1);
}

.fuel-card-row-selector {
    width: 22px;
    height: 22px;
    border: 1.5px solid #a8b6ca;
    border-radius: 50%;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
}

.fuel-card-list-row.is-selected .fuel-card-row-selector {
    border-color: #3474ef;
    background: #3474ef;
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(52, 116, 239, 0.24);
}

.fuel-card-art {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 190px;
    aspect-ratio: 1.66 / 1;
    padding: 12px 13px;
    border-radius: 13px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    box-shadow: 0 8px 17px rgba(18, 37, 70, 0.18);
    isolation: isolate;
    justify-self: start;
}

.fuel-card-art::before,
.fuel-card-art::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.fuel-card-art::before {
    width: 160px;
    height: 160px;
    right: -86px;
    top: -92px;
}

.fuel-card-art::after {
    width: 105px;
    height: 105px;
    right: -51px;
    top: -60px;
}

.fuel-card-art-top,
.fuel-card-art-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fuel-card-art-top strong {
    max-width: 76%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.fuel-card-art-top i {
    transform: rotate(90deg);
    font-size: 15px;
    opacity: 0.78;
}

.fuel-card-art-number {
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.fuel-card-art-foot > span {
    min-width: 0;
}

.fuel-card-art-foot small,
.fuel-card-art-foot b {
    display: block;
}

.fuel-card-art-foot small {
    margin-bottom: 2px;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.68;
}

.fuel-card-art-foot b {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
    white-space: nowrap;
}

.fuel-card-row-main,
.fuel-card-row-data {
    min-width: 0;
}

.fuel-card-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fuel-card-row-title > strong {
    max-width: 150px;
    overflow: hidden;
    color: #22314c;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.fuel-card-row-main > small,
.fuel-card-row-data > small,
.fuel-card-row-data > span {
    display: block;
}

.fuel-card-row-main > small {
    margin-top: 8px;
    color: #8795aa;
    font-size: 10px;
    font-weight: 700;
}

.fuel-card-status {
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e4f8ed;
    color: #168853;
    font-size: 9px;
    font-weight: 850;
    white-space: nowrap;
}

.fuel-card-status.is-warning { background: #fff1d2; color: #b96e00; }
.fuel-card-status.is-danger { background: #ffe2e1; color: #c83636; }
.fuel-card-status.is-neutral { background: #edf1f6; color: #64748b; }

.fuel-card-row-data {
    min-height: 58px;
    padding-left: 12px;
    border-left: 1px solid #edf1f6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fuel-card-row-data > small {
    margin-bottom: 6px;
    color: #8391a6;
    font-size: 9px;
    font-weight: 750;
}

.fuel-card-row-data > strong {
    overflow: hidden;
    color: #253650;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.fuel-card-row-data > span {
    margin-top: 5px;
    overflow: hidden;
    color: #8290a4;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 650;
}

.fuel-card-row-data .fuel-card-verified {
    color: #16a060;
}

.fuel-card-row-data .fuel-card-verified i {
    margin-right: 3px;
}

.fuel-card-vehicle-chip {
    align-self: flex-start;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid #d7e0ec;
    border-radius: 7px;
    background: #f9fbfd;
}

.fuel-cards-list-foot {
    min-height: 42px;
    padding: 9px 8px 2px;
    border-top: 1px solid #edf1f6;
}

.fuel-cards-list-foot i {
    margin-right: 4px;
    color: #3474ef;
}

.fuel-card-inspector {
    position: sticky;
    top: 94px;
    padding: 18px;
    overflow: hidden;
}

.fuel-card-inspector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf1f6;
}

.fuel-card-inspector-head span,
.fuel-card-inspector-head small {
    display: block;
}

.fuel-card-inspector-head span {
    color: #22314d;
    font-size: 15px;
    font-weight: 850;
}

.fuel-card-inspector-head small {
    margin-top: 3px;
    color: #8a97aa;
    font-size: 10px;
    font-weight: 700;
}

.fuel-card-inspector-head > a {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #60718c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.fuel-card-inspector-head > a:hover {
    background: #eef4ff;
    color: #2765dc;
}

.fuel-card-inspector-summary {
    display: grid;
    grid-template-columns: minmax(140px, 0.9fr) minmax(110px, 1fr);
    gap: 14px;
    align-items: center;
    padding: 17px 0;
}

.fuel-card-art-inspector {
    min-width: 140px;
    padding: 11px 12px;
}

.fuel-card-inspector-identity {
    min-width: 0;
}

.fuel-card-inspector-identity > div {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    flex-wrap: wrap;
}

.fuel-card-inspector-identity h2 {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    color: #22314c;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
}

.fuel-card-inspector-identity p {
    margin: 9px 0 0;
    color: #8290a5;
    font-size: 10px;
    font-weight: 650;
}

.fuel-card-inspector-details {
    margin: 0;
    border-top: 1px solid #edf1f6;
}

.fuel-card-inspector-details > div {
    min-height: 43px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f6;
    display: grid;
    grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: center;
}

.fuel-card-inspector-details dt {
    color: #7c8ba2;
    font-size: 10px;
    font-weight: 700;
}

.fuel-card-inspector-details dd {
    margin: 0;
    overflow: hidden;
    color: #263650;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 750;
}

.fuel-card-inspector-details dd small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #8895a8;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
}

.fuel-card-inspector-note {
    margin-top: 15px;
    padding: 13px;
    border: 1px solid #dce7f8;
    border-radius: 14px;
    background: #f7faff;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.fuel-card-inspector-note i {
    color: #3474ef;
    font-size: 16px;
}

.fuel-card-inspector-note p {
    margin: 0;
    color: #64758f;
    font-size: 10px;
    line-height: 1.55;
    font-weight: 650;
}

.fuel-card-inspector-note.is-warning { border-color: #f3dfb6; background: #fffbf2; }
.fuel-card-inspector-note.is-warning i { color: #d88908; }
.fuel-card-inspector-note.is-danger { border-color: #f4cccc; background: #fff7f7; }
.fuel-card-inspector-note.is-danger i { color: #d83c3c; }

.fuel-card-usage-frame {
    position: relative;
    transition: opacity 140ms ease, transform 140ms ease;
}

.fuel-card-usage-frame.is-loading {
    opacity: 0.62;
    transform: translateY(3px);
}

.fuel-card-usage-panel {
    --fuel-card-history-gradient: linear-gradient(180deg, #7ab6ff 0%, #2f7df4 100%);
    --fuel-card-current-gradient: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
    position: relative;
    isolation: isolate;
}

.fuel-card-usage-summary {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px 0;
}

.fuel-card-usage-identity {
    min-width: 0;
}

.fuel-card-usage-identity > div {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    flex-wrap: wrap;
}

.fuel-card-usage-identity h2 {
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    color: #22314c;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
}

.fuel-card-usage-identity p {
    margin: 8px 0 0;
    color: #8290a5;
    font-size: 11px;
    font-weight: 650;
}

.fuel-card-usage-panel .fuel-card-art-inspector {
    width: min(100%, 300px);
    max-width: 300px;
    min-width: 0;
    padding: 14px 15px;
    border-radius: 16px;
}

.fuel-card-usage-panel .fuel-card-art-inspector .fuel-card-art-top strong {
    font-size: 15px;
}

.fuel-card-usage-panel .fuel-card-art-inspector .fuel-card-art-top i {
    font-size: 16px;
}

.fuel-card-usage-panel .fuel-card-art-inspector .fuel-card-art-number {
    font-size: 12px;
    letter-spacing: 0.1em;
}

.fuel-card-usage-panel .fuel-card-art-inspector .fuel-card-art-foot small {
    font-size: 7px;
}

.fuel-card-usage-panel .fuel-card-art-inspector .fuel-card-art-foot b {
    max-width: 92px;
    font-size: 10px;
}

.fuel-card-usage-head {
    padding: 12px 0 10px;
    border-top: 1px solid #edf1f6;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.fuel-card-usage-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 15px;
}

.fuel-card-usage-head p {
    margin: 3px 0 0;
    color: #8a97aa;
    font-size: 10px;
    font-weight: 700;
}

.fuel-card-usage-year-strip {
    min-height: 44px;
    margin: 0 0 10px;
    padding: 7px 9px;
    border: 1px solid #e2ebf6;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fe 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fuel-card-usage-year-strip > span {
    color: #6c7d95;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fuel-card-year-control {
    min-height: 32px;
    border: 1px solid #d9e4f2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(38, 63, 97, 0.05);
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    color: #4b5f7c;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.fuel-card-year-control > a,
.fuel-card-year-control > span {
    width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #70819a;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.fuel-card-year-control > a:hover {
    background: #eef4ff;
    color: #155dd7;
}

.fuel-card-year-control > span {
    color: #c5cfdd;
}

.fuel-card-year-control label {
    min-height: 30px;
    padding: 0 6px;
    border-right: 1px solid #e4ebf5;
    border-left: 1px solid #e4ebf5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fuel-card-year-control label i {
    color: #2f6fed;
}

.fuel-card-year-control select {
    min-width: 64px;
    height: 28px;
    padding: 0 18px 0 4px;
    border: 0;
    background-color: transparent;
    color: #344b6a;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: none;
}

.fuel-card-year-control select:focus-visible {
    outline: 2px solid rgba(47, 102, 216, 0.18);
    outline-offset: -2px;
    border-radius: 7px;
}

.fuel-card-usage-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.fuel-card-usage-kpis > div {
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid #e1e9f5;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fe 100%);
}

.fuel-card-usage-kpis small,
.fuel-card-usage-kpis strong {
    display: block;
}

.fuel-card-usage-kpis small {
    color: #8391a6;
    font-size: 9px;
    font-weight: 800;
}

.fuel-card-usage-kpis strong {
    margin-top: 4px;
    overflow: hidden;
    color: #22314d;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 950;
}

/* The column hit areas stay still while only their fills animate. */
.fuel-card-chart-scroll {
    min-width: 0;
    max-width: 100%;
    margin-top: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #b8cce9 transparent;
}

.fuel-card-usage-chart {
    --fuel-card-zero: 0%;
    --fuel-card-plot-height: 164px;
    --fuel-card-column-width: 24px;
    min-width: 290px;
    padding: 18px 3px 8px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
}

.fuel-card-chart-axis {
    position: relative;
    height: var(--fuel-card-plot-height);
    color: #667892;
    font-size: 10px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.fuel-card-chart-axis > span {
    position: absolute;
    right: 0;
    transform: translateY(-50%);
    white-space: nowrap;
}

.fuel-card-chart-axis .is-top { top: 0; }
.fuel-card-chart-axis .is-middle { top: 50%; }
.fuel-card-chart-axis .is-zero { top: calc(100% - var(--fuel-card-zero)); }
.fuel-card-chart-axis .is-bottom { top: 100%; }

.fuel-card-chart-plot {
    position: relative;
    min-width: 0;
    height: calc(var(--fuel-card-plot-height) + 30px);
}

.fuel-card-chart-grid {
    position: absolute;
    inset: 0 0 auto;
    height: var(--fuel-card-plot-height);
    border-top: 1px solid #e4ebf5;
    border-bottom: 1px solid #c5d2e4;
    pointer-events: none;
}

.fuel-card-chart-grid::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    border-top: 1px dashed #e1e9f3;
}

.fuel-card-usage-chart.has-negative .fuel-card-chart-grid::after {
    top: calc(100% - var(--fuel-card-zero));
    border-top: 1px solid #b4c4da;
}

.fuel-card-chart-bars {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 5px;
}

.fuel-card-chart-month {
    position: relative;
    z-index: 0;
    display: grid;
    grid-template-rows: var(--fuel-card-plot-height) 30px;
    justify-items: center;
    min-width: 0;
}

.fuel-card-chart-month.is-current::before {
    content: "";
    position: absolute;
    inset: -7px -2px 0;
    z-index: -1;
    border: 1px solid #d6e5fc;
    border-radius: 10px;
    background: #f0f6ff;
}

.fuel-card-chart-bar {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
}

.fuel-card-chart-fill {
    position: absolute;
    left: 50%;
    bottom: var(--fuel-card-zero);
    width: min(var(--fuel-card-column-width), 76%);
    height: max(2px, var(--fuel-card-bar-size));
    border-radius: 7px 7px 2px 2px;
    background: var(--fuel-card-history-gradient);
    box-shadow: 0 4px 10px rgba(47, 111, 237, 0.12);
    transform: translateX(-50%);
    transform-origin: bottom center;
    pointer-events: none;
}

.fuel-card-chart-bar.is-negative .fuel-card-chart-fill {
    top: calc(100% - var(--fuel-card-zero));
    bottom: auto;
    border-radius: 2px 2px 7px 7px;
    background: linear-gradient(180deg, #f6bd69, #e79731);
    transform-origin: top center;
}

.fuel-card-chart-bar.is-empty .fuel-card-chart-fill {
    background: #bdcce0;
    border-radius: 2px;
    box-shadow: none;
}

.fuel-card-chart-bar:hover,
.fuel-card-chart-bar.is-selected {
    background: rgba(47, 111, 237, 0.065);
}

.fuel-card-chart-bar:focus-visible {
    outline: 2px solid #2f6fed;
    outline-offset: 2px;
}

.fuel-card-chart-month.is-current .fuel-card-chart-bar:not(.is-empty):not(.is-negative) .fuel-card-chart-fill {
    background: var(--fuel-card-current-gradient);
}

.is-chart-waiting .fuel-card-chart-fill { transform: translateX(-50%) scaleY(0); }
.fuel-card-chart-bar.is-rising .fuel-card-chart-fill {
    animation: fuel-card-fill-rise 560ms cubic-bezier(0.2, 0.75, 0.3, 1) backwards;
    animation-delay: var(--fuel-card-bar-delay, 0ms);
}

@keyframes fuel-card-fill-rise {
    from { transform: translateX(-50%) scaleY(0); }
    to { transform: translateX(-50%) scaleY(1); }
}

.fuel-card-chart-month > small {
    align-self: center;
    color: #60738d;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.fuel-card-chart-month.is-current > small { color: #155dd7; }

.fuel-card-chart-tooltip {
    position: absolute;
    z-index: 20;
    min-width: 150px;
    max-width: calc(100% - 16px);
    padding: 10px 13px;
    border: 1px solid #223b60;
    border-radius: 12px;
    background: #172844;
    color: #fff;
    box-shadow: 0 8px 24px rgba(22, 42, 75, 0.2);
    text-align: left;
    pointer-events: none;
}

.fuel-card-chart-tooltip[hidden],
.fuel-card-usage-error[hidden] { display: none; }

.fuel-card-chart-tooltip small,
.fuel-card-chart-tooltip strong,
.fuel-card-chart-tooltip em {
    display: block;
    white-space: nowrap;
}

.fuel-card-chart-tooltip small { color: #d0ddf0; font-size: 11px; font-weight: 650; }
.fuel-card-chart-tooltip strong { margin-top: 3px; color: #fff; font-size: 16px; font-weight: 850; }
.fuel-card-chart-tooltip em { margin-top: 4px; color: #bdd5ff; font-size: 11px; font-style: normal; }

.fuel-card-chart-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-height: 38px;
    margin: 8px 0 12px;
    color: #5b6c84;
    font-size: 11px;
    line-height: 1.55;
}

.fuel-card-chart-note i { flex: 0 0 auto; margin-top: 1px; color: #2f6fed; }
.fuel-card-chart-mobile-hint { display: none; }

.fuel-detail-usage-wrap {
    min-width: 0;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #dce5f1;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(38, 63, 97, 0.055);
}

.fuel-detail-usage-wrap .fuel-card-usage-panel { width: 100%; min-width: 0; }
.fuel-detail-usage-wrap .fuel-card-usage-head { padding: 0 0 18px; border: 0; }
.fuel-card-usage-head h3 { display: flex; align-items: center; gap: 9px; }
.fuel-card-usage-head h3 > i { color: #2f6fed; }
.fuel-detail-usage-wrap .fuel-card-usage-head h3 { font-size: 21px; letter-spacing: -0.03em; }
.fuel-detail-usage-wrap .fuel-card-usage-head p { margin-top: 6px; color: #63748b; font-size: 13px; }
.fuel-detail-usage-wrap .fuel-card-usage-year-strip { margin-bottom: 16px; padding: 10px 12px; }
.fuel-detail-usage-wrap .fuel-card-usage-year-strip > span { color: #516781; font-size: 11px; }
.fuel-detail-usage-wrap .fuel-card-year-control { min-height: 38px; }
.fuel-detail-usage-wrap .fuel-card-year-control > a,
.fuel-detail-usage-wrap .fuel-card-year-control > span { width: 36px; min-height: 38px; }
.fuel-detail-usage-wrap .fuel-card-year-control label { min-height: 38px; margin: 0; }
.fuel-detail-usage-wrap .fuel-card-year-control select { height: 36px; font-size: 14px; }
.fuel-detail-usage-wrap .fuel-card-usage-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fuel-detail-usage-wrap .fuel-card-usage-kpis > div { min-height: 86px; padding: 14px; }
.fuel-detail-usage-wrap .fuel-card-usage-kpis small { color: #63748b; font-size: 11px; }
.fuel-detail-usage-wrap .fuel-card-usage-kpis strong { margin-top: 8px; font-size: clamp(17px, 1.65vw, 23px); letter-spacing: -0.025em; white-space: normal; overflow-wrap: anywhere; }
.fuel-detail-usage-wrap .fuel-card-usage-chart { --fuel-card-plot-height: 280px; --fuel-card-column-width: 38px; min-width: 590px; gap: 14px; }
.fuel-detail-usage-wrap .fuel-card-chart-bars { gap: 8px; }
.fuel-detail-usage-wrap .fuel-card-chart-axis,
.fuel-detail-usage-wrap .fuel-card-chart-month > small { font-size: 12px; }
.fuel-detail-usage-wrap .fuel-card-chart-note { min-height: 38px; font-size: 12px; }
.fuel-detail-usage-wrap .fuel-card-usage-match span { padding: 4px 10px; font-size: 10px; }

@media (max-width: 760px) {
    .fuel-detail-usage-wrap { padding: 18px; border-radius: 18px; }
    .fuel-detail-usage-wrap .fuel-card-usage-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .fuel-detail-usage-wrap .fuel-card-usage-kpis > div { min-height: 78px; padding: 12px; }
    .fuel-detail-usage-wrap .fuel-card-usage-kpis strong { font-size: clamp(16px, 4.2vw, 19px); }
    .fuel-detail-usage-wrap .fuel-card-usage-chart { --fuel-card-plot-height: 230px; min-width: 560px; }
    .fuel-detail-usage-wrap .fuel-card-usage-year-strip { gap: 8px; flex-wrap: wrap; }
}

.fuel-card-usage-match {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 9px;
    border-top: 1px solid #edf1f6;
}

.fuel-card-usage-match span {
    min-height: 25px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f4f7fb;
    color: #53647d;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 850;
}

.fuel-card-usage-match i {
    color: #3474ef;
}

.fuel-card-usage-loading {
    position: absolute;
    top: 12px;
    right: 4px;
    z-index: 20;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #cfe0f8;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 9px 24px rgba(35, 68, 116, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #35639f;
    font-size: 10px;
    font-weight: 900;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.fuel-card-usage-frame.is-loading .fuel-card-usage-loading {
    opacity: 1;
    transform: translateY(0);
}

.fuel-card-usage-loading i {
    animation: fuel-card-chart-spin 700ms linear infinite;
}

.fuel-card-usage-error {
    margin-top: 15px;
    padding: 16px;
    border: 1px solid #f4cccc;
    border-radius: 14px;
    background: #fff7f7;
    color: #b91c1c;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fuel-card-usage-error p {
    margin: 0;
    color: #7f1d1d;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 750;
}

@keyframes fuel-card-chart-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .fuel-card-usage-frame,
    .fuel-card-usage-loading,
    .fuel-card-chart-bar,
    .fuel-card-chart-bar.is-rising .fuel-card-chart-fill {
        animation: none;
        transition-duration: 0.01ms;
        transition-delay: 0ms;
    }
}

.fuel-card-inspector-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 15px;
}

.fuel-card-inspector-actions a {
    min-height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 11px;
    text-decoration: none;
}

.fuel-cards-empty {
    margin: 0;
}

.fuel-status-text { font-weight: 800; }
.fuel-status-ok { color: #15803d; }
.fuel-status-warning { color: #b45309; }
.fuel-status-danger { color: #b91c1c; }
.fuel-status-neutral { color: #475569; }

.fuel-detail-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.fuel-detail-actions-right {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.fuel-detail-action-form { margin: 0; }

.fuel-detail-action-btn {
    min-width: 114px;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 14px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
}

.fuel-detail-action-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb 55%, #1d4ed8);
    color: #fff;
}

@media (min-width: 1900px) {
    .fuel-cards-workspace {
        grid-template-columns: minmax(760px, 1fr) minmax(460px, 560px);
        gap: 18px;
    }

    .fuel-card-list-row {
        grid-template-columns: 28px 190px minmax(160px, 1.08fr) minmax(150px, 0.82fr) 138px;
        gap: 15px;
    }
}

@media (max-width: 1220px) {
    .fuel-cards-toolbar .filters-toolbar-main {
        flex-wrap: wrap;
    }

    .fuel-cards-toolbar .filters-search-box {
        flex-basis: 100%;
    }

    .fuel-card-list-row {
        grid-template-columns: 26px 150px minmax(112px, 1fr) minmax(118px, 0.82fr);
    }

    .fuel-card-expiry-data {
        display: none;
    }
}

@media (max-width: 1160px) {
    .fuel-cards-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .fuel-card-inspector {
        position: static;
    }

    .fuel-card-list-row {
        grid-template-columns: 28px 170px minmax(140px, 1fr) minmax(132px, 0.82fr);
    }

    .fuel-card-inspector-summary {
        grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .fuel-cards-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fuel-cards-toolbar.filters-toolbar,
    .fuel-cards-toolbar .filters-toolbar-main {
        align-items: stretch;
    }

    .fuel-cards-toolbar .filters-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .fuel-cards-toolbar .filter-chip {
        flex: 0 0 auto;
    }

    .fuel-card-list-row {
        grid-template-columns: 26px 138px minmax(120px, 1fr) 110px;
        min-height: 114px;
    }

    .fuel-cards-list {
        max-height: 500px;
    }

    .fuel-card-list-row .fuel-card-expiry-data {
        display: none;
    }

    .fuel-card-art { padding: 10px 11px; }
    .fuel-card-art-number { font-size: 8px; }

    .mileage-import-mapping-grid.fuel-card-import-mapping-grid,
    .mileage-import-preview-head.fuel-card-import-preview-head,
    .mileage-import-preview-row.fuel-card-import-preview-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .fuel-cards-page { gap: 14px; }

    .fuel-cards-stats-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .fuel-cards-stat-card {
        min-height: 92px;
        padding-left: 78px;
    }

    .fuel-cards-toolbar .filters-sort-dropdown,
    .fuel-cards-toolbar .filters-toolbar-actions,
    .fuel-cards-import-form,
    .fuel-cards-toolbar .btn-add-vehicle {
        width: 100%;
    }

    .fuel-cards-list-head > small,
    .fuel-cards-list-foot span:last-child {
        display: none;
    }

    .fuel-card-list-row {
        grid-template-columns: 24px 112px minmax(0, 1fr);
        min-height: 94px;
        padding: 8px;
        gap: 9px;
    }

    .fuel-cards-list {
        max-height: 420px;
    }

    .fuel-card-list-row .fuel-card-row-data {
        display: none;
    }

    .fuel-card-row-title {
        display: block;
    }

    .fuel-card-row-title > strong {
        display: block;
        font-size: 14px;
    }

    .fuel-card-row-title .fuel-card-status {
        margin-top: 6px;
    }

    .fuel-card-row-main > small {
        margin-top: 5px;
        white-space: normal;
    }

    .fuel-card-art {
        border-radius: 10px;
        padding: 8px;
    }

    .fuel-card-art-top strong { font-size: 10px; }
    .fuel-card-art-top i { font-size: 11px; }
    .fuel-card-art-number { font-size: 6px; }
    .fuel-card-art-foot small { font-size: 5px; }
    .fuel-card-art-foot b { font-size: 7px; }

    .fuel-card-inspector {
        padding: 15px;
    }

    .fuel-card-inspector-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .fuel-card-art-inspector {
        width: min(100%, 260px);
    }

    .fuel-card-inspector-details > div {
        grid-template-columns: 95px minmax(0, 1fr);
    }

    .fuel-card-inspector-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .mileage-import-preview-head.fuel-card-import-preview-head {
        display: none;
    }

    .mileage-import-mapping-grid.fuel-card-import-mapping-grid,
    .mileage-import-preview-row.fuel-card-import-preview-row {
        grid-template-columns: 1fr;
    }

    .fuel-detail-actions-bar,
    .fuel-detail-actions-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-left: 0;
    }

    .fuel-detail-action-btn,
    .fuel-detail-actions-right > .btn-danger-solid,
    .fuel-detail-action-form,
    .fuel-detail-action-form button {
        width: 100%;
    }
}

.fuel-card-usage-frame.is-loading { opacity: 0.78; transform: none; }
.fuel-card-usage-error { align-items: center; flex-wrap: wrap; }
.fuel-card-usage-error p { flex: 1 1 170px; }
.fuel-card-usage-error button { padding: 8px 11px; border: 1px solid #e9b7b7; border-radius: 8px; background: #fff; color: #9b2929; font-size: 12px; font-weight: 750; cursor: pointer; }
@media (max-width: 560px) {
    .fuel-card-usage-loading span { display: none; }
    .fuel-detail-usage-wrap .fuel-card-chart-mobile-hint { display: flex; align-items: center; gap: 7px; margin: 6px 0 10px; color: #63748b; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .is-chart-waiting .fuel-card-chart-fill { transform: translateX(-50%); }
}



/* Source: css/pages/fuel-card-form.css */
.fuel-form-page-shell .field-error {
    margin-top: 0;
    font-size: 0.86rem;
    color: #c62828;
    min-height: 18px;
}

.fuel-form-page-shell .field-helper-text {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #75849a;
    font-weight: 650;
}

.fuel-form-page-shell .input-invalid,
.fuel-form-page-shell select.input-invalid {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.10) !important;
}

.fuel-form-layout {
    align-items: start;
    grid-template-columns: minmax(0, 1020px) 306px;
    justify-content: center;
    gap: 22px;
}

.fuel-form-card {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    border-color: #dfe7f2;
    box-shadow: 0 10px 26px rgba(38, 60, 92, 0.06);
}

.fuel-form-main {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.82fr);
    gap: 0;
    border-bottom: 1px solid #e7edf5;
}

.fuel-detail-shell .fuel-form-main {
    border-bottom: 0;
}

.fuel-detail-shell .app-page-header {
    margin-bottom: 0;
}

.fuel-detail-pin-confirm {
    color: #2456a3;
    font-size: 12px;
    text-decoration: underline;
}

.fuel-detail-header-edit {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

.fuel-detail-shell .fuel-detail-tips {
    position: static;
    overflow: hidden;
}

.fuel-form-section {
    min-width: 0;
    padding: 18px 20px;
}

.fuel-form-preview-section {
    min-width: 0;
    background: linear-gradient(180deg, #fbfcff 0%, #f4f7fc 100%);
    border-left: 1px solid #e7edf6;
}

.fuel-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.fuel-step-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f7bff 0%, #0f5bea 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(25, 94, 231, 0.26);
}

.fuel-form-section-head-compact {
    margin-bottom: 18px;
}

.fuel-form-section-head h2 {
    margin: 0;
    color: #192741;
    font-size: 18px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: 0;
}

.fuel-form-section-head p {
    margin: 4px 0 0;
    color: #64748f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.fuel-form-section-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(36, 99, 235, 0.10), rgba(59, 130, 246, 0.18));
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.fuel-form-grid {
    align-items: start;
    gap: 14px 28px;
}

.fuel-form-card .form-group {
    gap: 7px;
}

.fuel-form-card .form-group label {
    color: #354761;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 850;
}

.fuel-form-card .form-group input,
.fuel-form-card .form-group select,
.fuel-form-card .form-group textarea {
    min-height: 38px;
    border-radius: 7px;
    border-color: #d6e0ec;
    padding: 9px 12px;
    color: #253650;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(35, 51, 75, 0.02);
}

.fuel-form-card .form-group input::placeholder,
.fuel-form-card .form-group textarea::placeholder {
    color: #8190a8;
}

.fuel-assignment-section {
    border-bottom: 1px solid #e7edf5;
}

.fuel-assignment-grid {
    display: grid;
    grid-template-columns: minmax(0, 614px);
    gap: 12px;
    max-width: 614px;
}

.fuel-form-preview-section .fuel-form-section-head {
    margin-bottom: 16px;
}

.fuel-card-type-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border: 1px solid #dbe5f3;
    border-radius: 7px;
    background: #ffffff;
}

.fuel-card-type-switch label {
    cursor: pointer;
    margin: 0;
}

.fuel-card-type-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fuel-card-type-switch span {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #53657f;
    font-size: 13px;
    font-weight: 850;
    border: 1px solid transparent;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.fuel-card-type-switch label.active span,
.fuel-card-type-switch input:checked + span {
    color: #1769e8;
    background: #f4f8ff;
    border-color: #2f7bff;
    box-shadow: 0 6px 14px rgba(23, 105, 232, 0.10);
}

.fuel-card-type-switch label:hover span {
    transform: translateY(-1px);
}

.fuel-form-page-shell select:disabled,
.fuel-form-page-shell input:disabled:not([type="radio"]) {
    color: #9aa8ba;
    background: #f3f6fb;
    cursor: not-allowed;
}

/* ===== nowy podgląd karty ===== */

.fuel-card-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.fuel-card-preview-wrap .fuel-card-art-preview {
    max-width: 290px;
}

.fuel-card-preview-assignment {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid #dbe5f3;
    border-radius: 999px;
    background: #ffffff;
    color: #415577;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.fuel-card-preview-assignment i {
    color: #3975df;
    font-size: 0.9rem;
}

.fuel-card-expiry-tip {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #5d7090 !important;
}

.fuel-card-expiry-tip i {
    margin-top: 2px;
    color: #3975df;
    flex: 0 0 auto;
}

.fuel-card-preview-mini {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1.66 / 1;
    min-height: 182px;
    border-radius: 16px;
    padding: 16px 18px;
    background:
        linear-gradient(145deg, #102f78 0%, #1d4ed8 36%, #2563eb 62%, #5fb3ff 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow:
        0 18px 34px rgba(37, 99, 235, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.16);
}

.fuel-card-preview-mini::before,
.fuel-card-preview-mini::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.fuel-card-preview-mini::before {
    width: 190px;
    height: 190px;
    right: -102px;
    top: -108px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.fuel-card-preview-mini::after {
    width: 126px;
    height: 126px;
    right: -62px;
    top: -72px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.fuel-card-preview-pattern {
    display: none;
}

.fuel-card-preview-shine {
    display: none;
}

.fuel-card-preview-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.fuel-card-preview-brand {
    display: inline-flex;
    align-items: center;
    max-width: 190px;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fuel-card-preview-contactless {
    position: relative;
    width: 28px;
    height: 22px;
    flex-shrink: 0;
}

.fuel-card-preview-contactless span {
    position: absolute;
    top: 50%;
    right: 0;
    border: 2px solid rgba(255,255,255,0.85);
    border-left: 0;
    border-radius: 0 999px 999px 0;
    transform: translateY(-50%);
}

.fuel-card-preview-contactless span:nth-child(1) {
    width: 8px;
    height: 8px;
}

.fuel-card-preview-contactless span:nth-child(2) {
    width: 14px;
    height: 14px;
    right: 4px;
}

.fuel-card-preview-contactless span:nth-child(3) {
    width: 20px;
    height: 20px;
    right: 8px;
}

.fuel-card-preview-chip {
    display: none;
}

.fuel-card-preview-chip::before,
.fuel-card-preview-chip::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    height: 2px;
    border-radius: 999px;
    background: rgba(30, 64, 175, 0.18);
}

.fuel-card-preview-chip::before {
    top: 9px;
}

.fuel-card-preview-chip::after {
    top: 16px;
}

.fuel-card-preview-vehicle {
    position: absolute;
    z-index: 3;
    top: 46px;
    right: 18px;
    max-width: 128px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(15, 23, 42, 0.20);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    backdrop-filter: blur(5px);
}

.fuel-card-preview-vehicle[hidden] {
    display: none;
}

.fuel-card-preview-number {
    position: relative;
    z-index: 2;
    font-size: 13px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0.08em;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.fuel-card-preview-footer {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.fuel-card-preview-col span {
    display: block;
    margin-bottom: 3px;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.76;
}

.fuel-card-preview-col strong {
    display: block;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
    word-break: break-word;
}

.fuel-form-note-box {
    width: 100%;
    max-width: 290px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f8fbff;
    border: 1px solid #dfe9f7;
    box-shadow: 0 8px 18px rgba(111, 145, 197, 0.08);
}

.fuel-form-note-box i {
    color: #4a78d1;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.fuel-form-note-box p {
    margin: 0;
    color: #566982;
    font-size: 14px;
    line-height: 1.55;
}

.fuel-form-sidebar {
    top: 94px;
}

.fuel-form-page-shell .fuel-form-side-card {
    border-radius: 12px;
    border-color: #dfe7f2;
    box-shadow: 0 10px 26px rgba(38, 60, 92, 0.06);
}

.fuel-form-page-shell .subscription-side-card-head h3 {
    font-size: 17px;
}

.fuel-form-page-shell .subscription-tip-row {
    min-height: 76px;
}

.fuel-form-page-shell .subscription-tip-row p {
    font-size: 12px;
}

.fuel-form-quick-preview {
    border-top: 0;
}

.fuel-form-preview-list {
    margin: 0;
    padding: 0;
}

.fuel-form-preview-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    border-bottom: 1px solid #e6edf5;
}

.fuel-form-preview-list dt {
    min-width: 0;
    color: #40536e;
    font-size: 12px;
    font-weight: 800;
}

.fuel-form-preview-list dd {
    max-width: 130px;
    margin: 0;
    color: #1d2b45;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-form-status-pill {
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #365fb8;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 900;
}

.fuel-form-quick-preview > p {
    margin: 16px 0 4px;
    color: #7c899c;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 750;
}

.fuel-form-header p {
    max-width: 780px;
}

.fuel-form-card .vehicle-create-actions {
    border-top: 1px solid #e8eef7;
    background: linear-gradient(180deg, rgba(250,252,255,0.95) 0%, rgba(247,250,254,0.98) 100%);
    padding: 14px 20px;
}

.fuel-form-card .btn-create-submit {
    min-width: 190px;
    min-height: 38px;
    border-radius: 7px;
    font-size: 13px;
}

.fuel-form-card .btn-create-cancel {
    min-width: 116px;
    min-height: 38px;
    border-radius: 7px;
    font-size: 13px;
}

@media (max-width: 1180px) {
    .fuel-form-layout {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

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

    .fuel-form-preview-section {
        border-left: 0;
        border-top: 1px solid #e7edf6;
    }

    .fuel-card-preview-wrap {
        align-items: stretch;
    }

    .fuel-card-art-preview,
    .fuel-form-note-box {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .fuel-form-note-box {
        border-radius: 16px;
    }

    .fuel-form-card .btn-create-submit {
        min-width: 0;
        width: 100%;
    }

    .fuel-form-card .btn-create-cancel {
        min-width: 0;
    }
}

/* Keep the detail wrapper inside the tablet sidebar's reserved width. */
@media (min-width: 861px) and (max-width: 1120px) {
    .module-workspace:has(.fuel-detail-shell) .page-wrap-module {
        max-width: calc(100vw - 108px);
        padding-left: 0;
    }
}
.fuel-form-card [hidden] {
    display: none !important;
}



/* Source: css/components/fuel-card-themes.css */
.fuel-card-theme-default {
    --fuel-card-background: linear-gradient(145deg, #173b69 0%, #071b35 68%, #102d51 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.08);
    --fuel-card-decoration: rgba(255, 255, 255, 0.14);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(12, 34, 64, 0.24);
}

.fuel-card-theme-orlen {
    --fuel-card-background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.18), transparent 27%),
        linear-gradient(145deg, #ed2939 0%, #c81022 46%, #7d0714 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.14);
    --fuel-card-decoration: rgba(255, 255, 255, 0.2);
    --fuel-card-surface: rgba(255, 255, 255, 0.16);
    --fuel-card-shadow: rgba(150, 12, 28, 0.26);
}

.fuel-card-theme-mol {
    --fuel-card-background:
        radial-gradient(circle at 12% 10%, rgba(88, 214, 157, 0.22), transparent 31%),
        linear-gradient(145deg, #126b49 0%, #075139 48%, #033224 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(119, 231, 178, 0.2);
    --fuel-card-decoration: rgba(119, 231, 178, 0.25);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(5, 78, 54, 0.27);
}

.fuel-card-theme-circle-k {
    --fuel-card-background:
        radial-gradient(circle at 82% 10%, rgba(255, 221, 153, 0.32), transparent 28%),
        linear-gradient(145deg, #ff922f 0%, #f25a1f 48%, #bd2519 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.18);
    --fuel-card-decoration: rgba(255, 245, 225, 0.28);
    --fuel-card-surface: rgba(120, 25, 14, 0.18);
    --fuel-card-shadow: rgba(205, 65, 20, 0.28);
}

.fuel-card-theme-bp {
    --fuel-card-background:
        radial-gradient(circle at 86% 16%, rgba(255, 244, 74, 0.5), transparent 25%),
        linear-gradient(145deg, #f3ffd7 0%, #cbea82 48%, #79bc52 100%);
    --fuel-card-text: #174b35;
    --fuel-card-border: rgba(47, 126, 76, 0.2);
    --fuel-card-decoration: rgba(28, 113, 65, 0.25);
    --fuel-card-surface: rgba(255, 255, 255, 0.48);
    --fuel-card-shadow: rgba(79, 145, 78, 0.24);
}

.fuel-card-theme-shell {
    --fuel-card-background:
        radial-gradient(circle at 82% 15%, rgba(255, 255, 255, 0.58), transparent 25%),
        linear-gradient(145deg, #fffbe8 0%, #ffe36a 58%, #f7bd21 100%);
    --fuel-card-text: #5e2d16;
    --fuel-card-border: rgba(211, 37, 42, 0.24);
    --fuel-card-decoration: rgba(211, 37, 42, 0.31);
    --fuel-card-surface: rgba(255, 255, 255, 0.5);
    --fuel-card-shadow: rgba(204, 149, 15, 0.24);
}

.fuel-card-theme-moya {
    --fuel-card-background:
        radial-gradient(circle at 88% 10%, rgba(229, 47, 54, 0.72), transparent 22%),
        linear-gradient(145deg, #174f9b 0%, #0b3474 55%, #061d47 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.13);
    --fuel-card-decoration: rgba(113, 177, 255, 0.24);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(9, 49, 105, 0.26);
}

.fuel-card-theme-avia {
    --fuel-card-background:
        radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.22), transparent 24%),
        linear-gradient(145deg, #f2484f 0%, #c71928 52%, #760d18 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.15);
    --fuel-card-decoration: rgba(255, 255, 255, 0.21);
    --fuel-card-surface: rgba(255, 255, 255, 0.15);
    --fuel-card-shadow: rgba(145, 19, 32, 0.26);
}

.fuel-card-theme-amic,
.fuel-card-theme-slovnaft {
    --fuel-card-background:
        radial-gradient(circle at 84% 12%, rgba(255, 224, 74, 0.55), transparent 25%),
        linear-gradient(145deg, #248657 0%, #0c6342 52%, #06402e 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(244, 216, 58, 0.22);
    --fuel-card-decoration: rgba(255, 226, 79, 0.3);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(7, 88, 57, 0.26);
}

.fuel-card-theme-lotos {
    --fuel-card-background:
        radial-gradient(circle at 86% 12%, rgba(255, 206, 56, 0.64), transparent 24%),
        linear-gradient(145deg, #1760b6 0%, #113f82 55%, #0a2858 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.14);
    --fuel-card-decoration: rgba(253, 209, 68, 0.29);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(13, 58, 122, 0.26);
}

.fuel-card-theme-totalenergies {
    --fuel-card-background:
        radial-gradient(circle at 90% 8%, rgba(0, 190, 218, 0.58), transparent 24%),
        radial-gradient(circle at 70% 95%, rgba(229, 34, 58, 0.7), transparent 28%),
        linear-gradient(145deg, #173b76 0%, #11295a 58%, #091737 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.14);
    --fuel-card-decoration: rgba(85, 207, 226, 0.3);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(13, 37, 84, 0.28);
}

.fuel-card-theme-esso {
    --fuel-card-background:
        radial-gradient(circle at 88% 12%, rgba(225, 34, 47, 0.18), transparent 24%),
        linear-gradient(145deg, #ffffff 0%, #f2f6fb 58%, #dfe9f5 100%);
    --fuel-card-text: #153967;
    --fuel-card-border: rgba(25, 69, 120, 0.18);
    --fuel-card-decoration: rgba(217, 38, 52, 0.26);
    --fuel-card-surface: rgba(255, 255, 255, 0.64);
    --fuel-card-shadow: rgba(43, 67, 96, 0.18);
}

.fuel-card-theme-omv {
    --fuel-card-background:
        radial-gradient(circle at 86% 12%, rgba(62, 208, 184, 0.45), transparent 25%),
        linear-gradient(145deg, #188fa9 0%, #0b607e 52%, #083a5d 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.14);
    --fuel-card-decoration: rgba(137, 235, 218, 0.26);
    --fuel-card-surface: rgba(255, 255, 255, 0.14);
    --fuel-card-shadow: rgba(9, 83, 109, 0.26);
}

.fuel-card-theme-gulf {
    --fuel-card-background:
        radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.2), transparent 24%),
        linear-gradient(145deg, #ff9b36 0%, #f17024 48%, #174b79 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.16);
    --fuel-card-decoration: rgba(255, 255, 255, 0.25);
    --fuel-card-surface: rgba(21, 67, 108, 0.2);
    --fuel-card-shadow: rgba(190, 87, 24, 0.25);
}

.fuel-card-theme-texaco,
.fuel-card-theme-q8 {
    --fuel-card-background:
        radial-gradient(circle at 86% 12%, rgba(238, 44, 57, 0.58), transparent 25%),
        linear-gradient(145deg, #373b46 0%, #171d29 55%, #090e18 100%);
    --fuel-card-text: #ffffff;
    --fuel-card-border: rgba(255, 255, 255, 0.12);
    --fuel-card-decoration: rgba(239, 54, 66, 0.3);
    --fuel-card-surface: rgba(255, 255, 255, 0.13);
    --fuel-card-shadow: rgba(10, 17, 28, 0.3);
}

.fuel-card-art[class*="fuel-card-theme-"],
.fuel-card-preview-mini[class*="fuel-card-theme-"] {
    background: var(--fuel-card-background);
    color: var(--fuel-card-text);
    border: 1px solid var(--fuel-card-border);
    box-shadow:
        0 18px 34px var(--fuel-card-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.fuel-card-art[class*="fuel-card-theme-"]::before,
.fuel-card-art[class*="fuel-card-theme-"]::after,
.fuel-card-preview-mini[class*="fuel-card-theme-"]::before {
    border-color: var(--fuel-card-decoration);
}

.fuel-card-preview-mini[class*="fuel-card-theme-"] .fuel-card-preview-brand {
    color: var(--fuel-card-text);
    background: transparent;
    border-color: transparent;
}

.fuel-card-preview-mini[class*="fuel-card-theme-"] .fuel-card-preview-vehicle {
    color: var(--fuel-card-text);
    background: var(--fuel-card-surface);
    border-color: var(--fuel-card-border);
}

.fuel-card-preview-mini[class*="fuel-card-theme-"] .fuel-card-preview-contactless span {
    border-color: var(--fuel-card-text);
}

.fuel-card-theme-bp .fuel-card-preview-pattern,
.fuel-card-theme-shell .fuel-card-preview-pattern,
.fuel-card-theme-esso .fuel-card-preview-pattern {
    opacity: 0.42;
}



/* Source: css/pages/leasing.css */
.leasing-page,
.leasing-form-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.leasing-panel,
.leasing-side-card,
.leasing-stat-card,
.leasing-toolbar,
.leasing-form-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.leasing-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.leasing-stat-card {
    min-height: 94px;
    padding: 18px 18px 16px 92px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.leasing-stat-card::after {
    content: "";
    position: absolute;
    left: 92px;
    right: 18px;
    bottom: 14px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.13;
}

.leasing-stat-card i {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 22px;
}

.leasing-stat-card.is-warning i {
    background: #fff2d2;
    color: #d88300;
}

.leasing-stat-card.is-green i {
    background: #dcf8eb;
    color: #15935a;
}

.leasing-stat-card.is-purple i {
    background: #f1eaff;
    color: #6a49c8;
}

.leasing-stat-card span,
.leasing-stat-card strong {
    display: block;
}

.leasing-stat-card span {
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.leasing-stat-card strong {
    margin-top: 8px;
    color: #22314d;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.leasing-toolbar {
    padding: 12px;
    border-radius: 18px;
}

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

.leasing-filter-form select,
.leasing-filter-form input {
    min-height: 44px;
}

.leasing-filter-form select {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #52637d 50%),
        linear-gradient(135deg, #52637d 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 50%,
        calc(100% - 11px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #22314d;
    padding: 0 36px 0 13px;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 6px 16px rgba(39, 63, 96, 0.04);
}

.leasing-filter-form select:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
}

.leasing-search-box {
    flex: 1 1 300px;
    min-width: 0;
}

.leasing-filter-tabs {
    flex: 0 1 auto;
    min-height: 44px;
    padding: 4px;
    border-radius: 14px;
    background: #f5f8fc;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.leasing-filter-form select {
    flex: 0 1 180px;
    min-width: 168px;
}

.leasing-filter-form select[name="sort"] {
    flex-basis: 198px;
}

.leasing-filter-form .btn-secondary {
    flex: 0 0 auto;
}

.leasing-filter-tabs a {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #52637d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.leasing-filter-tabs a:hover,
.leasing-filter-tabs a.active {
    background: #ffffff;
    color: #2467df;
    box-shadow: 0 6px 16px rgba(36, 103, 223, 0.11);
}

.leasing-filter-tabs a.active.warning {
    color: #bc7100;
}

.leasing-filter-tabs a.active.danger {
    color: #d33a32;
}

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

.leasing-panel {
    border-radius: 20px;
    padding: 16px;
    min-width: 0;
}

.leasing-panel-head {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.leasing-panel-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.leasing-panel-head p {
    margin: 5px 0 0;
    color: #74839a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.leasing-list-tools {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #6c7c96;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.leasing-list-tools i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f3f7fc;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.leasing-table-wrap {
    overflow-x: auto;
}

.leasing-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
}

.leasing-table th {
    padding: 11px 10px;
    border-bottom: 1px solid #e7edf6;
    color: #71819a;
    font-size: 11px;
    font-weight: 900;
    text-align: left;
}

.leasing-table th a {
    color: inherit;
    text-decoration: none;
}

.leasing-table th a:hover {
    color: #2364d8;
}

.leasing-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #edf2f8;
    color: #2b3a55;
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
}

.leasing-table tbody tr:hover {
    background: #f8fbff;
}

.leasing-subject,
.leasing-financier,
.leasing-upcoming-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.leasing-subject strong,
.leasing-subject small,
.leasing-upcoming-top strong,
.leasing-upcoming-top small {
    display: block;
}

.leasing-subject strong,
.leasing-upcoming-top strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.2;
}

.leasing-subject small,
.leasing-upcoming-top small {
    margin-top: 2px;
    color: #64758f;
    font-size: 12px;
}

.leasing-subject-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    background: #eef4ff;
    color: #2f66d8;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.leasing-subject-logo.small {
    width: 38px;
    height: 38px;
    border-radius: 13px;
}

.leasing-subject-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.leasing-financier span {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f2f6fb;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 11px;
    font-weight: 900;
    flex: 0 0 auto;
}

.leasing-financier img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.leasing-financier strong {
    color: #263653;
    font-size: 13px;
    line-height: 1.25;
}

.leasing-date-danger {
    color: #d53932;
}

.leasing-date-warning {
    color: #c77400;
}

.leasing-date-ok {
    color: #138a55;
}

.leasing-days-pill,
.leasing-status {
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 900;
    white-space: nowrap;
}

.leasing-days-pill.danger,
.leasing-status.pending_buyout {
    background: #ffe9e7;
    color: #d53932;
}

.leasing-days-pill.warning,
.leasing-status.ending {
    background: #fff2d2;
    color: #bd7100;
}

.leasing-days-pill.ok,
.leasing-status.active,
.leasing-status.finished {
    background: #ddf7ea;
    color: #138a55;
}

.leasing-days-pill.neutral {
    background: #eef3f8;
    color: #5f718d;
}

.leasing-status.draft {
    background: #eef3f8;
    color: #5f718d;
}

.leasing-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #46607e;
    text-decoration: none;
    font-weight: 900;
}

.leasing-doc-link i {
    color: #2f66d8;
}

.leasing-muted {
    color: #95a2b6;
}

.leasing-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.leasing-inline-action {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #dbe5f2;
    border-radius: 10px;
    background: #ffffff;
    color: #33445f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.leasing-row-actions form {
    margin: 0;
}

.leasing-inline-action:hover {
    background: #eef4ff;
    border-color: #b8cdf9;
    color: #2364d8;
    transform: translateY(-1px);
}

.leasing-inline-action.is-success {
    border-color: #bdebd5;
    background: #effbf5;
    color: #158a55;
}

.leasing-upcoming {
    position: static;
}

.leasing-upcoming-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 12px;
}

.leasing-upcoming-card {
    min-height: 126px;
    padding: 16px;
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbfdff 0%, #ffffff 58%, #f6f9ff 100%);
    display: grid;
    grid-template-columns: minmax(210px, 1.2fr) minmax(280px, 1.8fr) auto;
    align-items: center;
    gap: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.leasing-upcoming-card .leasing-subject-logo.small {
    width: 46px;
    height: 46px;
    border-radius: 15px;
}

.leasing-upcoming-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.leasing-upcoming-meta div {
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid #edf2f8;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.leasing-upcoming-meta span,
.leasing-upcoming-meta strong {
    display: block;
}

.leasing-upcoming-meta span {
    color: #77869d;
    font-size: 12px;
    font-weight: 800;
}

.leasing-upcoming-meta strong {
    margin-top: 4px;
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.leasing-upcoming-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.leasing-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 24px;
    align-items: start;
}

.leasing-form-card {
    border-radius: 20px;
    overflow: hidden;
}

.leasing-form-section {
    padding: 22px 24px;
    border-bottom: 1px solid #e7edf6;
}

.leasing-form-section-head {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leasing-form-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 auto;
}

.leasing-form-section-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.leasing-form-section-head p {
    margin: 5px 0 0;
    color: #73829b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.leasing-existing-file {
    width: fit-content;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    background: #f2f6fb;
    color: #31415d;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.leasing-existing-file i {
    color: #2f66d8;
}

.leasing-existing-file-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.leasing-remove-file {
    cursor: pointer;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
}

.leasing-remove-file span {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid #ffd0d0;
    background: #fff5f5;
    color: #c03636;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 900;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.leasing-remove-file:hover span,
.leasing-remove-file:focus-visible span {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.leasing-date-locked,
.flatpickr-input.leasing-date-locked {
    background: #f3f7fc !important;
    color: #62738d;
    cursor: not-allowed;
}

.leasing-form-actions {
    padding: 18px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.leasing-tips {
    position: static;
}

.leasing-subject-grid {
    grid-template-columns: 1fr;
}

.leasing-full-field,
.leasing-contract-form-page .leasing-full-field {
    grid-column: 1 / -1;
}

.leasing-contract-form-page .form-group {
    min-width: 0;
}

.leasing-contract-form-page .form-group label {
    color: #233653;
    font-size: 12px;
    font-weight: 900;
}

.leasing-contract-form-page .leasing-inline-helper,
.leasing-contract-form-page .leasing-inline-note {
    color: #66758d;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.leasing-contract-form-page .leasing-inline-note {
    color: #d06b00;
}

.leasing-contract-form-page .leasing-inline-helper a {
    color: #1769e8;
    text-decoration: none;
}

.leasing-contract-form-page .leasing-inline-helper a:hover {
    text-decoration: underline;
}

.leasing-contract-form-page .leasing-money-control span {
    order: 2;
    min-width: 38px;
    border-right: 0;
    border-left: 1px solid #dbe4ef;
}

.leasing-contract-form-page .leasing-money-control input {
    min-width: 0;
}

.leasing-documents-section {
    padding-bottom: 18px;
}

.leasing-upload-zone {
    margin-top: 12px;
    min-height: 146px;
}

.leasing-subject-upload {
    min-height: 174px;
}

.leasing-document-upload {
    min-height: 112px;
}

.leasing-upload-zone strong {
    max-width: 230px;
}

.leasing-info-box {
    min-height: 62px;
    padding: 14px;
    border-radius: 7px;
    background: #f7faff;
    color: #63748d;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 750;
}

.leasing-info-box i {
    color: #2f66d8;
    font-size: 16px;
}

.leasing-notes-section .subscription-notes-box textarea {
    min-height: 92px !important;
}

.leasing-preview-list .subscription-preview-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
}

.leasing-preview-list .subscription-preview-row strong {
    max-width: 132px;
}

.leasing-preview-status {
    min-width: 52px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 9px;
    background: #edf2f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-group.is-hidden,
.is-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .leasing-filter-form {
        align-items: stretch;
    }

    .leasing-filter-tabs {
        flex: 1 1 100%;
        overflow-x: auto;
    }

    .leasing-main-grid,
    .leasing-form-layout {
        grid-template-columns: 1fr;
    }

    .leasing-upcoming {
        position: static;
    }

    .leasing-upcoming-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .leasing-upcoming-foot {
        justify-content: flex-start;
    }
}

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

    .leasing-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .leasing-filter-form select,
    .leasing-filter-form .btn-secondary,
    .leasing-search-box {
        width: 100%;
        flex: 1 1 auto;
    }

    .leasing-upcoming-list,
    .leasing-upcoming-meta {
        grid-template-columns: 1fr;
    }

}

.leasing-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.leasing-main-column,
.leasing-side-column {
    min-width: 0;
}

.leasing-main-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leasing-side-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.leasing-list-panel {
    overflow: hidden;
}

.leasing-table {
    width: 100%;
    min-width: 0;
    border-collapse: initial;
    display: grid;
    overflow-x: auto;
}

.leasing-table-head,
.leasing-row {
    min-width: 1160px;
    display: grid;
    grid-template-columns:
        minmax(210px, 1.1fr)
        minmax(158px, 0.72fr)
        minmax(138px, 0.58fr)
        minmax(142px, 0.58fr)
        minmax(130px, 0.56fr)
        minmax(126px, 0.52fr)
        minmax(176px, 0.72fr)
        minmax(142px, 0.58fr);
    gap: 10px;
    align-items: center;
}

.leasing-table-head {
    padding: 0 12px 10px;
    border-bottom: 1px solid #e7edf6;
    color: #71819a;
    font-size: 11px;
    font-weight: 900;
}

.leasing-table-head a,
.leasing-table-head span {
    color: inherit;
    text-decoration: none;
}

.leasing-table-head a:hover {
    color: #2364d8;
}

.leasing-row {
    min-height: 84px;
    padding: 12px;
    border-bottom: 1px solid #edf2f8;
    color: #2b3a55;
    font-size: 13px;
    font-weight: 750;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.leasing-row:hover {
    background: #f8fbff;
    box-shadow: inset 4px 0 0 #2f66d8;
}

.leasing-subject-cell,
.leasing-financier-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leasing-subject-cell > span:last-child,
.leasing-financier-cell > strong {
    min-width: 0;
}

.leasing-subject-cell strong,
.leasing-subject-cell small,
.leasing-financier-cell strong,
.leasing-number-cell strong,
.leasing-number-cell small,
.leasing-money-cell strong,
.leasing-money-cell small,
.leasing-date-cell strong,
.leasing-date-cell small,
.leasing-side-item strong,
.leasing-side-item small,
.leasing-activity-item strong,
.leasing-activity-item small {
    display: block;
}

.leasing-subject-cell strong,
.leasing-financier-cell strong,
.leasing-number-cell strong,
.leasing-money-cell strong,
.leasing-date-cell strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.leasing-subject-cell small,
.leasing-number-cell small,
.leasing-money-cell small,
.leasing-date-cell small {
    margin-top: 3px;
    color: #64758f;
    font-size: 12px;
    line-height: 1.25;
}

.leasing-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    overflow: hidden;
    background: #eef4ff;
    color: #2f66d8;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(47, 102, 216, 0.08);
}

.leasing-logo.small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 17px;
}

.leasing-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leasing-logo.palette-0 {
    background: linear-gradient(135deg, #eaf2ff, #2f6fed);
    color: #ffffff;
}

.leasing-logo.palette-1 {
    background: linear-gradient(135deg, #dcfce7, #20b77a);
    color: #ffffff;
}

.leasing-logo.palette-2 {
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    color: #ffffff;
}

.leasing-logo.palette-3 {
    background: linear-gradient(135deg, #ede9fe, #8b5cf6);
    color: #ffffff;
}

.leasing-logo.palette-4 {
    background: linear-gradient(135deg, #e0f2fe, #06a3b8);
    color: #ffffff;
}

.leasing-logo.palette-5 {
    background: linear-gradient(135deg, #fee2e2, #ef4444);
    color: #ffffff;
}

.leasing-financier-logo {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: #f2f6fb;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 11px;
    font-weight: 900;
    flex: 0 0 auto;
}

.leasing-financier-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.leasing-number-cell,
.leasing-money-cell,
.leasing-date-cell {
    min-width: 0;
}

.leasing-money-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    cursor: pointer;
}

.leasing-money-toggle strong {
    color: #22314d;
}

.leasing-money-toggle small {
    width: fit-content;
    border-radius: 8px;
    color: #64758f;
    transition: background 0.18s ease, color 0.18s ease;
}

.leasing-money-toggle:hover small {
    background: #eef4ff;
    color: #2467df;
}

.leasing-date-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.leasing-locked-vehicle {
    min-height: 78px;
    padding: 12px;
    border: 1px solid #dce6f3;
    border-radius: 16px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leasing-locked-vehicle-image {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    overflow: hidden;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 22px;
}

.leasing-locked-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leasing-locked-vehicle strong,
.leasing-locked-vehicle small {
    display: block;
}

.leasing-locked-vehicle strong {
    color: #22314d;
    font-size: 15px;
    font-weight: 900;
}

.leasing-locked-vehicle small {
    margin-top: 3px;
    color: #64758f;
    font-size: 13px;
    font-weight: 750;
}

.leasing-documents-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.leasing-doc-action {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #dbe6f4;
    border-radius: 12px;
    background: #ffffff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.06);
}

.leasing-doc-action i {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #eef4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.leasing-doc-action.is-schedule {
    color: #7c3aed;
}

.leasing-doc-action.is-schedule i {
    background: #f1eaff;
}

.leasing-doc-action:hover {
    border-color: #9bbcff;
    color: #0f5fe8;
}

.leasing-doc-empty {
    min-height: 28px;
    padding: 0 9px;
    border: 1px dashed #dce6f3;
    border-radius: 10px;
    color: #93a1b4;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 850;
}

.leasing-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.leasing-actions form {
    margin: 0;
}

.leasing-icon-action {
    width: 34px;
    height: 34px;
    border: 1px solid #dbe5f2;
    border-radius: 11px;
    background: #ffffff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(39, 63, 96, 0.04);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.leasing-icon-action:hover {
    background: #eef4ff;
    border-color: #b8cdf9;
    color: #0f5fe8;
    transform: translateY(-1px);
}

.leasing-icon-action.is-success {
    border-color: #bdebd5;
    background: #effbf5;
    color: #158a55;
}

.leasing-side-card {
    border-radius: 20px;
    padding: 18px;
    min-width: 0;
}

.leasing-side-head {
    padding-bottom: 13px;
    border-bottom: 1px solid #e8eef7;
    margin-bottom: 14px;
}

.leasing-side-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 17px;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leasing-side-head i {
    color: #2f66d8;
}

.leasing-side-list {
    display: grid;
    gap: 12px;
}

.leasing-side-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.leasing-side-item strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.leasing-side-item small {
    margin-top: 3px;
    color: #667790;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
}

.leasing-side-date {
    text-align: right;
}

.leasing-side-date strong {
    margin-bottom: 3px;
    background: transparent;
    padding: 0;
    min-width: 0;
    min-height: 0;
    display: block;
    font-size: 13px;
}

.leasing-structure-chart {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.leasing-donut {
    position: relative;
    width: 144px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.leasing-donut svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.leasing-donut-bg,
.leasing-donut-segment {
    fill: none;
    stroke-width: 14;
}

.leasing-donut-bg {
    stroke: #edf2f8;
}

.leasing-donut-segment {
    stroke-linecap: butt;
}

.leasing-donut-center {
    position: relative;
    z-index: 1;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 22px rgba(39, 63, 96, 0.08);
}

.leasing-donut-center strong {
    color: #22314d;
    font-size: 24px;
    line-height: 1;
}

.leasing-donut-center span {
    margin-top: 5px;
    color: #74839a;
    font-size: 11px;
    font-weight: 800;
}

.leasing-structure-legend {
    display: grid;
    gap: 10px;
}

.leasing-structure-legend div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #52637d;
    font-size: 13px;
    font-weight: 800;
}

.leasing-structure-legend span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.leasing-structure-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.leasing-structure-legend .subject-vehicle i,
.leasing-donut-segment.subject-vehicle {
    background: #2f6fed;
    stroke: #2f6fed;
}

.leasing-structure-legend .subject-machine i,
.leasing-donut-segment.subject-machine {
    background: #22c55e;
    stroke: #22c55e;
}

.leasing-structure-legend .subject-item i,
.leasing-donut-segment.subject-item {
    background: #8b5cf6;
    stroke: #8b5cf6;
}

.leasing-structure-legend .subject-other i,
.leasing-donut-segment.subject-other {
    background: #64748b;
    stroke: #64748b;
}

.leasing-structure-legend strong {
    color: #22314d;
    font-size: 13px;
    white-space: nowrap;
}

.leasing-side-link {
    min-height: 40px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e8eef7;
    color: #2467df;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.leasing-side-link:hover {
    color: #0f5fe8;
}

.leasing-activity-panel {
    padding-bottom: 14px;
}

.leasing-activity-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.leasing-activity-item {
    min-width: 0;
    min-height: 76px;
    padding: 12px;
    border: 1px solid #e6eef8;
    border-radius: 15px;
    background: #fbfdff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leasing-activity-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.leasing-activity-mark.palette-0 {
    background: #eaf2ff;
    color: #2f6fed;
}

.leasing-activity-mark.palette-1 {
    background: #e8f9f0;
    color: #18a85f;
}

.leasing-activity-mark.palette-2 {
    background: #fef3c7;
    color: #d97706;
}

.leasing-activity-mark.palette-3 {
    background: #f0ebff;
    color: #6d28d9;
}

.leasing-activity-mark.palette-4 {
    background: #e0f2fe;
    color: #0284c7;
}

.leasing-activity-mark.palette-5 {
    background: #fee2e2;
    color: #dc2626;
}

.leasing-activity-item strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.leasing-activity-item small {
    margin-top: 4px;
    color: #6f7f98;
    font-size: 12px;
    font-weight: 750;
}

.leasing-muted-empty {
    min-height: 96px;
    border: 1px dashed #dbe6f4;
    border-radius: 16px;
    background: #fbfdff;
    color: #6f7f98;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.leasing-schedule-preview {
    overflow-x: auto;
    border: 1px solid #e1e9f5;
    border-radius: 14px;
}

.leasing-schedule-preview table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}

.leasing-schedule-preview th,
.leasing-schedule-preview td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf2f8;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

.leasing-schedule-preview th {
    background: #f6f9fd;
    color: #53637a;
    font-weight: 900;
    white-space: nowrap;
}

.leasing-schedule-preview tr.is-invalid td {
    background: #fff7f7;
}

.leasing-schedule-preview td small {
    display: block;
    max-width: 280px;
    margin-top: 5px;
    color: #b42318;
}

@media (max-width: 1599px) {
    .leasing-workspace {
        grid-template-columns: 1fr;
    }

    .leasing-side-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leasing-activity-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@media (max-width: 760px) {
    .leasing-side-column,
    .leasing-activity-strip {
        grid-template-columns: 1fr;
    }

    .leasing-structure-chart {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .leasing-structure-legend {
        width: 100%;
    }
}



/* Source: css/pages/subscriptions.css */
.subscriptions-page,
.subscriptions-form-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.subscriptions-toolbar,
.subscriptions-panel,
.subscriptions-side-card,
.subscriptions-stat-card,
.subscriptions-form-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.subscriptions-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.subscriptions-stat-card {
    min-height: 94px;
    padding: 18px 18px 16px 92px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.subscriptions-stat-card::after {
    content: "";
    position: absolute;
    left: 92px;
    right: 18px;
    bottom: 14px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.13;
}

.subscriptions-stat-card i {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 22px;
}

.subscriptions-stat-card.is-warning i {
    background: #fff2d2;
    color: #d88300;
}

.subscriptions-stat-card.is-green i {
    background: #dcf8eb;
    color: #15935a;
}

.subscriptions-stat-card.is-purple i {
    background: #f1eaff;
    color: #6a49c8;
}

.subscriptions-stat-card span,
.subscriptions-stat-card strong,
.subscriptions-stat-card small {
    display: block;
}

.subscriptions-stat-card span {
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.subscriptions-stat-card strong {
    margin-top: 8px;
    color: #22314d;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.subscriptions-stat-card small {
    margin-top: 10px;
    color: #6b7c94;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 800;
}

.subscriptions-toolbar {
    padding: 12px;
    border-radius: 18px;
}

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

.subscriptions-search-box {
    flex: 1 1 340px;
    min-width: 0;
}

.subscriptions-filter-tabs {
    flex: 0 1 auto;
    min-height: 44px;
    padding: 4px;
    border-radius: 14px;
    background: #f5f8fc;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.subscriptions-filter-tabs a {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #52637d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.subscriptions-filter-tabs a:hover,
.subscriptions-filter-tabs a.active {
    background: #ffffff;
    color: #2467df;
    box-shadow: 0 6px 16px rgba(36, 103, 223, 0.11);
}

.subscriptions-filter-form select {
    appearance: none;
    -webkit-appearance: none;
    height: 44px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #52637d 50%),
        linear-gradient(135deg, #52637d 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 50%,
        calc(100% - 11px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #22314d;
    padding: 0 36px 0 13px;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 6px 16px rgba(39, 63, 96, 0.04);
}

.subscriptions-filter-form select {
    flex: 0 1 176px;
    min-width: 160px;
}

.subscriptions-filter-form select:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
}

.subscriptions-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.subscriptions-main-column,
.subscriptions-side-column {
    min-width: 0;
}

.subscriptions-main-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subscriptions-side-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.subscriptions-panel {
    border-radius: 20px;
    padding: 16px;
    min-width: 0;
}

.subscriptions-panel-head {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.subscriptions-panel-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.subscriptions-panel-head p {
    margin: 5px 0 0;
    color: #74839a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.subscriptions-table {
    display: grid;
    gap: 0;
    overflow-x: auto;
}

.subscriptions-table-head,
.subscriptions-row {
    min-width: 1060px;
    display: grid;
    grid-template-columns:
        minmax(210px, 1.08fr)
        minmax(220px, 1.05fr)
        minmax(155px, 0.78fr)
        minmax(108px, 0.48fr)
        minmax(118px, 0.52fr)
        minmax(102px, 0.44fr)
        minmax(158px, 0.58fr);
    gap: 10px;
    align-items: center;
}

.policies-table .subscriptions-table-head,
.policies-table .subscriptions-row {
    min-width: 1380px;
    grid-template-columns:
        minmax(190px, 1fr)
        minmax(150px, 0.68fr)
        minmax(128px, 0.58fr)
        minmax(110px, 0.48fr)
        minmax(108px, 0.46fr)
        minmax(126px, 0.54fr)
        minmax(145px, 0.64fr)
        minmax(126px, 0.48fr)
        minmax(176px, 0.62fr);
}

.policies-document-cell,
.policies-status-actions {
    min-width: 0;
    align-items: center;
    align-self: center;
    justify-content: center;
}

.policies-document-cell .subscriptions-doc-action {
    min-width: 86px;
    justify-content: center;
}

.policies-status-actions {
    flex-wrap: nowrap;
    gap: 9px;
}

.policies-status-actions .subscriptions-status-pill {
    flex: 0 0 auto;
}

.policies-status-actions .subscriptions-icon-action,
.policies-status-actions .btn-secondary {
    flex: 0 0 auto;
}

.policies-status-actions form {
    margin: 0;
    display: inline-flex;
    flex: 0 0 auto;
}

.policies-table .subscriptions-table-head span:nth-child(8),
.policies-table .subscriptions-table-head span:nth-child(9) {
    text-align: center;
}

.policies-insurer-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.policies-insurer-cell > span:last-child {
    min-width: 0;
    display: flex;
    align-items: center;
}

.policies-insurer-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(47, 102, 216, 0.08);
}

.policies-insurer-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
    background: #ffffff;
}

.policies-number-cell,
.policies-date-cell,
.policies-type-cell,
.policies-money-cell,
.policies-payment-cell {
    min-width: 0;
}

.policies-number-cell strong,
.policies-date-cell strong,
.policies-type-cell strong,
.policies-money-cell strong,
.policies-payment-cell strong {
    color: #22314d;
    overflow-wrap: anywhere;
}

.policy-status.policy-status-pending {
    background: #eaf2ff;
    color: #2f66d8;
}

.policy-status.policy-status-draft,
.policy-status.policy-status-finished,
.policy-status.policy-status-replaced,
.policy-status.policy-status-archived,
.policy-status.policy-status-cancelled {
    background: #eef3f8;
    color: #5f718d;
}

#policies-page .subscriptions-doc-action {
    border-color: #f0d4d1;
    background: #fff7f6;
    color: #c4413a;
}

#policies-page .subscriptions-doc-action i {
    background: #ffe8e5;
}

.subscriptions-muted-empty.inline {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #93a4bd;
    font-size: 12px;
    font-weight: 850;
}

.policies-empty-mark {
    color: #8ea0b9;
    font-size: 14px;
    font-weight: 900;
}

.policy-payment-list {
    display: grid;
    gap: 10px;
}

.policy-linked-subject-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: #f8fbff;
}

.policy-linked-subject-media {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: #eaf2ff;
    color: #2563eb;
}

.policy-linked-subject-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.policy-linked-subject-strip small,
.policy-linked-subject-strip em {
    display: block;
    color: #71819a;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.policy-linked-subject-strip strong {
    display: block;
    margin: 2px 0;
    color: #22314d;
    font-size: 16px;
}

.policy-payment-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.75fr) minmax(130px, 0.55fr) minmax(180px, 1fr) 38px;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #dbe6f4;
    border-radius: 14px;
    background: #f8fbff;
}

.policy-payment-row .form-group {
    margin: 0;
}

.policy-payment-remove {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    justify-content: center;
    padding: 0;
}

.policy-payment-add {
    width: fit-content;
    margin-top: 12px;
}

.subscriptions-table-head {
    padding: 0 12px 10px;
    border-bottom: 1px solid #e7edf6;
    color: #71819a;
    font-size: 11px;
    font-weight: 900;
}

.subscriptions-row {
    min-height: 82px;
    padding: 12px;
    border-bottom: 1px solid #edf2f8;
    color: #2b3a55;
    font-size: 13px;
    font-weight: 750;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.subscriptions-row:hover {
    background: #f8fbff;
    box-shadow: inset 4px 0 0 #2f66d8;
}

.subscriptions-provider-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.subscriptions-provider-cell strong,
.subscriptions-provider-cell small,
.subscriptions-row strong,
.subscriptions-row small {
    display: block;
}

.subscriptions-provider-cell strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.2;
}

.subscriptions-provider-cell small,
.subscriptions-row small {
    margin-top: 3px;
    color: #64758f;
    font-size: 12px;
    line-height: 1.25;
}

.subscriptions-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    overflow: hidden;
    background: #eef4ff;
    color: #2f66d8;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(47, 102, 216, 0.08);
}

.subscriptions-logo.small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.subscriptions-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subscriptions-logo.palette-0 {
    background: linear-gradient(135deg, #ffe5d5, #ff5a1f);
    color: #ffffff;
}

.subscriptions-logo.palette-1 {
    background: linear-gradient(135deg, #dcfce7, #22c55e);
    color: #ffffff;
}

.subscriptions-logo.palette-2 {
    background: linear-gradient(135deg, #ede9fe, #6d28d9);
    color: #ffffff;
}

.subscriptions-logo.palette-3 {
    background: linear-gradient(135deg, #fce7f3, #db2777);
    color: #ffffff;
}

.subscriptions-logo.palette-4 {
    background: linear-gradient(135deg, #e0f2fe, #0284c7);
    color: #ffffff;
}

.subscriptions-logo.palette-5 {
    background: linear-gradient(135deg, #fef3c7, #d97706);
    color: #ffffff;
}

.subscriptions-services-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.subscriptions-services-cell span {
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid #dce6f3;
    border-radius: 999px;
    background: #f7faff;
    color: #465872;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 850;
}

.subscriptions-services-cell i {
    color: #2f66d8;
}

.subscriptions-person-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.subscriptions-person-cell > span:last-child {
    min-width: 0;
}

.subscriptions-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.subscriptions-person-cell strong,
.subscriptions-date-cell strong {
    overflow-wrap: anywhere;
}

.subscriptions-status-pill,
.subscriptions-date-danger,
.subscriptions-date-warning,
.subscriptions-date-ok,
.subscriptions-date-neutral {
    min-height: 28px;
    min-width: 64px;
    padding: 0 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
}

.subscriptions-row small.subscriptions-date-danger,
.subscriptions-row small.subscriptions-date-warning,
.subscriptions-row small.subscriptions-date-ok,
.subscriptions-row small.subscriptions-date-neutral,
.subscriptions-upcoming-meta strong.subscriptions-date-danger,
.subscriptions-upcoming-meta strong.subscriptions-date-warning,
.subscriptions-upcoming-meta strong.subscriptions-date-ok,
.subscriptions-upcoming-meta strong.subscriptions-date-neutral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.subscriptions-status-pill {
    min-width: 86px;
}

.subscriptions-status-pill.danger,
.subscriptions-date-danger {
    background: #ffe8e6;
    color: #d33a32;
}

.subscriptions-status-pill.warning,
.subscriptions-date-warning {
    background: #fff1d8;
    color: #bc7100;
}

.subscriptions-status-pill.ok,
.subscriptions-date-ok {
    background: #ddf7ea;
    color: #13854f;
}

.subscriptions-status-pill.neutral,
.subscriptions-date-neutral {
    background: #eef3fa;
    color: #607089;
}

.subscriptions-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.subscriptions-doc-action {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #dbe6f4;
    border-radius: 12px;
    background: #ffffff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.06);
}

.subscriptions-doc-action i {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #eef4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.subscriptions-doc-action:hover {
    border-color: #9bbcff;
    color: #0f5fe8;
}

.subscriptions-icon-action {
    width: 38px;
    height: 38px;
    border: 1px solid #dbe6f4;
    border-radius: 12px;
    background: #ffffff;
    color: #41536e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.06);
}

.subscriptions-icon-action:hover {
    border-color: #9bbcff;
    color: #0f5fe8;
    transform: translateY(-1px);
}

.subscriptions-actions .btn-sm {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 11px;
}

.subscriptions-upcoming-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.subscriptions-upcoming-card {
    min-height: 108px;
    padding: 16px;
    border: 1px solid #dce6f3;
    border-radius: 16px;
    background: #fafdff;
    display: grid;
    grid-template-columns: minmax(210px, 0.9fr) minmax(420px, 1.45fr) minmax(110px, auto);
    gap: 14px;
    align-items: center;
}

.subscriptions-upcoming-meta {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(96px, 0.75fr) minmax(96px, 0.75fr) minmax(110px, 0.8fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.subscriptions-upcoming-meta > div {
    min-width: 0;
}

.subscriptions-upcoming-meta span {
    display: block;
    color: #71819a;
    font-size: 11px;
    font-weight: 900;
}

.subscriptions-upcoming-meta strong {
    display: block;
    margin-top: 4px;
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.subscriptions-upcoming-meta strong.subscriptions-date-danger,
.subscriptions-upcoming-meta strong.subscriptions-date-warning,
.subscriptions-upcoming-meta strong.subscriptions-date-ok,
.subscriptions-upcoming-meta strong.subscriptions-date-neutral {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.subscriptions-upcoming-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.subscriptions-inline-action {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 11px;
    border: 1px solid #d9e4f3;
    background: #ffffff;
    color: #22314d;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 850;
}

.subscriptions-inline-action:hover {
    border-color: #9bbcff;
    color: #2467df;
}

.subscriptions-side-card {
    border-radius: 20px;
    padding: 18px;
    min-width: 0;
}

.subscriptions-side-head {
    padding-bottom: 13px;
    border-bottom: 1px solid #e8eef7;
    margin-bottom: 14px;
}

.subscriptions-side-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 17px;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscriptions-side-head i {
    color: #2f66d8;
}

.subscriptions-side-list {
    display: grid;
    gap: 12px;
}

.subscriptions-side-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.subscriptions-side-item strong,
.subscriptions-side-item small,
.subscriptions-activity-item strong,
.subscriptions-activity-item small {
    display: block;
}

.subscriptions-side-item strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.25;
}

.subscriptions-side-item small {
    margin-top: 3px;
    color: #667790;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
}

.subscriptions-side-date {
    text-align: right;
}

.subscriptions-side-date strong {
    margin-bottom: 3px;
    background: transparent;
    padding: 0;
    min-width: 0;
    min-height: 0;
    display: block;
    font-size: 13px;
}

.subscriptions-cost-chart {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.policies-structure-card .subscriptions-cost-chart {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.policies-structure-card .subscriptions-cost-legend {
    gap: 9px;
}

.policies-structure-card .subscriptions-cost-legend div {
    justify-content: flex-start;
    gap: 10px;
    font-size: 12.5px;
}

.policies-structure-card .subscriptions-cost-legend span {
    min-width: 94px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.policies-structure-card .subscriptions-cost-legend strong {
    font-size: 12.5px;
    white-space: nowrap;
}

.policies-structure-card .subscriptions-cost-legend i {
    width: 10px;
    height: 10px;
}

.subscriptions-donut.policies-donut {
    width: 128px;
    background: transparent;
    box-shadow: none;
}

.subscriptions-donut.policies-donut::after {
    display: none;
}

.subscriptions-donut.policies-donut .subscriptions-donut-bg,
.subscriptions-donut.policies-donut .subscriptions-donut-segment {
    stroke-width: 9;
}

.subscriptions-donut.policies-donut .subscriptions-donut-center {
    width: 82px;
    height: 82px;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.07);
}

.subscriptions-donut.policies-donut .subscriptions-donut-center strong {
    max-width: 72px;
    font-size: 13px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.subscriptions-donut.policies-donut .subscriptions-donut-center span {
    margin-top: 4px;
    font-size: 10px;
}

.subscriptions-donut {
    position: relative;
    width: 144px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.subscriptions-donut svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.subscriptions-donut-bg,
.subscriptions-donut-segment {
    fill: none;
    stroke-width: 14;
}

.subscriptions-donut-bg {
    stroke: #edf2f8;
}

.subscriptions-donut-segment {
    stroke-linecap: butt;
}

.subscriptions-donut-center {
    position: relative;
    z-index: 1;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 22px rgba(39, 63, 96, 0.08);
}

.subscriptions-donut-center strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.1;
}

.subscriptions-donut-center span {
    margin-top: 4px;
    color: #74839a;
    font-size: 11px;
    font-weight: 800;
}

.subscriptions-cost-legend {
    display: grid;
    gap: 10px;
}

.subscriptions-cost-legend div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #52637d;
    font-size: 13px;
    font-weight: 800;
}

.subscriptions-cost-legend span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.subscriptions-cost-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.subscriptions-cost-legend .service-mobile i,
.subscriptions-donut-segment.service-mobile {
    background: #2f6fed;
    stroke: #2f6fed;
}

.subscriptions-cost-legend .service-internet i,
.subscriptions-donut-segment.service-internet {
    background: #20b77a;
    stroke: #20b77a;
}

.subscriptions-cost-legend .service-landline i,
.subscriptions-donut-segment.service-landline {
    background: #8b5cf6;
    stroke: #8b5cf6;
}

.subscriptions-cost-legend .service-data i,
.subscriptions-donut-segment.service-data {
    background: #f59e0b;
    stroke: #f59e0b;
}

.subscriptions-cost-legend .service-device i,
.subscriptions-donut-segment.service-device {
    background: #06a3b8;
    stroke: #06a3b8;
}

.subscriptions-cost-legend .service-hosting i,
.subscriptions-donut-segment.service-hosting {
    background: #0f766e;
    stroke: #0f766e;
}

.subscriptions-cost-legend .service-domain i,
.subscriptions-donut-segment.service-domain {
    background: #2563eb;
    stroke: #2563eb;
}

.subscriptions-cost-legend .service-software i,
.subscriptions-donut-segment.service-software {
    background: #9333ea;
    stroke: #9333ea;
}

.subscriptions-cost-legend .service-other i,
.subscriptions-donut-segment.service-other {
    background: #64748b;
    stroke: #64748b;
}

.subscriptions-cost-legend .policies-legend-vehicle {
    background: #2f6fed;
}

.subscriptions-cost-legend .policies-legend-machine {
    background: #20b77a;
}

.subscriptions-cost-legend .policies-legend-property {
    background: #f59e0b;
}

.subscriptions-cost-legend .policies-legend-life {
    background: #8b5cf6;
}

.subscriptions-cost-legend .policies-legend-equipment {
    background: #06a3b8;
}

.subscriptions-cost-legend .policies-legend-other,
.subscriptions-cost-legend .policies-legend-external_vehicle,
.subscriptions-cost-legend .policies-legend-external_machine {
    background: #64748b;
}

.subscriptions-cost-legend strong {
    color: #22314d;
    font-size: 13px;
}

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

.policies-missing-tile {
    min-height: 78px;
    padding: 14px;
    border: 1px solid #ffdca8;
    border-radius: 14px;
    background: #fff8eb;
    color: #b96b00;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.policies-missing-tile.danger {
    border-color: #ffd0d0;
    background: #fff1f1;
    color: #d33a32;
}

.policies-missing-tile strong {
    font-size: 22px;
    line-height: 1;
    font-weight: 950;
}

.policies-missing-tile span {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 900;
}

.policies-side-bottom-link {
    margin-top: 14px;
    justify-content: center;
}

.subscriptions-side-link,
.policies-side-bottom-link {
    min-height: 34px;
    color: #0f5fe8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.subscriptions-side-link:hover,
.policies-side-bottom-link:hover {
    color: #084fc6;
}

.policies-days-label {
    display: inline-flex;
    width: fit-content;
    min-height: 26px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 900;
}

.policies-date-ok,
.policies-days-ok {
    color: #129250;
}

.policies-date-warning,
.policies-days-warning {
    color: #c27300;
}

.policies-date-danger,
.policies-days-danger {
    color: #e3342f;
}

.policies-date-neutral,
.policies-days-neutral {
    color: #7a8aa1;
}

.policies-days-ok {
    background: #ddf7ea;
}

.policies-days-warning {
    background: #fff2d2;
}

.policies-days-danger {
    background: #ffe9e7;
}

.policies-days-neutral {
    background: #eef3f8;
}

.policies-warning-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #fff3dc;
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
}

.policy-document-add-link {
    width: fit-content;
    margin-top: 4px;
}

.policy-document-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    padding: 24px;
    background: rgba(21, 32, 52, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: policyDocumentBackdropIn 180ms ease-out both;
}

.policy-document-modal[hidden] {
    display: none;
}

.policy-document-modal-card {
    position: relative;
    width: min(560px, 100%);
    padding: 24px;
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(30, 45, 70, 0.22);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    transform-origin: center;
    animation: policyDocumentCardIn 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.policy-document-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.policy-document-modal-card h2 {
    margin: 0;
    color: #22314d;
    font-size: 22px;
    line-height: 1.15;
}

.policy-document-modal-card p {
    margin: 8px 0 0;
    color: #607089;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.policy-document-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.policy-document-modal-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@keyframes policyDocumentBackdropIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes policyDocumentCardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.975);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.subscriptions-activity-panel {
    padding-bottom: 14px;
}

.subscriptions-activity-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.subscriptions-activity-item {
    min-width: 0;
    min-height: 76px;
    padding: 12px;
    border: 1px solid #e6eef8;
    border-radius: 15px;
    background: #fbfdff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscriptions-activity-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.subscriptions-activity-mark.palette-0 {
    background: #fff0e8;
    color: #f05a22;
}

.subscriptions-activity-mark.palette-1 {
    background: #e8f9f0;
    color: #18a85f;
}

.subscriptions-activity-mark.palette-2 {
    background: #f0ebff;
    color: #6d28d9;
}

.subscriptions-activity-mark.palette-3 {
    background: #fce7f3;
    color: #db2777;
}

.subscriptions-activity-mark.palette-4 {
    background: #e0f2fe;
    color: #0284c7;
}

.subscriptions-activity-mark.palette-5 {
    background: #fef3c7;
    color: #d97706;
}

.subscriptions-activity-item strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.subscriptions-activity-item small {
    margin-top: 4px;
    color: #6f7f98;
    font-size: 12px;
    font-weight: 750;
}

.subscriptions-muted-empty {
    min-height: 96px;
    border: 1px dashed #dbe6f4;
    border-radius: 16px;
    background: #fbfdff;
    color: #6f7f98;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

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

.subscriptions-form-card {
    border-radius: 20px;
    overflow: hidden;
}

.subscriptions-form-section {
    padding: 22px;
    border-bottom: 1px solid #edf2f8;
}

.subscriptions-form-section-head {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.subscriptions-form-section-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 20px;
}

.subscriptions-form-section h2 {
    margin: 0;
    color: #22314d;
    font-size: 20px;
    letter-spacing: 0;
}

.subscriptions-form-section p {
    margin: 5px 0 0;
    color: #71819a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.subscriptions-indefinite-toggle {
    margin-top: 8px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.subscriptions-indefinite-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.subscriptions-existing-file {
    min-height: 38px;
    margin-bottom: 8px;
    padding: 0 12px;
    border: 1px solid #dce6f3;
    border-radius: 12px;
    background: #f7faff;
    color: #2f66d8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 850;
}

.subscriptions-existing-file-row .subscriptions-existing-file {
    margin-bottom: 0;
}

.subscriptions-items {
    display: grid;
    gap: 12px;
}

.subscriptions-item-row {
    padding: 14px;
    border: 1px solid #dce6f3;
    border-radius: 16px;
    background: #fbfdff;
    box-shadow: 0 8px 22px rgba(42, 67, 101, 0.04);
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.subscriptions-item-row:not(.is-collapsed) {
    border-color: #c8daf5;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(47, 102, 216, 0.08);
}

.subscriptions-item-row.is-collapsed:hover {
    border-color: #a9c4ee;
    background: #f7faff;
    transform: translateY(-1px);
}

.subscriptions-item-row-head {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
    transition: margin-bottom 0.22s ease;
}

.subscriptions-item-row.is-collapsed .subscriptions-item-row-head {
    margin-bottom: 0;
}

.subscriptions-item-toggle {
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    text-align: left;
    cursor: pointer;
}

.subscriptions-item-toggle:focus-visible {
    outline: 3px solid rgba(47, 102, 216, 0.17);
    outline-offset: 4px;
    border-radius: 12px;
}

.subscriptions-item-head-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.subscriptions-item-row:not(.is-collapsed) .subscriptions-item-head-icon {
    background: linear-gradient(135deg, #3779eb, #195fda);
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(47, 102, 216, 0.2);
}

.subscriptions-item-head-copy {
    min-width: 0;
    display: block;
}

.subscriptions-item-head-copy strong,
.subscriptions-item-head-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subscriptions-item-head-copy strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.3;
}

.subscriptions-item-head-copy small {
    margin-top: 2px;
    color: #71819a;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.subscriptions-item-chevron {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.26s ease, background 0.22s ease;
}

.subscriptions-item-row.is-collapsed .subscriptions-item-chevron {
    transform: rotate(180deg);
    background: #f0f3f8;
    color: #64758f;
}

.subscriptions-item-body {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.28s ease, opacity 0.2s ease;
}

.subscriptions-item-body > .form-grid {
    min-height: 0;
    overflow: hidden;
}

.subscriptions-item-row.is-collapsed .subscriptions-item-body {
    grid-template-rows: 0fr;
    opacity: 0;
}

.subscriptions-item-remove {
    flex: 0 0 auto;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.subscriptions-item-remove:hover {
    background: #ffe9e7;
    color: #d23b34;
    transform: scale(1.04);
}

.subscriptions-item-remove[hidden] {
    display: none !important;
}

.subscriptions-add-item {
    margin-top: 12px;
}

.subscriptions-form-actions {
    padding: 18px 22px;
    background: #f8fbff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.subscriptions-tips {
    position: static;
    top: auto;
}

@media (max-width: 1599px) {
    .subscriptions-workspace {
        grid-template-columns: 1fr;
    }

    .subscriptions-side-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subscriptions-activity-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .subscriptions-upcoming-list {
        grid-template-columns: 1fr;
    }

    .subscriptions-upcoming-card {
        grid-template-columns: 1fr;
    }

    .subscriptions-upcoming-foot {
        align-items: flex-start;
    }

    .subscriptions-form-layout {
        grid-template-columns: 1fr;
    }
}

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

    .subscriptions-filter-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .subscriptions-filter-form select,
    .subscriptions-filter-form .btn-secondary {
        flex: 1 1 100%;
    }

    .subscriptions-side-column,
    .subscriptions-activity-strip {
        grid-template-columns: 1fr;
    }

    .subscriptions-cost-chart {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .subscriptions-cost-legend {
        width: 100%;
    }

    .subscriptions-upcoming-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subscriptions-form-section {
        padding: 18px 14px;
    }

    .subscriptions-item-row {
        padding: 12px;
    }

    .subscriptions-item-row-head {
        gap: 7px;
    }

    .subscriptions-item-toggle {
        grid-template-columns: 36px minmax(0, 1fr) 26px;
        gap: 7px;
    }

    .subscriptions-item-head-icon {
        width: 36px;
        height: 36px;
    }
}

.subscriptions-contract-form-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.subscription-form-workspace {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 920px) 306px;
    justify-content: center;
    gap: 22px;
    align-items: start;
}

.subscription-editor,
.subscription-side-card {
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(38, 60, 92, 0.06);
}

.subscription-editor {
    min-width: 0;
    overflow: hidden;
}

.subscription-editor-section {
    padding: 18px;
    border-bottom: 1px solid #e7edf5;
}

.subscription-section-heading {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.subscription-step-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2f7bf4 0%, #165ee7 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(25, 94, 231, 0.26);
}

.subscription-section-heading h2 {
    margin: 0;
    color: #192741;
    font-size: 18px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: 0;
}

.subscription-section-heading p {
    margin: 4px 0 0;
    color: #64748f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.subscriptions-contract-form-page .form-group {
    gap: 7px;
}

.subscriptions-contract-form-page .form-group label {
    color: #354761;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 850;
}

.subscription-contract-grid,
.subscription-item-grid,
.subscription-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 14px;
}

.subscription-contract-grid .subscription-money-field {
    max-width: 380px;
}

.subscriptions-contract-form-page .form-group input,
.subscriptions-contract-form-page .form-group select,
.subscriptions-contract-form-page .form-group textarea {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid #d6e0ec;
    border-radius: 7px;
    background: #ffffff;
    color: #253650;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(35, 51, 75, 0.02);
}

.subscriptions-contract-form-page .form-group input::placeholder,
.subscriptions-contract-form-page .form-group textarea::placeholder {
    color: #8190a8;
}

.subscriptions-contract-form-page .form-group input:focus,
.subscriptions-contract-form-page .form-group select:focus,
.subscriptions-contract-form-page .form-group textarea:focus {
    border-color: #93b8f6;
    box-shadow: 0 0 0 3px rgba(37, 104, 232, 0.12);
}

.subscription-date-control,
.subscription-money-control {
    min-height: 38px;
    border: 1px solid #d6e0ec;
    border-radius: 7px;
    background: #ffffff;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.subscription-date-control {
    position: relative;
}

.subscription-date-control:focus-within,
.subscription-money-control:focus-within {
    border-color: #93b8f6;
    box-shadow: 0 0 0 3px rgba(37, 104, 232, 0.12);
}

.subscription-date-control input,
.subscription-money-control input {
    min-height: 36px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.subscription-date-control input {
    padding-right: 38px !important;
}

.subscription-date-control i {
    position: absolute;
    right: 12px;
    top: 50%;
    color: #364965;
    font-size: 15px;
    pointer-events: none;
    transform: translateY(-50%);
}

.subscription-money-control span {
    align-self: stretch;
    min-width: 40px;
    border-right: 1px solid #dbe4ef;
    background: #f8fafd;
    color: #4f6078;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.subscriptions-indefinite-toggle {
    margin-top: 2px;
    min-height: 22px;
    color: #41536d;
    font-size: 12px;
    font-weight: 750;
}

.subscriptions-indefinite-toggle input {
    width: 14px;
    height: 14px;
}

.subscription-inline-note {
    color: #d06b00;
    font-size: 11px;
    font-weight: 750;
}

/* Wskazówka pod selectem partnera (Operator / Ubezpieczyciel) — wzorzec jak
   "Brakuje kierowcy?" w mandatach. Formularz polis też używa tych klas. */
.subscription-inline-helper {
    color: #64748f;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.subscription-inline-helper a {
    color: #1769e8;
    text-decoration: none;
}

.subscription-inline-helper a:hover {
    text-decoration: underline;
}

.subscriptions-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.subscriptions-contract-form-page .subscriptions-items {
    gap: 10px;
}

.subscriptions-contract-form-page .subscriptions-item-row {
    padding: 12px;
    border: 1px solid #d9e3f0;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: none;
}

.subscriptions-contract-form-page .subscriptions-item-row:not(.is-collapsed) {
    border-color: #d5e0ee;
    box-shadow: none;
}

.subscriptions-contract-form-page .subscriptions-item-row-head {
    margin-bottom: 12px;
    gap: 8px;
}

.subscriptions-contract-form-page .subscriptions-item-row.is-collapsed .subscriptions-item-row-head {
    margin-bottom: 0;
}

.subscriptions-contract-form-page .subscriptions-item-toggle {
    min-height: 28px;
    grid-template-columns: 30px minmax(0, 1fr) 22px;
    gap: 8px;
}

.subscriptions-contract-form-page .subscriptions-item-head-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: linear-gradient(145deg, #2f7bf4, #1664e8);
    color: #ffffff;
    font-size: 14px;
    box-shadow: 0 7px 14px rgba(25, 94, 231, 0.22);
}

.subscriptions-contract-form-page .subscriptions-item-head-copy {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscriptions-contract-form-page .subscriptions-item-head-copy strong {
    color: #1d2b45;
    font-size: 13px;
    font-weight: 900;
}

.subscriptions-contract-form-page .subscriptions-item-head-copy small {
    margin: 0;
    color: #52637d;
    font-size: 11px;
    font-weight: 750;
}

.subscriptions-contract-form-page .subscriptions-item-head-copy small::before {
    content: "·";
    margin-right: 8px;
    color: #8c99ad;
}

.subscriptions-contract-form-page .subscriptions-item-chevron {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: transparent;
    color: #64748f;
}

.subscriptions-contract-form-page .subscriptions-item-body {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.24s ease, opacity 0.18s ease;
}

.subscriptions-contract-form-page .subscriptions-item-body > .subscription-item-grid {
    min-height: 0;
    overflow: hidden;
}

.subscriptions-contract-form-page .subscriptions-item-row.is-collapsed .subscriptions-item-body {
    grid-template-rows: 0fr;
    opacity: 0;
}

.subscriptions-contract-form-page .subscriptions-item-remove {
    width: 28px;
    height: 28px;
    min-height: 28px;
    border-radius: 7px;
}

.subscription-add-service-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.subscription-add-service {
    min-height: 38px;
    padding: 0 20px;
    border: 1px dashed #2570ef;
    border-radius: 7px;
    background: #ffffff;
    color: #1665e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.subscription-add-service:hover {
    background: #f4f8ff;
    transform: translateY(-1px);
    box-shadow: 0 9px 18px rgba(37, 112, 239, 0.1);
}

.subscription-add-service-row p {
    margin: 0;
    color: #738199;
    font-size: 12px;
    font-weight: 700;
}

.subscription-docs-section {
    padding-bottom: 10px;
}

.subscription-document-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
}

.subscription-upload-zone {
    min-height: 84px;
    padding: 12px;
    border: 1px dashed #2a74ef;
    border-radius: 7px;
    background: #fbfdff;
    color: #1d2b45;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.subscription-upload-zone:hover,
.subscription-upload-zone.is-dragging {
    border-color: #105edf;
    background: #f3f8ff;
    box-shadow: 0 0 0 3px rgba(37, 104, 232, 0.09);
}

.subscription-upload-zone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.subscription-upload-zone i {
    color: #1769e8;
    font-size: 31px;
    line-height: 1;
}

.subscription-upload-zone strong,
.subscription-upload-zone span,
.subscription-upload-zone em {
    display: block;
    font-style: normal;
    line-height: 1.2;
}

.subscription-upload-zone strong {
    font-size: 12px;
    font-weight: 850;
}

.subscription-upload-zone span {
    color: #64748f;
    font-size: 11px;
    font-weight: 750;
}

.subscription-upload-zone em {
    min-width: 118px;
    min-height: 32px;
    margin-top: 2px;
    padding: 0 18px;
    border: 1px solid #d4dfed;
    border-radius: 7px;
    background: #ffffff;
    color: #1e2d48;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.subscription-upload-meta {
    margin-top: 6px;
    color: #78869b;
    font-size: 11px;
    font-weight: 750;
}

.subscriptions-contract-form-page .subscriptions-existing-file-row {
    margin-bottom: 8px;
}

.subscriptions-contract-form-page .subscriptions-existing-file {
    min-height: 34px;
    border-radius: 7px;
    font-size: 12px;
}

.subscription-notes-box {
    position: relative;
}

.subscription-notes-box textarea {
    min-height: 100px !important;
    resize: vertical;
}

.subscription-notes-box span {
    position: absolute;
    right: 12px;
    bottom: 9px;
    color: #8b98ac;
    font-size: 11px;
    font-weight: 750;
    pointer-events: none;
}

.subscription-form-actions {
    padding: 14px 18px;
    border-top: 1px solid #e7edf5;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.subscription-form-actions .btn-secondary,
.subscription-form-actions .btn-primary,
.subscription-form-actions .btn-danger-solid {
    min-height: 38px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 900;
}

.subscription-form-actions .btn-secondary {
    min-width: 80px;
}

.subscription-save-button {
    min-width: 150px;
    background: linear-gradient(180deg, #2d78f3 0%, #1764e8 100%);
    box-shadow: 0 10px 18px rgba(23, 100, 232, 0.2);
}

.subscription-form-sidebar {
    min-width: 0;
    position: sticky;
    top: 94px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.subscription-side-card {
    padding: 16px;
}

.subscription-side-card-head {
    min-height: 42px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6edf5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.subscription-side-card-head span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff4df;
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    font-size: 20px;
}

.subscription-side-card-head .subscription-eye-icon {
    background: #eaf2ff;
    color: #1769e8;
}

.subscription-side-card-head h3 {
    margin: 0;
    color: #17233d;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
}

.subscription-tip-row {
    min-height: 76px;
    padding: 16px 0;
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.subscription-tip-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.subscription-tip-row > i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef5ff;
    color: #1769e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.subscription-tip-row p {
    margin: 0;
    color: #344763;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 750;
}

.subscription-preview-card {
    padding-bottom: 18px;
}

.subscription-preview-list {
    display: flex;
    flex-direction: column;
}

.subscription-preview-row {
    min-height: 52px;
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.subscription-preview-row > i {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #eef5ff;
    color: #1769e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.subscription-preview-row span {
    min-width: 0;
    color: #40536e;
    font-size: 12px;
    font-weight: 800;
}

.subscription-preview-row strong {
    max-width: 130px;
    color: #1d2b45;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subscription-preview-card > p {
    margin: 16px 0 4px;
    color: #7c899c;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 750;
}

.policy-contract-form-page .subscription-inline-helper {
    color: #738199;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

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

.policy-contract-form-page .policy-single-grid {
    grid-template-columns: 1fr;
}

.policy-contract-form-page .policy-term-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 22px;
}

.policy-contract-form-page .policy-term-grid .subscription-money-field,
.policy-contract-form-page .policy-payment-row .subscription-money-field {
    max-width: none;
}

.policy-contract-form-page .policy-money-control input {
    min-width: 0;
}

.policy-contract-form-page .policy-money-control span {
    order: 2;
    min-width: 38px;
    border-right: 0;
    border-left: 1px solid #dbe4ef;
}

.policy-contract-form-page .policy-payment-list {
    gap: 10px;
}

.policy-contract-form-page .policy-payment-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.86fr) minmax(120px, 0.75fr) minmax(190px, 1fr) 38px;
    gap: 12px;
    align-items: end;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.policy-contract-form-page .policy-payment-row .form-group {
    min-width: 0;
    margin: 0;
}

.policy-contract-form-page .policy-payment-remove {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 7px;
    align-self: end;
    justify-content: center;
}

.policy-contract-form-page .policy-payment-add {
    width: fit-content;
    margin-top: 12px;
}

.policy-contract-form-page .policy-document-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.policy-contract-form-page .policy-upload-zone {
    min-height: 112px;
}

.policy-contract-form-page .policy-upload-zone strong {
    max-width: 260px;
}

.policy-contract-form-page .policy-parser-tip {
    margin-top: 12px;
}

.policy-contract-form-page .policy-document-add-link {
    min-height: 38px;
    margin-top: 0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 900;
}

.policy-preview-list .subscription-preview-row strong {
    max-width: 108px;
}

@media (max-width: 1180px) {
    .subscription-form-workspace {
        grid-template-columns: 1fr;
    }

    .subscription-form-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .subscription-contract-grid,
    .subscription-item-grid,
    .subscription-document-grid,
    .subscription-form-sidebar {
        grid-template-columns: 1fr;
    }

    .subscription-contract-grid .subscription-money-field {
        max-width: none;
    }

    .subscription-editor-section {
        padding: 16px 14px;
    }

    .subscription-section-heading {
        gap: 11px;
    }

    .subscriptions-contract-form-page .subscriptions-item-head-copy {
        display: block;
    }

    .subscriptions-contract-form-page .subscriptions-item-head-copy small::before {
        content: none;
        margin: 0;
    }

    .subscription-form-actions {
        justify-content: stretch;
    }

    .subscription-form-actions .btn-secondary,
    .subscription-form-actions .btn-primary,
    .subscription-form-actions .btn-danger-solid {
        flex: 1 1 100%;
    }

    .policy-contract-form-page .policy-term-grid,
    .policy-contract-form-page .policy-document-grid,
    .policy-contract-form-page .policy-payment-row {
        grid-template-columns: 1fr;
    }

    .policy-contract-form-page .policy-payment-remove {
        width: 100%;
    }
}



/* Source: css/pages/costs.css */
.costs-overview-page {
    display: grid;
    gap: 18px;
}

.costs-panel,
.costs-side-card,
.costs-stat-card,
.costs-module-card {
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(39, 63, 96, 0.08);
}

.costs-panel-head p,
.costs-stat-card small,
.costs-module-card em,
.costs-recent-row small,
.costs-attention-row small,
.costs-empty p {
    color: #6c7c96;
    font-weight: 750;
}

.costs-overview-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.costs-stat-card {
    min-height: 112px;
    padding: 20px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
}

.costs-stat-card i {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #eaf2ff;
    color: #2f6fed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    grid-row: span 3;
}

.costs-stat-card.is-blue i { background: #eaf2ff; color: #2f6fed; }
.costs-stat-card.is-orange i { background: #fff1d7; color: #f59e0b; }
.costs-stat-card.is-green i { background: #dcf8ec; color: #14a86b; }
.costs-stat-card.is-red i { background: #ffe2e0; color: #ef4444; }

.costs-stat-card span,
.costs-module-card small {
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.costs-stat-card strong {
    margin-top: 3px;
    color: #1f2d49;
    font-size: 24px;
    line-height: 1.12;
}

.costs-stat-card small {
    margin-top: 4px;
    font-size: 11px;
}

.costs-module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.costs-module-card {
    min-height: 94px;
    padding: 17px 18px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.costs-module-card:hover {
    transform: translateY(-2px);
    border-color: #b8cdf2;
    box-shadow: 0 18px 42px rgba(39, 63, 96, 0.12);
}

.costs-module-icon,
.costs-recent-icon,
.costs-attention-row > span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.costs-module-card strong {
    display: block;
    margin: 3px 0;
    color: #1f2d49;
    font-size: 20px;
}

.costs-module-card > i {
    color: #8ea0b9;
}

.tone-blue .costs-module-icon,
.tone-blue .costs-recent-icon,
.costs-attention-row.tone-blue > span { background: #eaf2ff; color: #2f6fed; }
.tone-green .costs-module-icon,
.tone-green .costs-recent-icon,
.costs-attention-row.tone-green > span { background: #dcf8ec; color: #14a86b; }
.tone-purple .costs-module-icon,
.tone-purple .costs-recent-icon,
.costs-attention-row.tone-purple > span { background: #f0eaff; color: #7c3aed; }
.tone-orange .costs-module-icon,
.tone-orange .costs-recent-icon,
.costs-attention-row.tone-orange > span { background: #fff1d7; color: #e58a00; }
.tone-red .costs-module-icon,
.tone-red .costs-recent-icon,
.costs-attention-row.tone-red > span,
.costs-attention-row.tone-danger > span { background: #ffe2e0; color: #ef4444; }
.costs-attention-row.tone-warning > span { background: #fff1d7; color: #f59e0b; }
.costs-attention-row.tone-ok > span { background: #dcf8ec; color: #14a86b; }

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

.costs-overview-main,
.costs-overview-side {
    display: grid;
    gap: 18px;
}

.costs-panel,
.costs-side-card {
    padding: 20px;
}

.costs-panel-head,
.costs-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6edf6;
}

.costs-panel-head h2,
.costs-side-head h3 {
    margin: 0;
    color: #1f2d49;
    font-size: 20px;
}

.costs-panel-head p {
    margin: 4px 0 0;
    font-size: 13px;
}

.costs-panel-pill {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}

.costs-chart-panel {
    --cost-history-gradient: linear-gradient(180deg, #80b8ff 0%, #2f7df4 100%);
    --cost-current-gradient: linear-gradient(180deg, #4b8df5 0%, #155dd7 100%);
    --cost-forecast-gradient: linear-gradient(180deg, #c4dbff 0%, #78aaf5 100%);
    position: relative;
    isolation: isolate;
    padding: 0;
    overflow: hidden;
    transition: opacity 120ms ease, transform 120ms ease;
}

.costs-chart-panel.htmx-swapping {
    opacity: 0.42;
    transform: translateY(5px);
}

.costs-chart-loading {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 20;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid #cfe0f8;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 9px 24px rgba(35, 68, 116, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #35639f;
    font-size: 10px;
    font-weight: 900;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.costs-chart-loading.htmx-request {
    opacity: 1;
    transform: translateY(0);
}

.costs-chart-loading i {
    font-size: 13px;
    animation: costs-chart-spin 700ms linear infinite;
}

.costs-expense-head {
    min-height: 58px;
    padding: 18px 20px 10px;
    border-bottom: 1px solid #e6edf6;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.costs-expense-head h2 {
    margin: 0;
    color: #1f2d49;
    font-size: 22px;
    line-height: 1.1;
}

.costs-expense-head p {
    margin: 4px 0 0;
    color: #72829a;
    font-size: 12px;
    font-weight: 800;
}

.costs-chart-legend {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #73849c;
    font-size: 10px;
    font-weight: 850;
}

.costs-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.costs-chart-legend i {
    width: 10px;
    height: 14px;
    border-radius: 4px 4px 2px 2px;
    background: var(--cost-history-gradient);
    box-shadow: 0 3px 7px rgba(47, 111, 237, 0.17);
}

.costs-chart-legend i.is-history {
    background: var(--cost-history-gradient);
}

.costs-chart-legend i.is-current {
    background: var(--cost-current-gradient);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.13);
}

.costs-chart-legend i.is-forecast {
    background: var(--cost-forecast-gradient);
    box-shadow: 0 3px 7px rgba(72, 126, 209, 0.12);
}

.costs-expense-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.costs-year-control,
.costs-expense-tabs {
    min-height: 34px;
    border: 1px solid #d9e4f2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(38, 63, 97, 0.05);
}

.costs-year-control {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    color: #4b5f7c;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.costs-year-control > a,
.costs-year-control > span {
    width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #70819a;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.costs-year-control > a:hover {
    background: #eef4ff;
    color: #155dd7;
}

.costs-year-control > span {
    color: #c5cfdd;
}

.costs-year-control label {
    min-height: 32px;
    padding: 0 7px 0 9px;
    border-right: 1px solid #e4ebf5;
    border-left: 1px solid #e4ebf5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.costs-year-control label i {
    color: #2f6fed;
}

.costs-year-control select {
    min-width: 68px;
    height: 30px;
    padding: 0 22px 0 5px;
    border: 0;
    background-color: transparent;
    color: #344b6a;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: none;
}

.costs-year-control select:focus-visible {
    outline: 2px solid rgba(47, 102, 216, 0.18);
    outline-offset: -2px;
    border-radius: 7px;
}

.costs-expense-tabs {
    padding: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f5f8fd;
}

.costs-expense-tabs button {
    min-height: 27px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    color: #65758f;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.costs-expense-tabs button.is-active {
    background: #ffffff;
    color: #1663e6;
    box-shadow: 0 5px 12px rgba(43, 98, 207, 0.12);
}

.costs-expense-tabs button:focus-visible {
    outline: 3px solid rgba(47, 102, 216, 0.16);
    outline-offset: 2px;
}

.costs-expense-chart {
    min-height: 254px;
    padding: 16px 14px 14px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
}

.costs-chart-axis {
    height: 190px;
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #8a9bb3;
    font-size: 11px;
    font-weight: 850;
    text-align: right;
}

.costs-chart-plot {
    position: relative;
    min-width: 0;
    height: 222px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.costs-chart-grid,
.costs-chart-bars {
    position: absolute;
    inset: 0;
    min-width: 720px;
}

.costs-chart-grid {
    height: 190px;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 62px,
            #e7edf6 63px,
            transparent 64px
        );
}

.costs-chart-bars {
    height: 222px;
    padding: 0 10px;
    display: grid;
    grid-template-columns: repeat(12, minmax(42px, 1fr));
    gap: 10px;
    z-index: 1;
}

.costs-chart-month {
    position: relative;
    z-index: 0;
    height: 222px;
    display: grid;
    grid-template-rows: 190px 32px;
    justify-items: center;
    align-items: end;
}

.costs-chart-month.is-current::before {
    content: "";
    position: absolute;
    inset: 0 -7px 4px;
    z-index: -1;
    border: 1px solid rgba(47, 111, 237, 0.24);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(47, 111, 237, 0.11), rgba(47, 111, 237, 0.035));
}

.costs-chart-bar {
    position: relative;
    transform-origin: bottom center;
    width: min(28px, 70%);
    padding: 0;
    border: 0;
    min-height: 8px;
    border-radius: 7px 7px 2px 2px;
    background: var(--cost-history-gradient);
    box-shadow: 0 6px 12px rgba(47, 111, 237, 0.17);
    cursor: pointer;
    overflow: visible;
    opacity: 1;
    transform: none;
    transition:
        transform 220ms ease,
        box-shadow 180ms ease;
}

.costs-chart-panel.is-chart-primed .costs-chart-bar {
    opacity: 0;
    transform: translateY(10px) scaleY(0.02) scaleX(0.82);
}

.costs-chart-bar.is-rising {
    animation: costs-chart-rise 720ms cubic-bezier(0.2, 0.78, 0.24, 1) backwards;
    animation-delay: var(--cost-bar-delay, 0ms);
}

.costs-chart-bar:hover,
.costs-chart-bar:focus-visible,
.costs-chart-bar.is-selected {
    transform: translateY(-2px) scaleX(1.08);
    box-shadow: 0 10px 22px rgba(47, 111, 237, 0.28);
}

.costs-chart-bar:focus-visible {
    outline: 3px solid rgba(47, 102, 216, 0.24);
    outline-offset: 3px;
}

.costs-chart-month.is-current .costs-chart-bar {
    background: var(--cost-current-gradient);
    box-shadow: 0 8px 18px rgba(26, 91, 205, 0.28);
}

.costs-chart-month.is-future .costs-chart-bar {
    background: var(--cost-forecast-gradient);
    box-shadow: 0 6px 12px rgba(72, 126, 209, 0.12);
}

.costs-chart-month > small {
    align-self: end;
    min-height: 20px;
    color: #73849c;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.costs-chart-month.is-current > small {
    color: #155dd7;
    font-weight: 950;
}

.costs-chart-month.is-future > small {
    color: #8294ad;
}

.costs-chart-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 12;
    min-width: 112px;
    padding: 7px 9px;
    border: 1px solid rgba(28, 69, 135, 0.15);
    border-radius: 10px;
    background: #172844;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(22, 42, 75, 0.22);
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.costs-chart-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: #172844;
    transform: translateX(-50%) rotate(45deg);
}

.costs-chart-month:first-child .costs-chart-tooltip {
    left: -2px;
    transform: none;
}

.costs-chart-month:first-child .costs-chart-tooltip::after {
    left: 24px;
    transform: rotate(45deg);
}

.costs-chart-month:last-child .costs-chart-tooltip {
    right: -2px;
    left: auto;
    transform: none;
}

.costs-chart-month:last-child .costs-chart-tooltip::after {
    right: 20px;
    left: auto;
    transform: rotate(45deg);
}

.costs-chart-bar.is-tooltip-below .costs-chart-tooltip {
    top: 12px;
    bottom: auto;
}

.costs-chart-bar.is-tooltip-below .costs-chart-tooltip::after {
    top: -5px;
    bottom: auto;
}

.costs-chart-tooltip small,
.costs-chart-tooltip strong,
.costs-chart-tooltip em {
    position: relative;
    z-index: 1;
    display: block;
    white-space: nowrap;
}

.costs-chart-tooltip small {
    color: #bdcce2;
    font-size: 9px;
    font-weight: 800;
}

.costs-chart-tooltip strong {
    margin-top: 2px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
}

.costs-chart-tooltip em {
    margin-top: 1px;
    color: #8fb8ff;
    font-size: 8px;
    font-style: normal;
    font-weight: 850;
}

.costs-chart-bar.h-0 { height: 0%; }
.costs-chart-bar.h-5 { height: 5%; }
.costs-chart-bar.h-10 { height: 10%; }
.costs-chart-bar.h-15 { height: 15%; }
.costs-chart-bar.h-20 { height: 20%; }
.costs-chart-bar.h-25 { height: 25%; }
.costs-chart-bar.h-30 { height: 30%; }
.costs-chart-bar.h-35 { height: 35%; }
.costs-chart-bar.h-40 { height: 40%; }
.costs-chart-bar.h-45 { height: 45%; }
.costs-chart-bar.h-50 { height: 50%; }
.costs-chart-bar.h-55 { height: 55%; }
.costs-chart-bar.h-60 { height: 60%; }
.costs-chart-bar.h-65 { height: 65%; }
.costs-chart-bar.h-70 { height: 70%; }
.costs-chart-bar.h-75 { height: 75%; }
.costs-chart-bar.h-80 { height: 80%; }
.costs-chart-bar.h-85 { height: 85%; }
.costs-chart-bar.h-90 { height: 90%; }
.costs-chart-bar.h-95 { height: 95%; }
.costs-chart-bar.h-100 { height: 100%; }

@keyframes costs-chart-spin {
    to { transform: rotate(360deg); }
}

@keyframes costs-chart-rise {
    0% {
        opacity: 0;
        transform: translateY(10px) scaleY(0.02) scaleX(0.82);
    }
    62% {
        opacity: 1;
        transform: translateY(-2px) scaleY(1.035) scaleX(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scaleY(1) scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .costs-chart-panel,
    .costs-chart-loading,
    .costs-chart-bar {
        animation: none;
        transition-duration: 0.01ms;
        transition-delay: 0ms;
    }

    .costs-chart-panel.is-chart-pending .costs-chart-bar,
    .costs-chart-panel.is-chart-primed .costs-chart-bar {
        opacity: 1;
        transform: none;
    }
}

.costs-chart-column strong {
    color: #53637c;
    font-size: 12px;
}

.costs-chart-column small {
    color: #1f2d49;
    font-size: 11px;
    font-weight: 900;
}

.costs-recent-list,
.costs-attention-list {
    display: grid;
}

.costs-recent-row {
    min-height: 104px;
    padding: 14px 0;
    border-bottom: 1px solid #edf2f8;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 96px 136px;
    align-items: start;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.costs-recent-row:hover .costs-recent-detail {
    border-color: #d6e3f4;
    background: #f8fbff;
}

.costs-recent-row:last-child,
.costs-attention-row:last-child {
    border-bottom: 0;
}

.costs-recent-row strong,
.costs-attention-row strong {
    display: block;
    color: #1f2d49;
    font-size: 14px;
}

.costs-recent-content {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.costs-recent-mainline {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.costs-recent-mainline > span:first-child {
    min-width: 0;
}

.costs-recent-mainline strong,
.costs-recent-mainline small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.costs-recent-status {
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f2d49;
    background: #f1f5fb;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.costs-recent-status.status-ok {
    background: #dcf8ec;
    color: #0f8b58;
}

.costs-recent-status.status-warning,
.costs-recent-status.status-neutral {
    background: #fff1d7;
    color: #b56b00;
}

.costs-recent-status.status-danger {
    background: #ffe2e0;
    color: #d62f2f;
}

.costs-recent-details {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.costs-recent-detail {
    min-height: 32px;
    min-width: 0;
    max-width: min(280px, 100%);
    padding: 6px 9px;
    border: 1px solid #e6edf6;
    border-radius: 10px;
    background: #fbfcff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #53637c;
    transition: border-color 160ms ease, background 160ms ease;
}

.costs-recent-detail i {
    color: #2f6fed;
    font-size: 13px;
}

.costs-recent-detail small {
    color: #7a8aa3;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.costs-recent-detail b {
    min-width: 0;
    color: #263654;
    font-size: 11px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.costs-recent-date,
.costs-recent-amount {
    min-height: 44px;
    padding-top: 2px;
    display: grid;
    align-content: start;
    justify-items: end;
    gap: 4px;
}

.costs-recent-date small,
.costs-recent-amount small {
    color: #8a9ab3;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.costs-recent-date em,
.costs-attention-row em {
    color: #697b94;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.costs-recent-amount b {
    color: #1f2d49;
    text-align: right;
    font-size: 14px;
    font-weight: 950;
}

.costs-donut-layout {
    padding-top: 18px;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.costs-donut {
    position: relative;
    width: 128px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.costs-donut svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.costs-donut-bg,
.costs-donut-segment {
    fill: none;
    stroke-width: 9;
}

.costs-donut-bg {
    stroke: #edf2f8;
}

.costs-donut-segment {
    stroke-linecap: butt;
}

.costs-donut-segment.tone-blue { stroke: #2f6fed; }
.costs-donut-segment.tone-green { stroke: #20b77a; }
.costs-donut-segment.tone-purple { stroke: #8b5cf6; }
.costs-donut-segment.tone-red { stroke: #ef4444; }

.costs-donut-center {
    position: relative;
    z-index: 1;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.07);
}

.costs-donut-center strong {
    max-width: 74px;
    color: #1f2d49;
    font-size: 13px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.costs-donut-center span {
    margin-top: 3px;
    color: #6b7c95;
    font-size: 10px;
    font-weight: 850;
}

.costs-donut-legend {
    display: grid;
    gap: 10px;
}

.costs-donut-legend div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #1f2d49;
    font-size: 13px;
    font-weight: 900;
}

.costs-donut-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.costs-donut-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-flex;
}

.costs-donut-legend i.tone-blue { background: #2f6fed; }
.costs-donut-legend i.tone-green { background: #20b77a; }
.costs-donut-legend i.tone-purple { background: #8b5cf6; }
.costs-donut-legend i.tone-red { background: #ef4444; }

.costs-attention-row {
    min-height: 70px;
    padding: 11px 0;
    border-bottom: 1px solid #edf2f8;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.costs-empty {
    min-height: 160px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    gap: 8px;
}

.costs-empty.compact {
    min-height: 140px;
}

.costs-empty i {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.costs-empty h3 {
    margin: 0;
    color: #1f2d49;
    font-size: 17px;
}

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

    .costs-overview-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .costs-overview-stats,
    .costs-module-grid,
    .costs-chart {
        grid-template-columns: 1fr;
    }

    .costs-chart {
        height: auto;
    }

    .costs-chart-column {
        height: 120px;
    }

    .costs-expense-head {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 16px 12px;
    }

    .costs-expense-controls {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        gap: 8px;
    }

    .costs-year-control {
        justify-content: center;
    }

    .costs-expense-tabs {
        min-width: 0;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: thin;
    }

    .costs-expense-chart {
        padding-right: 10px;
        padding-left: 8px;
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .costs-recent-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .costs-recent-mainline {
        flex-direction: column;
        gap: 6px;
    }

    .costs-recent-date,
    .costs-recent-amount {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }

    .costs-recent-detail {
        max-width: 100%;
    }

    .costs-recent-detail b {
        white-space: normal;
    }

    .costs-donut-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.cost-report-page {
    display: grid;
    gap: 18px;
    max-width: 1460px;
    margin: 0 auto;
}

.cost-report-pilot-note,
.cost-report-card {
    border: 1px solid #dbe6f4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(39, 63, 96, 0.08);
}

.cost-report-pilot-note {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-color: #cfe0fb;
    background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
}

.cost-report-pilot-note > span {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    color: #ffffff;
    background: #1769e8;
    font-size: 20px;
    box-shadow: 0 9px 20px rgba(23, 105, 232, 0.22);
}

.cost-report-pilot-note strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 950;
}

.cost-report-pilot-note p {
    margin: 4px 0 0;
    color: #5e708b;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}

.cost-report-layout {
    display: grid;
    grid-template-columns: minmax(520px, 0.86fr) minmax(520px, 1.14fr);
    gap: 18px;
    align-items: start;
}

.cost-report-card {
    min-width: 0;
    padding: 22px;
}

.cost-report-card-head,
.cost-report-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5edf7;
}

.cost-report-card-head {
    justify-content: flex-start;
}

.cost-report-card-head > span {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    color: #1769e8;
    background: #eaf2ff;
    font-size: 21px;
}

.cost-report-card-head h2,
.cost-report-preview-head h2 {
    margin: 0;
    color: #17233d;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 950;
}

.cost-report-card-head p,
.cost-report-preview-head p {
    margin: 5px 0 0;
    color: #687a94;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.cost-report-errors {
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid #f5c2c2;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    color: #b42323;
    background: #fff5f5;
}

.cost-report-errors p {
    margin: 0 0 3px;
    font-size: 12px;
    font-weight: 800;
}

.cost-report-form {
    margin-top: 18px;
    display: grid;
    gap: 18px;
}

.cost-report-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.cost-report-fieldset legend {
    margin-bottom: 11px;
    color: #253653;
    font-size: 13px;
    font-weight: 950;
}

.cost-report-fieldset > small {
    display: block;
    margin-top: 7px;
    color: #7a8aa1;
    font-size: 10px;
    font-weight: 750;
}

.cost-report-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cost-report-date-grid label,
.cost-report-scope-panel > label {
    display: grid;
    gap: 7px;
}

.cost-report-date-grid label > span,
.cost-report-scope-panel label > span,
.cost-report-vehicle-list-head > span {
    color: #536680;
    font-size: 11px;
    font-weight: 900;
}

.cost-report-date-grid input,
.cost-report-scope-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d6e0ed;
    border-radius: 9px;
    color: #253653;
    background: #ffffff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.cost-report-scope-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.cost-report-scope-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.cost-report-scope-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cost-report-scope-option > span {
    min-height: 90px;
    padding: 13px 10px;
    border: 1px solid #dce5f1;
    border-radius: 10px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    text-align: center;
    background: #fbfcfe;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.cost-report-scope-option i {
    color: #6580a8;
    font-size: 19px;
}

.cost-report-scope-option strong {
    color: #253653;
    font-size: 12px;
    font-weight: 950;
}

.cost-report-scope-option small {
    color: #7b8da6;
    font-size: 9px;
    font-weight: 750;
}

.cost-report-scope-option input:checked + span {
    border-color: #1769e8;
    background: #eef5ff;
    box-shadow: 0 0 0 2px rgba(23, 105, 232, 0.08);
}

.cost-report-scope-option input:checked + span i,
.cost-report-scope-option input:checked + span strong {
    color: #1769e8;
}

.cost-report-scope-panel {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    background: #f8fafd;
}

.cost-report-vehicle-list-head {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cost-report-vehicle-list {
    max-height: 246px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    scrollbar-width: thin;
}

.cost-report-vehicle-list label {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #dce5f1;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #ffffff;
    cursor: pointer;
}

.cost-report-vehicle-list input {
    margin-top: 2px;
    accent-color: #1769e8;
}

.cost-report-vehicle-list span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.cost-report-vehicle-list strong {
    color: #253653;
    font-size: 11px;
    font-weight: 950;
}

.cost-report-vehicle-list small {
    color: #7688a1;
    font-size: 9px;
    line-height: 1.35;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cost-report-includes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cost-report-includes > span {
    min-width: 0;
    padding: 11px;
    border: 1px solid #e1e8f2;
    border-radius: 9px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1px 7px;
    align-items: center;
    background: #fbfcfe;
}

.cost-report-includes i {
    grid-row: span 2;
    color: #1769e8;
    font-size: 17px;
}

.cost-report-includes b {
    color: #253653;
    font-size: 11px;
    font-weight: 950;
}

.cost-report-includes small {
    color: #7b8ca4;
    font-size: 8px;
    font-weight: 750;
}

.cost-report-submit {
    min-height: 46px;
    width: 100%;
}

.cost-report-preview {
    position: sticky;
    top: 92px;
}

.cost-report-preview-head > div > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: #1769e8;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cost-report-preview-head em {
    padding: 7px 10px;
    border-radius: 999px;
    color: #1769e8;
    background: #eaf2ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}

.cost-report-preview-frame {
    min-height: 580px;
    margin-top: 18px;
    border: 1px solid #dce4ef;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    background: #e9edf3;
    box-shadow: inset 0 1px 5px rgba(39, 63, 96, 0.08);
}

.cost-report-preview-frame img {
    width: min(100%, 760px);
    height: auto;
    display: block;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(27, 48, 78, 0.15);
}

.cost-report-preview-empty {
    min-height: 580px;
    max-width: 360px;
    padding: 40px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cost-report-preview-empty > span {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1769e8;
    background: #ffffff;
    font-size: 29px;
    box-shadow: 0 12px 30px rgba(39, 63, 96, 0.12);
}

.cost-report-preview-empty strong {
    margin-top: 17px;
    color: #253653;
    font-size: 16px;
    font-weight: 950;
}

.cost-report-preview-empty p {
    margin: 8px 0 0;
    color: #71839c;
    font-size: 11px;
    line-height: 1.55;
    font-weight: 750;
}

.cost-report-preview-summary {
    margin-top: 14px;
    padding: 13px 15px;
    border: 1px solid #dfe7f2;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafd;
}

.cost-report-preview-summary span {
    color: #667993;
    font-size: 11px;
    font-weight: 800;
}

.cost-report-preview-summary strong {
    color: #17233d;
    font-size: 16px;
    font-weight: 950;
}

.cost-report-preview-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cost-report-preview-actions a {
    min-height: 44px;
}

@media (max-width: 1260px) {
    .cost-report-layout {
        grid-template-columns: 1fr;
    }

    .cost-report-preview {
        position: static;
    }
}

@media (max-width: 700px) {
    .cost-report-card {
        padding: 16px;
    }

    .cost-report-date-grid,
    .cost-report-scope-grid,
    .cost-report-vehicle-list,
    .cost-report-includes {
        grid-template-columns: 1fr;
    }

    .cost-report-scope-option > span {
        min-height: 72px;
        grid-template-columns: 28px minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    .cost-report-scope-option i {
        grid-row: span 2;
    }

    .cost-report-preview-frame,
    .cost-report-preview-empty {
        min-height: 420px;
    }

    .cost-report-preview-actions {
        grid-template-columns: 1fr;
    }
}



/* Source: css/pages/fuel-costs.css */
.fuel-costs-page,
.fuel-control-page,
.fuel-import-page {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.fuel-costs-filters,
.fuel-costs-panel,
.fuel-import-assurance,
.fuel-import-form,
.fuel-import-schema-section,
.fuel-import-side > section {
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(39, 63, 96, 0.08);
}

.fuel-costs-filters {
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(230px, 1.35fr) repeat(6, minmax(120px, .7fr)) auto;
    align-items: end;
    gap: 10px;
}

.fuel-costs-filters label {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.fuel-costs-filters label > span {
    color: #687a94;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fuel-costs-filters input,
.fuel-costs-filters select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d9e4f2;
    border-radius: 11px;
    background: #fbfdff;
    color: #253653;
    font-size: 12px;
    font-weight: 800;
}

.fuel-page-loading {
    min-height: 0;
    margin: -10px 4px -8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: #4773aa;
    font-size: 10px;
    font-weight: 850;
}

.fuel-page-loading i,
.fuel-chart-loading i { animation: fuel-spin .8s linear infinite; }
@keyframes fuel-spin { to { transform: rotate(360deg); } }

.fuel-costs-search {
    position: relative;
}

.fuel-costs-search i {
    position: absolute;
    left: 13px;
    bottom: 12px;
    z-index: 1;
    color: #8090a7;
}

.fuel-costs-search input {
    padding-left: 38px;
}

.fuel-costs-filter-actions {
    display: flex;
    gap: 7px;
}

.fuel-costs-filter-actions .btn-primary,
.fuel-costs-filter-actions .btn-secondary {
    min-height: 42px;
    white-space: nowrap;
}

.fuel-costs-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.fuel-costs-stats article {
    min-width: 0;
    min-height: 116px;
    padding: 18px;
    border: 1px solid #dbe6f4;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(39, 63, 96, .07);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 12px;
    align-content: center;
}

.fuel-costs-stats article.has-warning {
    border-color: #ffd5cd;
    background: linear-gradient(145deg, #fff 55%, #fff7f5);
}

.fuel-costs-stats article > span {
    width: 46px;
    height: 46px;
    grid-row: span 3;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.fuel-costs-stats .is-blue { background: #eaf2ff; color: #2f6fed; }
.fuel-costs-stats .is-green { background: #dcf8ec; color: #139b65; }
.fuel-costs-stats .is-purple { background: #f0eaff; color: #7c3aed; }
.fuel-costs-stats .is-orange { background: #fff1d7; color: #e58a00; }
.fuel-costs-stats .is-red { background: #ffe6e1; color: #e74f3d; }

.fuel-costs-stats small,
.fuel-costs-stats em {
    overflow: hidden;
    color: #708199;
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-costs-stats strong {
    margin: 2px 0;
    overflow: hidden;
    color: #1d2c48;
    font-size: 20px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-costs-notice {
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #f2d58e;
    border-radius: 13px;
    background: #fff9e9;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #805f11;
    font-size: 12px;
    font-weight: 800;
}

.fuel-costs-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    gap: 18px;
    align-items: stretch;
}

.fuel-costs-panel {
    min-width: 0;
    overflow: hidden;
}

.fuel-costs-panel > header,
.fuel-import-schema-section > header,
.fuel-import-side section > header {
    min-height: 70px;
    padding: 17px 20px;
    border-bottom: 1px solid #e5edf6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fuel-costs-panel h2,
.fuel-import-page h2,
.fuel-import-page h3 {
    margin: 0;
    color: #1d2d48;
}

.fuel-costs-panel h2,
.fuel-import-page h2 { font-size: 18px; }
.fuel-import-page h3 { font-size: 16px; }

.fuel-costs-panel header p,
.fuel-import-page header p,
.fuel-import-page .fuel-import-form-head p {
    margin: 4px 0 0;
    color: #718198;
    font-size: 11px;
    font-weight: 750;
}

.fuel-costs-chart-tabs {
    padding: 3px;
    border: 1px solid #d9e4f2;
    border-radius: 10px;
    background: #f7faff;
    display: flex;
}

.fuel-costs-chart-tabs button {
    min-height: 31px;
    padding: 0 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #687b96;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}

.fuel-costs-chart-tabs button.is-active {
    background: #fff;
    color: #1765df;
    box-shadow: 0 5px 13px rgba(30, 73, 132, .12);
}

.fuel-chart-head { align-items: flex-start !important; }
.fuel-chart-controls { display: grid; justify-items: end; gap: 8px; }
.fuel-chart-year-control { display: flex; align-items: center; gap: 5px; }
.fuel-chart-year-control > a,
.fuel-chart-year-control > span {
    width: 31px;
    height: 31px;
    border: 1px solid #dbe5f1;
    border-radius: 9px;
    background: #f8fbff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #55708f;
    text-decoration: none;
}
.fuel-chart-year-control > span { opacity: .38; }
.fuel-chart-year-control > a:hover { border-color: #a9c8ee; background: #eef6ff; color: #1c66cf; }
.fuel-chart-year-control label { min-height: 31px; padding: 0 8px; border: 1px solid #dbe5f1; border-radius: 9px; background: #fff; display: flex; align-items: center; gap: 6px; color: #6380a2; }
.fuel-chart-year-control select { min-width: 58px; border: 0; background: transparent; color: #2e4664; font-size: 11px; font-weight: 900; outline: 0; }
.fuel-chart-legend { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 10px; }
.fuel-chart-legend span { display: inline-flex; align-items: center; gap: 5px; color: #71839a; font-size: 8px; font-weight: 800; }
.fuel-chart-legend i { width: 8px; height: 8px; border-radius: 3px; background: #2c71e4; }
.fuel-chart-legend i.is-current { background: #12a875; }
.fuel-chart-legend i.is-selected { background: #0c55ca; box-shadow: 0 0 0 2px rgba(36, 107, 222, .15); }
.fuel-costs-chart-month.is-current-period > small { color: #0c8e63; }
.fuel-costs-chart-month.is-current-period .fuel-costs-chart-bar { background: linear-gradient(180deg, #53d8a8, #109a6a); box-shadow: 0 7px 14px rgba(16, 154, 106, .22); }
.fuel-costs-chart-panel { position: relative; }
.fuel-costs-chart-panel.is-chart-pending .fuel-costs-chart-bar { height: 0 !important; }
.fuel-costs-chart-panel.is-chart-primed .fuel-costs-chart-bar { height: 0 !important; transition: none; }
.fuel-chart-loading { min-height: 34px; padding: 6px 14px; position: absolute; right: 14px; bottom: 10px; border: 1px solid #d8e6f5; border-radius: 10px; background: rgba(255, 255, 255, .94); align-items: center; gap: 6px; color: #366ba9; font-size: 9px; font-weight: 850; box-shadow: 0 8px 20px rgba(29, 61, 102, .12); }

.fuel-costs-chart {
    height: 260px;
    padding: 26px 18px 15px 52px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(28px, 1fr));
    align-items: end;
    gap: 7px;
    background:
        linear-gradient(to bottom, transparent 32.8%, #edf2f8 33%, transparent 33.5%),
        linear-gradient(to bottom, transparent 65.8%, #edf2f8 66%, transparent 66.5%),
        linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.fuel-costs-chart::before {
    content: "wynik miesięczny";
    position: absolute;
    top: 18px;
    left: 13px;
    color: #91a0b4;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.fuel-costs-chart-month {
    height: 205px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
}

.fuel-costs-chart-month > small {
    color: #6e8098;
    font-size: 10px;
    font-weight: 900;
}

.fuel-costs-chart-month.is-selected-period > small { color: #145fd4; }

.fuel-costs-chart-bar {
    width: min(32px, 72%);
    min-height: 0;
    padding: 0;
    position: relative;
    border: 0;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #74adff, #216ce7);
    box-shadow: 0 7px 14px rgba(34, 105, 226, .2);
    cursor: pointer;
    will-change: height;
    transition: height .46s cubic-bezier(.22, .74, .22, 1), filter .16s ease;
}
.fuel-costs-chart-bar.is-rising { transition-delay: var(--fuel-bar-delay, 0ms), 0ms; }

.fuel-costs-chart-month.is-selected-period .fuel-costs-chart-bar {
    background: linear-gradient(180deg, #4b90fb, #0c55ca);
    box-shadow: 0 0 0 4px rgba(36, 107, 222, .12), 0 9px 18px rgba(25, 87, 185, .28);
}

.fuel-costs-chart-bar:hover,
.fuel-costs-chart-bar:focus-visible { filter: saturate(1.18) brightness(.98); }

.fuel-costs-chart-tooltip {
    width: 154px;
    padding: 10px;
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translateX(-50%);
    border: 1px solid #d9e5f4;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(29, 54, 90, .18);
    text-align: left;
}

.fuel-costs-chart-tooltip small,
.fuel-costs-chart-tooltip strong,
.fuel-costs-chart-tooltip em { display: block; }
.fuel-costs-chart-tooltip small { color: #718198; font-size: 9px; font-weight: 850; }
.fuel-costs-chart-tooltip strong { margin: 3px 0; color: #172844; font-size: 15px; }
.fuel-costs-chart-tooltip em { color: #61748f; font-size: 9px; font-style: normal; font-weight: 750; }

.fuel-costs-chart-bar.h-0 { height: 0; }
.fuel-costs-chart-bar.h-5 { height: 5%; }
.fuel-costs-chart-bar.h-10 { height: 10%; }
.fuel-costs-chart-bar.h-15 { height: 15%; }
.fuel-costs-chart-bar.h-20 { height: 20%; }
.fuel-costs-chart-bar.h-25 { height: 25%; }
.fuel-costs-chart-bar.h-30 { height: 30%; }
.fuel-costs-chart-bar.h-35 { height: 35%; }
.fuel-costs-chart-bar.h-40 { height: 40%; }
.fuel-costs-chart-bar.h-45 { height: 45%; }
.fuel-costs-chart-bar.h-50 { height: 50%; }
.fuel-costs-chart-bar.h-55 { height: 55%; }
.fuel-costs-chart-bar.h-60 { height: 60%; }
.fuel-costs-chart-bar.h-65 { height: 65%; }
.fuel-costs-chart-bar.h-70 { height: 70%; }
.fuel-costs-chart-bar.h-75 { height: 75%; }
.fuel-costs-chart-bar.h-80 { height: 80%; }
.fuel-costs-chart-bar.h-85 { height: 85%; }
.fuel-costs-chart-bar.h-90 { height: 90%; }
.fuel-costs-chart-bar.h-95 { height: 95%; }
.fuel-costs-chart-bar.h-100 { height: 100%; }

.fuel-panel-badge {
    min-height: 34px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    background: #eef4ff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2b65c4;
    font-size: 10px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}
button.fuel-panel-badge { cursor: pointer; font-family: inherit; }

.fuel-panel-badge.is-warning { background: #fff0e8; color: #bd5428; }

.fuel-ranking-list {
    max-height: 356px;
    padding: 6px;
    overflow: auto;
    scrollbar-color: #cbd9ea transparent;
    scrollbar-width: thin;
}

.fuel-ranking-row {
    min-height: 78px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 13px;
    display: grid;
    grid-template-columns: 38px minmax(115px, .72fr) minmax(190px, 1.28fr) 16px;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.fuel-ranking-row[hidden],
.fuel-ranking-empty[hidden],
.fuel-ranking-search button[hidden] { display: none !important; }

.fuel-ranking-row.is-selected {
    border-color: #8cb7f0;
    background: linear-gradient(90deg, #edf5ff 0%, #f8fbff 72%, #ffffff 100%);
    box-shadow: inset 3px 0 #276ed8, 0 8px 20px rgba(33, 94, 181, .11);
}

.fuel-ranking-row.is-selected .fuel-ranking-chevron {
    color: #276ed8;
}

.fuel-ranking-selection {
    width: max-content;
    min-height: 19px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #dcecff;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #1f63c8;
    font-size: 8px;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}

.fuel-ranking-tools {
    padding: 12px 13px;
    border-bottom: 1px solid #e8eef6;
    background: #fafcff;
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(150px, .72fr);
    align-items: end;
    gap: 9px;
}

.fuel-ranking-search { min-width: 0; position: relative; }
.fuel-ranking-search > i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #8495aa; font-size: 12px; }
.fuel-ranking-search input {
    width: 100%;
    min-height: 38px;
    padding: 0 34px 0 33px;
    border: 1px solid #d8e4f1;
    border-radius: 10px;
    background: #fff;
    color: #263a55;
    font-size: 11px;
    font-weight: 750;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.fuel-ranking-search input:focus { border-color: #77a8e9; box-shadow: 0 0 0 3px rgba(37, 109, 211, .1); }
.fuel-ranking-search button {
    width: 27px;
    height: 27px;
    padding: 0;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: #eef3f9;
    color: #667b95;
    cursor: pointer;
}
.fuel-ranking-sort { min-width: 0; display: grid; gap: 4px; }
.fuel-ranking-sort > span { padding-left: 2px; color: #7789a1; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.fuel-ranking-sort select {
    width: 100%;
    min-height: 38px;
    padding: 0 28px 0 10px;
    border: 1px solid #d8e4f1;
    border-radius: 10px;
    background: #fff;
    color: #344b68;
    font-size: 10px;
    font-weight: 850;
}
.fuel-ranking-empty { min-height: 150px; padding: 24px; color: #71839b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; }
.fuel-ranking-empty > i { margin-bottom: 3px; color: #93abc8; font-size: 24px; }
.fuel-ranking-empty strong { color: #334963; font-size: 12px; }
.fuel-ranking-empty span { font-size: 9px; font-weight: 750; }

.fuel-ranking-row:hover,
.fuel-ranking-row:focus-visible { border-color: #d5e4f5; background: #f8fbff; box-shadow: 0 7px 17px rgba(43, 78, 122, .07); transform: translateY(-1px); outline: 0; }

.fuel-ranking-position {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #edf2f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #62738b;
    font-size: 11px;
    font-weight: 950;
}

.fuel-ranking-position.is-top-1 { background: #fff1bb; color: #9d6b00; }
.fuel-ranking-position.is-top-2 { background: #e9eef5; color: #53657e; }
.fuel-ranking-position.is-top-3 { background: #f6e4d5; color: #9b5c2e; }

.fuel-ranking-vehicle { min-width: 0; display: grid; gap: 3px; }
.fuel-ranking-vehicle strong { overflow: hidden; color: #20334f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fuel-ranking-vehicle small { overflow: hidden; color: #7a8aa0; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.fuel-ranking-result { min-width: 0; padding-left: 11px; border-left: 1px solid #e5edf6; display: grid; gap: 6px; }
.fuel-ranking-primary { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fuel-ranking-primary small { color: #71839a; font-size: 8px; font-weight: 850; }
.fuel-ranking-primary strong { color: #116f55; font-size: 13px; white-space: nowrap; }
.fuel-ranking-context { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; }
.fuel-ranking-context > span { min-width: 0; display: inline-flex; align-items: center; gap: 4px; color: #617590; font-size: 8px; font-weight: 800; white-space: nowrap; }
.fuel-ranking-context i { color: #86a0bd; font-size: 9px; }
.fuel-ranking-chevron { color: #a1b0c2; font-size: 11px; transition: color .16s ease, transform .16s ease; }
.fuel-ranking-row:hover .fuel-ranking-chevron { color: #3473c9; transform: translateX(2px); }

.fuel-transactions-table-wrap,
.fuel-import-batch-table-wrap { overflow: auto; }

.fuel-transactions-table,
.fuel-import-batch-table {
    width: 100%;
    border-collapse: collapse;
}

.fuel-transactions-table { min-width: 1260px; }
.fuel-import-batch-table { min-width: 900px; }

.fuel-transactions-table th,
.fuel-import-batch-table th {
    padding: 11px 13px;
    border-bottom: 1px solid #dfe8f3;
    background: #f7faff;
    color: #657790;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .035em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.fuel-transactions-table td,
.fuel-import-batch-table td {
    padding: 11px 13px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.fuel-transactions-table tr.needs-review { background: #fffaf6; }
.fuel-transactions-table tbody tr:hover,
.fuel-import-batch-table tbody tr:hover { background: #f8fbff; }

.fuel-transactions-table td > strong,
.fuel-transactions-table td > small,
.fuel-transactions-table td > a,
.fuel-import-batch-table td > strong,
.fuel-import-batch-table td > small { display: block; }

.fuel-transactions-table td > strong,
.fuel-transactions-table td > a,
.fuel-import-batch-table td > strong {
    color: #253650;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.fuel-transactions-table td > small,
.fuel-import-batch-table td > small {
    max-width: 210px;
    margin-top: 3px;
    overflow: hidden;
    color: #7a8ba2;
    font-size: 9px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-provider,
.fuel-category,
.fuel-match-status {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .03em;
}

.fuel-provider { padding: 2px 6px; }
.fuel-provider.is-orlen { background: #ffe8e5; color: #c74132; }
.fuel-provider.is-mol { background: #e8f3ff; color: #2466b0; }
.fuel-category { padding: 2px 7px; }
.fuel-category.is-fuel { background: #dcf8ec; color: #12865a; }
.fuel-category.is-adblue { background: #e5f4ff; color: #2377ae; }
.fuel-category.is-service_fee { background: #f1ecff; color: #7152bd; }
.fuel-category.is-other { background: #edf1f6; color: #65758c; }
.fuel-match-status { padding: 4px 7px; }
.fuel-match-status.is-ok { background: #e5f8ef; color: #14865c; }
.fuel-match-status.is-review { background: #ffebe4; color: #bd522e; }
.fuel-match-status.is-confirmed { background: #e7f1ff; color: #2865b7; }

.fuel-transaction-confirm {
    margin-top: 7px;
}

.fuel-transaction-confirm button {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #c9dcf7;
    border-radius: 8px;
    background: #f2f7ff;
    color: #265fae;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}

.fuel-transaction-confirm button:hover {
    border-color: #7eaae7;
    background: #e8f1ff;
}

.fuel-card-link {
    width: max-content;
    max-width: 100%;
    margin-top: 4px;
    color: #2c6bc8 !important;
    font-size: 9px !important;
}

/* Ręczne zakupy i zużycia */
.fuel-manual-list { display: grid; }

.fuel-manual-row {
    min-height: 86px;
    padding: 13px 16px;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    grid-template-columns: 105px minmax(190px, .8fr) 105px 115px minmax(260px, 1.3fr) 34px;
    align-items: center;
    gap: 13px;
}

.fuel-manual-row:last-child { border-bottom: 0; }
.fuel-manual-row:hover { background: #f9fbfe; }
.fuel-manual-row > span { min-width: 0; display: grid; gap: 3px; }
.fuel-manual-row strong { color: #263750; font-size: 11px; }
.fuel-manual-row small,
.fuel-manual-row em { color: #7b8ca2; font-size: 9px; font-style: normal; font-weight: 750; }
.fuel-manual-source strong,
.fuel-manual-source small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-manual-source em { color: #4b6f9f; }
.fuel-manual-quantity strong { color: #117f5a; font-size: 14px; }
.fuel-manual-cost strong { font-size: 12px; }

.fuel-manual-allocations {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px !important;
}

.fuel-manual-allocation {
    max-width: 100%;
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid #d8e7f6;
    border-radius: 9px;
    background: #f2f7fd;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #36618f;
    font-size: 9px;
}

.fuel-manual-allocation.is-unassigned { border-color: #f0d9a2; background: #fff8e6; color: #956d12; }
.fuel-manual-allocation b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-manual-allocation em { color: inherit; font-weight: 900; white-space: nowrap; }

.fuel-manual-delete {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #98a7b9;
    cursor: pointer;
}
.fuel-manual-delete:hover,
.fuel-manual-delete:focus-visible { background: #ffebe7; color: #c54e3e; }

.fuel-manual-modal[hidden] { display: none; }
.fuel-manual-modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 22px; }
.fuel-manual-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(16, 29, 48, .56); backdrop-filter: blur(3px); cursor: default; }
.has-fuel-manual-modal { overflow: hidden; }

.fuel-manual-dialog {
    width: min(1080px, 100%);
    max-height: min(850px, calc(100vh - 44px));
    position: relative;
    overflow: auto;
    border: 1px solid #d9e4f1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(12, 30, 56, .3);
}

.fuel-manual-dialog > header {
    min-height: 82px;
    padding: 17px 20px;
    position: sticky;
    z-index: 2;
    top: 0;
    border-bottom: 1px solid #e4ecf5;
    background: rgba(255, 255, 255, .97);
    display: grid;
    grid-template-columns: 44px 1fr 36px;
    align-items: center;
    gap: 12px;
}
.fuel-manual-dialog > header > span { width: 44px; height: 44px; border-radius: 13px; background: #e4f7ee; display: inline-flex; align-items: center; justify-content: center; color: #13855d; font-size: 20px; }
.fuel-manual-dialog h2 { margin: 0; color: #1d2d48; font-size: 18px; }
.fuel-manual-dialog header p { margin: 4px 0 0; color: #718198; font-size: 10px; font-weight: 750; }
.fuel-manual-modal-close { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f5f9; color: #667991; cursor: pointer; }
.fuel-manual-modal-close:hover { background: #e7edf5; color: #263750; }
.fuel-manual-dialog form { padding: 18px 20px 20px; }

.fuel-manual-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fuel-manual-form-grid label,
.fuel-manual-line-row label,
.fuel-manual-allocation-row label { min-width: 0; display: grid; gap: 5px; }
.fuel-manual-form-grid label.is-wide { grid-column: span 2; }
.fuel-manual-form-grid label > span:first-child,
.fuel-manual-line-row label > span:first-child,
.fuel-manual-allocation-row label > span:first-child { color: #5e718b; font-size: 9px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.fuel-manual-form-grid label > span em,
.fuel-manual-line-row label > span em,
.fuel-manual-allocation-row label > span em { color: #98a5b6; font-size: 8px; font-style: normal; text-transform: none; }
.fuel-manual-form-grid input,
.fuel-manual-form-grid select,
.fuel-manual-form-grid textarea,
.fuel-manual-line-row input,
.fuel-manual-line-row select,
.fuel-manual-allocation-row input,
.fuel-manual-allocation-row select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background: #fbfdff;
    color: #293b56;
    font-size: 11px;
    font-weight: 750;
    padding: 0 11px;
}
.fuel-manual-form-grid select,
.fuel-manual-line-row select,
.fuel-manual-allocation-row select { padding: 0 33px 0 11px; }
.fuel-manual-form-grid textarea { min-height: 66px; padding-top: 10px; resize: vertical; }
.fuel-manual-form-grid input:focus,
.fuel-manual-form-grid select:focus,
.fuel-manual-form-grid textarea:focus,
.fuel-manual-line-row input:focus,
.fuel-manual-line-row select:focus,
.fuel-manual-allocation-row input:focus,
.fuel-manual-allocation-row select:focus { border-color: #5893e5; box-shadow: 0 0 0 3px rgba(54, 124, 221, .11); outline: 0; }

.fuel-manual-input-unit { position: relative; display: block; }
.fuel-manual-input-unit input { padding-right: 48px; }
.fuel-manual-input-unit b { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: #8190a5; font-size: 9px; font-weight: 900; pointer-events: none; }
.fuel-manual-date-input { position: relative; display: block; }
.fuel-manual-date-input > i { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: #6e8db3; font-size: 12px; pointer-events: none; }
.fuel-manual-date-input input { padding-left: 34px; }

.fuel-manual-lines-editor,
.fuel-manual-allocation-editor { margin-top: 18px; border: 1px solid #dfe8f3; border-radius: 14px; overflow: hidden; }
.fuel-manual-allocation-editor[hidden],
.fuel-manual-direct-asset[hidden] { display: none !important; }
.fuel-manual-allocation-head { padding: 12px 14px; border-bottom: 1px solid #e6edf5; background: #f8fbff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fuel-manual-allocation-head h3 { margin: 0; color: #263750; font-size: 13px; }
.fuel-manual-allocation-head p { margin: 3px 0 0; color: #77889e; font-size: 9px; font-weight: 750; }
.fuel-manual-allocation-rows:empty { display: none; }
.fuel-manual-line-row { padding: 12px 13px; border-bottom: 1px solid #e9eff6; display: grid; grid-template-columns: 28px minmax(185px, 1.05fr) minmax(120px, .65fr) minmax(140px, .72fr) minmax(220px, 1.2fr) 34px; align-items: end; gap: 9px; background: #fff; }
.fuel-manual-line-row:last-child { border-bottom: 0; }
.fuel-manual-line-number { width: 27px; height: 27px; margin-bottom: 7px; border-radius: 8px; background: #eaf2ff; display: inline-flex; align-items: center; justify-content: center; color: #2b69c6; font-size: 10px; font-weight: 950; }
.fuel-manual-line-remove { width: 34px; height: 42px; border: 0; border-radius: 9px; background: #f4f6f9; color: #8190a5; cursor: pointer; }
.fuel-manual-line-remove:hover:not(:disabled) { background: #ffebe7; color: #c54e3e; }
.fuel-manual-line-remove:disabled { opacity: .35; cursor: not-allowed; }
.fuel-manual-allocation-row { padding: 11px 13px; border-bottom: 1px solid #e9eff6; display: grid; grid-template-columns: 145px minmax(190px, 1fr) 100px minmax(150px, .8fr) 34px; align-items: end; gap: 9px; }
.fuel-manual-allocation-remove { width: 34px; height: 42px; border: 0; border-radius: 9px; background: #f4f6f9; color: #8090a5; cursor: pointer; }
.fuel-manual-allocation-remove:hover { background: #ffebe7; color: #c54e3e; }
.fuel-manual-balance { min-height: 43px; padding: 10px 14px; background: #f8fbff; display: flex; align-items: center; color: #58708f; font-size: 10px; font-weight: 800; }
.fuel-manual-balance i { margin-right: 6px; }
.fuel-manual-balance.is-complete { background: #edf9f4; color: #147d59; }
.fuel-manual-balance.is-error { background: #fff0ec; color: #b84935; }
.fuel-manual-dialog footer { margin-top: 16px; display: flex; justify-content: flex-end; gap: 9px; }

@media (prefers-reduced-motion: reduce) {
    .fuel-costs-chart-bar { transition-duration: .01ms; transition-delay: 0ms; }
    .fuel-costs-chart-panel.is-chart-pending .fuel-costs-chart-bar,
    .fuel-costs-chart-panel.is-chart-primed .fuel-costs-chart-bar { height: auto; }
}

/* Kontrola tankowań i kilometrówki */
.fuel-control-filters,
.fuel-control-vehicle-card,
.fuel-control-empty {
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(39, 63, 96, .08);
}
.fuel-control-filters { padding: 14px; display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(145px, .7fr)) auto; align-items: end; gap: 10px; }
.fuel-control-filters label { min-width: 0; display: grid; gap: 5px; }
.fuel-control-filters label > span { color: #687a94; font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.fuel-control-filters input,
.fuel-control-filters select { width: 100%; min-height: 42px; border: 1px solid #d9e4f2; border-radius: 11px; background: #fbfdff; color: #253653; font-size: 12px; font-weight: 800; }
.fuel-control-filters .fuel-costs-search { display: block; }
.fuel-control-explanation { min-height: 64px; padding: 12px 16px; border: 1px solid #cde6da; border-radius: 15px; background: linear-gradient(135deg, #f2fbf7, #fbfefd); display: flex; align-items: center; gap: 12px; color: #285c4a; }
.fuel-control-explanation > span { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 12px; background: #d9f4e8; display: inline-flex; align-items: center; justify-content: center; color: #14845d; font-size: 18px; }
.fuel-control-explanation strong { display: block; font-size: 11px; }
.fuel-control-explanation p { margin: 3px 0 0; color: #5d786e; font-size: 10px; font-weight: 750; line-height: 1.45; }
.fuel-control-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fuel-control-stats article { min-width: 0; min-height: 104px; padding: 15px; border: 1px solid #dbe6f4; border-radius: 16px; background: #fff; box-shadow: 0 12px 28px rgba(39, 63, 96, .07); display: grid; grid-template-columns: 41px minmax(0, 1fr); column-gap: 10px; align-content: center; }
.fuel-control-stats article.has-warning { border-color: #f2c1b7; background: linear-gradient(145deg, #fff, #fff5f2); }
.fuel-control-stats article > span { width: 41px; height: 41px; grid-row: span 3; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.fuel-control-stats .is-blue { background: #eaf2ff; color: #2f6fed; }
.fuel-control-stats .is-red { background: #ffe6e1; color: #d94d3b; }
.fuel-control-stats .is-green { background: #dcf8ec; color: #139b65; }
.fuel-control-stats .is-purple { background: #f0eaff; color: #7c3aed; }
.fuel-control-stats .is-orange { background: #fff1d7; color: #d77f00; }
.fuel-control-stats small,
.fuel-control-stats em { overflow: hidden; color: #74869e; font-size: 9px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.fuel-control-stats strong { margin: 2px 0; overflow: hidden; color: #20324d; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.fuel-control-vehicles { display: grid; gap: 16px; }
.fuel-control-vehicle-card { overflow: hidden; }
.fuel-control-vehicle-card.has-alerts { border-color: #efc8bf; }
.fuel-control-vehicle-card > header { min-height: 82px; padding: 14px 17px; border-bottom: 1px solid #e5edf6; background: linear-gradient(90deg, #fbfdff, #f7faff); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fuel-control-vehicle-card.has-alerts > header { background: linear-gradient(90deg, #fff, #fff7f5); }
.fuel-control-vehicle-identity { min-width: 220px; display: flex; align-items: center; gap: 11px; }
.fuel-control-vehicle-identity > span { width: 43px; height: 43px; flex: 0 0 auto; border-radius: 13px; background: #e9f2ff; display: inline-flex; align-items: center; justify-content: center; color: #2b6ac6; font-size: 19px; }
.fuel-control-vehicle-identity h2 { margin: 0; color: #21324c; font-size: 16px; }
.fuel-control-vehicle-identity p { margin: 3px 0 0; color: #75879e; font-size: 9px; font-weight: 800; }
.fuel-control-vehicle-totals { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.fuel-control-vehicle-totals > span { min-width: 95px; padding: 6px 9px; border-left: 1px solid #e2eaf4; display: grid; gap: 2px; }
.fuel-control-vehicle-totals small { color: #7e8da1; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.fuel-control-vehicle-totals strong { color: #263a56; font-size: 11px; }
.fuel-control-vehicle-totals > b { min-height: 30px; padding: 0 9px; border-radius: 9px; background: #ffebe6; display: inline-flex; align-items: center; gap: 5px; color: #bd4d38; font-size: 9px; white-space: nowrap; }
.fuel-control-vehicle-totals > b.is-ok { background: #e5f7ef; color: #13835a; }
.fuel-control-timeline { padding: 8px 16px 14px; }
.fuel-control-event { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
.fuel-control-event-marker { position: relative; display: flex; justify-content: center; }
.fuel-control-event-marker::after { content: ""; width: 2px; position: absolute; z-index: 0; top: 0; bottom: 0; background: #dce6f1; }
.fuel-control-event:first-child .fuel-control-event-marker::after { top: 20px; }
.fuel-control-event:last-child .fuel-control-event-marker::after { bottom: calc(100% - 20px); }
.fuel-control-event-marker > span { width: 27px; height: 27px; margin-top: 15px; z-index: 1; border: 4px solid #fff; border-radius: 50%; background: #dff4ea; display: inline-flex; align-items: center; justify-content: center; color: #11835a; font-size: 8px; box-shadow: 0 0 0 1px #cae3d9; }
.fuel-control-event.is-warning .fuel-control-event-marker > span { background: #ffe5de; color: #c34a36; box-shadow: 0 0 0 1px #f0c3b9; }
.fuel-control-event.is-missing .fuel-control-event-marker > span { background: #fff0cf; color: #a97300; box-shadow: 0 0 0 1px #efd7a4; }
.fuel-control-event.is-first .fuel-control-event-marker > span { background: #e5effd; color: #346bab; box-shadow: 0 0 0 1px #cbdcf2; }
.fuel-control-event-card { margin: 7px 0; border: 1px solid #e1e9f3; border-radius: 13px; overflow: hidden; background: #fff; }
.fuel-control-event.is-warning .fuel-control-event-card { border-color: #f1b9ae; box-shadow: 0 7px 18px rgba(177, 65, 43, .08); }
.fuel-control-event-main { min-height: 57px; padding: 9px 12px; display: grid; grid-template-columns: 86px 60px minmax(180px, 1fr) 100px; align-items: center; gap: 9px; }
.fuel-control-event-main strong,
.fuel-control-event-main small { display: block; }
.fuel-control-event-main strong { color: #293b55; font-size: 10px; }
.fuel-control-event-main small { margin-top: 2px; overflow: hidden; color: #7b8ba0; font-size: 8px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.fuel-control-event-volume { text-align: right; }
.fuel-control-event-volume strong { color: #10845d; font-size: 14px; }
.fuel-control-source { padding: 4px 6px; border-radius: 7px; background: #eef3f9; color: #61758f; font-size: 7px; font-weight: 950; text-align: center; }
.fuel-control-source.is-orlen { background: #ffe9e6; color: #c14031; }
.fuel-control-source.is-mol { background: #e4f1ff; color: #2267af; }
.fuel-control-source.is-manual { background: #e3f6ed; color: #17835d; }
.fuel-control-interval { min-height: 64px; padding: 8px 12px; border-top: 1px solid #e8eef5; background: #f9fbfe; display: grid; grid-template-columns: 145px 170px 145px minmax(230px, 1fr); align-items: center; gap: 9px; }
.fuel-control-interval > span:not(.fuel-control-status) { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 5px; }
.fuel-control-interval > span:not(.fuel-control-status) > i { grid-row: span 3; color: #7790ae; font-size: 13px; }
.fuel-control-interval small,
.fuel-control-interval em { overflow: hidden; color: #8190a4; font-size: 8px; font-style: normal; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.fuel-control-interval strong { overflow: hidden; color: #2e435f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fuel-control-status { min-height: 43px; padding: 7px 9px; border-radius: 10px; background: #e9f7f1; display: flex; align-items: center; gap: 8px; color: #147b58; }
.fuel-control-status > i { font-size: 15px; }
.fuel-control-status > span { min-width: 0; }
.fuel-control-status strong,
.fuel-control-status small { display: block; }
.fuel-control-status strong { font-size: 9px; }
.fuel-control-status small { margin-top: 2px; color: inherit; font-size: 7px; white-space: normal; }
.fuel-control-event.is-warning .fuel-control-status { background: #ffe8e2; color: #ad4633; }
.fuel-control-event.is-missing .fuel-control-status { background: #fff1d3; color: #956a0d; }
.fuel-control-event.is-first .fuel-control-status { background: #eaf2fd; color: #3b6698; }
.fuel-control-empty { min-height: 260px; padding: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #74869d; text-align: center; }
.fuel-control-empty > i { color: #89a8ce; font-size: 34px; }
.fuel-control-empty strong { color: #2c405c; font-size: 15px; }
.fuel-control-empty span { max-width: 550px; font-size: 10px; font-weight: 750; line-height: 1.5; }
.fuel-control-empty .btn-primary { margin-top: 8px; }

.fuel-costs-empty {
    min-height: 170px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #7789a1;
    text-align: center;
}

.fuel-costs-empty i { color: #9db5d4; font-size: 28px; }
.fuel-costs-empty strong { color: #344762; font-size: 14px; }
.fuel-costs-empty span { font-size: 11px; font-weight: 750; }

.fuel-import-history-list article {
    min-height: 62px;
    padding: 10px 16px;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    grid-template-columns: 38px minmax(220px, 1fr) repeat(3, minmax(90px, .35fr));
    align-items: center;
    gap: 10px;
}

.fuel-import-history-list article:last-child { border-bottom: 0; }
.fuel-import-history-list article > span:not(.fuel-import-icon) { display: grid; gap: 2px; }
.fuel-import-history-list strong { color: #263750; font-size: 11px; }
.fuel-import-history-list small { color: #7b8ca2; font-size: 9px; font-weight: 750; }
.fuel-import-history-list .is-warning strong { color: #bd5428; }

.fuel-import-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e8f3ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2c70c8;
}

/* Import */
.fuel-import-assurance {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.fuel-import-assurance article {
    min-height: 72px;
    padding: 12px;
    border-radius: 13px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    gap: 11px;
}

.fuel-import-assurance article > span {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #e7f1ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2a6ed0;
    font-size: 17px;
}

.fuel-import-assurance strong,
.fuel-import-assurance small { display: block; }
.fuel-import-assurance strong { color: #2c3e59; font-size: 11px; }
.fuel-import-assurance small { margin-top: 3px; color: #73849b; font-size: 9px; font-weight: 750; line-height: 1.35; }

.fuel-import-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 18px;
    align-items: start;
}

.fuel-import-main,
.fuel-import-side { display: grid; gap: 18px; }

.fuel-import-form { padding: 20px; }
.fuel-import-form-head { display: flex; gap: 12px; align-items: center; }
.fuel-import-form-head > span {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: #1766dd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 950;
}

.fuel-import-dropzone {
    min-height: 180px;
    margin-top: 17px;
    padding: 24px;
    position: relative;
    border: 2px dashed #bbcee7;
    border-radius: 16px;
    background: linear-gradient(145deg, #fbfdff, #f5f9ff);
    display: flex;
    align-items: center;
    gap: 17px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.fuel-import-dropzone:hover,
.fuel-import-dropzone.is-file-dragover,
.fuel-import-dropzone.has-selected-file { border-color: #4f8de7; background: #f3f8ff; }
.fuel-import-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fuel-import-dropzone-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 19px;
    background: #e5f0ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2871d4;
    font-size: 29px;
}

.fuel-import-dropzone-copy { min-width: 0; flex: 1; display: grid; gap: 5px; }
.fuel-import-dropzone-copy strong { color: #263852; font-size: 15px; }
.fuel-import-dropzone-copy small { color: #71839b; font-size: 10px; font-weight: 750; }
.fuel-import-dropzone-copy em {
    max-width: 100%;
    margin-top: 5px;
    overflow: hidden;
    color: #2d68bb;
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fuel-import-submit-row {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.fuel-import-submit-row p { max-width: 560px; margin: 0; color: #6f8199; font-size: 10px; font-weight: 750; line-height: 1.5; }
.fuel-import-submit-row button:disabled { opacity: .5; cursor: not-allowed; }

.fuel-import-schema-grid { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.fuel-import-schema-grid article { padding: 17px; border: 1px solid #e0e8f3; border-radius: 14px; background: #fbfdff; }
.fuel-import-schema-grid article.is-orlen { border-top: 4px solid #e04a3b; }
.fuel-import-schema-grid article.is-mol { border-top: 4px solid #3279c9; }
.fuel-import-provider { padding: 4px 8px; border-radius: 999px; background: #edf3fa; color: #536983; font-size: 8px; font-weight: 950; letter-spacing: .05em; }
.fuel-import-schema-grid h3 { margin-top: 11px; }
.fuel-import-schema-grid p { min-height: 42px; margin: 5px 0 12px; color: #708299; font-size: 10px; font-weight: 750; line-height: 1.45; }
.fuel-import-schema-grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.fuel-import-schema-grid li { color: #526680; font-size: 10px; font-weight: 800; }
.fuel-import-schema-grid li i { margin-right: 5px; color: #159766; }

.fuel-import-side > section { overflow: hidden; }
.fuel-import-match-steps { margin: 0; padding: 13px; list-style: none; display: grid; gap: 4px; }
.fuel-import-match-steps li { padding: 10px; border-radius: 11px; display: flex; gap: 10px; }
.fuel-import-match-steps li:hover { background: #f7faff; }
.fuel-import-match-steps li > span { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 9px; background: #e8f1ff; display: inline-flex; align-items: center; justify-content: center; color: #2468c8; font-size: 10px; font-weight: 950; }
.fuel-import-match-steps strong,
.fuel-import-match-steps small { display: block; }
.fuel-import-match-steps strong { color: #2c3e58; font-size: 10px; }
.fuel-import-match-steps small { margin-top: 3px; color: #75869c; font-size: 9px; font-weight: 750; line-height: 1.4; }

.fuel-import-classification > div { padding: 12px 15px; border-bottom: 1px solid #edf2f7; display: flex; align-items: center; gap: 11px; }
.fuel-import-classification > div:last-child { border-bottom: 0; }
.fuel-import-classification > div > span { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; }
.fuel-import-classification .is-fuel { background: #ddf8ec; color: #128c5d; }
.fuel-import-classification .is-adblue { background: #e4f3ff; color: #2477ad; }
.fuel-import-classification .is-fee { background: #f1ebff; color: #7555ba; }
.fuel-import-classification p { margin: 0; }
.fuel-import-classification strong,
.fuel-import-classification small { display: block; }
.fuel-import-classification strong { color: #2b3d57; font-size: 10px; }
.fuel-import-classification small { margin-top: 3px; color: #73849b; font-size: 9px; font-weight: 750; line-height: 1.35; }

.fuel-import-full-history .is-warning { color: #bd5428; }

@media (max-width: 1450px) {
    .fuel-costs-filters { grid-template-columns: minmax(220px, 1.5fr) repeat(3, 1fr); }
    .fuel-costs-filter-actions { grid-column: span 1; }
    .fuel-costs-stats { grid-template-columns: repeat(3, 1fr); }
    .fuel-control-stats { grid-template-columns: repeat(3, 1fr); }
    .fuel-control-event-main { grid-template-columns: 82px 58px minmax(150px, 1fr) 95px; }
    .fuel-control-interval { grid-template-columns: 130px 150px 130px minmax(200px, 1fr); }
}

@media (max-width: 1100px) {
    .fuel-costs-dashboard-grid,
    .fuel-import-workspace { grid-template-columns: 1fr; }
    .fuel-import-side { grid-template-columns: 1fr 1fr; }
    .fuel-import-assurance { grid-template-columns: 1fr 1fr; }
    .fuel-manual-row { grid-template-columns: 95px minmax(180px, 1fr) 100px 110px 34px; }
    .fuel-manual-allocations { grid-column: 2 / -1; }
    .fuel-control-filters { grid-template-columns: 1fr 1fr 1fr; }
    .fuel-control-filters .fuel-costs-search { grid-column: span 2; }
    .fuel-control-vehicle-card > header { align-items: flex-start; flex-direction: column; }
    .fuel-control-vehicle-totals { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .fuel-control-interval { grid-template-columns: repeat(3, 1fr); }
    .fuel-control-status { grid-column: 1 / -1; }
    .fuel-manual-line-row { grid-template-columns: 28px 1fr 105px 120px 34px; }
    .fuel-manual-direct-asset { grid-column: 2 / 5; }
}

@media (max-width: 760px) {
    .fuel-costs-filters { grid-template-columns: 1fr 1fr; }
    .fuel-costs-search,
    .fuel-costs-filter-actions { grid-column: 1 / -1; }
    .fuel-costs-stats { grid-template-columns: 1fr 1fr; }
    .fuel-costs-dashboard-grid { display: block; }
    .fuel-ranking-panel { margin-top: 18px; }
    .fuel-costs-chart { padding-left: 30px; gap: 3px; }
    .fuel-costs-chart::before { display: none; }
    .fuel-costs-panel > header { align-items: flex-start; flex-direction: column; }
    .fuel-import-assurance,
    .fuel-import-side,
    .fuel-import-schema-grid { grid-template-columns: 1fr; }
    .fuel-import-dropzone { align-items: flex-start; flex-wrap: wrap; }
    .fuel-import-dropzone .btn-secondary { width: 100%; }
    .fuel-import-submit-row { align-items: stretch; flex-direction: column; }
    .fuel-import-history-list article { grid-template-columns: 38px 1fr; }
    .fuel-import-history-list article > span:nth-child(n+3) { padding-left: 48px; }
    .fuel-manual-row { grid-template-columns: 90px 1fr 34px; align-items: start; }
    .fuel-manual-quantity,
    .fuel-manual-cost,
    .fuel-manual-allocations { grid-column: 2 / -1; }
    .fuel-manual-row > form { grid-column: 3; grid-row: 1; }
    .fuel-manual-form-grid { grid-template-columns: 1fr 1fr; }
    .fuel-manual-form-grid label.is-wide { grid-column: 1 / -1; }
    .fuel-manual-line-row { grid-template-columns: 28px 1fr 1fr 34px; }
    .fuel-manual-line-row label:nth-of-type(1),
    .fuel-manual-direct-asset { grid-column: 2 / 4; }
    .fuel-manual-line-remove { grid-column: 4; grid-row: 1; }
    .fuel-manual-allocation-row { grid-template-columns: 1fr 1fr 34px; }
    .fuel-manual-allocation-row label:nth-child(1),
    .fuel-manual-allocation-row label:nth-child(2),
    .fuel-manual-allocation-row label:nth-child(4) { grid-column: span 1; }
    .fuel-manual-allocation-row label:nth-child(4) { grid-column: 1 / 3; }
    .fuel-control-filters { grid-template-columns: 1fr 1fr; }
    .fuel-control-filters .fuel-costs-search { grid-column: 1 / -1; }
    .fuel-control-stats { grid-template-columns: 1fr 1fr; }
    .fuel-control-event-main { grid-template-columns: 78px 55px 1fr 90px; }
    .fuel-control-interval { grid-template-columns: 1fr 1fr; }
    .fuel-control-status { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
    .fuel-costs-filters,
    .fuel-costs-stats { grid-template-columns: 1fr; }
    .fuel-costs-filters > * { grid-column: auto; }
    .fuel-costs-chart-tabs { width: 100%; }
    .fuel-costs-chart-tabs button { flex: 1; }
    .fuel-costs-chart { height: 225px; padding-right: 8px; padding-left: 8px; }
    .fuel-costs-chart-month { height: 175px; }
    .fuel-ranking-row { grid-template-columns: 34px minmax(0, 1fr) 14px; }
    .fuel-ranking-result { grid-column: 2 / 3; padding: 8px 0 0; border-top: 1px solid #e7eef6; border-left: 0; }
    .fuel-ranking-chevron { grid-column: 3; grid-row: 1; }
    .fuel-chart-head { align-items: stretch !important; }
    .fuel-chart-controls { width: 100%; justify-items: stretch; }
    .fuel-chart-year-control { justify-content: space-between; }
    .fuel-chart-legend { gap: 6px; }
    .fuel-ranking-tools { grid-template-columns: 1fr; }
    .fuel-manual-modal { padding: 0; }
    .fuel-manual-dialog { width: 100%; max-height: 100vh; min-height: 100vh; border: 0; border-radius: 0; }
    .fuel-manual-form-grid { grid-template-columns: 1fr; }
    .fuel-manual-form-grid label.is-wide { grid-column: auto; }
    .fuel-manual-allocation-head { align-items: stretch; flex-direction: column; }
    .fuel-manual-allocation-row { grid-template-columns: 1fr 34px; }
    .fuel-manual-allocation-row label { grid-column: 1; }
    .fuel-manual-allocation-row label:nth-child(3) { grid-column: 1; }
    .fuel-manual-allocation-remove { grid-column: 2; grid-row: 1; }
    .fuel-manual-line-row { grid-template-columns: 28px 1fr 34px; }
    .fuel-manual-line-row label,
    .fuel-manual-line-row label:nth-of-type(1),
    .fuel-manual-direct-asset { grid-column: 2; }
    .fuel-manual-line-number { grid-column: 1; grid-row: 1; }
    .fuel-manual-line-remove { grid-column: 3; grid-row: 1; }
    .fuel-manual-row { grid-template-columns: 1fr 34px; }
    .fuel-manual-date,
    .fuel-manual-source,
    .fuel-manual-quantity,
    .fuel-manual-cost,
    .fuel-manual-allocations { grid-column: 1; }
    .fuel-manual-row > form { grid-column: 2; grid-row: 1; }
    .fuel-control-filters,
    .fuel-control-stats { grid-template-columns: 1fr; }
    .fuel-control-filters > *,
    .fuel-control-filters .fuel-costs-search { grid-column: auto; }
    .fuel-control-vehicle-totals { display: grid; grid-template-columns: 1fr 1fr; }
    .fuel-control-vehicle-totals > b { grid-column: 1 / -1; }
    .fuel-control-timeline { padding-right: 8px; padding-left: 7px; }
    .fuel-control-event { grid-template-columns: 27px minmax(0, 1fr); gap: 3px; }
    .fuel-control-event-marker > span { width: 24px; height: 24px; }
    .fuel-control-event-main { grid-template-columns: 1fr auto; }
    .fuel-control-event-date,
    .fuel-control-event-place { grid-column: 1; }
    .fuel-control-source,
    .fuel-control-event-volume { grid-column: 2; }
    .fuel-control-event-place { grid-row: 2; }
    .fuel-control-event-volume { grid-row: 2; }
    .fuel-control-interval { grid-template-columns: 1fr; }
    .fuel-control-status { grid-column: auto; }
}



/* Source: css/pages/fines.css */
.fines-page,
.fines-form-page,
.fines-detail-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fines-hero,
.fines-panel,
.fines-stat-card,
.fines-toolbar,
.fines-side-card,
.fines-tip-card,
.fines-form-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.fines-hero {
    min-height: 108px;
    padding: 22px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.fines-hero h1 {
    margin: 0;
    color: #22314d;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: 0;
}

.fines-hero p {
    margin: 8px 0 0;
    color: #6f7f98;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.fines-hero-actions,
.fines-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fines-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fines-stat-card {
    min-height: 94px;
    padding: 14px 18px 12px 92px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.fines-stat-card::after {
    content: "";
    position: absolute;
    left: 92px;
    right: 18px;
    bottom: 10px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.13;
}

.fines-stat-card i {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 22px;
}

.fines-stat-card.is-warning i {
    background: #fff2d2;
    color: #d88300;
}

.fines-stat-card.is-danger i {
    background: #ffe5e1;
    color: #c23b2d;
}

.fines-stat-card.is-green i {
    background: #dcf8eb;
    color: #15935a;
}

.fines-stat-card span,
.fines-stat-card strong,
.fines-stat-card small {
    display: block;
}

.fines-stat-card span {
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.fines-stat-card strong {
    margin-top: 6px;
    color: #22314d;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.fines-stat-card small {
    margin-top: 6px;
    color: #2467df;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
}

.fines-stat-card.is-warning small {
    color: #d88300;
}

.fines-stat-card.is-danger small {
    color: #d9473d;
}

.fines-stat-card.is-green small {
    color: #15935a;
}

.fines-toolbar {
    padding: 12px;
    border-radius: 18px;
}

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

.fines-filter-form select,
.fines-filter-form input {
    min-height: 44px;
    border: 1px solid #d9e4f3;
    border-radius: 13px;
    background-color: #ffffff;
    color: #22314d;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 7px 18px rgba(39, 63, 96, 0.05);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.fines-filter-form select {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 1 176px;
    min-width: 160px;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, #52637d 50%),
        linear-gradient(135deg, #52637d 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 50%,
        calc(100% - 11px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.fines-filter-form input.js-date-picker {
    flex: 0 1 182px;
    min-width: 164px;
}

.fines-filter-form select:focus,
.fines-filter-form input:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
    box-shadow: 0 9px 20px rgba(47, 102, 216, 0.08);
}

.fines-search-box {
    flex: 1 1 340px;
    min-width: 0;
}

.fines-filter-tabs {
    flex: 0 1 auto;
    min-height: 44px;
    padding: 4px;
    border-radius: 14px;
    background: #f5f8fc;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
}

.fines-filter-tabs a {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    color: #52637d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.fines-filter-tabs a:hover,
.fines-filter-tabs a.active {
    background: #ffffff;
    color: #2467df;
    box-shadow: 0 6px 16px rgba(36, 103, 223, 0.11);
}

.fines-filter-form select[name="sort"] {
    min-width: 0;
}

.fines-filter-form select[name="vehicle_id"],
.fines-filter-form select[name="driver_id"] {
    min-width: 0;
}

.fines-clear-filters {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d9e4f3;
    border-radius: 13px;
    background: #ffffff;
    color: #41526f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.fines-clear-filters:hover {
    border-color: #9bbcff;
    color: #0f5fe8;
}

.fines-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.fines-main-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.fines-side-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    min-width: 0;
}

.fines-panel {
    border-radius: 20px;
    padding: 16px;
    min-width: 0;
}

.fines-panel-head {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.fines-panel-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.fines-panel-head p {
    margin: 5px 0 0;
    color: #74839a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.fines-table {
    display: grid;
    overflow-x: auto;
    overflow-y: visible;
}

.fines-table-head,
.fines-row {
    box-sizing: border-box;
    min-width: 1080px;
    display: grid;
    grid-template-columns:
        minmax(126px, 0.52fr)
        minmax(150px, 0.72fr)
        minmax(150px, 0.72fr)
        minmax(110px, 0.5fr)
        minmax(118px, 0.58fr)
        minmax(112px, 0.45fr)
        minmax(114px, 0.5fr)
        minmax(108px, 0.44fr)
        minmax(84px, 0.3fr)
        minmax(126px, 0.42fr);
    gap: 10px;
    align-items: center;
}

.fines-table-head {
    padding: 0 12px 10px;
    border-bottom: 1px solid #e7edf6;
    color: #71819a;
    font-size: 11px;
    font-weight: 900;
}

.fines-row {
    min-height: 82px;
    padding: 12px;
    border-bottom: 1px solid #edf2f8;
    color: #2b3a55;
    font-size: 13px;
    font-weight: 750;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.fines-row:hover {
    background: #f8fbff;
}

.fines-row > * {
    min-width: 0;
}

.fines-date-cell strong,
.fines-vehicle-cell strong,
.fines-person-cell strong,
.fines-number-cell strong,
.fines-authority-cell strong,
.fines-amount-cell strong,
.fines-due-cell strong,
.fines-row small {
    display: block;
}

.fines-date-cell strong,
.fines-row strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.fines-row small {
    margin-top: 3px;
    color: #64758f;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.fines-vehicle-cell,
.fines-person-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.fines-mini-icon,
.fines-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.fines-mini-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.fines-date-danger {
    color: #dc2626 !important;
}

.fines-date-warning {
    color: #d97706 !important;
}

.fines-date-ok {
    color: #15935a !important;
}

.fines-date-neutral {
    color: #607089 !important;
}

.fine-status,
.fines-doc-pill {
    min-height: 28px;
    min-width: 64px;
    padding: 0 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.fine-status {
    width: fit-content;
    background: #edf3fb;
    color: #52637d;
}

.fine-status.warning {
    background: #fff2d2;
    color: #a86600;
}

.fine-status.ok {
    background: #dcf8eb;
    color: #137a4e;
}

.fine-status.info {
    background: #eaf2ff;
    color: #2467df;
}

.fine-status.purple {
    background: #f1eaff;
    color: #6345b6;
}

.fine-status.neutral {
    background: #eef1f5;
    color: #68768b;
}

.fines-doc-pill {
    gap: 5px;
    border: 1px solid #dce6f3;
    background: #f7faff;
    color: #2f66d8;
}

.fines-muted-inline {
    color: #8a98ad;
    font-size: 13px;
    font-weight: 800;
}

.fines-actions {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    justify-content: flex-end;
    overflow: visible;
}

.fines-icon-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid #dbe6f4;
    border-radius: 12px;
    background: #ffffff;
    color: #42526d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.05);
}

.fines-icon-button:hover {
    border-color: #9bbcff;
    color: #0f5fe8;
}

.fines-more-menu {
    position: relative;
    flex: 0 0 36px;
}

.fines-more-menu summary {
    list-style: none;
}

.fines-more-menu summary::-webkit-details-marker {
    display: none;
}

.fines-more-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 15;
    min-width: 190px;
    padding: 8px;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(31, 45, 71, 0.16);
}

.fines-more-popover a,
.fines-more-popover button {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.fines-more-popover form {
    margin: 0;
}

.fines-more-popover a:hover,
.fines-more-popover button:hover {
    background: #f3f7ff;
    color: #0f5fe8;
}

.fines-side-card {
    border-radius: 20px;
    padding: 18px;
    min-width: 0;
}

.fines-side-head {
    padding-bottom: 13px;
    border-bottom: 1px solid #e8eef7;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fines-side-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 17px;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fines-side-head i,
.fines-side-head a {
    color: #2f66d8;
}

.fines-side-head a {
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.fines-side-list,
.fines-activity-list {
    display: grid;
    gap: 12px;
}

.fines-side-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.fines-side-item strong,
.fines-side-item small,
.fines-activity-item strong,
.fines-activity-item small {
    display: block;
}

.fines-side-item strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
}

.fines-side-item small {
    margin-top: 3px;
    color: #667790;
    font-size: 12px;
    font-weight: 750;
}

.fines-side-date {
    text-align: right;
}

.fines-donut-layout {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.fines-donut {
    position: relative;
    width: 132px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.fines-donut svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.fines-donut-bg,
.fines-donut-segment {
    fill: none;
    stroke-width: 14;
}

.fines-donut-bg {
    stroke: #edf2f8;
}

.fines-donut-segment {
    stroke-linecap: butt;
}

.fines-donut-center {
    position: relative;
    z-index: 1;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 22px rgba(39, 63, 96, 0.08);
}

.fines-donut-center strong {
    color: #22314d;
    font-size: 24px;
    line-height: 1;
}

.fines-donut-center span {
    margin-top: 5px;
    color: #74839a;
    font-size: 11px;
    font-weight: 800;
}

.fines-status-legend {
    display: grid;
    gap: 9px;
}

.fines-status-legend div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #52637d;
    font-size: 12px;
    font-weight: 800;
}

.fines-status-legend span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fines-status-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.fines-status-legend .status-unpaid i,
.fines-donut-segment.status-unpaid {
    background: #f59e0b;
    stroke: #f59e0b;
}

.fines-status-legend .status-paid i,
.fines-donut-segment.status-paid {
    background: #20b77a;
    stroke: #20b77a;
}

.fines-status-legend .status-transferred i,
.fines-donut-segment.status-transferred {
    background: #2f6fed;
    stroke: #2f6fed;
}

.fines-status-legend .status-disputed i,
.fines-donut-segment.status-disputed {
    background: #8b5cf6;
    stroke: #8b5cf6;
}

.fines-status-legend .status-cancelled i,
.fines-donut-segment.status-cancelled {
    background: #94a3b8;
    stroke: #94a3b8;
}

.fines-status-legend .status-draft i,
.fines-donut-segment.status-draft {
    background: #cbd5e1;
    stroke: #cbd5e1;
}

.fines-activity-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.fines-activity-item > span {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fines-activity-item strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
}

.fines-activity-item small {
    margin-top: 4px;
    color: #6f7f98;
    font-size: 12px;
    font-weight: 750;
}

.fines-muted-empty {
    min-height: 96px;
    border: 1px dashed #dbe6f4;
    border-radius: 16px;
    background: #fbfdff;
    color: #6f7f98;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.fines-tip-card {
    min-height: 76px;
    padding: 14px 18px;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.fines-tip-card > span {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.fines-tip-card strong,
.fines-tip-card p {
    margin: 0;
}

.fines-tip-card strong {
    color: #22314d;
    font-size: 15px;
}

.fines-tip-card p {
    margin-top: 4px;
    color: #667790;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 750;
}

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

.fines-form-card {
    border-radius: 20px;
    padding: 20px;
}

.fines-form-section {
    padding: 0 0 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f8;
}

.fines-form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
}

.fines-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.fines-form-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 20px;
}

.fines-form-section-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
}

.fines-form-section-head p {
    margin: 5px 0 0;
    color: #74839a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

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

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

.fines-form-card input,
.fines-form-card select,
.fines-form-card textarea {
    width: 100%;
}

.fines-form-card .form-group.is-disabled {
    opacity: 0.55;
}

.fines-form-card .form-group.is-disabled label,
.fines-form-card .form-group.is-disabled .field-helper-text {
    color: #8a98ad;
}

.fines-form-card input:disabled,
.fines-form-card select:disabled {
    cursor: not-allowed;
    background: #eef3f8;
    color: #7c8ba2;
}

.fines-existing-file,
.fines-attachment-card {
    margin-bottom: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #dce7f5;
    border-radius: 14px;
    background: #f7faff;
    color: #2d5eb9;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 850;
}

.fines-existing-file-row .fines-existing-file {
    margin-bottom: 0;
}

.fines-remove-attachment-action {
    margin: 0 0 12px;
    width: fit-content;
    min-height: 36px;
    padding: 0 12px 0 6px;
    border: 1px solid #ffd1cc;
    border-radius: 999px;
    background: #fff5f4;
    color: #c23b2d;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.fines-remove-attachment-action input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fines-remove-attachment-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    color: #c23b2d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(194, 59, 45, 0.12);
}

.fines-remove-attachment-action:has(input:checked) {
    background: #d9473d;
    border-color: #d9473d;
    color: #ffffff;
}

.fines-remove-attachment-action:has(input:checked) .fines-remove-attachment-icon {
    color: #d9473d;
}

.fines-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.fine-contract-form-page .fine-assignment-grid,
.fine-contract-form-page .fine-data-grid,
.fine-contract-form-page .fine-description-grid {
    column-gap: 22px;
    row-gap: 12px;
}

.fine-contract-form-page .fine-person-field label span {
    color: #60708a;
    font-weight: 750;
}

.fine-contract-form-page .fine-inline-helper {
    color: #64748f;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.fine-contract-form-page .fine-inline-helper a {
    color: #1769e8;
    text-decoration: none;
}

.fine-contract-form-page .fine-inline-helper a:hover {
    text-decoration: underline;
}

.fine-contract-form-page .fine-payment-reference-field,
.fine-contract-form-page .fine-attachment-field {
    grid-column: 1 / -1;
}

.fine-contract-form-page textarea {
    min-height: 58px !important;
    resize: vertical;
}

.fine-contract-form-page .form-group.is-disabled {
    opacity: 0.56;
}

.fine-contract-form-page .form-group.is-disabled label,
.fine-contract-form-page .form-group.is-disabled .fine-inline-helper {
    color: #8a98ad;
}

.fine-contract-form-page input:disabled,
.fine-contract-form-page select:disabled {
    cursor: not-allowed;
    background: #eef3f8 !important;
    color: #7c8ba2 !important;
}

.fine-contract-form-page .fine-upload-zone {
    min-height: 68px;
    padding: 14px 16px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-align: left;
}

.fine-contract-form-page .fine-upload-zone i {
    width: 42px;
    color: #1769e8;
    flex: 0 0 42px;
    font-size: 31px;
}

.fine-contract-form-page .fine-upload-copy {
    min-width: 0;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 5px;
    color: #1d2b45;
}

.fine-contract-form-page .fine-upload-copy strong {
    max-width: none;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
}

.fine-contract-form-page .fine-upload-copy small {
    color: #64748f;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 750;
}

.fine-contract-form-page .fine-upload-zone em {
    min-width: 112px;
    margin: 0;
    flex: 0 0 auto;
}

.fine-preview-list .subscription-preview-row strong {
    max-width: 124px;
}

.fines-side-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fines-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.fines-detail-summary {
    margin: 0 0 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.fines-detail-summary article {
    min-height: 82px;
    padding: 14px;
    border: 1px solid #e2ebf7;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.fines-detail-summary article.is-danger {
    border-color: #ffd1cc;
    background: linear-gradient(135deg, #fff7f6 0%, #ffffff 100%);
}

.fines-detail-summary article.is-success {
    border-color: #c9efd9;
    background: linear-gradient(135deg, #f1fff7 0%, #ffffff 100%);
}

.fines-detail-summary span,
.fines-detail-summary strong {
    display: block;
}

.fines-detail-summary span {
    color: #71819a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.fines-detail-summary strong {
    margin-top: 8px;
    color: #21324f;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 950;
}

.fines-detail-grid div {
    padding: 13px;
    border-radius: 14px;
    background: #f7f9fd;
    border: 1px solid #edf2f8;
}

.fines-detail-grid dt {
    margin: 0 0 5px;
    color: #73839c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.fines-detail-grid dd {
    margin: 0;
    color: #243653;
    font-size: 14px;
    font-weight: 800;
}

.fines-assignee-badge {
    width: fit-content;
    min-height: 24px;
    margin: 0 0 7px;
    padding: 0 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 900;
}

.fines-assignee-badge.is-driver {
    background: #eaf2ff;
    color: #2467df;
}

.fines-assignee-badge.is-person {
    background: #f1eaff;
    color: #6749c7;
}

.fines-text-block {
    margin-top: 18px;
}

.fines-text-block h3 {
    margin: 0 0 8px;
    color: #22314d;
    font-size: 15px;
}

.fines-text-block p {
    margin: 0;
    white-space: pre-line;
    color: #53647d;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 650;
}

.fines-attachment-card small,
.fines-attachment-card strong {
    display: block;
}

.fines-attachment-card small {
    margin-top: 3px;
    color: #6f7f98;
    font-size: 12px;
}

.fines-muted-box {
    padding: 14px;
    border-radius: 14px;
    background: #f7f9fd;
    color: #6f7f98;
    font-size: 13px;
    font-weight: 750;
}

.fines-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fines-history article {
    padding: 12px;
    border-radius: 14px;
    background: #f7f9fd;
}

.fines-history strong,
.fines-history span {
    display: block;
}

.fines-history strong {
    color: #243653;
    font-size: 13px;
}

.fines-history span {
    margin-top: 3px;
    color: #7c8ba2;
    font-size: 12px;
    font-weight: 750;
}

.fines-history p {
    margin: 8px 0 0;
    color: #53647d;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-line;
}

.fines-paid-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fines-paid-form input {
    min-height: 42px;
    max-width: 158px;
}

.fines-paid-date-input,
.fines-paid-form .flatpickr-input {
    height: 42px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #ffffff;
    color: #22314d;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 7px 18px rgba(39, 63, 96, 0.05);
}

.fines-paid-date-input:focus,
.fines-paid-form .flatpickr-input:focus {
    border-color: #9bbcff;
    outline: 3px solid rgba(47, 102, 216, 0.14);
}

/* Fine details v2 */
.fines-detail-page-v2 {
    display: grid;
    gap: 18px;
}

.fines-detail-page-v2 .app-page-header {
    margin-bottom: -6px;
}

.fines-detail-edit-v2 {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

.fines-detail-meta-v2 {
    margin-top: -18px;
    color: #536781;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 850;
}

.fines-detail-meta-v2 .fine-status {
    min-height: 28px;
}

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

.fines-detail-main-v2,
.fines-side-panel-v2 {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.fines-detail-page-v2 .fines-panel {
    border: 1px solid #dce6f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(37, 58, 91, 0.055);
}

.fines-detail-card-v2 {
    padding: 24px;
}

.fines-detail-card-v2 > h2,
.fines-notes-card-v2 > h2,
.fines-side-card-v2 > h2 {
    margin: 0;
    color: #172846;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 950;
}

.fines-detail-summary-v2 {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.fines-detail-summary-v2 article {
    min-width: 0;
    min-height: 112px;
    padding: 18px;
    border: 1px solid #dfe8f4;
    border-radius: 10px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
}

.fines-detail-summary-v2 article.is-danger {
    border-color: #ffc9c2;
    background: #fff8f7;
}

.fines-detail-summary-v2 article.is-success {
    border-color: #ccefdc;
    background: #f6fff9;
}

.fines-detail-summary-v2 article > span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eef4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.fines-detail-summary-v2 article.is-success > span {
    background: #dff8ea;
    color: #168451;
}

.fines-detail-summary-v2 small,
.fines-detail-fields-v2 dt,
.fines-notes-grid-v2 small,
.fines-quick-card-v2 dt {
    color: #667b99;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 950;
    text-transform: uppercase;
}

.fines-detail-summary-v2 small {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fines-detail-summary-v2 small .fine-status {
    min-height: 26px;
    padding: 0 10px;
    font-style: normal;
    text-transform: none;
}

.fines-detail-summary-v2 strong,
.fines-detail-summary-v2 b {
    min-width: 0;
    margin-top: 7px;
    color: #172846;
    display: block;
    overflow-wrap: anywhere;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 950;
}

.fines-detail-summary-v2 b {
    font-size: 16px;
}

.fines-detail-fields-v2 {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
}

.fines-detail-fields-v2 > div {
    min-width: 0;
    min-height: 60px;
    padding: 11px 6px;
    border-bottom: 1px solid #e4ebf4;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.fines-detail-fields-v2 > div > span {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f1f5fb;
    color: #172846;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.fines-detail-fields-v2 dl,
.fines-detail-fields-v2 dt,
.fines-detail-fields-v2 dd {
    min-width: 0;
    margin: 0;
}

.fines-detail-fields-v2 dd {
    margin-top: 5px;
    color: #172846;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.fines-assignment-row-v2 {
    grid-column: 1 / -1;
}

.fines-assignment-row-v2 .fines-assignee-badge {
    margin: 0 8px 0 0;
    display: inline-flex;
    vertical-align: middle;
}

.fines-notes-card-v2,
.fines-side-card-v2 {
    padding: 24px;
}

.fines-notes-grid-v2 {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.fines-notes-grid-v2 article {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
}

.fines-notes-grid-v2 article > span,
.fines-side-empty-v2 > span,
.fines-history-v2 article > span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #edf4ff;
    color: #2f73ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    font-size: 20px;
}

.fines-notes-grid-v2 p {
    margin: 8px 0 0;
    color: #40536f;
    white-space: pre-line;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 850;
}

.fines-side-empty-v2,
.fines-history-v2 article {
    min-width: 0;
    min-height: 78px;
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #172846;
    text-decoration: none;
}

.fines-side-empty-v2 strong,
.fines-side-empty-v2 small,
.fines-history-v2 strong,
.fines-history-v2 small {
    display: block;
}

.fines-side-empty-v2 strong,
.fines-history-v2 strong {
    color: #172846;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 950;
}

.fines-side-empty-v2 small,
.fines-history-v2 small {
    margin-top: 4px;
    color: #63748d;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 750;
}

.fines-side-empty-v2.is-link:hover strong {
    color: #1f63dd;
}

.fines-history-v2 {
    display: grid;
    gap: 14px;
}

.fines-history-v2 article {
    margin-top: 0;
    align-items: flex-start;
}

.fines-history-v2 p {
    margin: 6px 0 0;
    color: #52647d;
    white-space: pre-line;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 750;
}

.fines-quick-card-v2 dl {
    margin: 18px 0 0;
    display: grid;
}

.fines-quick-card-v2 dl > div {
    min-height: 46px;
    border-bottom: 1px solid #e4ebf4;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.fines-quick-card-v2 dl > div:last-child {
    border-bottom: 0;
}

.fines-quick-card-v2 dt,
.fines-quick-card-v2 dd {
    min-width: 0;
    margin: 0;
}

.fines-quick-card-v2 dd {
    color: #172846;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 950;
}

.fines-quick-card-v2 .fine-status {
    justify-self: end;
}

@media (max-width: 1599px) {
    .fines-workspace,
    .fines-detail-summary,
    .fines-form-layout,
    .fines-detail-layout {
        grid-template-columns: 1fr;
    }

    .fines-side-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fines-side-column .fines-side-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    .fines-detail-summary,
    .fines-form-layout,
    .fines-detail-layout {
        grid-template-columns: 1fr;
    }

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

}

@media (max-width: 720px) {
    .fines-hero,
    .fines-panel-head,
    .fines-form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .fines-stats-grid,
    .fines-side-column,
    .fines-form-card .form-grid,
    .fines-detail-grid,
    .fines-donut-layout {
        grid-template-columns: 1fr;
    }

    .fines-filter-tabs {
        width: 100%;
    }

    .fines-filter-form select,
    .fines-clear-filters {
        flex: 1 1 100%;
    }

    .fines-hero-actions,
    .fines-paid-form {
        width: 100%;
    }

    .fines-tip-card {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .fine-contract-form-page .fine-assignment-grid,
    .fine-contract-form-page .fine-data-grid,
    .fine-contract-form-page .fine-description-grid {
        grid-template-columns: 1fr;
    }

    .fine-contract-form-page .fine-upload-zone {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .fine-contract-form-page .fine-upload-zone em {
        width: 100%;
    }
}

@media (min-width: 1181px) {
    .fines-detail-page-v2 .fines-detail-layout-v2 {
        grid-template-columns: minmax(0, 1fr) 380px;
    }
}

@media (max-width: 1180px) {
    .fines-detail-summary-v2,
    .fines-detail-fields-v2,
    .fines-notes-grid-v2 {
        grid-template-columns: 1fr;
    }

    .fines-detail-page-v2 .app-page-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .fines-detail-edit-v2 {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .fines-detail-card-v2,
    .fines-notes-card-v2,
    .fines-side-card-v2 {
        padding: 18px;
    }

    .fines-detail-summary-v2 article,
    .fines-detail-fields-v2 > div,
    .fines-notes-grid-v2 article,
    .fines-side-empty-v2,
    .fines-history-v2 article {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .fines-detail-summary-v2 article > span,
    .fines-detail-fields-v2 > div > span,
    .fines-notes-grid-v2 article > span,
    .fines-side-empty-v2 > span,
    .fines-history-v2 article > span {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .fines-quick-card-v2 dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 8px 0;
    }

    .fines-quick-card-v2 dd {
        text-align: left;
    }
}



/* Source: css/pages/mileage.css */
.mileage-page,
.mileage-form-page,
.mileage-entry-form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mileage-page,
.mileage-form-page {
    overflow-x: clip;
}

.mileage-form-page {
    max-width: 1280px;
    margin: 0 auto;
}

.mileage-page {
    max-width: 100%;
    margin: 0;
}

@media (max-width: 1450px) {
    .mileage-page > .app-module-header {
        flex-wrap: wrap;
        gap: 14px;
    }

    .mileage-page > .app-module-header > .app-module-header-main {
        flex: 1 0 100%;
    }

    .mileage-page > .app-module-header > .app-module-header-actions {
        width: 100%;
        padding-top: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .mileage-page > .app-module-header > .app-module-header-actions > form,
    .mileage-page > .app-module-header > .app-module-header-actions > form > .btn-secondary {
        width: 100%;
    }
}

.mileage-short-threshold-form {
    min-height: 48px;
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #d7e2f1;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(31, 65, 120, 0.07);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.mileage-short-threshold-form:focus-within {
    border-color: #8bb2ef;
    box-shadow: 0 0 0 3px rgba(52, 113, 224, 0.11);
}

.mileage-short-threshold-form > label {
    min-width: 158px;
    padding: 0 8px 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4a5d78;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 850;
}

.mileage-short-threshold-form input {
    width: 45px;
    height: 30px;
    border: 1px solid #cbdaf0;
    border-radius: 9px;
    background: #f8fbff;
    color: #164ea6;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    outline: 0;
}

.mileage-short-threshold-form small {
    color: #77879d;
    font-size: 11px;
    font-weight: 800;
}

.mileage-short-threshold-apply {
    width: 43px;
    min-width: 43px;
    border: 0;
    border-left: 1px solid #dce6f3;
    background: #f5f8fd;
    color: #3169c6;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 150ms ease, color 150ms ease;
}

.mileage-short-threshold-apply:hover {
    background: #eaf2ff;
    color: #164da7;
}

.mileage-short-threshold-apply:focus-visible {
    outline: 2px solid #3777df;
    outline-offset: -3px;
}

@media (max-width: 760px) {
    .mileage-short-threshold-form > label {
        min-width: 0;
        flex: 1 1 auto;
        justify-content: center;
    }
}

.mileage-location-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
    gap: 18px;
    align-items: start;
}

.mileage-location-form {
    display: grid;
    gap: 16px;
}

.mileage-location-form > label:not(.mileage-location-toggle) {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.mileage-location-form input[type="text"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    padding: 10px 12px;
    color: #0f172a;
    background: #fff;
}

.mileage-location-form input[type="text"]:focus {
    outline: 3px solid rgba(37, 99, 235, 0.14);
    border-color: #2563eb;
}

.mileage-location-toggle {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
}

.mileage-location-toggle input {
    margin-top: 3px;
}

.mileage-location-toggle span {
    display: grid;
    gap: 3px;
}

.mileage-location-toggle strong { color: #172554; }
.mileage-location-toggle small { color: #64748b; line-height: 1.45; }

.mileage-location-form-actions,
.mileage-location-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.mileage-location-list {
    display: grid;
    gap: 10px;
}

.mileage-location-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #fff;
}

.mileage-location-form-card,
.mileage-location-list-card,
.mileage-location-row,
.mileage-tools-grid,
.mileage-tools-workspace,
.mileage-issues-panel,
.mileage-row {
    scroll-margin-top: 1.25rem;
}

.mileage-location-row:target {
    animation: mileage-target-soft-highlight 1.4s ease-out;
}

@keyframes mileage-target-soft-highlight {
    0% {
        background: #eef5ff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }
    100% {
        background: #fff;
        box-shadow: none;
    }
}

.mileage-location-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
}

.mileage-location-main {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.mileage-location-main strong { color: #172554; font-size: 0.95rem; }
.mileage-location-main span { color: #334155; line-height: 1.4; }
.mileage-location-main small { color: #64748b; }

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

@media (max-width: 560px) {
    .mileage-location-row { grid-template-columns: 38px minmax(0, 1fr); }
    .mileage-location-actions { grid-column: 2; justify-content: flex-start; }
}

.mileage-panel,
.mileage-toolbar,
.mileage-stat-card {
    border: 1px solid #e4ebf5;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.mileage-panel h2 {
    margin: 0;
    color: #22314d;
    letter-spacing: 0;
}

.mileage-panel-head p {
    margin: 7px 0 0;
    color: #6f7f98;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.mileage-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.mileage-history-vehicle-card {
    min-height: 92px;
    padding: 16px 18px;
    border: 1px solid #dfe8f4;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7faff 0%, #ffffff 72%);
    box-shadow: 0 10px 26px rgba(39, 63, 96, 0.06);
    display: grid;
    grid-template-columns: 58px minmax(180px, auto) minmax(260px, 1fr);
    gap: 14px;
    align-items: center;
}

.mileage-history-vehicle-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 24px;
}

.mileage-history-vehicle-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mileage-history-vehicle-card > span:nth-child(2) {
    display: grid;
    gap: 3px;
}

.mileage-history-vehicle-card small {
    color: #71829a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.mileage-history-vehicle-card strong {
    color: #20304c;
    font-size: 18px;
    font-weight: 950;
}

.mileage-history-vehicle-card b {
    color: #2f66d8;
    font-size: 12px;
}

.mileage-history-vehicle-card p {
    margin: 0;
    color: #667892;
    line-height: 1.5;
    font-size: 13px;
    font-weight: 700;
}

.mileage-history-filter-form {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px);
    gap: 10px;
}

.mileage-history-filter-form > select {
    min-height: 44px;
}

.mileage-history-groups {
    display: grid;
    gap: 16px;
}

.mileage-history-group {
    min-width: 0;
    border: 1px solid #e1e9f4;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.06);
    overflow: hidden;
}

.mileage-history-group-head {
    padding: 14px 16px;
    border-bottom: 1px solid #e5ecf5;
    background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 82%);
    display: flex;
    align-items: center;
    gap: 11px;
}

.mileage-history-group-head > span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #e7f0ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.mileage-history-group-head h2,
.mileage-history-group-head p {
    margin: 0;
}

.mileage-history-group-head h2 {
    color: #20304c;
    font-size: 17px;
    font-weight: 950;
}

.mileage-history-group-head p {
    margin-top: 3px;
    color: #71819a;
    font-size: 11px;
    font-weight: 750;
}

.mileage-history-group .mileage-list-panel {
    border-radius: 0;
}

.mileage-history-group .mileage-table .mileage-row:last-child {
    border-bottom: 0;
}

.mileage-history-row-actions {
    display: flex;
    justify-content: flex-start;
}

.mileage-history-empty {
    min-height: 210px;
}

.mileage-stat-card {
    min-height: 94px;
    padding: 18px 18px 16px 92px;
    border-radius: 16px;
    position: relative;
}

.mileage-stat-card i {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 22px;
}

.mileage-stat-card.is-green i { background: #dcf8eb; color: #15935a; }
.mileage-stat-card.is-purple i { background: #f1eaff; color: #6a49c8; }
.mileage-stat-card.is-warning i { background: #fff2d2; color: #d88300; }
.mileage-stat-card.is-danger i { background: #ffe2e2; color: #e43d3d; }
.mileage-stat-card.is-danger strong { color: #ef3838; }

.mileage-lock-note {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d9e4f3;
    border-radius: 13px;
    background: #f6f9ff;
    color: #50627d;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 850;
}

.mileage-stat-card span,
.mileage-stat-card strong,
.mileage-stat-card small {
    display: block;
}

.mileage-stat-card span {
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.mileage-stat-card strong {
    margin-top: 8px;
    color: #22314d;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.mileage-stat-card small {
    margin-top: 8px;
    color: #7888a0;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 800;
}

.mileage-toolbar,
.mileage-panel {
    padding: 14px;
    border-radius: 18px;
}

.mileage-month-status,
.mileage-fix-panel {
    border: 1px solid #e4ebf5;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.mileage-month-status {
    min-height: 118px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(184px, 0.62fr) minmax(320px, 1.45fr) minmax(150px, 0.54fr) auto;
    gap: 18px;
    align-items: center;
}

.mileage-month-status-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mileage-month-status-main > i {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.mileage-month-status.is-approved .mileage-month-status-main > i {
    background: #fff2d2;
    color: #d88300;
}

.mileage-month-status.is-closed .mileage-month-status-main > i {
    background: #dcf8eb;
    color: #15935a;
}

.mileage-month-status small,
.mileage-fix-head small {
    color: #72819a;
    font-size: 11px;
    font-weight: 850;
}

.mileage-month-status strong {
    display: block;
    margin-top: 3px;
    color: #22314d;
    font-size: 21px;
}

.mileage-month-status-main small b {
    margin-top: 6px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1f63e4;
    display: block;
    font-size: 11px;
}

.mileage-month-status.is-approved .mileage-month-status-main small b {
    background: #fff2d2;
    color: #b66a00;
}

.mileage-month-status.is-closed .mileage-month-status-main small b {
    background: #dcf8eb;
    color: #15935a;
}

.mileage-month-progress {
    min-width: 0;
}

.mileage-progress-head,
.mileage-progress-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 18px;
    align-items: center;
}

.mileage-progress-head span {
    color: #64758f;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.mileage-progress-head strong {
    margin: 0;
    font-size: 16px;
    text-align: right;
}

.mileage-progress-head em {
    color: #7c8ba2;
    font-size: 13px;
    font-style: normal;
    font-weight: 850;
}

.mileage-progress-track {
    margin: 12px 0;
    width: 100%;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: #e9eef8;
    display: block;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    accent-color: #1f63e4;
}

.mileage-progress-track::-webkit-progress-bar {
    border-radius: 999px;
    background: #e9eef8;
}

.mileage-progress-track::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, #1f63e4 0%, #317bff 100%);
    transition: width 0.22s ease;
}

.mileage-progress-track::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #1f63e4 0%, #317bff 100%);
}

.mileage-progress-foot {
    grid-template-columns: 1fr auto;
}

.mileage-progress-foot span {
    color: #6d7d96;
    font-size: 12px;
    font-weight: 750;
}

.mileage-progress-foot span:last-child {
    text-align: right;
}

.mileage-progress-foot strong {
    margin: 3px 0 0;
    font-size: 14px;
}

.mileage-month-status-copy {
    border-left: 1px solid #dfe7f2;
    padding-left: 18px;
}

.mileage-month-status p,
.mileage-fix-panel p {
    margin: 0;
    color: #64758f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 750;
}

.mileage-month-status-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.mileage-month-status-actions form {
    margin: 0;
}

.mileage-month-status-actions button[disabled] {
    opacity: 0.48;
    cursor: not-allowed;
}

.mileage-fix-panel {
    padding: 0;
    overflow: hidden;
}

.mileage-fix-panel:not(.is-clean) {
    border-color: #ffd28a;
    background: linear-gradient(90deg, #fff6df 0%, #fffaf1 42%, #ffffff 100%);
}

.mileage-fix-panel.is-clean {
    border-color: #cbefdc;
    background: #fbfffd;
}

.mileage-fix-compact {
    min-height: 76px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.mileage-fix-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: #fff2d2;
    color: #d88300;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.mileage-fix-icon.is-ok {
    background: #dcf8eb;
    color: #15935a;
}

.mileage-fix-compact strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.mileage-fix-compact small {
    margin-top: 4px;
    color: #64758f;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 750;
}

.mileage-fix-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.mileage-fix-head span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.mileage-fix-head i {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: #fff2d2;
    color: #d88300;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mileage-fix-panel.is-clean .mileage-fix-head i {
    background: #dcf8eb;
    color: #15935a;
}

.mileage-fix-list {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mileage-fix-item {
    min-height: 58px;
    padding: 10px;
    border: 1px solid #f4d5b0;
    border-radius: 14px;
    background: #fffaf2;
    color: #22314d;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    text-decoration: none;
}

.mileage-fix-item.is-error {
    border-color: #f1b9b9;
    background: #fff6f6;
}

.mileage-fix-item > i {
    margin-top: 1px;
    color: #d88300;
}

.mileage-fix-item.is-error > i {
    color: #dc3636;
}

.mileage-fix-item strong,
.mileage-fix-item small {
    display: block;
}

.mileage-fix-item strong {
    font-size: 12px;
    font-weight: 900;
}

.mileage-fix-item small {
    margin-top: 3px;
    color: #667792;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 750;
}

.mileage-filter-form {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(188px, auto) minmax(180px, 248px) minmax(140px, 170px);
    gap: 10px;
    align-items: center;
}

.mileage-search-box {
    width: 100%;
    min-width: 0;
}

.mileage-filter-form > select,
.mileage-month-filter {
    width: 100%;
    min-width: 0;
}

.mileage-filter-form select,
.mileage-month-picker select,
.mileage-summary-form select,
.mileage-summary-form input,
.mileage-odometer-form select,
.mileage-odometer-form .js-date-picker,
.mileage-odometer-form input[type="number"],
.mileage-form-grid input,
.mileage-form-grid select,
.mileage-route-fields input,
.mileage-route-fields textarea {
    min-height: 44px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #ffffff;
    color: #22314d;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 750;
}

.mileage-route-fields textarea {
    width: 100%;
    min-height: 92px;
    padding-block: 11px;
    line-height: 1.45;
    resize: vertical;
}

.mileage-odometer-form select,
.mileage-odometer-form .js-date-picker,
.mileage-odometer-form input[type="number"] {
    width: 100%;
    box-shadow: 0 6px 16px rgba(39, 63, 96, 0.04);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mileage-odometer-form select:focus,
.mileage-odometer-form .js-date-picker:focus,
.mileage-odometer-form input[type="number"]:focus {
    border-color: #79a5f5;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.mileage-odometer-form input::placeholder {
    color: #9aa8ba;
}

.mileage-month-filter {
    min-height: 44px;
    padding: 0 11px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    color: #3971d5;
    background: #ffffff;
    gap: 7px;
    box-shadow: 0 6px 16px rgba(39, 63, 96, 0.04);
}

.mileage-month-picker input[type="hidden"] {
    display: none;
}

.mileage-month-picker select {
    border: 0 !important;
    min-height: 42px !important;
    padding: 0 !important;
    color: #34445f;
    font-weight: 850;
    outline: 0;
    box-shadow: none;
}

.mileage-month-picker select:first-of-type {
    min-width: 94px;
}

.mileage-month-picker select:last-of-type {
    min-width: 72px;
}

.mileage-workspace {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.mileage-main-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mileage-side-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mileage-panel-head {
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.mileage-list-head-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.mileage-bulk-mode-toggle[aria-pressed="true"] {
    border-color: #8db3f4;
    background: #eaf2ff;
    color: #245dbd;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.1);
}

.mileage-page.is-bulk-selecting {
    padding-bottom: 190px;
}

.mileage-page.is-bulk-selecting .mileage-drag-handle {
    display: none;
}

.mileage-page.is-bulk-selecting .mileage-insert-slot {
    display: none;
    pointer-events: none;
}

.mileage-selection-indicator {
    display: none;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    border: 2px solid #b4c7e4;
    border-radius: 7px;
    color: #ffffff;
    background: #ffffff;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.mileage-selection-indicator i {
    opacity: 0;
    font-size: 14px;
}

.mileage-page.is-bulk-selecting .mileage-selection-indicator {
    display: inline-flex;
}

.mileage-page.is-bulk-selecting .is-bulk-selected .mileage-selection-indicator {
    border-color: #2f6fed;
    background: #2f6fed;
    box-shadow: 0 2px 6px rgba(47, 111, 237, 0.2);
}

.mileage-page.is-bulk-selecting .is-bulk-selected .mileage-selection-indicator i {
    opacity: 1;
}

.mileage-page.is-bulk-selecting .mileage-row {
    cursor: pointer;
    user-select: none;
}

.mileage-page.is-bulk-selecting .mileage-table .mileage-row:not(.is-bulk-selected):hover {
    z-index: 1;
    background: #f5f8fe;
    box-shadow: inset 0 0 0 1px #d4e1f5;
}

.mileage-page.is-bulk-selecting .mileage-table .mileage-row:focus-visible {
    z-index: 3;
    outline: 3px solid rgba(47, 111, 237, 0.24);
    outline-offset: 2px;
}

.mileage-page.is-bulk-selecting .mileage-table .mileage-row.is-bulk-selected[data-bulk-selected="true"] {
    z-index: 2;
    background: linear-gradient(90deg, #dceaff 0%, #edf4ff 100%);
    box-shadow: inset 4px 0 0 #2f6fed, inset 0 0 0 2px #8db3f4;
}

.mileage-bulk-assistant {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    z-index: 1200;
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 16px 18px 18px;
    border: 1px solid rgba(185, 204, 233, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 68px rgba(24, 47, 84, 0.22), 0 0 0 4px rgba(47, 111, 237, 0.06);
    backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    transform: translateX(-50%);
    overflow: visible;
    animation: mileage-bulk-assistant-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mileage-bulk-assistant[hidden] {
    display: none;
}

@keyframes mileage-bulk-assistant-in {
    from { opacity: 0; transform: translate(-50%, 10px) scale(0.985); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.mileage-bulk-assistant-head {
    min-width: 0;
    padding-right: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.mileage-bulk-assistant-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mileage-bulk-assistant-icon {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(145deg, #1f63df 0%, #4b8df8 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 9px 22px rgba(40, 100, 213, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.mileage-bulk-assistant-icon .bi-signpost-split {
    font-size: 22px;
}

.mileage-bulk-assistant-icon .bi-stars {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    color: #eaf2ff;
}

.mileage-bulk-assistant-brand strong,
.mileage-bulk-assistant-brand div > span {
    display: block;
}

.mileage-bulk-assistant-brand strong {
    color: #243653;
    font-size: 14px;
    line-height: 1.25;
}

.mileage-bulk-assistant-brand div > span {
    margin-top: 4px;
    color: #708098;
    font-size: 11px;
    font-weight: 750;
}

.mileage-bulk-assistant-brand div > span b {
    color: #2f6fed;
}

.mileage-bulk-assistant-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 1px solid #dce5f1;
    border-radius: 10px;
    background: #f7f9fc;
    color: #5e6f89;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.mileage-bulk-assistant-close:hover,
.mileage-bulk-assistant-close:focus-visible {
    border-color: #a9c4ef;
    background: #eef4ff;
    color: #245fca;
    outline: 0;
    transform: translateY(-1px);
}

.mileage-bulk-selection-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.mileage-bulk-select-toggle {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #bfd2ef;
    border-radius: 11px;
    background: #f4f8ff;
    color: #285fab;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mileage-bulk-select-toggle:hover:not(:disabled),
.mileage-bulk-select-toggle:focus-visible,
.mileage-bulk-select-toggle[aria-pressed="true"] {
    border-color: #79a6ee;
    background: #e8f1ff;
    color: #1f58b7;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.1);
}

.mileage-bulk-select-incomplete {
    border-color: #e7c77b;
    background: #fff9e9;
    color: #8a6013;
}

.mileage-bulk-select-incomplete:hover:not(:disabled),
.mileage-bulk-select-incomplete:focus-visible,
.mileage-bulk-select-incomplete[aria-pressed="true"] {
    border-color: #d9ad49;
    background: #fff3cf;
    color: #744d08;
    box-shadow: 0 0 0 3px rgba(217, 173, 73, 0.14);
}

.mileage-bulk-select-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.mileage-bulk-delete-form {
    margin: 0;
    display: flex;
    align-items: center;
}

.mileage-bulk-edit-actions {
    min-width: 0;
    padding-top: 13px;
    border-top: 1px solid #e6edf7;
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.25fr) 124px;
    gap: 10px;
    align-items: end;
}

.mileage-bulk-edit-actions label,
.mileage-bulk-edit-field {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.mileage-bulk-edit-actions label > span,
.mileage-bulk-edit-field > span {
    color: #63728a;
    font-size: 10px;
    font-weight: 900;
}

.mileage-bulk-edit-actions select,
.mileage-bulk-edit-actions input {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #d5dfec;
    border-radius: 10px;
    background: #ffffff;
    color: #253650;
    font-size: 12px;
}

.mileage-bulk-edit-actions select:focus,
.mileage-bulk-edit-actions input:focus {
    border-color: #77a2ef;
    outline: 3px solid rgba(47, 111, 237, 0.12);
}

.mileage-bulk-driver-control {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mileage-bulk-driver-control select {
    min-width: 0;
    flex: 1 1 auto;
}

.mileage-bulk-driver-warning {
    position: relative;
    flex: 0 0 auto;
}

.mileage-bulk-driver-warning[hidden],
.mileage-bulk-compatible-only[hidden] {
    display: none !important;
}

.mileage-bulk-driver-warning > button {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #efc772;
    border-radius: 10px;
    background: #fff6dc;
    color: #b8740a;
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mileage-bulk-driver-warning > button:hover,
.mileage-bulk-driver-warning > button:focus-visible {
    border-color: #dfa936;
    background: #ffefbd;
    color: #965b05;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(223, 169, 54, 0.18);
}

.mileage-bulk-driver-conflicts {
    position: absolute;
    right: 0;
    bottom: calc(100% + 9px);
    z-index: 20;
    width: min(560px, calc(100vw - 48px));
    max-height: min(430px, calc(100vh - 240px));
    padding: 14px;
    border: 1px solid #ead6a5;
    border-radius: 14px;
    background: #fffef9;
    color: #34425a;
    box-shadow: 0 18px 48px rgba(66, 50, 18, 0.22);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(5px);
    transition: opacity 0.14s ease, visibility 0.14s ease, transform 0.14s ease;
}

.mileage-bulk-driver-warning:hover .mileage-bulk-driver-conflicts,
.mileage-bulk-driver-warning:focus-within .mileage-bulk-driver-conflicts {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mileage-bulk-driver-conflicts > strong {
    display: block;
    margin-bottom: 10px;
    color: #754e0d;
    font-size: 12px;
}

.mileage-bulk-driver-conflicts section + section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #efe3c5;
}

.mileage-bulk-driver-conflicts section > b {
    display: block;
    margin-bottom: 7px;
    color: #263852;
    font-size: 11px;
}

.mileage-bulk-driver-conflicts ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 7px;
}

.mileage-bulk-driver-conflicts li {
    padding: 8px 9px;
    border-radius: 9px;
    background: #fff8e6;
    display: grid;
    gap: 2px;
}

.mileage-bulk-driver-conflicts li > span {
    color: #86580c;
    font-size: 10px;
    font-weight: 900;
}

.mileage-bulk-driver-conflicts li > small {
    color: #35465f;
    font-size: 10px;
    font-weight: 750;
}

.mileage-bulk-driver-conflicts li > em,
.mileage-bulk-driver-conflicts-more {
    color: #6e7888;
    font-size: 9px;
    font-style: normal;
    line-height: 1.35;
}

.mileage-bulk-driver-conflicts-more {
    display: block;
    margin-top: 7px;
    font-weight: 800;
}

.mileage-bulk-compatible-only {
    margin-top: 2px;
    padding: 7px 9px;
    border: 1px solid #ead7a7;
    border-radius: 9px;
    background: #fffaeb;
    color: #78530f;
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 7px !important;
    cursor: pointer;
}

.mileage-bulk-compatible-only input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: #c98a17;
}

.mileage-bulk-compatible-only > span {
    color: inherit !important;
    font-size: 10px !important;
    font-weight: 850 !important;
}

.mileage-bulk-apply,
.mileage-bulk-delete-form .btn-danger {
    min-height: 42px;
    white-space: nowrap;
}

.mileage-bulk-apply {
    width: 100%;
    justify-content: center;
    gap: 7px;
}

@media (max-width: 1120px) {
    .mileage-bulk-edit-actions {
        grid-template-columns: minmax(190px, 0.85fr) minmax(240px, 1.15fr) 116px;
    }
}

@media (max-width: 760px) {
    .mileage-list-head-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .mileage-bulk-mode-toggle {
        width: 100%;
        justify-content: center;
    }

    .mileage-page.is-bulk-selecting {
        padding-bottom: 410px;
    }

    .mileage-bulk-assistant {
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
        padding: 14px;
        border-radius: 17px;
        gap: 10px;
    }

    .mileage-bulk-assistant-head {
        padding-right: 38px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .mileage-bulk-assistant-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .mileage-bulk-selection-actions {
        width: 100%;
        justify-content: stretch;
    }

    .mileage-bulk-select-toggle,
    .mileage-bulk-delete-form {
        flex: 1 1 150px;
    }

    .mileage-bulk-select-toggle,
    .mileage-bulk-delete-form .btn-danger {
        width: 100%;
        justify-content: center;
    }

    .mileage-bulk-edit-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .mileage-bulk-row-check {
        top: 17px;
        transform: none;
    }
}

.mileage-panel h2 {
    font-size: 18px;
}

.mileage-table {
    min-width: 1144px;
}

.mileage-table.is-drag-active {
    user-select: none;
}

.mileage-list-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.mileage-table-head,
.mileage-table .mileage-row,
.mileage-drag-ghost {
    display: grid;
    grid-template-columns: 112px 128px minmax(210px, 320px) 72px minmax(172px, 1.2fr) minmax(142px, 0.85fr) 76px minmax(162px, 190px);
    gap: 10px;
    align-items: center;
}

.mileage-table-head {
    padding: 10px;
    border-bottom: 1px solid #e5ebf4;
    color: #72819a;
    font-size: 11px;
    font-weight: 900;
}

.mileage-table .mileage-row {
    position: relative;
    min-height: 74px;
    padding: 12px 10px;
    border-bottom: 1px solid #edf1f6;
    color: #243653;
    font-size: 12px;
    transition: background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.mileage-table .mileage-row.starts-new-day {
    margin-top: 28px;
}

.mileage-table .mileage-row.starts-new-day.is-first-day {
    margin-top: 24px;
}

.mileage-table .mileage-row.starts-new-day::before {
    content: "";
    position: absolute;
    top: -15px;
    right: 10px;
    left: 10px;
    height: 1px;
    background: linear-gradient(90deg, #bcd1f1 0%, #e1eaf6 68%, rgba(225, 234, 246, 0) 100%);
}

.mileage-table .mileage-row.starts-new-day::after {
    content: attr(data-day-label);
    position: absolute;
    top: -27px;
    left: 16px;
    z-index: 2;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid #cfdef3;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    color: #4d6688;
    box-shadow: 0 5px 13px rgba(51, 86, 136, 0.09);
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.mileage-table .mileage-row[draggable="true"] {
    cursor: default;
}

.mileage-table .mileage-row.is-dragging {
    opacity: 0.24;
    cursor: grabbing;
    background: #eef5ff;
    box-shadow: inset 0 0 0 1px #a9c5ff;
    transform: scale(0.997);
}

.mileage-table .mileage-row.is-drag-over {
    background: #f7fbff;
    box-shadow: inset 0 2px 0 #2f6fed;
}

.mileage-table .mileage-row.is-reordering {
    will-change: transform;
}

.mileage-table.is-saving-order,
.mileage-table .mileage-row.is-saving-order {
    pointer-events: none;
    opacity: 0.72;
}

.mileage-table .mileage-row.is-deleting {
    pointer-events: none;
    cursor: wait;
    opacity: 0.48;
}

.mileage-table .mileage-row.is-deleting .mileage-icon-button.is-delete {
    cursor: wait;
    transform: none;
}

.mileage-table .mileage-row.is-drop-blocked {
    background: #fff3f3;
    box-shadow: inset 0 0 0 1px #f4b2b2;
}

.mileage-table .mileage-row.has-sequence-warning {
    background: linear-gradient(90deg, #fffaf0 0, #ffffff 38%);
    box-shadow: inset 3px 0 0 #d99a2b;
}

.mileage-table .mileage-row.is-weekend:not(.has-sequence-warning):not(.is-inline-editing) {
    background: linear-gradient(90deg, #fffaf0 0, #ffffff 58%);
    box-shadow: inset 3px 0 0 #e7b44e;
}

.mileage-table .mileage-row.starts-new-day.is-weekend::after {
    border-color: #ecd49d;
    background: linear-gradient(180deg, #fffdf8 0%, #fff7e6 100%);
    color: #8a631d;
}

.mileage-insert-slot {
    position: absolute;
    z-index: 4;
    right: 10px;
    bottom: -19px;
    left: 10px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2764d9;
    text-decoration: none;
}

.mileage-insert-slot::before {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    top: 19px;
    height: 1px;
    background: linear-gradient(90deg, rgba(190, 209, 237, 0) 0%, #d9e5f5 18%, #d9e5f5 82%, rgba(190, 209, 237, 0) 100%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mileage-insert-slot-button {
    position: relative;
    z-index: 1;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #b8cff3;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
    box-shadow: 0 5px 14px rgba(48, 93, 161, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(7px) scale(0.9);
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.18s ease, box-shadow 0.18s ease;
}

.mileage-insert-slot-button i {
    font-size: 13px;
}

.mileage-insert-slot:hover::before,
.mileage-insert-slot:focus-visible::before {
    background: linear-gradient(90deg, rgba(72, 132, 237, 0) 0%, #8db7fb 18%, #8db7fb 82%, rgba(72, 132, 237, 0) 100%);
    transform: scaleX(0.98);
}

.mileage-insert-slot:hover .mileage-insert-slot-button,
.mileage-insert-slot:focus-visible .mileage-insert-slot-button {
    opacity: 1;
    transform: translateY(-3px) scale(1);
}

.mileage-insert-slot:hover .mileage-insert-slot-button {
    background: linear-gradient(180deg, #ffffff 0%, #e8f1ff 100%);
    box-shadow: 0 10px 22px rgba(40, 102, 210, 0.2), 0 0 0 4px rgba(86, 143, 238, 0.1);
}

.mileage-insert-slot:focus-visible {
    outline: none;
}

.mileage-insert-slot:focus-visible .mileage-insert-slot-button {
    outline: 3px solid rgba(47, 111, 237, 0.28);
    outline-offset: 2px;
}

.mileage-insert-slot.is-append {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    height: 46px;
    margin: 3px 10px 9px;
    border: 1px dashed #c6d8f3;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.82) 0%, rgba(240, 246, 255, 0.96) 100%);
}

.mileage-insert-slot.is-append::before {
    top: 50%;
}

.mileage-insert-slot.is-append .mileage-insert-slot-button {
    border-color: #8eb3eb;
    background: #ffffff;
    color: #1f5bb7;
    opacity: 1;
    transform: none;
}

.mileage-insert-slot.is-append:hover,
.mileage-insert-slot.is-append:focus-visible {
    border-color: #78a5e9;
    background: #edf4ff;
}

.mileage-insert-slot.is-append:hover .mileage-insert-slot-button,
.mileage-insert-slot.is-append:focus-visible .mileage-insert-slot-button {
    transform: translateY(-1px) scale(1.02);
}

#mileage-month-status,
#mileage-monthly-summary,
#mileage-odometer-reading,
[id^="mileage-entry-"],
[id^="mileage-summary-"] {
    scroll-margin-top: 96px;
}

#mileage-month-status.is-mileage-focus-pulse,
#mileage-monthly-summary.is-mileage-focus-pulse,
#mileage-odometer-reading.is-mileage-focus-pulse,
.mileage-table .mileage-row.is-mileage-focus-pulse,
.mileage-summary-card.is-mileage-focus-pulse {
    position: relative;
    z-index: 3;
    animation: mileage-focus-pulse 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center;
}

@keyframes mileage-focus-pulse {
    0% {
        transform: scale(1);
        outline: 0 solid rgba(47, 111, 237, 0);
        box-shadow: 0 0 0 rgba(47, 111, 237, 0);
    }
    36% {
        transform: scale(1.018);
        outline: 3px solid rgba(47, 111, 237, 0.22);
        box-shadow: 0 18px 38px rgba(47, 111, 237, 0.18), 0 0 0 6px rgba(255, 207, 92, 0.28);
    }
    100% {
        transform: scale(1);
        outline: 0 solid rgba(47, 111, 237, 0);
        box-shadow: 0 0 0 rgba(47, 111, 237, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #mileage-month-status.is-mileage-focus-pulse,
    #mileage-monthly-summary.is-mileage-focus-pulse,
    #mileage-odometer-reading.is-mileage-focus-pulse,
    .mileage-table .mileage-row.is-mileage-focus-pulse,
    .mileage-summary-card.is-mileage-focus-pulse {
        animation: none;
        outline: 3px solid rgba(47, 111, 237, 0.24);
        box-shadow: 0 0 0 6px rgba(255, 207, 92, 0.22);
    }
}

.mileage-drag-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
    pointer-events: none;
    min-height: 68px;
    padding: 10px;
    border: 1px solid #a9c5ff;
    border-radius: 14px;
    background: #ffffff;
    color: #243653;
    font-size: 12px;
    box-shadow: 0 18px 44px rgba(28, 55, 103, 0.2), 0 0 0 4px rgba(47, 111, 237, 0.08);
    opacity: 0.98;
    will-change: transform;
}

.mileage-drag-ghost .mileage-row-actions {
    opacity: 0.36;
}

.mileage-drag-ghost .mileage-insert-slot {
    display: none;
}

.mileage-table .mileage-row small,
.mileage-summary-list small {
    display: block;
    margin-top: 3px;
    color: #7b8aa2;
    font-size: 11px;
    font-weight: 750;
}

.mileage-vehicle-cell,
.mileage-date-cell,
.mileage-driver-cell,
.mileage-summary-vehicle,
.mileage-route-cell a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mileage-vehicle-cell,
.mileage-driver-cell,
.mileage-route-cell,
.mileage-purpose-cell,
.mileage-distance-cell {
    min-width: 0;
}

.mileage-vehicle-cell > span,
.mileage-driver-cell > span,
.mileage-summary-vehicle > span {
    min-width: 0;
}

.mileage-date-cell {
    gap: 6px;
}

.mileage-weekend-badge {
    width: fit-content;
    min-height: 18px;
    margin-top: 5px;
    padding: 0 6px;
    border: 1px solid #ecd49d;
    border-radius: 999px;
    background: #fff5dc;
    color: #8b6116;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.025em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.mileage-weekend-badge i {
    font-size: 9px;
}

.mileage-drag-handle {
    width: 28px;
    height: 34px;
    border: 1px solid #dbe5f3;
    border-radius: 11px;
    background: #f8fbff;
    color: #6e83a2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.mileage-drag-handle:hover {
    border-color: #a9c5ff;
    color: #2f6fed;
    background: #eef5ff;
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.12);
}

.mileage-drag-handle:active {
    cursor: grabbing;
    transform: translateY(1px);
}

.mileage-vehicle-thumb,
.mileage-driver-avatar,
.mileage-summary-thumb {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
}

.mileage-vehicle-thumb,
.mileage-summary-thumb,
.mileage-driver-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eef4ff;
    color: #3971d5;
    font-size: 12px;
    font-weight: 900;
}

.mileage-vehicle-thumb img,
.mileage-driver-avatar img,
.mileage-summary-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: 1px solid #e2e9f3;
}

.mileage-vehicle-cell i {
    color: #3971d5;
}

.mileage-summary-thumb {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

.mileage-driver-avatar {
    border-radius: 50%;
    background: #eaf2ff;
}

.mileage-driver-cell small {
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.mileage-purpose-cell strong {
    display: block;
    line-height: 1.45;
}

.mileage-purpose-cell strong.is-empty {
    color: #8795aa;
    font-weight: 750;
}

.mileage-purpose-exception {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: #80610f;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.25;
}

.mileage-purpose-exception i {
    color: #b68300;
}

.mileage-scope-badge {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #286ce5;
    font-size: 11px;
    font-weight: 900;
}

.mileage-scope-badge.is-local {
    background: #e2f8ee;
    color: #118754;
}

.mileage-scope-badge.is-national {
    background: #fff3d8;
    color: #b66a00;
}

.mileage-scope-badge.is-foreign {
    background: #ffe3e3;
    color: #d63b3b;
}

.mileage-scope-badge.is-manual,
.mileage-scope-badge.is-unknown {
    background: #f2f5f9;
    color: #61718a;
}

.mileage-route-cell a {
    width: fit-content;
    margin-top: 5px;
    color: #2f6fed;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}

.mileage-route-two-line {
    display: grid;
    gap: 2px;
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.mileage-route-two-line span {
    display: block;
}

.mileage-route-two-line .mileage-route-waypoint {
    color: #526b8d;
    font-size: 11px;
    font-weight: 800;
}

.mileage-route-waypoint > .bi-geo-alt {
    margin-right: 3px;
    color: #2f6fed;
}

.mileage-route-arrow {
    width: 20px;
    height: 16px;
    color: #1f63e4;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
}

.mileage-sequence-alert-shell {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin-top: 6px;
}

.mileage-sequence-alert {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 1px solid #ead8b3;
    border-radius: 9px;
    background: #fffbf3;
    color: #6f531e;
    overflow: hidden;
}

.mileage-sequence-alert.is-animating {
    transition: height 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: height;
}

.mileage-sequence-alert-head {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 7px;
    cursor: pointer;
    list-style: none;
}

.mileage-sequence-alert-head::-webkit-details-marker {
    display: none;
}

.mileage-sequence-alert-head::marker {
    display: none;
    content: "";
}

.mileage-sequence-alert-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #f6e7c5;
    color: #a66a08;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.mileage-sequence-alert-copy {
    min-width: 0;
}

.mileage-sequence-alert-head strong {
    display: block;
    color: #725113;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
}

.mileage-sequence-alert .mileage-sequence-alert-head small {
    margin-top: 1px;
    color: #8a6b31;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
}

.mileage-sequence-alert-toggle {
    color: #8d6b2e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.mileage-sequence-alert-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.mileage-sequence-alert-shell.has-repair-action .mileage-sequence-alert-head {
    padding-right: 65px;
}

.mileage-sequence-alert-toggle .is-close-label {
    display: none;
}

.mileage-sequence-alert[open] .mileage-sequence-alert-toggle .is-open-label {
    display: none;
}

.mileage-sequence-alert[open] .mileage-sequence-alert-toggle .is-close-label {
    display: inline;
}

.mileage-sequence-alert-toggle i {
    font-size: 9px;
    transition: transform 0.16s ease;
}

.mileage-sequence-alert[open] .mileage-sequence-alert-toggle i {
    transform: rotate(180deg);
}

.mileage-sequence-alert-details {
    padding: 7px;
    border-top: 1px solid #eee0c4;
    display: grid;
    gap: 7px;
    background: #ffffff;
    transform-origin: top;
    transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.mileage-sequence-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.mileage-sequence-point {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid #e5eaf2;
    border-radius: 9px;
    background: #ffffff;
    display: grid;
    grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.mileage-sequence-point.is-expected {
    border-color: #bbdec8;
    background: #f3fbf6;
}

.mileage-sequence-point.is-current {
    border-color: #ead8b3;
    background: #fffbf3;
}

.mileage-sequence-alert .mileage-sequence-point small {
    margin: 0;
    color: #7c8899;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.025em;
    line-height: 1.15;
    text-transform: uppercase;
}

.mileage-sequence-point strong {
    display: block;
    color: #253854;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.mileage-sequence-break-symbol {
    min-height: 24px;
    color: #ae7212;
    display: grid;
    grid-template-columns: minmax(10px, 1fr) auto auto minmax(10px, 1fr);
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
}

.mileage-sequence-break-symbol::before,
.mileage-sequence-break-symbol::after {
    content: "";
    border-top: 1px dashed #dfc17e;
}

.mileage-sequence-break-symbol i {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #f9edcf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.mileage-sequence-alert .mileage-sequence-break-symbol small {
    margin: 0;
    color: #95631a;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.mileage-sequence-date-warning {
    padding: 7px 8px;
    border: 1px solid #f0c08d;
    border-radius: 9px;
    background: #fff8ec;
    color: #9a590d;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.mileage-sequence-date-warning > i {
    font-size: 15px;
    text-align: center;
}

.mileage-sequence-date-warning strong {
    display: block;
    font-size: 9px;
    font-weight: 950;
}

.mileage-sequence-alert .mileage-sequence-date-warning small {
    margin-top: 1px;
    color: #996832;
    font-size: 8px;
    font-weight: 800;
}

.mileage-sequence-fallback {
    margin: 0;
    color: #795b20;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.4;
}

.mileage-continuity-repair-form {
    display: flex;
    margin: 0;
}

.mileage-continuity-repair-form.is-alert-header {
    position: absolute;
    top: 5px;
    right: 7px;
    z-index: 3;
}

.mileage-continuity-repair-form.is-alert-header .mileage-continuity-repair-button {
    width: auto;
    min-height: 24px;
    padding: 4px 7px;
    border-color: #dec17f;
    border-radius: 7px;
    background: #ffffff;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.mileage-continuity-repair-button {
    width: 100%;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #d8b160;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff8e8;
    color: #805a12;
    box-shadow: none;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.mileage-continuity-repair-button:hover:not(:disabled) {
    border-color: #be8d2f;
    background: #f9ebc9;
    color: #674506;
    transform: translateY(-1px);
}

.mileage-continuity-repair-button:focus-visible {
    outline: 3px solid rgba(208, 151, 37, 0.2);
    outline-offset: 2px;
}

.mileage-continuity-repair-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

@media (prefers-reduced-motion: reduce) {
    .mileage-sequence-alert.is-animating,
    .mileage-sequence-alert-details,
    .mileage-sequence-alert-toggle i {
        transition: none;
    }
}

.mileage-icon-button {
    position: relative;
    width: 32px;
    height: 32px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #f7f9fc;
    color: #5a6b86;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.mileage-icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 54, 83, 0.12);
}

.mileage-icon-button:focus-visible {
    outline: 2px solid #2f6fed;
    outline-offset: 2px;
}

.mileage-icon-button.is-edit:hover {
    border-color: #a9c6f8;
    background: #eef5ff;
    color: #2f6fed;
}

.mileage-icon-button.is-preview {
    color: #356ddb;
}

.mileage-icon-button.is-preview:hover {
    border-color: #91b4f3;
    background: #eaf2ff;
    color: #1558d6;
}

.mileage-icon-button.is-return:hover {
    border-color: #8bd4a9;
    background: #e9f7ef;
    color: #1f9d57;
}

.mileage-icon-button.is-delete:hover {
    border-color: #ff9d9d;
    background: #ffecec;
    color: #ef3838;
}

/* Hover tooltip — anchored to the button's right edge so it stays inside the
   horizontally scrollable list panel (overflow-x: auto). */
.mileage-icon-button::after,
.mileage-icon-button::before {
    position: absolute;
    bottom: calc(100% + 9px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 40;
}

.mileage-icon-button::after {
    content: attr(data-tooltip);
    right: 0;
    padding: 5px 9px;
    border-radius: 7px;
    background: #1f2a44;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

.mileage-icon-button::before {
    content: "";
    right: 11px;
    bottom: calc(100% + 4px);
    border: 5px solid transparent;
    border-top-color: #1f2a44;
}

.mileage-icon-button[data-tooltip]:hover::after,
.mileage-icon-button[data-tooltip]:hover::before,
.mileage-icon-button[data-tooltip]:focus-visible::after,
.mileage-icon-button[data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mileage-row-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: start;
}

.mileage-row-default-actions {
    width: 146px;
    display: grid;
    grid-template-columns: repeat(4, 32px);
    align-items: center;
    justify-content: start;
    gap: 6px;
}

body.has-mileage-route-preview {
    overflow: hidden;
}

.mileage-route-preview-dialog {
    width: min(860px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: #1f2a44;
    box-shadow: 0 28px 80px rgba(24, 39, 75, 0.28);
    overflow: hidden;
}

.mileage-route-preview-dialog::backdrop {
    background: rgba(18, 31, 53, 0.54);
    backdrop-filter: blur(3px);
}

.mileage-route-preview-dialog [hidden] {
    display: none !important;
}

.mileage-route-preview-panel {
    max-height: calc(100vh - 32px);
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.mileage-route-preview-head {
    min-height: 74px;
    padding: 16px 18px;
    border-bottom: 1px solid #e5ebf4;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: center;
}

.mileage-route-preview-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #eaf2ff;
    color: #2f6fed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.mileage-route-preview-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.mileage-route-preview-head p {
    margin: 4px 0 0;
    color: #70809a;
    font-size: 12px;
    font-weight: 700;
}

.mileage-route-preview-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f7f9fc;
    color: #61718a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mileage-route-preview-close:hover,
.mileage-route-preview-close:focus-visible {
    border-color: #a9c6f8;
    background: #eef5ff;
    color: #2f6fed;
    outline: 0;
}

.mileage-route-preview-map {
    position: relative;
    height: min(440px, 54vh);
    min-height: 300px;
    background: #eef3f9;
    overflow: hidden;
}

.mileage-route-preview-map iframe {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border: 0;
    background: #eef3f9;
}

.mileage-route-preview-loading,
.mileage-route-preview-fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 24px;
    background: #eef3f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #5f7190;
    text-align: center;
}

.mileage-route-preview-loading span {
    width: 30px;
    height: 30px;
    border: 3px solid #c6d7f2;
    border-top-color: #2f6fed;
    border-radius: 50%;
    animation: mileage-map-preview-spin 0.8s linear infinite;
}

.mileage-route-preview-loading strong,
.mileage-route-preview-fallback strong {
    color: #2a3a56;
    font-size: 14px;
}

.mileage-route-preview-fallback i {
    color: #2f6fed;
    font-size: 30px;
}

.mileage-route-preview-map.is-loaded .mileage-route-preview-loading {
    display: none;
}

.mileage-route-preview-details {
    margin: 0;
    padding: 14px 18px;
    border-top: 1px solid #e5ebf4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 22px;
}

.mileage-route-preview-details > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
}

.mileage-route-preview-details dt {
    color: #70809a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.mileage-route-preview-details dd {
    margin: 0;
    color: #293b58;
    font-size: 12px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.mileage-route-preview-actions {
    padding: 0 18px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes mileage-map-preview-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 720px) {
    .mileage-route-preview-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 16px;
    }

    .mileage-route-preview-panel {
        max-height: calc(100vh - 16px);
    }

    .mileage-route-preview-head {
        min-height: 64px;
        padding: 12px;
        grid-template-columns: 38px minmax(0, 1fr) 34px;
        gap: 9px;
    }

    .mileage-route-preview-icon {
        width: 38px;
        height: 38px;
    }

    .mileage-route-preview-map {
        height: min(340px, 47vh);
        min-height: 240px;
    }

    .mileage-route-preview-details {
        padding: 12px;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .mileage-route-preview-actions {
        padding: 4px 12px 12px;
        display: grid;
        grid-template-columns: 1fr;
    }

    .mileage-route-preview-actions .btn-secondary,
    .mileage-route-preview-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.mileage-quick-edit-button {
    grid-column: 1 / -1;
    min-height: 29px;
    padding: 0 8px;
    border: 1px solid #c7d8f2;
    border-radius: 9px;
    background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
    color: #3268bd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.mileage-quick-edit-button:hover,
.mileage-quick-edit-button:focus-visible {
    border-color: #79a6f3;
    background: #eaf3ff;
    color: #1f59b5;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.mileage-return-form {
    margin: 0;
}

.mileage-row.is-creating-return .mileage-icon-button.is-return {
    cursor: wait;
    opacity: 0.56;
    transform: none;
}

.mileage-row-actions form {
    margin: 0;
    display: contents;
}

.mileage-inline-edit-form,
.mileage-inline-editor,
.mileage-inline-edit-actions,
.mileage-mobile-field-label {
    display: none;
}

.mileage-row.is-inline-editing {
    background: linear-gradient(90deg, #f6faff 0%, #ffffff 68%);
    box-shadow: inset 3px 0 0 #2f6fed;
}

.mileage-row.is-inline-editing .mileage-inline-view,
.mileage-row.is-inline-editing .mileage-row-default-actions {
    display: none;
}

.mileage-row.is-inline-editing .mileage-inline-editor {
    display: grid;
    gap: 5px;
}

.mileage-row.is-inline-editing .mileage-inline-edit-actions {
    display: grid;
}

.mileage-row.is-inline-editing .mileage-drag-handle {
    display: none;
}

.mileage-inline-editor > span,
.mileage-inline-editor label > span {
    color: #697b96;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.mileage-inline-editor input,
.mileage-inline-editor select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #b9cdee;
    border-radius: 10px;
    background: #ffffff;
    color: #22314d;
    box-sizing: border-box;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.mileage-inline-editor input:focus,
.mileage-inline-editor select:focus {
    border-color: #2f6fed;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.mileage-inline-route-editor {
    gap: 7px !important;
}

.mileage-inline-date-editor {
    width: 100%;
    min-width: 0;
}

.mileage-inline-date-control {
    position: relative;
    min-width: 0;
    color: #22314d;
    letter-spacing: normal;
    text-transform: none;
}

.mileage-inline-date-control > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 10px;
    color: #3971d5;
    font-size: 12px;
    pointer-events: none;
    transform: translateY(-50%);
}

.mileage-inline-date-control input,
.mileage-inline-date-control input.flatpickr-input {
    padding-left: 30px;
}

.mileage-inline-route-editor label {
    display: grid;
    gap: 4px;
}

.mileage-inline-edit-actions {
    grid-template-columns: auto auto;
    justify-content: end;
    gap: 7px;
}

.mileage-inline-edit-actions .btn-primary,
.mileage-inline-edit-actions .btn-secondary {
    min-height: 36px;
    white-space: nowrap;
}

.mileage-inline-edit-actions .btn-primary {
    gap: 7px;
    padding: 0 13px 0 10px;
    border: 1px solid #1f63dc;
    border-radius: 10px;
    background: linear-gradient(135deg, #3c83f7 0%, #2868df 100%);
    box-shadow: 0 7px 14px rgba(37, 99, 235, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.mileage-inline-edit-actions .btn-primary i {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: inline-grid;
    place-items: center;
    font-size: 11px;
    line-height: 1;
}

.mileage-inline-edit-actions .btn-secondary {
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.mileage-inline-edit-error {
    grid-column: 1 / -1;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #f0c5c5;
    border-radius: 9px;
    background: #fff4f4;
    color: #bd3434;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.mileage-row.is-saving-inline-edit .mileage-inline-edit-actions {
    opacity: 0.65;
    pointer-events: none;
}

.mileage-driver-inline-view {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mileage-driver-inline-view > span:last-child {
    min-width: 0;
}

.mileage-summary-form,
.mileage-odometer-form,
.mileage-summary-list {
    display: grid;
    gap: 11px;
}

.mileage-locked-box {
    padding: 16px;
    border: 1px solid #dbe5f3;
    border-radius: 15px;
    background: #f7faff;
    color: #22314d;
    display: grid;
    gap: 8px;
    justify-items: start;
}

.mileage-locked-box i {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.mileage-locked-box strong {
    font-size: 14px;
    font-weight: 900;
}

.mileage-locked-box p {
    margin: 0;
    color: #6f7f98;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 750;
}

.mileage-summary-form label:not(.mileage-toggle) > span:first-child,
.mileage-odometer-form label > span:first-child,
.mileage-entry-form label > span {
    display: block;
    margin-bottom: 6px;
    color: #64758f;
    font-size: 12px;
    font-weight: 900;
}

.mileage-summary-form input,
.mileage-summary-form select,
.mileage-odometer-form input,
.mileage-odometer-form select,
.mileage-entry-form input,
.mileage-entry-form select {
    width: 100%;
}

.mileage-summary-form small,
.mileage-plan-note,
.mileage-distance-message,
.mileage-muted {
    color: #7787a0;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.mileage-odometer-section {
    margin-top: 0;
    padding-top: 14px;
    border-top: 0;
}

.mileage-odometer-heading {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mileage-monthly-heading {
    justify-content: flex-start;
    gap: 10px;
}

.mileage-monthly-heading > span,
.mileage-odometer-heading > span,
.mileage-odometer-reading-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.mileage-odometer-heading h3 {
    margin: 0;
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.mileage-odometer-heading p {
    margin: 3px 0 0;
    color: #74849c;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
}

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

.mileage-unit-input {
    position: relative;
    display: block;
}

.mileage-unit-input b {
    position: absolute;
    top: 50%;
    right: 13px;
    color: #71819a;
    font-size: 11px;
    transform: translateY(-50%);
}

.mileage-unit-input input[type="number"],
.mileage-unit-input input.mileage-setup-distance-input {
    width: 100%;
    height: 38px;
    padding: 0 42px 0 10px;
    border: 1px solid #cdddf8;
    border-radius: 10px;
    background: #fff;
    font-size: 0.88rem;
    color: #1c2b4a;
    appearance: textfield;
    -moz-appearance: textfield;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.mileage-unit-input input[type="number"]::placeholder,
.mileage-unit-input input.mileage-setup-distance-input::placeholder {
    color: #9aa7bd;
}

.mileage-unit-input input[type="number"]:focus,
.mileage-unit-input input.mileage-setup-distance-input:focus,
.mileage-setup-ref-grid input[type="date"]:focus {
    outline: none;
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.mileage-unit-input input[type="number"]::-webkit-inner-spin-button,
.mileage-unit-input input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.mileage-odometer-rule {
    padding: 10px 11px;
    border: 1px solid #d8e5f5;
    border-radius: 12px;
    background: #f7faff;
    color: #5f7392;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.mileage-odometer-rule i {
    color: #2f66d8;
}

.mileage-odometer-list {
    margin-top: 13px;
    display: grid;
    gap: 8px;
}

.mileage-odometer-reading {
    min-width: 0;
    padding: 9px;
    border: 1px solid #e2eaf5;
    border-radius: 13px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.mileage-odometer-reading-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
    font-size: 15px;
}

.mileage-odometer-reading strong,
.mileage-odometer-reading small {
    display: block;
}

.mileage-odometer-reading strong {
    color: #263955;
    font-size: 12px;
    font-weight: 900;
}

.mileage-odometer-reading small {
    margin-top: 3px;
    color: #7a8aa2;
    font-size: 10px;
    font-weight: 750;
}

.mileage-odometer-reading form button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #a04a56;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mileage-odometer-reading form button:hover {
    background: #fff0f2;
    color: #cf3045;
}

.mileage-odometer-empty {
    margin: 12px 0 0;
    color: #7b8aa1;
    font-size: 11px;
    font-weight: 750;
}

.mileage-route-assist-message {
    margin: 11px 0 0;
    padding: 9px 11px;
    border: 1px solid #cfe0f7;
    border-radius: 11px;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    color: #42638f;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 800;
}

.mileage-route-assist-message::before {
    content: "\F4A6";
    margin-right: 7px;
    color: #2f6fed;
    font-family: "bootstrap-icons";
}

.mileage-route-assist-message.is-warning {
    border-color: #f3d6a4;
    background: #fffaf0;
    color: #8a6427;
}

.mileage-route-assist-message.is-warning::before {
    content: "\F33A";
    color: #d58a16;
}

.mileage-chain-note {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #c9ead9;
    border-radius: 13px;
    background: linear-gradient(135deg, #effbf5 0%, #f7fffb 100%);
    color: #36745a;
    display: flex;
    align-items: center;
    gap: 11px;
}

.mileage-chain-note > i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #d7f5e5;
    color: #15935a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 17px;
}

.mileage-chain-note strong,
.mileage-chain-note span {
    display: block;
}

.mileage-chain-note strong {
    color: #245f47;
    font-size: 12px;
    font-weight: 900;
}

.mileage-chain-note span {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 750;
}

.mileage-insert-note {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #cfe0fb;
    border-radius: 13px;
    background: linear-gradient(135deg, #f7fbff 0%, #edf4ff 100%);
    color: #284a7c;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.mileage-insert-note > i {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #dceaff;
    color: #2f6fed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.mileage-insert-note strong,
.mileage-insert-note span {
    display: block;
}

.mileage-insert-note strong {
    font-size: 13px;
    font-weight: 900;
}

.mileage-insert-note span {
    margin-top: 2px;
    color: #60799c;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 720;
}

.mileage-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mileage-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    opacity: 0;
}

.mileage-order-status {
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #c9ead9;
    border-radius: 999px;
    background: #effbf5;
    color: #18794e;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.mileage-order-status.is-error {
    border-color: #f1c7c7;
    background: #fff3f3;
    color: #bd3434;
}

.mileage-order-status.is-warning {
    position: fixed;
    z-index: 90;
    top: 88px;
    left: 50%;
    width: max-content;
    max-width: min(680px, calc(100vw - 32px));
    padding: 10px 14px;
    border-color: #f0d59a;
    background: #fff8e8;
    color: #98610b;
    box-shadow: 0 14px 34px rgba(125, 83, 14, 0.18);
    white-space: normal;
    transform: translateX(-50%);
}

.mileage-toggle span {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #dce4ef;
    position: relative;
}

.mileage-toggle span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.18s ease;
}

.mileage-toggle input:checked + span {
    background: #2f6fed;
}

.mileage-toggle input:checked + span::after {
    transform: translateX(18px);
}

.mileage-toggle.is-disabled {
    cursor: not-allowed;
    opacity: 0.64;
}

.mileage-toggle input:disabled + span {
    background: #e4e9f1;
    box-shadow: inset 0 0 0 1px #d5deea;
}

.mileage-toggle.is-disabled b {
    color: #65758d;
}

.mileage-odometer-integration-toggle {
    margin-top: 1px;
}

.mileage-integration-note {
    margin-top: -5px;
    color: #75859d;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 10px;
    line-height: 1.45;
    font-weight: 750;
}

.mileage-integration-note i {
    color: #6c84a7;
}

.mileage-summary-card {
    padding: 0;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.mileage-summary-card-head {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mileage-summary-limit {
    text-align: right;
}

.mileage-summary-limit strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.mileage-summary-card-metrics {
    border-top: 1px solid #e8eef7;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.mileage-summary-card-metrics span {
    padding: 11px 12px;
}

.mileage-summary-card-metrics span + span {
    border-left: 1px solid #e8eef7;
    text-align: right;
}

.mileage-summary-card-metrics strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.mileage-summary-card-metrics span:last-child strong {
    color: #ef3838;
}

.mileage-summary-card.is-complete .mileage-summary-card-metrics strong {
    color: #15935a;
}

.mileage-summary-card.is-over .mileage-summary-card-metrics span:last-child strong {
    color: #dc3636;
}

.mileage-history-link {
    margin-top: 10px;
    color: #1f63e4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.mileage-summary-details {
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}

.mileage-summary-details summary {
    min-height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #34445f;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.mileage-summary-details summary::-webkit-details-marker {
    display: none;
}

.mileage-summary-details summary i {
    color: #6e83a2;
    transition: transform 0.18s ease;
}

.mileage-summary-details[open] summary i {
    transform: rotate(180deg);
}

.mileage-summary-details .mileage-summary-list {
    max-height: 265px;
    overflow: auto;
    padding: 0 12px 6px;
}

.mileage-issues-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1600px) {
    .module-workspace:has(.mileage-page) .mileage-workspace {
        grid-template-columns: 1fr;
    }
}

.mileage-issues-panel {
    padding: 16px;
}

.mileage-bulk-toolbar {
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid #cfe0ff;
    border-radius: 15px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    display: grid;
    gap: 12px;
}

.mileage-bulk-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #1f63e4;
}

.mileage-bulk-head i {
    font-size: 20px;
    line-height: 1.2;
}

.mileage-bulk-head strong {
    display: block;
    color: #1c2b4a;
}

.mileage-bulk-head span {
    font-size: 0.85rem;
    color: #4a5a76;
}

.mileage-bulk-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.mileage-bulk-controls label {
    display: grid;
    gap: 4px;
    font-size: 0.82rem;
    color: #4a5a76;
    flex: 1 1 200px;
}

.mileage-bulk-controls select,
.mileage-bulk-controls input[type="text"] {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cdddf8;
    border-radius: 10px;
    background: #ffffff;
    font-size: 0.9rem;
}

.mileage-bulk-controls .btn-primary {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mileage-bulk-controls .btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.mileage-bulk-check {
    position: absolute;
    top: 10px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.mileage-bulk-check input {
    width: 18px;
    height: 18px;
    accent-color: #2f6fed;
    cursor: pointer;
}

.mileage-issues-list {
    display: grid;
    gap: 10px;
}

.mileage-issue-card {
    position: relative;
    min-height: 112px;
    padding: 14px;
    border: 1px solid #e3ebf6;
    border-radius: 15px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(220px, 0.62fr) auto;
    gap: 14px;
    align-items: center;
    animation: mileage-issue-card-in 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mileage-issue-card.is-error {
    border-color: #f1b8b8;
    background: linear-gradient(90deg, #fff6f6 0%, #ffffff 54%);
    box-shadow: inset 3px 0 0 #ef4444;
}

.mileage-issue-card.is-warning {
    border-color: #efd39b;
    background: linear-gradient(90deg, #fffaf0 0%, #ffffff 54%);
    box-shadow: inset 3px 0 0 #d88300;
}

.mileage-issue-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff1f1;
    color: #dc3636;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.mileage-issue-card.is-warning .mileage-issue-icon {
    background: #fff2d2;
    color: #b66a00;
}

.mileage-issue-main {
    min-width: 0;
}

.mileage-issue-severity {
    width: fit-content;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #ffe2e2;
    color: #bd3434;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}

.mileage-issue-card.is-warning .mileage-issue-severity {
    background: #fff2d2;
    color: #9a6500;
}

.mileage-issue-main h2 {
    margin: 7px 0 0;
    color: #22314d;
    font-size: 15px;
    font-weight: 950;
}

.mileage-issue-main p {
    margin: 5px 0 0;
    color: #5f6f88;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 780;
}

.mileage-issue-main small {
    margin-top: 5px;
    color: #8290a5;
    display: block;
    font-size: 11px;
    font-weight: 750;
}

.mileage-issue-meta {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mileage-issue-meta div {
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid #e3ebf6;
    border-radius: 12px;
    background: rgba(248, 251, 255, 0.86);
}

.mileage-issue-meta dt {
    margin: 0;
    color: #7b8aa2;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.mileage-issue-meta dd {
    margin: 4px 0 0;
    color: #263955;
    font-size: 12px;
    font-weight: 900;
}

.mileage-issue-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.mileage-issue-actions .btn-primary,
.mileage-issue-actions .btn-secondary {
    white-space: nowrap;
}

.mileage-issue-locked {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    background: #f7faff;
    color: #66758e;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 850;
}

/* Widok pozycji do poprawy — styl referencyjny; nie wpływa na pozostałe ekrany kilometrówki. */
.mileage-issues-page {
    gap: 16px;
}

.mileage-issues-page .app-module-header {
    min-height: 56px;
    padding: 0;
}

.mileage-issues-page .app-module-header h1 {
    font-size: 25px;
    line-height: 1.18;
    font-weight: 800;
}

.mileage-issues-page .app-module-header p {
    margin-top: 5px;
    color: #526784;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.mileage-issues-page .app-module-header-actions {
    padding-top: 0;
    gap: 11px;
}

.mileage-issues-page .app-module-header-actions > .btn-primary,
.mileage-issues-page .app-module-header-actions > .btn-secondary {
    min-width: 138px;
    height: 48px;
    min-height: 48px;
    border-radius: 12px;
    font-size: 13px;
}

.mileage-issues-page .app-module-header-actions > .btn-primary {
    min-width: 153px;
}

.mileage-issues-stats {
    gap: 24px;
}

.mileage-issues-page .mileage-stat-card {
    min-height: 114px;
    padding: 17px 18px 15px 96px;
    border-color: #e6edf7;
    border-radius: 15px;
    box-shadow: 0 7px 18px rgba(39, 63, 96, 0.045);
}

.mileage-issues-page .mileage-stat-card i {
    left: 14px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    font-size: 28px;
}

.mileage-issues-page .mileage-stat-card span {
    color: #4d6485;
    font-size: 13px;
    font-weight: 800;
}

.mileage-issues-page .mileage-stat-card strong {
    margin-top: 7px;
    color: #102144;
    font-size: 27px;
    line-height: 1;
}

.mileage-issues-page .mileage-stat-card.is-danger strong {
    color: #102144;
}

.mileage-issues-page .mileage-stat-card small {
    margin-top: 8px;
    color: #607697;
    font-size: 11px;
    font-weight: 750;
}

.mileage-issues-toolbar {
    padding: 6px 8px;
    border-radius: 14px;
    border-color: #e6edf7;
    box-shadow: 0 5px 16px rgba(39, 63, 96, 0.035);
}

.mileage-issues-page .mileage-filter-form {
    grid-template-columns: 280px minmax(0, 1fr) 228px 236px;
    gap: 18px;
}

.mileage-issues-page .mileage-filter-form > select {
    min-height: 42px;
    height: 42px;
    border-color: #d8e3f2;
    border-radius: 10px;
    box-shadow: none;
    color: #172849;
    font-size: 13px;
    font-weight: 800;
}

.mileage-issues-page .mileage-filter-form > select[name="severity"] {
    grid-column: 3;
}

.mileage-issues-page .mileage-filter-form > select[name="sort"] {
    grid-column: 4;
}

.mileage-issues-page .mileage-issues-month-picker {
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: grid;
    grid-template-columns: 150px 118px;
    gap: 12px;
}

.mileage-issues-page .mileage-issues-month-field {
    min-width: 0;
    height: 42px;
    padding: 0 11px;
    border: 1px solid #d8e3f2;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mileage-issues-page .mileage-issues-month-field > i {
    color: #1e68ee;
    font-size: 18px;
    line-height: 1;
}

.mileage-issues-page .mileage-month-picker .mileage-issues-month-field select {
    width: 100%;
    min-width: 0;
    min-height: 40px !important;
    color: #172849;
    font-size: 13px;
    font-weight: 800;
}

.mileage-issues-page .mileage-issues-year-field {
    padding-left: 13px;
}

.mileage-issues-panel {
    padding: 8px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.mileage-issues-page .mileage-panel-head {
    margin: 0 0 13px;
}

.mileage-issues-page .mileage-panel h2 {
    color: #102144;
    font-size: 20px;
    font-weight: 800;
}

.mileage-issues-page .mileage-panel-head p {
    margin-top: 3px;
    color: #597093;
    font-size: 12px;
    font-weight: 700;
}

.mileage-issues-page .mileage-bulk-toolbar {
    min-height: 124px;
    margin-bottom: 15px;
    padding: 14px 20px 12px;
    border-color: #d5e5ff;
    border-radius: 12px;
    background: linear-gradient(110deg, #f9fcff 0%, #f0f6ff 100%);
    gap: 8px;
}

.mileage-issues-page .mileage-bulk-head {
    gap: 14px;
}

.mileage-issues-page .mileage-bulk-head i {
    font-size: 21px;
}

.mileage-issues-page .mileage-bulk-head strong {
    color: #102144;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
}

.mileage-issues-page .mileage-bulk-head span {
    display: block;
    margin-top: 3px;
    color: #597093;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
}

.mileage-issues-page .mileage-bulk-controls {
    padding-left: 37px;
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.04fr) auto;
    align-items: end;
    gap: 15px;
}

.mileage-issues-page .mileage-bulk-controls label {
    gap: 4px;
    color: #526987;
    font-size: 11px;
    font-weight: 700;
}

.mileage-issues-page .mileage-bulk-controls select,
.mileage-issues-page .mileage-bulk-controls input[type="text"] {
    height: 38px;
    border-color: #d5e1f2;
    border-radius: 9px;
    color: #233552;
    font-size: 12px;
    font-weight: 700;
}

.mileage-issues-page .mileage-bulk-controls .btn-primary {
    width: 244px;
    min-width: 244px;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 850;
}

.mileage-issues-page .mileage-issues-list {
    gap: 0;
}

.mileage-issues-page .mileage-issue-card {
    min-height: 108px;
    margin-top: -1px;
    padding: 8px 14px;
    border-color: #ffd99c;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: none;
    grid-template-columns: 20px 66px minmax(260px, 1fr) minmax(375px, 498px) 202px;
    gap: 12px;
    animation: none;
}

.mileage-issues-page .mileage-issue-card.is-warning,
.mileage-issues-page .mileage-issue-card.is-error {
    border-color: #ffd99c;
    background: #ffffff;
    box-shadow: none;
}

.mileage-issues-page .mileage-bulk-check {
    position: static;
    width: 20px;
    height: 20px;
    align-self: center;
    border-radius: 5px;
    line-height: 0;
}

.mileage-issues-page .mileage-bulk-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #a9b8cc;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(38, 62, 96, 0.08);
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.mileage-issues-page .mileage-bulk-check input:hover {
    border-color: #4b83ec;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.11);
}

.mileage-issues-page .mileage-bulk-check input:checked {
    border-color: #2469df;
    background-color: #2469df;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.2 8.3 2.9 2.9 6.7-6.7' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px;
    box-shadow: 0 3px 8px rgba(36, 105, 223, 0.24);
}

.mileage-issues-page .mileage-bulk-check input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.2);
}

.mileage-issues-page .mileage-issue-icon {
    grid-column: 2;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #fff3df;
    color: #f28b00;
    font-size: 28px;
}

.mileage-issues-page .mileage-issue-card.is-warning .mileage-issue-icon {
    background: #fff3df;
    color: #f28b00;
}

.mileage-issues-page .mileage-issue-main {
    grid-column: 3;
}

.mileage-issues-page .mileage-issue-severity {
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid #ffd69b;
    border-radius: 9px;
    background: #fff8ec;
    color: #bb7000;
    font-size: 9px;
    font-weight: 900;
}

.mileage-issues-page .mileage-issue-card.is-warning .mileage-issue-severity {
    background: #fff8ec;
    color: #bb7000;
}

.mileage-issues-page .mileage-issue-main h2 {
    margin-top: 6px;
    color: #102144;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 850;
}

.mileage-issues-page .mileage-issue-main p {
    margin-top: 4px;
    color: #536987;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 650;
}

.mileage-issues-page .mileage-issue-main small {
    margin-top: 5px;
    color: #5d7290;
    font-size: 11px;
    font-weight: 650;
}

.mileage-issues-page .mileage-issue-main small i {
    margin-right: 4px;
    color: #5a769b;
    font-size: 11px;
}

.mileage-issues-page .mileage-issue-meta {
    grid-column: 4;
    gap: 14px;
}

.mileage-issues-page .mileage-issue-meta div {
    min-height: 57px;
    padding: 9px 11px;
    border-color: #e4ecf7;
    border-radius: 10px;
    background: #f8fbff;
}

.mileage-issues-page .mileage-issue-meta dt {
    color: #647b9d;
    font-size: 10px;
    font-weight: 800;
    text-transform: none;
}

.mileage-issues-page .mileage-issue-meta dd {
    margin-top: 4px;
    color: #102144;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 850;
}

.mileage-issues-page .mileage-issue-actions {
    grid-column: 5;
    width: 202px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 7px;
}

.mileage-issues-page .mileage-issue-actions .btn-primary,
.mileage-issues-page .mileage-issue-actions .btn-secondary {
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}

.mileage-issues-page .mileage-issue-actions .btn-primary {
    background: linear-gradient(135deg, #2878ef 0%, #1e61d5 100%);
}

.mileage-issue-context-list {
    display: grid;
    gap: 22px;
}

.mileage-issue-context-group {
    overflow: hidden;
    border: 1px solid #dfe8f5;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(36, 59, 94, 0.06);
}

.mileage-issue-context-group.is-error {
    border-color: #efb8b8;
    box-shadow: 0 8px 24px rgba(153, 38, 38, 0.07);
}

.mileage-issue-context-group.is-warning {
    border-color: #efd39b;
}

.mileage-issue-context-head {
    padding: 14px 16px;
    border-bottom: 1px solid #e7edf6;
    background: linear-gradient(100deg, #fff7f7 0%, #ffffff 60%);
    display: grid;
    grid-template-columns: auto 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.mileage-issue-context-group.is-warning .mileage-issue-context-head {
    background: linear-gradient(100deg, #fffaf0 0%, #ffffff 60%);
}

.mileage-issue-context-head .mileage-bulk-check {
    width: 20px;
}

.mileage-bulk-check-placeholder {
    width: 20px;
    height: 20px;
}

.mileage-issue-context-head > .mileage-issue-icon {
    grid-column: auto;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 19px;
}

.mileage-issue-context-copy {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(180px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.mileage-issue-context-copy > strong {
    color: #172849;
    font-size: 14px;
    font-weight: 900;
}

.mileage-issue-context-copy ul {
    margin: 0;
    padding-left: 18px;
    color: #435a7b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.mileage-issue-context-copy li + li {
    margin-top: 3px;
}

.mileage-issue-context-copy li small {
    color: #7789a3;
    font-size: 10px;
    font-weight: 800;
}

.mileage-issue-context-table {
    min-width: 1144px;
}

.mileage-issue-context-table-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.mileage-issue-context-table .mileage-row {
    padding-top: 29px;
}

.mileage-issue-context-table .mileage-row::after {
    content: attr(data-context-label);
    position: absolute;
    top: 6px;
    left: 10px;
    min-height: 18px;
    padding: 0 7px;
    border: 1px solid #d9e3f0;
    border-radius: 999px;
    background: #f5f8fc;
    color: #71829b;
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.mileage-issue-context-table .mileage-row.is-issue-previous,
.mileage-issue-context-table .mileage-row.is-issue-next {
    background: #fbfcfe;
    opacity: 0.72;
}

.mileage-issue-context-table .mileage-row.is-issue-problem {
    background: linear-gradient(90deg, #fff4f4 0%, #ffffff 60%);
    box-shadow: inset 4px 0 0 #e33d3d;
}

.mileage-issue-context-group.is-warning .mileage-row.is-issue-problem {
    background: linear-gradient(90deg, #fff8e9 0%, #ffffff 60%);
    box-shadow: inset 4px 0 0 #dc8a0b;
}

.mileage-issue-context-table .mileage-row.is-issue-problem::after {
    border-color: #efbcbc;
    background: #ffeaea;
    color: #bd3434;
}

.mileage-issue-context-group.is-warning .mileage-row.is-issue-problem::after {
    border-color: #efd39b;
    background: #fff2d2;
    color: #986000;
}

.mileage-issue-context-table .mileage-row.is-inline-editing {
    opacity: 1;
    background: linear-gradient(90deg, #eef5ff 0%, #ffffff 68%);
    box-shadow: inset 4px 0 0 #2f6fed;
}

.mileage-issue-row-lock {
    color: #71819a;
    font-size: 10px;
    font-weight: 800;
}

.mileage-summary-issues {
    margin-top: 24px;
    display: grid;
    gap: 10px;
}

.mileage-summary-issues > h3 {
    margin: 0 0 2px;
    color: #172849;
    font-size: 15px;
    font-weight: 900;
}

@media (max-width: 1180px) {
    .mileage-issues-page .mileage-filter-form {
        grid-template-columns: minmax(250px, 1fr) 1fr;
    }

    .mileage-issues-page .mileage-issues-month-picker {
        grid-column: 1 / -1;
    }

    .mileage-issues-page .mileage-issue-card {
        grid-template-columns: 20px 58px minmax(250px, 1fr) minmax(285px, 0.9fr);
    }

    .mileage-issues-page .mileage-issue-icon {
        grid-column: 2;
        width: 58px;
        height: 58px;
        font-size: 24px;
    }

    .mileage-issues-page .mileage-issue-main {
        grid-column: 3;
    }

    .mileage-issues-page .mileage-issue-meta {
        grid-column: 4;
    }

    .mileage-issues-page .mileage-issue-actions {
        grid-column: 2 / -1;
        width: auto;
        flex-direction: row;
    }

    .mileage-issues-page .mileage-issue-actions .btn-primary,
    .mileage-issues-page .mileage-issue-actions .btn-secondary {
        width: auto;
    }

    .mileage-issue-context-copy {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mileage-issue-context-copy ul {
        grid-column: 1 / -1;
    }
}

@keyframes mileage-issue-card-in {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.mileage-entry-form label b {
    color: #df4949;
}

.mileage-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
    gap: 16px;
}

.mileage-route-fields,
.mileage-route-points {
    display: grid;
    gap: 11px;
}

.mileage-route-neighbors {
    padding: 13px;
    border: 1px solid #d8e4f4;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff 0%, #ffffff 76%);
    transition: opacity 0.16s ease, border-color 0.16s ease;
}

.mileage-route-neighbors.is-loading {
    border-color: #bfd3f1;
    opacity: 0.68;
}

.mileage-route-neighbors-head {
    margin-bottom: 11px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.mileage-route-neighbors-head > span {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #e7f0ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.mileage-route-neighbors-head strong,
.mileage-route-neighbors-head small {
    display: block;
}

.mileage-route-neighbors-head strong {
    color: #243754;
    font-size: 12px;
    font-weight: 900;
}

.mileage-route-neighbors-head small {
    margin-top: 2px;
    color: #74849c;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 720;
}

.mileage-route-neighbors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.mileage-route-neighbor {
    min-width: 0;
    padding: 11px;
    border: 1px solid #dbe6f5;
    border-radius: 13px;
    background: #ffffff;
}

.mileage-route-neighbor-previous {
    border-color: #cfe0f8;
    background: #f7faff;
}

.mileage-route-neighbor-next {
    border-color: #d7e8df;
    background: #f8fcfa;
}

.mileage-route-neighbor.is-empty {
    border-color: #e1e8f1;
    background: #fbfcfe;
}

.mileage-route-neighbor-title {
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.mileage-route-neighbor-title > span {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    background: #e6f0ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.mileage-route-neighbor-next .mileage-route-neighbor-title > span {
    background: #e3f5eb;
    color: #168257;
}

.mileage-route-neighbor-title small,
.mileage-route-neighbor-title strong {
    display: block;
}

.mileage-route-neighbor-title small {
    color: #7a899f;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.mileage-route-neighbor-title strong {
    margin-top: 1px;
    color: #2a3e5d;
    font-size: 11px;
    font-weight: 900;
}

.mileage-route-neighbor-content {
    margin-top: 10px;
}

.mileage-route-neighbor-point,
.mileage-route-neighbor-path,
.mileage-route-neighbor-meta {
    display: block;
    overflow-wrap: anywhere;
}

.mileage-route-neighbor-point {
    color: #1f4f9e;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 900;
}

.mileage-route-neighbor-next .mileage-route-neighbor-point {
    color: #13724e;
}

.mileage-route-neighbor-path {
    margin-top: 5px;
    color: #586b87;
    font-size: 10px;
    line-height: 1.4;
    font-weight: 720;
}

.mileage-route-neighbor-meta {
    margin-top: 5px;
    color: #8794a8;
    font-size: 9px;
    font-weight: 800;
}

.mileage-route-neighbor-empty {
    margin: 9px 0 0;
    color: #8592a5;
    font-size: 10px;
    line-height: 1.4;
    font-weight: 720;
}

.mileage-route-neighbor-actions {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mileage-route-neighbor-actions button {
    min-height: 29px;
    padding: 5px 8px;
    border: 1px solid #d5e1f1;
    border-radius: 9px;
    background: #ffffff;
    color: #4d6381;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 880;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mileage-route-neighbor-actions button:hover,
.mileage-route-neighbor-actions button:focus-visible {
    border-color: #9dbbe8;
    background: #edf4ff;
    color: #285fb8;
    outline: none;
}

.mileage-route-neighbor-actions button.is-copied {
    border-color: #bce4ce;
    background: #eaf8f1;
    color: #16764f;
}

.mileage-waypoints-control {
    display: grid;
    gap: 10px;
    justify-items: start;
}

.mileage-waypoints-control > label {
    width: 100%;
}

.mileage-waypoints-toggle {
    min-height: 38px;
    padding-inline: 12px;
}

.mileage-distance-budget {
    padding: 14px;
    border: 1px solid #d9e6f7;
    border-radius: 15px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mileage-distance-budget-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #dceaff;
    color: #2f6fed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mileage-distance-budget-copy {
    min-width: 0;
}

.mileage-distance-budget small,
.mileage-distance-budget strong,
.mileage-distance-budget p {
    display: block;
}

.mileage-distance-budget small {
    color: #607592;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mileage-distance-budget strong {
    margin-top: 3px;
    color: #244f9f;
    font-size: 25px;
    line-height: 1;
    font-weight: 950;
}

.mileage-distance-budget strong em {
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.mileage-distance-budget p {
    margin: 6px 0 0;
    color: #70819a;
    font-size: 10px;
    line-height: 1.4;
    font-weight: 750;
}

.mileage-distance-budget-track {
    height: 5px;
    margin-top: 9px;
    border-radius: 999px;
    background: rgba(70, 105, 160, 0.14);
    overflow: hidden;
}

.mileage-distance-budget-track span {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f6fed, #55a0ff);
    display: block;
    transition: width 0.2s ease;
}

.mileage-distance-budget.is-loading .mileage-distance-budget-icon i {
    animation: mileage-budget-pulse 1s ease-in-out infinite;
}

.mileage-distance-budget.is-complete {
    border-color: #bfe7d2;
    background: linear-gradient(135deg, #effbf5 0%, #e5f8ee 100%);
}

.mileage-distance-budget.is-complete .mileage-distance-budget-icon {
    background: #ccefdc;
    color: #15935a;
}

.mileage-distance-budget.is-complete strong {
    color: #147a4d;
}

.mileage-distance-budget.is-complete .mileage-distance-budget-track span {
    background: #22a766;
}

.mileage-distance-budget.is-over {
    border-color: #f0c4c4;
    background: linear-gradient(135deg, #fff7f7 0%, #ffebeb 100%);
}

.mileage-distance-budget.is-over .mileage-distance-budget-icon {
    background: #ffdada;
    color: #d83b3b;
}

.mileage-distance-budget.is-over strong {
    color: #c83232;
}

.mileage-distance-budget.is-over .mileage-distance-budget-track span {
    background: #e45353;
}

.mileage-distance-budget.is-missing {
    border-color: #eadcbf;
    background: #fffaf0;
}

.mileage-distance-budget.is-missing .mileage-distance-budget-icon {
    background: #f8e9c8;
    color: #b87918;
}

.mileage-distance-budget.is-missing strong {
    color: #9a681c;
}

@keyframes mileage-budget-pulse {
    50% { opacity: 0.42; transform: scale(0.92); }
}

.mileage-map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mileage-plan-note {
    max-width: 320px;
    color: #6b5b9b;
}

.mileage-map-preview {
    min-height: 310px;
    border: 1px solid #dce5f1;
    border-radius: 14px;
    background: #f7faff;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.mileage-map-preview > div {
    max-width: 360px;
    padding: 24px;
    text-align: center;
    color: #6f809b;
}

.mileage-map-preview i {
    color: #3474e9;
    display: block;
    font-size: 34px;
}

.mileage-map-preview strong {
    margin-top: 8px;
    display: block;
    color: #263955;
}

.mileage-map-preview p {
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}

.mileage-map-preview iframe {
    width: 100%;
    height: 100%;
    min-height: 310px;
    border: 0;
}

.mileage-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-right: 104px;
}

.mileage-form-actions > a { order: 1; }
.mileage-form-actions .mileage-submit-save { order: 2; }
.mileage-form-actions .mileage-submit-next { order: 3; }

.mileage-import-mapping-grid,
.mileage-import-fix-grid {
    display: grid;
    gap: 12px;
}

.mileage-import-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
    gap: 14px;
    align-items: stretch;
}

.mileage-import-intro-grid > .mileage-panel {
    min-height: 100%;
}

.mileage-import-sheet {
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}

.mileage-import-sheet-toolbar {
    min-height: 38px;
    padding: 0 12px;
    border-bottom: 1px solid #dbe5f2;
    background: #eef5ff;
    display: flex;
    align-items: center;
    gap: 7px;
}

.mileage-import-sheet-toolbar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #9eb3cf;
}

.mileage-import-sheet-toolbar span:nth-child(1) {
    background: #ff6b6b;
}

.mileage-import-sheet-toolbar span:nth-child(2) {
    background: #f2bb4c;
}

.mileage-import-sheet-toolbar span:nth-child(3) {
    background: #36b37e;
}

.mileage-import-sheet-toolbar strong {
    margin-left: 6px;
    color: #2b3b55;
    font-size: 12px;
    font-weight: 900;
}

.mileage-import-sheet-scroll {
    overflow-x: auto;
}

.mileage-import-sheet-grid {
    min-width: 920px;
    display: grid;
    grid-template-columns: 42px 116px 190px 118px 168px 168px 180px 154px;
}

.vehicle-import-sheet-grid {
    min-width: 2120px;
    grid-template-columns: 42px 120px 138px 142px 126px 176px 250px 118px 210px 132px 146px 150px 122px 154px 120px;
}

.mileage-import-sheet-corner,
.mileage-import-sheet-letter,
.mileage-import-sheet-row-number,
.mileage-import-sheet-cell {
    min-height: 38px;
    border-right: 1px solid #dfe7f2;
    border-bottom: 1px solid #dfe7f2;
    display: flex;
    align-items: center;
}

.mileage-import-sheet-corner,
.mileage-import-sheet-letter,
.mileage-import-sheet-row-number {
    background: #f1f5fa;
    color: #6d7b91;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

.mileage-import-sheet-cell {
    padding: 7px 10px;
    color: #253753;
    background: #ffffff;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 760;
}

.mileage-import-sheet-cell.is-required {
    background: #eef8f3;
    color: #126340;
    font-weight: 920;
}

.mileage-import-sheet-cell.is-required::after {
    content: "*";
    margin-left: 4px;
    color: #15935a;
    font-weight: 950;
}

.mileage-import-sheet-notes {
    padding: 10px 12px;
    background: #f8fbff;
    color: #66758e;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 800;
}

.mileage-import-sheet-notes b {
    color: #15935a;
}

.mileage-import-upload-panel {
    display: grid;
    align-content: start;
}

.mileage-import-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.mileage-import-upload-panel .mileage-import-upload {
    grid-template-columns: 1fr;
}

.mileage-import-upload label,
.mileage-import-mapping label,
.mileage-import-fix-grid label,
.mileage-export-grid label {
    display: grid;
    gap: 7px;
    color: #53637d;
    font-size: 12px;
    font-weight: 850;
}

.mileage-import-upload input,
.mileage-import-mapping select,
.mileage-import-fix-grid input,
.mileage-import-fix-grid select,
.mileage-export-grid input,
.mileage-export-grid select {
    min-height: 42px;
    width: 100%;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    padding: 0 12px;
    background: #ffffff;
    color: #23344f;
    font: inherit;
}

.mileage-import-dropzone {
    min-height: 180px;
    border: 1px dashed #a9bbd4;
    border-radius: 16px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(47, 102, 216, 0.08), rgba(21, 147, 90, 0.08)),
        #fbfdff;
    grid-template-columns: 54px minmax(0, 1fr);
    align-content: center;
    align-items: center;
    cursor: pointer;
}

.mileage-import-dropzone:hover {
    border-color: #2f66d8;
    background:
        linear-gradient(135deg, rgba(47, 102, 216, 0.12), rgba(21, 147, 90, 0.11)),
        #ffffff;
}

.mileage-import-dropzone-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #e8f1ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.mileage-import-dropzone-copy strong,
.mileage-import-dropzone-copy small {
    display: block;
}

.mileage-import-dropzone-copy strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 950;
}

.mileage-import-dropzone-copy small {
    margin-top: 5px;
    color: #6f7f98;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 760;
}

.mileage-import-dropzone input {
    grid-column: 1 / -1;
    margin-top: 12px;
    background: #ffffff;
}

.mileage-export-layout {
    display: grid;
    grid-template-columns: minmax(330px, 0.68fr) minmax(620px, 1.32fr);
    gap: 16px;
    align-items: start;
}

.mileage-export-control-panel {
    display: grid;
    gap: 16px;
}

.mileage-export-headline {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.mileage-export-headline-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mileage-export-report-preview {
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 16px;
    overflow: hidden;
}

.mileage-export-report-top {
    padding-bottom: 12px;
    border-bottom: 2px solid #0d6cff;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 18px;
}

.mileage-export-logo {
    color: #0d6cff;
    font-size: 18px;
    font-weight: 950;
}

.mileage-export-logo b {
    color: #07184a;
}

.mileage-export-report-top strong,
.mileage-export-report-top small {
    display: block;
}

.mileage-export-report-top strong {
    color: #07184a;
    font-size: 18px;
    font-weight: 950;
}

.mileage-export-report-top small {
    margin-top: 2px;
    color: #66758e;
    font-size: 11px;
    font-weight: 800;
}

.mileage-export-report-top i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eef5ff;
    color: #0d6cff;
    display: grid;
    place-items: center;
    font-size: 21px;
}

.mileage-export-report-cards,
.mileage-export-report-table {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.mileage-export-report-cards {
    grid-template-columns: 1fr 1fr 1fr;
}

.mileage-export-report-cards span,
.mileage-export-report-table span {
    min-height: 38px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #ffffff;
    color: #253753;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 900;
}

.mileage-export-report-table {
    grid-template-columns: 0.75fr 1.7fr 1.1fr 0.8fr 0.8fr;
}

.mileage-export-report-table span {
    min-height: 32px;
    border-radius: 8px;
}

.mileage-export-report-lines {
    margin-top: 8px;
    display: grid;
    gap: 7px;
}

.mileage-export-report-lines span {
    height: 10px;
    border-radius: 999px;
    background: #edf3fb;
}

.mileage-export-form {
    display: grid;
    gap: 16px;
}

.mileage-export-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.mileage-export-field.is-wide,
.mileage-export-check.is-wide {
    grid-column: 1 / -1;
}

.mileage-export-month-picker {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
}

.mileage-export-month-picker select {
    flex: 1 1 auto;
    min-width: 0;
}

.mileage-export-check {
    min-height: 42px;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    display: flex !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    color: #33435e;
}

.mileage-export-check input {
    width: 17px;
    min-height: 17px;
    padding: 0;
}

.mileage-export-actions {
    display: flex;
    justify-content: flex-end;
}

.mileage-export-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.mileage-export-summary span {
    min-height: 72px;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    padding: 12px 12px 12px 48px;
    background: #f8fbff;
    color: #50627d;
    position: relative;
}

.mileage-export-summary i {
    position: absolute;
    left: 12px;
    top: 14px;
    width: 27px;
    height: 27px;
    border-radius: 9px;
    background: #e9f2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mileage-export-summary b,
.mileage-export-summary small {
    display: block;
}

.mileage-export-summary b {
    color: #22314d;
    font-size: 13px;
    font-weight: 950;
}

.mileage-export-summary small {
    margin-top: 4px;
    color: #74849c;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 800;
}

.mileage-pdf-preview-panel {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 16px;
}

.mileage-pdf-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mileage-pdf-preview-kicker {
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.mileage-pdf-preview-head h2 {
    margin-top: 5px;
    font-size: 18px;
    line-height: 1.2;
}

.mileage-pdf-preview-head p {
    margin: 5px 0 0;
    color: #6f7f98;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
}

.mileage-pdf-preview-badge {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 950;
}

.mileage-pdf-preview-frame {
    height: clamp(680px, 82vh, 980px);
    min-height: 680px;
    border: 1px solid #d7e1ef;
    border-radius: 14px;
    background: #d7dee8;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mileage-pdf-preview-frame img,
.mileage-pdf-preview-frame iframe {
    display: block;
    background: #ffffff;
}

body.mileage-preview-is-expanded {
    overflow: hidden;
}

.mileage-pdf-preview-panel.is-expanded {
    position: fixed;
    z-index: 1100;
    inset: 18px;
    max-width: 1680px;
    margin: auto;
    padding: 20px;
    border: 1px solid #c8d8ed;
    border-radius: 18px;
    background: #f8fbff;
    box-shadow: 0 24px 64px rgba(18, 42, 82, 0.28);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.mileage-pdf-preview-panel.is-expanded .mileage-pdf-preview-frame {
    height: auto;
    min-height: 0;
}

.mileage-pdf-preview-frame img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mileage-pdf-preview-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.mileage-pdf-preview-frame [hidden] {
    display: none !important;
}

.mileage-pdf-preview-frame.is-hidden,
.mileage-preview-chooser.is-hidden {
    display: none;
}

.mileage-preview-chooser {
    border: 1px solid #d7e1ef;
    border-radius: 14px;
    padding: 12px;
    background: #ffffff;
    min-height: 360px;
}

.mileage-preview-choice-grid {
    max-height: min(600px, 64vh);
    overflow-y: auto;
    padding-right: 4px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.mileage-preview-choice {
    min-height: 84px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    padding: 12px;
    background: #f8fbff;
    color: #22314d;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mileage-preview-choice:hover,
.mileage-preview-choice.is-selected {
    border-color: #a9c4ff;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(39, 99, 216, 0.10);
    transform: translateY(-1px);
}

.mileage-preview-choice-thumb {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eaf2ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.mileage-preview-choice-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.mileage-preview-choice-copy strong {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mileage-preview-choice-copy span,
.mileage-preview-choice-copy small {
    color: #6f7f98;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 800;
}

.mileage-pdf-preview-state {
    position: absolute;
    inset: 0;
    padding: 24px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(238, 244, 252, 0.96));
    color: #52637d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
}

.mileage-pdf-preview-state.is-hidden {
    display: none;
}

.mileage-pdf-preview-state i {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #e8f1ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.mileage-pdf-preview-panel.is-loading .mileage-pdf-preview-state i {
    animation: mileage-preview-spin 0.9s linear infinite;
}

.mileage-pdf-preview-state strong {
    color: #22314d;
    font-size: 15px;
    font-weight: 950;
}

.mileage-pdf-preview-state span {
    max-width: 280px;
    color: #6f7f98;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 780;
}

.mileage-pdf-preview-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mileage-pdf-preview-actions span {
    color: #6f7f98;
    font-size: 12px;
    font-weight: 850;
}

.mileage-pdf-preview-actions .is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.mileage-preview-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mileage-preview-page-nav[hidden] {
    display: none;
}

.mileage-preview-page-nav .btn-secondary {
    width: 38px;
    min-width: 38px;
    padding: 0;
}

.mileage-preview-page-nav .btn-secondary:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.mileage-preview-page-nav span {
    min-width: 92px;
    text-align: center;
}

@keyframes mileage-preview-spin {
    to {
        transform: rotate(360deg);
    }
}

.mileage-export-notes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mileage-import-file-note {
    margin-bottom: 14px;
    padding: 11px 12px;
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    background: #f8fbff;
    color: #50627d;
    display: flex;
    gap: 9px;
    align-items: center;
    font-size: 13px;
    font-weight: 850;
}

.mileage-import-mapping-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vehicle-import-mapping-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mileage-import-actions {
    margin-top: 14px;
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.mileage-import-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mileage-import-preview-table {
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    overflow: hidden;
}

.mileage-import-preview-head,
.mileage-import-preview-row {
    display: grid;
    grid-template-columns: 1.1fr 0.75fr 1.15fr 0.55fr 1.2fr 1.2fr 1.05fr 1.05fr;
    gap: 10px;
    align-items: center;
}

.mileage-import-preview-head {
    padding: 10px 12px;
    background: #f3f7fd;
    color: #62718a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.mileage-import-preview-row {
    min-height: 58px;
    padding: 11px 12px;
    border-top: 1px solid #edf2f8;
    color: #2c3c58;
    font-size: 12px;
    font-weight: 760;
}

.vehicle-import-preview-head,
.vehicle-import-preview-row {
    grid-template-columns: 1.1fr 1.15fr 0.9fr 0.48fr 1.2fr 1.35fr 0.8fr 0.85fr;
}

.machine-import-preview-head,
.machine-import-preview-row {
    grid-template-columns: 1.05fr 1.45fr 0.9fr 1.05fr 0.45fr 0.65fr 0.8fr;
}

.mileage-import-preview-row.is-ready {
    background: #fbfffd;
}

.mileage-import-preview-row.is-decision {
    background: #fffaf0;
}

.mileage-import-preview-row.is-skipped {
    background: #fff7f7;
}

.mileage-import-optimizations {
    display: grid;
    gap: 14px;
}

.mileage-import-optimization-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.mileage-import-optimization-list {
    display: grid;
    gap: 10px;
}

.mileage-import-optimization-details {
    border: 1px solid #d7e5f7;
    border-radius: 14px;
    background: #f8fbff;
    overflow: hidden;
}

.mileage-import-optimization-details > summary {
    min-height: 52px;
    padding: 0 15px;
    color: #29415f;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 900;
}

.mileage-import-optimization-details > summary::-webkit-details-marker {
    display: none;
}

.mileage-import-optimization-details > summary span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.mileage-import-optimization-details > summary i {
    transition: transform 0.18s ease;
}

.mileage-import-optimization-details[open] > summary i {
    transform: rotate(180deg);
}

.mileage-import-optimization-details > summary b {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e5efff;
    color: #2f6fed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mileage-import-optimization-details .mileage-import-optimization-list {
    padding: 0 12px 12px;
}

.mileage-import-waypoints {
    align-self: start;
    border: 1px solid #dfe8f4;
    border-radius: 11px;
    background: #fbfdff;
}

.mileage-import-waypoints > summary {
    min-height: 42px;
    padding: 0 12px;
    color: #426186;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 850;
}

.mileage-import-waypoints > label {
    padding: 0 10px 10px;
}

.mileage-import-waypoints textarea {
    width: 100%;
}

.mileage-import-optimization-card {
    padding: 14px;
    border: 1px solid #d7e5f7;
    border-radius: 14px;
    background: #f8fbff;
    display: grid;
    gap: 12px;
}

.mileage-import-optimization-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.mileage-import-optimization-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #e7f1ff;
    color: #2f6fed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.mileage-import-optimization-head strong,
.mileage-import-optimization-head small {
    display: block;
}

.mileage-import-optimization-head strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 950;
}

.mileage-import-optimization-head small {
    margin-top: 4px;
    color: #667792;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 750;
}

.mileage-import-optimization-toggle {
    margin: 0;
    white-space: nowrap;
}

.mileage-import-optimization-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mileage-import-optimization-change {
    min-height: 82px;
    padding: 12px;
    border: 1px solid #dfe9f6;
    border-radius: 12px;
    background: #ffffff;
    display: grid;
    gap: 5px;
}

.mileage-import-optimization-change span {
    width: fit-content;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}

.mileage-import-optimization-change strong {
    color: #253753;
    font-size: 12px;
    line-height: 1.42;
    font-weight: 900;
}

.mileage-import-optimization-change small {
    color: #7a899e;
    font-size: 11px;
    font-weight: 760;
}

.mileage-import-optimization-change.is-removed {
    border-color: #f1c8c8;
    background: #fff8f8;
}

.mileage-import-optimization-change.is-removed span {
    background: #ffe2e2;
    color: #bd3434;
}

.mileage-import-optimization-change.is-updated {
    border-color: #c6e7d5;
    background: #f5fff9;
}

.mileage-import-optimization-change.is-updated span {
    background: #dff7e9;
    color: #16734b;
}

.mileage-post-import-threshold-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.mileage-post-import-threshold-form label {
    display: grid;
    gap: 7px;
    color: #52637a;
    font-size: 0.82rem;
    font-weight: 800;
}

.mileage-post-import-threshold-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mileage-post-import-threshold-input input {
    width: 110px;
}

.mileage-post-import-warning {
    border-color: #ead39b;
    background: #fffaf0;
}

.mileage-post-import-warning h2,
.mileage-post-import-empty h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 1rem;
}

.mileage-post-import-warning p,
.mileage-post-import-empty p {
    margin: 0;
    color: #65758b;
}

.mileage-post-import-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.mileage-post-import-columns h3 {
    margin: 0 0 8px;
    color: #65758b;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mileage-post-import-route {
    display: grid;
    gap: 4px;
    margin-top: 7px;
    padding: 10px 12px;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: #f8fafc;
}

.mileage-post-import-route span {
    color: #6d7d92;
    font-size: 0.76rem;
}

.mileage-post-import-route strong {
    color: #253753;
    font-size: 0.86rem;
}

.mileage-post-import-route b {
    color: #16734b;
    font-size: 0.82rem;
}

.mileage-post-import-route.is-removed {
    border-color: #f1c8c8;
    background: #fff8f8;
}

.mileage-post-import-route.is-updated {
    border-color: #c6e7d5;
    background: #f5fff9;
}

@media (max-width: 760px) {
    .mileage-post-import-columns {
        grid-template-columns: 1fr;
    }
}

.mileage-import-preview-row b,
.mileage-import-preview-row small {
    display: block;
}

.mileage-import-preview-row small {
    margin-top: 4px;
    color: #7b89a0;
    font-size: 10px;
}

.mileage-import-decision-list {
    display: grid;
    gap: 12px;
}

.mileage-import-decision {
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
}

.mileage-import-decision.is-decision {
    border-color: #f0d79c;
    background: #fffaf0;
}

.mileage-import-decision.is-skipped {
    border-color: #f1c6c6;
    background: #fff7f7;
}

.mileage-import-decision-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.mileage-import-decision-head strong {
    color: #22314d;
}

.mileage-import-decision-head span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2d62c7;
    font-size: 11px;
    font-weight: 900;
}

.mileage-import-decision ul {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #6d4d29;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 780;
}

.mileage-import-choice-row {
    margin-top: 12px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #34445f;
    font-size: 12px;
    font-weight: 850;
}

.mileage-import-fix-grid {
    margin-top: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vehicle-import-fix-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.machine-import-fix-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.machine-import-fix-grid .machine-import-notes-field {
    grid-column: span 2;
}

.mileage-import-fix-grid small {
    color: #7888a0;
    font-size: 11px;
}

.vehicle-import-fix-grid label.is-soft-disabled,
.machine-import-fix-grid label.is-soft-disabled {
    opacity: 0.62;
}

.vehicle-import-fix-grid label.is-soft-disabled input,
.machine-import-fix-grid label.is-soft-disabled input {
    background: #f2f5f9;
    cursor: not-allowed;
}

@media (max-width: 1180px) {
    .mileage-filter-form {
        grid-template-columns: minmax(220px, 1fr) minmax(174px, auto) minmax(156px, 210px) minmax(140px, 160px);
    }

    .mileage-workspace,
    .mileage-map-layout,
    .mileage-month-status,
    .mileage-export-layout,
    .mileage-import-intro-grid {
        grid-template-columns: 1fr;
    }

    .mileage-pdf-preview-panel {
        position: static;
    }

    .mileage-month-status-actions {
        justify-content: flex-start;
    }

    .mileage-month-status-copy {
        border-left: 0;
        border-top: 1px solid #dfe7f2;
        padding: 14px 0 0;
    }

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

    .mileage-issue-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .mileage-issue-meta,
    .mileage-issue-actions {
        grid-column: 1 / -1;
    }

    .mileage-issue-actions {
        justify-content: flex-start;
    }

    .mileage-import-optimization-head,
    .mileage-import-optimization-flow {
        grid-template-columns: 1fr;
    }

    .mileage-import-optimization-toggle {
        width: fit-content;
    }

    .mileage-import-mapping-grid,
    .mileage-import-fix-grid,
    .mileage-import-stats,
    .mileage-export-grid,
    .mileage-export-summary,
    .mileage-export-notes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mileage-import-preview-head,
    .mileage-import-preview-row {
        grid-template-columns: 1fr 0.7fr 1fr;
    }

    .vehicle-import-preview-head,
    .vehicle-import-preview-row {
        grid-template-columns: 1fr 1fr;
    }

    .machine-import-preview-head,
    .machine-import-preview-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .mileage-route-neighbors-grid {
        grid-template-columns: 1fr;
    }

    .mileage-route-neighbor-actions button {
        flex: 1 1 120px;
    }
}

@media (max-width: 760px) {
    .mileage-history-vehicle-card {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .mileage-history-vehicle-icon {
        width: 52px;
        height: 52px;
    }

    .mileage-history-vehicle-card p {
        grid-column: 1 / -1;
    }

    .mileage-history-filter-form {
        grid-template-columns: 1fr;
    }

    .mileage-filter-form {
        grid-template-columns: 1fr;
    }

    .mileage-stats-grid,
    .mileage-form-grid,
    .mileage-fix-list,
    .mileage-issue-meta {
        grid-template-columns: 1fr;
    }

    .mileage-progress-head,
    .mileage-progress-foot,
    .mileage-fix-compact {
        grid-template-columns: 1fr;
    }

    .mileage-issue-card {
        grid-template-columns: 1fr;
    }

    .mileage-issue-actions .btn-primary,
    .mileage-issue-actions .btn-secondary {
        width: 100%;
    }

    .mileage-import-optimization-actions,
    .mileage-import-optimization-actions .btn-secondary {
        width: 100%;
    }

    .mileage-form-actions {
        align-items: stretch;
        flex-direction: column;
        padding-right: 14px;
        padding-bottom: 88px;
    }

    .mileage-form-actions > a,
    .mileage-form-actions > button {
        width: 100%;
        justify-content: center;
    }

    .mileage-list-panel {
        overflow-x: visible;
    }

    .mileage-table {
        min-width: 0;
        display: grid;
        gap: 10px;
    }

    .mileage-table-head {
        display: none;
    }

    .mileage-table .mileage-row {
        min-height: 0;
        padding: 13px;
        border: 1px solid #e4ebf5;
        border-radius: 15px;
        background: #ffffff;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 12px;
    }

    .mileage-table .mileage-row.is-weekend:not(.has-sequence-warning):not(.is-inline-editing) {
        border-color: #ead8b3;
        background: linear-gradient(135deg, #fffaf0 0%, #ffffff 72%);
    }

    .mileage-table .mileage-row.starts-new-day {
        margin-top: 30px;
    }

    .mileage-date-cell {
        grid-column: 1;
    }

    .mileage-vehicle-cell {
        grid-column: 2;
        justify-content: flex-end;
        text-align: right;
    }

    .mileage-route-cell,
    .mileage-purpose-cell,
    .mileage-driver-cell,
    .mileage-row-actions,
    .mileage-history-row-actions,
    .mileage-insert-slot {
        grid-column: 1 / -1;
    }

    .mileage-scope-cell {
        grid-column: 1;
        align-self: center;
    }

    .mileage-distance-cell {
        grid-column: 2;
        justify-self: end;
        text-align: right;
    }

    .mileage-mobile-field-label {
        display: block;
        margin-bottom: 3px;
        color: #7b8aa2;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .mileage-driver-inline-view {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
    }

    .mileage-driver-inline-view .mileage-mobile-field-label {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .mileage-row-actions,
    .mileage-row-default-actions,
    .mileage-inline-edit-actions {
        justify-content: stretch;
    }

    .mileage-row-default-actions {
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mileage-row-default-actions .mileage-icon-button {
        width: 100%;
        justify-self: stretch;
    }

    .mileage-quick-edit-button {
        width: 100%;
    }

    .mileage-inline-edit-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .mileage-inline-edit-actions .btn-primary,
    .mileage-inline-edit-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .mileage-row.is-inline-editing .mileage-inline-editor input,
    .mileage-row.is-inline-editing .mileage-inline-editor select {
        min-height: 40px;
        font-size: 13px;
    }

    .mileage-import-upload,
    .mileage-import-mapping-grid,
    .mileage-import-fix-grid,
    .mileage-import-stats,
    .mileage-export-grid,
    .mileage-export-summary,
    .mileage-export-notes,
    .mileage-export-report-cards,
    .mileage-export-report-table {
        grid-template-columns: 1fr;
    }

    .mileage-import-dropzone {
        min-height: 154px;
        grid-template-columns: 1fr;
    }

    .mileage-import-dropzone-icon {
        margin-bottom: 8px;
    }

    .mileage-pdf-preview-frame {
        height: 68vh;
        min-height: 420px;
    }

    .mileage-pdf-preview-panel.is-expanded {
        inset: 0;
        padding: 14px;
        border-radius: 0;
    }

    .mileage-pdf-preview-head,
    .mileage-pdf-preview-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .mileage-pdf-preview-badge,
    .mileage-pdf-preview-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .mileage-export-report-top {
        grid-template-columns: 1fr auto;
    }

    .mileage-export-logo {
        grid-column: 1 / -1;
    }

    .mileage-import-preview-head {
        display: none;
    }

    .mileage-import-preview-row {
        grid-template-columns: 1fr;
    }

    .mileage-import-fix-grid {
        grid-template-columns: 1fr;
    }

    .machine-import-fix-grid .machine-import-notes-field {
        grid-column: span 1;
    }
}

/* ============================================================
   Konfiguracja miesiąca — CTA na liście + strona ustawień
   ============================================================ */

.mileage-setup-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid #cfe0ff;
    border-radius: 15px;
    background: linear-gradient(120deg, #f6faff 0%, #eef4ff 100%);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

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

.mileage-issues-cta.has-issues {
    border-color: #ffd28a;
    background: linear-gradient(120deg, #fff8e9 0%, #fffdf8 100%);
}

.mileage-issues-cta.has-issues .mileage-setup-cta-icon,
.mileage-issues-cta.has-issues .mileage-setup-cta-status {
    color: #bc7600;
}

.mileage-setup-cta:hover {
    border-color: #9cbcff;
    box-shadow: 0 12px 26px rgba(47, 111, 237, 0.14);
    transform: translateY(-1px);
}

.mileage-setup-cta.is-ready {
    border-color: #bfe6cf;
    background: linear-gradient(120deg, #f4fbf6 0%, #eafaf0 100%);
}

.mileage-setup-cta-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2f6fed;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.14);
}

.mileage-setup-cta.is-ready .mileage-setup-cta-icon {
    color: #1f9d57;
    box-shadow: inset 0 0 0 1px rgba(31, 157, 87, 0.16);
}

.mileage-setup-cta-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.mileage-setup-cta-body strong {
    color: #1c2b4a;
    font-size: 0.98rem;
}

.mileage-setup-cta-body small {
    color: #4a5a76;
    font-size: 0.84rem;
}

.mileage-setup-cta-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #2f6fed;
    white-space: nowrap;
}

.mileage-setup-cta.is-ready .mileage-setup-cta-status {
    color: #1f9d57;
}

/* --- Overview --- */
.mileage-setup-overview {
    padding: 18px 20px;
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    background: #ffffff;
    display: grid;
    gap: 16px;
}

.mileage-setup-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.mileage-setup-overview-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mileage-setup-overview-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #2f6fed;
    background: linear-gradient(180deg, #f2f7ff 0%, #e6efff 100%);
}

.mileage-setup-overview-title h2 {
    margin: 0;
    font-size: 1.12rem;
    color: #1c2b4a;
}

.mileage-setup-overview-title p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.mileage-setup-month {
    margin: 0;
}

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

.mileage-setup-progress {
    padding: 13px 15px;
    border: 1px solid #e6edf7;
    border-radius: 13px;
    background: #fbfcfe;
    display: grid;
    gap: 8px;
}

.mileage-setup-progress.is-complete {
    border-color: #bfe6cf;
    background: #f5fbf7;
}

.mileage-setup-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mileage-setup-progress-top span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #33415c;
}

.mileage-setup-progress-top strong {
    font-size: 0.95rem;
    color: #1c2b4a;
}

.mileage-setup-bar {
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    border: 0;
    background: #e8eef8;
}

.mileage-setup-bar::-webkit-progress-bar {
    border-radius: 999px;
    background: #e8eef8;
}

.mileage-setup-bar::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, #2f6fed, #4f8bff);
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mileage-setup-bar::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #2f6fed, #4f8bff);
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mileage-setup-progress.is-complete .mileage-setup-bar::-webkit-progress-value {
    background: linear-gradient(90deg, #1f9d57, #35c073);
}

.mileage-setup-progress.is-complete .mileage-setup-bar::-moz-progress-bar {
    background: linear-gradient(90deg, #1f9d57, #35c073);
}

.mileage-setup-progress small {
    font-size: 0.8rem;
    color: #64748b;
}

.mileage-setup-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: #f4f7fb;
    color: #55627a;
    font-size: 0.82rem;
}

.mileage-setup-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid #f1d59b;
    border-radius: 15px;
    background: linear-gradient(120deg, #fffaf0 0%, #fff4dd 100%);
}

.mileage-setup-locked i {
    font-size: 22px;
    color: #d88300;
}

.mileage-setup-locked strong {
    color: #7a4e00;
}

.mileage-setup-locked p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #8a6415;
}

.mileage-setup-exempt {
    padding: 16px 18px;
    border: 1px solid #dce4ef;
    border-radius: 16px;
    background: #f8fafc;
}

.mileage-setup-exempt > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mileage-setup-exempt-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #64748b;
    background: #e9eef5;
}

.mileage-setup-exempt h2 {
    margin: 0;
    color: #263650;
    font-size: 0.98rem;
}

.mileage-setup-exempt p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.mileage-setup-exempt ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    border-top: 1px solid #e3e9f1;
}

.mileage-setup-exempt li {
    min-height: 38px;
    padding: 9px 0;
    border-bottom: 1px solid #e3e9f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #52627b;
    font-size: 0.84rem;
}

.mileage-setup-exempt li small {
    margin-left: 5px;
    color: #7a889d;
}

.mileage-setup-exempt li a {
    color: #2f6fed;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 700;
}

/* --- Vehicle cards --- */
.mileage-setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.mileage-setup-card {
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(20, 40, 80, 0.04);
    transition: box-shadow 0.16s ease, border-color 0.16s ease;
    outline: none;
}

.mileage-setup-card:hover {
    box-shadow: 0 10px 26px rgba(20, 40, 80, 0.08);
}

.mileage-setup-card.is-ready {
    border-color: #cfeadb;
}

.mileage-setup-card.is-setup-flash {
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.mileage-setup-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f8;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%);
}

.mileage-setup-card.is-ready .mileage-setup-card-head {
    background: linear-gradient(180deg, #f7fdf9 0%, #f0faf4 100%);
}

.mileage-setup-thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7d8aa3;
    font-size: 22px;
}

.mileage-setup-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mileage-setup-card-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.mileage-setup-card-id strong {
    font-size: 1.02rem;
    color: #1c2b4a;
    letter-spacing: 0.01em;
}

.mileage-setup-card-id small {
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mileage-setup-flags {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 auto;
    align-items: flex-end;
}

.mileage-setup-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.mileage-setup-flag.is-done {
    color: #1f9d57;
    background: #ecfaf1;
    border-color: #c4ebd4;
}

.mileage-setup-flag.is-todo {
    color: #d97706;
    background: #fff6e9;
    border-color: #f3d9ab;
}

.mileage-setup-flag.is-muted {
    color: #7c89a3;
    background: #f2f5fa;
    border-color: #e2e8f2;
}

.mileage-setup-card-body {
    display: grid;
    gap: 14px;
    padding: 16px;
    flex: 1 1 auto;
}

.mileage-setup-field {
    display: grid;
    gap: 10px;
}

.mileage-setup-field-ref {
    padding-top: 14px;
    border-top: 1px dashed #e6ecf5;
}

.mileage-setup-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mileage-setup-field-head > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #33415c;
}

.mileage-setup-field-head em {
    font-style: normal;
    font-size: 0.74rem;
    color: #8a97ad;
}

.mileage-setup-optional {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f2f5fa;
}

.mileage-setup-form {
    display: grid;
    gap: 10px;
    margin: 0;
}

.mileage-setup-input-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.mileage-setup-input-row .mileage-unit-input {
    flex: 1 1 auto;
}

.mileage-setup-input-row .btn-primary {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mileage-setup-toggle {
    justify-self: start;
}

.mileage-setup-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 11px;
    background: #f8fafd;
    border: 1px solid #eef2f8;
}

.mileage-setup-metrics span {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: center;
}

.mileage-setup-metrics strong {
    font-size: 0.92rem;
    color: #1c2b4a;
}

.mileage-setup-metrics small {
    font-size: 0.72rem;
    color: #7c89a3;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mileage-setup-metrics span.is-over strong {
    color: #ef4444;
}

.mileage-setup-metrics span.is-complete strong {
    color: #1f9d57;
}

.mileage-setup-hint,
.mileage-setup-readonly {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.mileage-setup-readonly {
    font-weight: 600;
    color: #33415c;
}

.mileage-setup-ref-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 10px;
}

.mileage-setup-ref-grid label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mileage-setup-ref-grid small {
    font-size: 0.76rem;
    color: #64748b;
}

.mileage-setup-ref-grid .js-date-picker {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #cdddf8;
    border-radius: 10px;
    background: #fff;
    font-size: 0.88rem;
    color: #1c2b4a;
}

.mileage-setup-ref-grid .js-date-picker:focus {
    outline: none;
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.mileage-setup-ref-grid .mileage-unit-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.mileage-setup-ref-hint {
    margin: -1px 0 0;
    color: #71819a;
    font-size: 0.76rem;
    line-height: 1.4;
}

.mileage-setup-reading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #f3f8ff;
    border: 1px solid #d9e6fb;
}

.mileage-setup-reading-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mileage-setup-reading-main strong {
    font-size: 0.94rem;
    color: #1c2b4a;
}

.mileage-setup-reading-main small {
    font-size: 0.78rem;
    color: #64748b;
}

.mileage-setup-reading-del {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid #ffcaca;
    border-radius: 9px;
    background: #fff5f5;
    color: #ef3838;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.mileage-setup-reading-del:hover {
    border-color: #ff9d9d;
    background: #ffecec;
}

.mileage-setup-reading + .mileage-setup-form {
    margin-top: 4px;
}

@media (max-width: 620px) {
    .mileage-action-cards {
        grid-template-columns: 1fr;
    }

    .mileage-setup-grid {
        grid-template-columns: 1fr;
    }
    .mileage-setup-progress-grid {
        grid-template-columns: 1fr;
    }
    .mileage-setup-ref-grid {
        grid-template-columns: 1fr;
    }

    .mileage-setup-exempt li {
        align-items: flex-start;
        flex-direction: column;
    }
}
.mileage-import-cleaning-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mileage-import-cleaning-grid span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #dce7f6);
    border-radius: 12px;
    background: #f8fbff;
    color: #526381;
}

.mileage-import-cleaning-grid b {
    color: #0a2351;
    font-size: 1.15rem;
}

.mileage-import-odometer-option p,
.mileage-setup-import-total,
.mileage-setup-odometer-proposal small {
    color: #667897;
}

.mileage-import-odometer-option p {
    margin: 10px 0 0;
}

.mileage-route-summary {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d8e6f8;
    border-radius: 14px;
    background: linear-gradient(145deg, #f8fbff, #ffffff);
}

.mileage-route-summary > strong {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #0a2351;
}

.mileage-route-summary dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 14px 0 10px;
}

.mileage-route-summary dl div {
    min-width: 0;
}

.mileage-route-summary dt {
    color: #7183a0;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mileage-route-summary dd {
    margin: 3px 0 0;
    color: #162d56;
    overflow-wrap: anywhere;
}

.mileage-route-summary p {
    margin: 0;
    color: #b15d00;
}

.mileage-route-summary p.is-ready {
    color: #11835f;
}

.mileage-setup-import-total {
    margin: 12px 0 0;
}

.mileage-setup-odometer-proposal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #eef6ff;
}

.mileage-setup-odometer-proposal span,
.mileage-setup-odometer-proposal small {
    display: block;
}

@media (max-width: 720px) {
    .mileage-import-cleaning-grid,
    .mileage-route-summary dl {
        grid-template-columns: 1fr;
    }

    .mileage-setup-odometer-proposal {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Narzędzia kilometrówki */
.mileage-tools-page {
    display: grid;
    gap: 22px;
}

.mileage-tools-month-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mileage-tools-month-picker {
    width: auto;
    min-width: 202px;
    box-shadow: none;
}

.mileage-tools-month-step {
    width: 38px;
    min-width: 38px;
    height: 44px;
    border: 1px solid #d9e4f3;
    border-radius: 12px;
    background: #fff;
    color: #506787;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mileage-tools-month-step:hover {
    border-color: #a9c3eb;
    background: #f4f8ff;
    color: #2f66d8;
}

.mileage-tools-period-note {
    width: fit-content;
    margin: -8px 0 0;
    padding: 9px 12px;
    border: 1px solid #ead8b6;
    border-radius: 11px;
    background: #fffaf1;
    color: #805718;
    font-size: 13px;
    font-weight: 750;
}

.mileage-tools-threshold-form input {
    min-height: 42px;
    border: 1px solid #ced9e7;
    border-radius: 11px;
    background: #fff;
    padding: 0 12px;
    color: #243651;
    font: inherit;
    font-weight: 700;
}

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

.mileage-tool-card {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    min-height: 230px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid #dde6f1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(31, 49, 80, 0.06);
}

.mileage-tool-card::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(38, 113, 230, 0.05);
}

.mileage-tool-card.is-route::after { background: rgba(15, 157, 113, 0.06); }
.mileage-tool-card.is-import::after { background: rgba(233, 154, 35, 0.07); }
.mileage-tool-card.is-location::after { background: rgba(137, 86, 218, 0.06); }

.mileage-tool-card-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #edf4ff;
    color: #2563b8;
    font-size: 23px;
}

.mileage-tool-card.is-route .mileage-tool-card-icon { background: #eaf9f3; color: #0d8b63; }
.mileage-tool-card.is-import .mileage-tool-card-icon { background: #fff6e8; color: #b76d0c; }
.mileage-tool-card.is-location .mileage-tool-card-icon { background: #f4efff; color: #7550bd; }

.mileage-tool-card h2 {
    margin: 10px 0 7px;
    color: #223451;
    font-size: 19px;
}

.mileage-tool-card p {
    margin: 0;
    color: #68778e;
    font-size: 14px;
    line-height: 1.55;
}

.mileage-tool-card-actions {
    grid-column: 1 / -1;
    display: flex;
    align-self: end;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.mileage-tools-workspace {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #d9e4f0;
    border-radius: 22px;
    background: #f8fafc;
}

.mileage-tools-workspace-head,
.mileage-driver-bulk-bar,
.mileage-tools-save-bar,
.mileage-short-tool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.mileage-tools-workspace-head h2 {
    margin: 4px 0 6px;
    color: #20324f;
    font-size: 24px;
}

.mileage-tools-workspace-head p {
    max-width: 850px;
    margin: 0;
    color: #67768d;
    line-height: 1.55;
}

.mileage-tools-workspace .eyebrow {
    color: #2c6fca;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mileage-tools-summary-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.mileage-tools-summary-row span {
    display: grid;
    gap: 2px;
    padding: 13px 14px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #fff;
    color: #67768c;
    font-size: 12px;
}

.mileage-tools-summary-row b { color: #213550; font-size: 20px; }
.mileage-tools-summary-row .is-warning { background: #fff8ed; border-color: #f2d9b1; }

.mileage-driver-plan-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    background: #fff;
}

.mileage-driver-plan-actions p {
    margin: 0;
    color: #65748a;
    font-size: 13px;
    font-weight: 700;
}

.mileage-driver-plan-actions form { flex: 0 0 auto; }

.mileage-tools-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px 2px;
}

.mileage-driver-plan-form,
.mileage-short-tool-list {
    display: grid;
    gap: 12px;
}

.mileage-driver-bulk-bar {
    flex-wrap: wrap;
    padding: 14px;
    border: 1px solid #dce5ef;
    border-radius: 15px;
    background: #fff;
}

.mileage-tools-check-all,
.mileage-driver-bulk-choice {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #35465f;
    font-size: 13px;
    font-weight: 750;
}

.mileage-driver-bulk-choice select,
.mileage-driver-plan-select select,
.mileage-short-tool-head select {
    min-height: 42px;
    min-width: 220px;
    border: 1px solid #ccd8e7;
    border-radius: 11px;
    background: #fff;
    padding: 0 34px 0 11px;
    color: #263851;
    font: inherit;
}

.mileage-driver-plan-list {
    display: grid;
    gap: 8px;
    max-height: 720px;
    overflow: auto;
    padding-right: 4px;
}

.mileage-driver-plan-row {
    display: grid;
    grid-template-columns: 26px minmax(280px, 1fr) minmax(230px, .55fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    background: #fff;
}

.mileage-driver-plan-check input,
.mileage-tools-check-all input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.mileage-driver-plan-route,
.mileage-driver-plan-select {
    display: grid;
    gap: 4px;
}

.mileage-driver-plan-route span,
.mileage-driver-plan-select span,
.mileage-driver-plan-select small {
    color: #728096;
    font-size: 12px;
    font-weight: 700;
}

.mileage-driver-plan-route strong { color: #243650; font-size: 14px; }
.mileage-driver-plan-route p { margin: 0; color: #55647a; font-size: 13px; }

.mileage-tools-save-bar {
    position: sticky;
    bottom: 10px;
    z-index: 4;
    padding: 14px 16px;
    border: 1px solid #cfdceb;
    border-radius: 15px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 34px rgba(31, 49, 80, .13);
    backdrop-filter: blur(10px);
    color: #4f6077;
}

.mileage-tools-unresolved {
    border: 1px solid #ead8b6;
    border-radius: 14px;
    background: #fffaf1;
    padding: 13px 15px;
}

.mileage-tools-unresolved summary { cursor: pointer; color: #8b5a15; font-weight: 800; }
.mileage-tools-unresolved > div { display: grid; gap: 7px; margin-top: 12px; max-height: 300px; overflow: auto; }
.mileage-tools-unresolved p { display: grid; gap: 3px; margin: 0; padding: 8px 0; border-top: 1px solid #eedfca; color: #65738a; }

.mileage-tools-threshold-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 14px;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    background: #fff;
    color: #43546b;
    font-size: 13px;
    font-weight: 750;
}

.mileage-tools-threshold-form input { width: 72px; }

.mileage-short-tool-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dbe5ef;
    border-radius: 17px;
    background: #fff;
    transition: opacity .18s ease, border-color .18s ease, background .18s ease;
}

.mileage-short-tool-card.is-skipped { opacity: .62; }
.mileage-short-tool-card.is-warning { border-color: #edc47f; background: #fffaf1; }

.mileage-short-tool-head > div { min-width: 0; }
.mileage-short-tool-head > div > span { color: #2d6ab9; font-size: 12px; font-weight: 800; }
.mileage-short-tool-head h3 { margin: 4px 0; color: #233650; font-size: 17px; }
.mileage-short-tool-head p { margin: 0; color: #6b7890; font-size: 13px; }
.mileage-short-tool-head label { display: grid; gap: 5px; color: #66758b; font-size: 11px; font-weight: 800; }

.mileage-short-tool-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mileage-short-tool-compare > div {
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 13px;
    border-radius: 13px;
}

.mileage-short-tool-compare .is-before { background: #fff4f2; }
.mileage-short-tool-compare .is-after { background: #eef9f4; }
.mileage-short-tool-compare h4 { margin: 0 0 3px; color: #3b4d64; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.mileage-short-tool-compare > div > div { display: grid; gap: 2px; padding-top: 7px; border-top: 1px solid rgba(80, 99, 124, .13); }
.mileage-short-outcome[hidden] { display: none !important; }
.mileage-short-tool-compare span { color: #758198; font-size: 11px; font-weight: 750; }
.mileage-short-tool-compare strong { color: #293a52; font-size: 13px; }
.mileage-short-tool-compare small { color: #65748a; font-size: 11px; }
.mileage-short-decision-note { margin: 0; color: #4f6077; font-size: 12px; font-weight: 700; }

@media (max-width: 920px) {
    .mileage-tools-grid,
    .mileage-tools-summary-row,
    .mileage-short-tool-compare {
        grid-template-columns: 1fr;
    }

    .mileage-driver-plan-row {
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .mileage-driver-plan-select { grid-column: 2; }
}

@media (max-width: 680px) {
    .mileage-tools-workspace-head,
    .mileage-driver-plan-actions,
    .mileage-driver-bulk-bar,
    .mileage-tools-save-bar,
    .mileage-short-tool-head {
        align-items: stretch;
        flex-direction: column;
    }

    .mileage-tools-month-form { width: 100%; }
    .mileage-tools-month-picker { flex: 1 1 auto; min-width: 0; }

    .mileage-tool-card { grid-template-columns: 44px minmax(0, 1fr); padding: 17px; }
    .mileage-tool-card-icon { width: 44px; height: 44px; }
    .mileage-tools-workspace { padding: 15px; }
    .mileage-driver-bulk-choice { align-items: stretch; flex-direction: column; }
    .mileage-driver-bulk-choice select,
    .mileage-driver-plan-select select,
    .mileage-short-tool-head select { width: 100%; min-width: 0; }
}



/* Source: css/pages/correspondence.css */
.correspondence-page,
.correspondence-form-page,
.correspondence-detail-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.correspondence-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.correspondence-hero h1 {
    margin: 4px 0 6px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0;
}

.correspondence-hero p {
    max-width: 760px;
    color: #66758f;
    margin: 0;
}

.correspondence-hero-actions,
.correspondence-form-actions,
.correspondence-page-controls,
.correspondence-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.correspondence-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.correspondence-stat-card,
.correspondence-panel,
.correspondence-side-panel,
.correspondence-form-card,
.correspondence-tips,
.correspondence-detail-panel {
    background: #fff;
    border: 1px solid rgba(128, 148, 180, 0.22);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(35, 48, 80, 0.08);
}

.correspondence-stat-card {
    min-height: 132px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.correspondence-stat-card i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #195fd8;
    background: #edf4ff;
    font-size: 18px;
}

.correspondence-stat-card span,
.correspondence-stat-card small,
.correspondence-muted,
.correspondence-muted-inline,
.correspondence-table-head,
.correspondence-row small {
    color: #66758f;
}

.correspondence-stat-card strong {
    font-size: 28px;
    line-height: 1;
}

.correspondence-stat-card.is-warning i {
    color: #b45309;
    background: #fff7e6;
}

.correspondence-stat-card.is-danger i {
    color: #dc2626;
    background: #fff1f2;
}

.correspondence-stat-card.is-green i {
    color: #047857;
    background: #eafaf3;
}

.correspondence-toolbar,
.correspondence-panel,
.correspondence-side-panel,
.correspondence-form-card,
.correspondence-tips,
.correspondence-detail-panel {
    padding: 18px;
}

.correspondence-filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.correspondence-search-box {
    flex: 1 1 320px;
    min-width: min(100%, 280px);
}

.correspondence-filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.correspondence-filter-tabs a,
.correspondence-clear-filters,
.correspondence-type-pill,
.correspondence-status-pill,
.correspondence-doc-pill,
.correspondence-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    border-radius: 8px;
    text-decoration: none;
}

.correspondence-filter-tabs a {
    padding: 7px 12px;
    color: #52637d;
    background: #f4f7fb;
    font-weight: 700;
}

.correspondence-filter-tabs a.active {
    color: #0f5fe8;
    background: #e9f2ff;
}

.correspondence-clear-filters {
    padding: 7px 12px;
    background: #f8fafc;
    color: #52637d;
    font-weight: 700;
}

.correspondence-workspace,
.correspondence-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 18px;
    align-items: start;
}

.correspondence-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.correspondence-panel-head h2,
.correspondence-form-section h2,
.correspondence-detail-section h2 {
    margin: 0;
    font-size: 18px;
}

.correspondence-panel-head p,
.correspondence-form-section p,
.correspondence-detail-section p,
.correspondence-tips li {
    margin: 4px 0 0;
    color: #66758f;
}

.correspondence-table {
    display: grid;
    gap: 8px;
}

.correspondence-table-head,
.correspondence-row {
    display: grid;
    grid-template-columns: 110px 120px minmax(150px, 1fr) minmax(140px, 0.9fr) minmax(180px, 1.2fr) 145px 70px 92px;
    gap: 12px;
    align-items: center;
}

.correspondence-table-head {
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.correspondence-row {
    min-height: 82px;
    padding: 12px;
    border: 1px solid rgba(128, 148, 180, 0.18);
    border-radius: 8px;
    background: #fbfdff;
}

.correspondence-main-cell,
.correspondence-date-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.correspondence-main-cell strong,
.correspondence-main-cell small,
.correspondence-description-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-description-cell {
    color: #334155;
}

.correspondence-type-pill {
    padding: 6px 10px;
    width: fit-content;
    color: #245b38;
    background: #eafaf3;
    font-weight: 800;
}

.correspondence-status-pill {
    padding: 6px 9px;
    width: fit-content;
    color: #52637d;
    background: #f3f6fb;
    font-size: 12px;
    font-weight: 800;
}

.correspondence-status-pill.is-due,
.correspondence-status-text.is-due {
    color: #dc2626;
    background: #fff1f2;
}

.correspondence-status-pill.is-soon,
.correspondence-status-pill.is-planned,
.correspondence-status-text.is-soon,
.correspondence-status-text.is-planned {
    color: #b45309;
    background: #fff7e6;
}

.correspondence-status-pill.is-sent,
.correspondence-status-text.is-sent {
    color: #047857;
    background: #eafaf3;
}

.correspondence-status-text {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 8px;
}

.correspondence-doc-pill {
    width: 42px;
    color: #195fd8;
    background: #edf4ff;
    font-weight: 800;
}

.correspondence-icon-button {
    width: 36px;
    height: 36px;
    color: #42516c;
    background: #f4f7fb;
}

.correspondence-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.correspondence-activity-list,
.correspondence-history-list {
    display: grid;
    gap: 10px;
}

.correspondence-activity-item,
.correspondence-history-item,
.correspondence-reminder-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.correspondence-activity-item i,
.correspondence-history-item i,
.correspondence-reminder-head > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #195fd8;
    background: #edf4ff;
}

.correspondence-activity-item span,
.correspondence-history-item span,
.correspondence-reminder-head span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

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

.correspondence-form-card {
    display: grid;
    gap: 22px;
}

.correspondence-form-section {
    display: grid;
    gap: 14px;
}

.correspondence-form-section-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.correspondence-form-section-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #195fd8;
    background: #edf4ff;
    flex: 0 0 auto;
}

.correspondence-existing-file-row {
    margin-bottom: 10px;
}

.correspondence-remove-scan {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #52637d;
    font-weight: 700;
}

.correspondence-form-card input:disabled,
.correspondence-form-card textarea:disabled,
.correspondence-form-card .flatpickr-input.is-disabled {
    background: #eef1f6;
    color: #596b83;
    border-color: #e1e8f2;
    cursor: not-allowed;
}

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

.correspondence-switch {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(128, 148, 180, 0.22);
    border-radius: 8px;
    background: #fbfdff;
}

.correspondence-switch span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.correspondence-switch small {
    color: #66758f;
}

.correspondence-tips-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.correspondence-tips ul {
    margin: 0;
    padding-left: 18px;
}

.correspondence-detail-grid,
.correspondence-reminder-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.correspondence-detail-grid div,
.correspondence-reminder-details div {
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.correspondence-detail-grid span,
.correspondence-reminder-details span {
    display: block;
    color: #66758f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.correspondence-detail-section {
    margin-top: 20px;
}

.correspondence-scan-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #edf4ff;
    color: #195fd8;
    font-weight: 800;
    text-decoration: none;
}

.correspondence-reminder-message {
    margin: 14px 0 0;
    color: #334155;
    white-space: pre-wrap;
}

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

    .correspondence-workspace,
    .correspondence-detail-layout,
    .correspondence-form-layout {
        grid-template-columns: 1fr;
    }

    .correspondence-table-head {
        display: none;
    }

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

@media (max-width: 720px) {
    .correspondence-hero,
    .correspondence-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .correspondence-stats-grid,
    .correspondence-row,
    .correspondence-switch-grid,
    .correspondence-detail-grid,
    .correspondence-reminder-details {
        grid-template-columns: 1fr;
    }

    .correspondence-filter-form {
        align-items: stretch;
    }

    .correspondence-filter-form select,
    .correspondence-clear-filters {
        width: 100%;
    }
}

/* ======================================================================
   Korespondencja — szczegóły wpisu
   ====================================================================== */

.correspondence-detail-page {
    gap: 22px;
    color: #17233d;
}

.correspondence-detail-page .correspondence-hero {
    align-items: flex-start;
}

.correspondence-detail-page .correspondence-hero h1 {
    margin: 0 0 6px;
    font-size: clamp(30px, 3.5vw, 42px);
    font-weight: 900;
    letter-spacing: 0;
}

.correspondence-detail-page .correspondence-hero p {
    color: #53637f;
    font-size: 15px;
    font-weight: 750;
}

.correspondence-detail-page .correspondence-hero-actions {
    justify-content: flex-end;
}

.correspondence-detail-page .correspondence-hero-actions .btn-secondary,
.correspondence-detail-page .correspondence-hero-actions .btn-danger-solid {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 850;
}

.correspondence-detail-separator {
    color: #aeb9cc;
    padding: 0 6px;
}

.correspondence-entry-detail-layout {
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
    gap: 18px;
    align-items: start;
}

.correspondence-entry-detail-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.correspondence-entry-card,
.correspondence-entry-scan-card {
    padding: 20px;
    border: 1px solid #dde6f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(34, 54, 90, 0.07);
}

.correspondence-entry-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.correspondence-entry-card-head h2 {
    margin: 0;
    color: #17233d;
    font-size: 17px;
    font-weight: 900;
}

.correspondence-entry-section-icon,
.correspondence-entry-info-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #0f63ea;
    font-size: 16px;
}

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

.correspondence-entry-info-grid.is-compact {
    margin-top: 14px;
}

.correspondence-entry-info,
.correspondence-entry-reminder,
.correspondence-entry-description {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    background: #fbfdff;
}

.correspondence-entry-info,
.correspondence-entry-description {
    display: flex;
    align-items: center;
    gap: 12px;
}

.correspondence-entry-reminder {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.correspondence-entry-description {
    margin-top: 14px;
    align-items: flex-start;
}

.correspondence-entry-info span,
.correspondence-entry-reminder span,
.correspondence-entry-description span {
    min-width: 0;
}

.correspondence-entry-info small,
.correspondence-entry-reminder small,
.correspondence-entry-description small,
.correspondence-entry-summary-grid small {
    display: block;
    margin-bottom: 5px;
    color: #66758f;
    font-size: 13px;
    font-weight: 750;
}

.correspondence-entry-info strong,
.correspondence-entry-reminder strong,
.correspondence-entry-description strong,
.correspondence-entry-summary-grid strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.correspondence-entry-description strong {
    font-weight: 750;
}

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

.correspondence-entry-summary-grid > div {
    padding: 14px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    background: #fbfdff;
}

.correspondence-entry-scan-card {
    min-width: 0;
}

.correspondence-entry-scan-preview {
    min-height: 560px;
    height: clamp(560px, 66vh, 720px);
    border: 1px solid #dce5f1;
    border-radius: 8px;
    background: #f5f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.correspondence-entry-scan-preview.has-file {
    background: #ffffff;
}

.correspondence-entry-scan-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.correspondence-entry-scan-preview iframe {
    width: 100%;
    height: 100%;
    min-height: 560px;
    border: 0;
    display: block;
}

.correspondence-entry-scan-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 34px 22px;
    color: #53637f;
    text-align: center;
}

.correspondence-entry-scan-empty i {
    color: #9fb1ca;
    font-size: 46px;
}

.correspondence-entry-scan-empty strong {
    color: #17233d;
    font-weight: 900;
}

.correspondence-entry-download {
    margin-top: 14px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #dce5f1;
    border-radius: 8px;
    color: #0f63ea;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    font-weight: 850;
}

.correspondence-entry-download small {
    color: #53637f;
    font-size: 12px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .correspondence-entry-detail-layout {
        grid-template-columns: 1fr;
    }

    .correspondence-entry-scan-preview,
    .correspondence-entry-scan-preview iframe {
        min-height: 460px;
    }

    .correspondence-entry-scan-preview {
        height: clamp(460px, 58vh, 640px);
    }
}

@media (max-width: 720px) {
    .correspondence-entry-info-grid,
    .correspondence-entry-summary-grid {
        grid-template-columns: 1fr;
    }

    .correspondence-entry-reminder {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .correspondence-entry-reminder .correspondence-status-text {
        grid-column: 1 / -1;
        width: fit-content;
    }
}

/* Main correspondence dashboard refresh */
.correspondence-page {
    gap: 28px;
    color: #17233d;
}

.correspondence-page .correspondence-stats-grid {
    gap: 22px;
}

.correspondence-page .correspondence-stat-card,
.correspondence-page .correspondence-toolbar,
.correspondence-page .correspondence-panel,
.correspondence-page .correspondence-side-panel {
    border: 1px solid #dde6f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(34, 54, 90, 0.08);
}

.correspondence-page .correspondence-stat-card {
    min-height: 154px;
    padding: 30px 28px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}

.correspondence-page .correspondence-stat-icon {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #0f63ea;
}

.correspondence-page .correspondence-stat-icon i {
    position: static;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: currentColor;
    display: inline-flex;
    transform: none;
    font-size: 28px;
}

.correspondence-page .correspondence-stat-card.is-warning .correspondence-stat-icon {
    background: #fff4df;
    color: #ea8700;
}

.correspondence-page .correspondence-stat-card.is-danger .correspondence-stat-icon {
    background: #ffecee;
    color: #ef3d43;
}

.correspondence-page .correspondence-stat-card.is-green .correspondence-stat-icon {
    background: #eaf8f0;
    color: #158d58;
}

.correspondence-page .correspondence-stat-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.correspondence-page .correspondence-stat-copy span {
    color: #52617b;
    font-size: 15px;
    font-weight: 750;
}

.correspondence-page .correspondence-stat-copy strong {
    color: #14213b;
    font-size: 36px;
    line-height: 1;
    font-weight: 900;
}

.correspondence-page .correspondence-stat-copy small {
    color: #53637f;
    font-size: 14px;
    font-weight: 750;
}

.correspondence-page .correspondence-stat-card.is-blue small {
    color: #0f63ea;
}

.correspondence-page .correspondence-toolbar {
    padding: 21px 22px;
}

.correspondence-page .correspondence-filter-form {
    display: grid;
    grid-template-columns: minmax(340px, 0.72fr) minmax(560px, 1.08fr) minmax(200px, 0.38fr) minmax(210px, 0.38fr);
    gap: 24px;
    align-items: center;
}

.correspondence-page .correspondence-search-box {
    min-width: 0;
    width: 100%;
    flex: none;
}

.correspondence-page .correspondence-search-box input,
.correspondence-page .correspondence-filter-form select {
    width: 100%;
    min-height: 52px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: #ffffff;
    color: #17233d;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(34, 54, 90, 0.04);
}

.correspondence-page .correspondence-search-box input {
    padding-left: 48px;
}

.correspondence-page .search-box-icon {
    left: 17px;
    color: #53647d;
    font-size: 19px;
}

.correspondence-page .correspondence-filter-tabs {
    min-height: 52px;
    padding: 4px;
    border: 1px solid #e1e8f2;
    border-radius: 10px;
    background: #ffffff;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
}

.correspondence-page .correspondence-filter-tabs a {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    background: transparent;
    color: #52617b;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.correspondence-page .correspondence-filter-tabs a.active {
    background: #eef5ff;
    color: #0f63ea;
    box-shadow: 0 5px 14px rgba(18, 92, 234, 0.08);
}

.correspondence-page .correspondence-clear-filters {
    min-height: 52px;
    border-radius: 10px;
}

.correspondence-page .correspondence-workspace {
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 20px;
}

.correspondence-page .correspondence-panel,
.correspondence-page .correspondence-side-panel {
    padding: 26px 24px;
}

.correspondence-page .correspondence-panel-head {
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.correspondence-page .correspondence-panel-title-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7aa8ff, #4d80f2);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 9px 18px rgba(50, 105, 232, 0.18);
}

.correspondence-page .correspondence-panel-title-icon.is-clock {
    background: #edf4ff;
    color: #0f63ea;
    box-shadow: none;
}

.correspondence-page .correspondence-panel-head h2 {
    color: #17233d;
    font-size: 18px;
    font-weight: 900;
}

.correspondence-page .correspondence-table {
    gap: 0;
}

.correspondence-page .correspondence-table-head,
.correspondence-page .correspondence-row {
    grid-template-columns: 100px 132px minmax(150px, 1.05fr) minmax(130px, 0.85fr) minmax(136px, 0.95fr) 132px 72px 132px;
    gap: 14px;
}

.correspondence-page .correspondence-table-head {
    min-height: 34px;
    padding: 0 10px 12px;
    color: #61718b;
    font-size: 11px;
    font-weight: 900;
    border-bottom: 1px solid #e2e9f3;
}

.correspondence-page .correspondence-table-head span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.correspondence-page .correspondence-row {
    min-height: 108px;
    margin-top: 0;
    padding: 22px 10px;
    border: 0;
    border-bottom: 1px solid #edf2f8;
    border-radius: 0;
    background: transparent;
}

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

.correspondence-page .correspondence-date-cell strong,
.correspondence-page .correspondence-main-cell strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 900;
}

.correspondence-page .correspondence-date-cell small,
.correspondence-page .correspondence-main-cell small,
.correspondence-page .correspondence-muted,
.correspondence-page .correspondence-row small {
    color: #65758f;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-page .correspondence-description-cell {
    color: #17233d;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
    white-space: normal;
}

.correspondence-page .correspondence-type-pill {
    min-height: 54px;
    padding: 0 13px;
    border: 1px solid #d5f0e2;
    border-radius: 9px;
    background: #ecfaf3;
    color: #15824f;
    justify-content: flex-start;
    font-size: 13px;
    font-weight: 900;
}

.correspondence-page .correspondence-type-pill i {
    font-size: 19px;
}

.correspondence-page .correspondence-status-pill {
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #ffdfb4;
    border-radius: 7px;
    background: #fff6e8;
    color: #df7900;
    font-size: 13px;
    font-weight: 900;
}

.correspondence-page .correspondence-status-pill.is-due {
    border-color: #ffd6d9;
    background: #fff1f2;
    color: #dc2626;
}

.correspondence-page .correspondence-status-pill.is-sent {
    border-color: #d0f1dc;
    background: #eaf8f0;
    color: #158d58;
}

.correspondence-page .correspondence-status-pill.is-none {
    border-color: #e1e8f2;
    background: #f6f8fb;
    color: #65758f;
}

.correspondence-page .correspondence-doc-pill {
    min-width: 48px;
    height: 38px;
    border-radius: 8px;
    background: #edf4ff;
    color: #0f63ea;
    font-size: 14px;
}

.correspondence-page .correspondence-actions {
    gap: 9px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.correspondence-page .correspondence-icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid #dde6f2;
    border-radius: 8px;
    background: #ffffff;
    color: #63728a;
    box-shadow: 0 6px 14px rgba(34, 54, 90, 0.04);
}

.correspondence-page .correspondence-icon-button:hover {
    border-color: #cfe0ff;
    color: #0f63ea;
    background: #f6faff;
}

.correspondence-page .correspondence-more-menu {
    position: relative;
}

.correspondence-page .correspondence-more-menu summary {
    list-style: none;
    cursor: pointer;
}

.correspondence-page .correspondence-more-menu summary::-webkit-details-marker {
    display: none;
}

.correspondence-page .correspondence-more-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    min-width: 172px;
    padding: 8px;
    border: 1px solid #dde6f2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(28, 45, 75, 0.16);
    display: grid;
    gap: 4px;
}

.correspondence-page .correspondence-more-popover a {
    min-height: 36px;
    padding: 0 9px;
    border-radius: 8px;
    color: #42516c;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.correspondence-page .correspondence-more-popover a:hover {
    background: #f4f8ff;
    color: #0f63ea;
}

.correspondence-page .correspondence-pagination {
    min-height: 72px;
    margin: 0 -24px -26px;
    padding: 18px 24px 0;
    border-top: 1px solid #edf2f8;
    color: #3f4f69;
    font-weight: 800;
}

.correspondence-page .correspondence-page-controls {
    gap: 8px;
}

.correspondence-page .correspondence-page-button,
.correspondence-page .correspondence-page-current {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
}

.correspondence-page .correspondence-page-button {
    border: 1px solid #dde6f2;
    color: #7a879c;
    background: #ffffff;
}

.correspondence-page .correspondence-page-button.is-disabled {
    opacity: 0.55;
}

.correspondence-page .correspondence-page-current {
    background: #125cea;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(18, 92, 234, 0.24);
}

.correspondence-page .correspondence-side-panel {
    min-height: 330px;
}

.correspondence-page .correspondence-activity-list {
    position: relative;
    gap: 22px;
    padding-left: 8px;
}

.correspondence-page .correspondence-activity-list::before {
    content: "";
    position: absolute;
    left: 30px;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: #d8e3f2;
}

.correspondence-page .correspondence-activity-item {
    position: relative;
    align-items: flex-start;
    gap: 15px;
}

.correspondence-page .correspondence-activity-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: #edf4ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.correspondence-page .correspondence-activity-icon i {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    font-size: 19px;
}

.correspondence-page .correspondence-activity-item span:not(.correspondence-activity-icon) {
    padding-top: 3px;
}

.correspondence-page .correspondence-activity-item strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 900;
}

.correspondence-page .correspondence-activity-item small {
    margin-top: 5px;
    color: #65758f;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-page .correspondence-activity-item em {
    margin-top: 7px;
    color: #0f63ea;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.correspondence-page .correspondence-history-link {
    min-height: 48px;
    margin-top: 24px;
    border-radius: 8px;
    background: #f3f6fa;
    color: #0f63ea;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

.correspondence-day-list {
    display: grid;
    gap: 14px;
}

.correspondence-day-group {
    border: 1px solid #dde6f2;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.correspondence-day-summary {
    min-height: 76px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 34px minmax(180px, 1fr) auto minmax(160px, 0.7fr);
    gap: 14px;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.correspondence-day-summary::-webkit-details-marker {
    display: none;
}

.correspondence-day-chevron {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef5ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease;
}

.correspondence-day-group[open] .correspondence-day-chevron {
    transform: rotate(90deg);
}

.correspondence-day-title {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.correspondence-day-title strong {
    color: #17233d;
    font-size: 18px;
    font-weight: 900;
}

.correspondence-day-title small,
.correspondence-day-scan {
    color: #65758f;
    font-size: 13px;
    font-weight: 750;
}

.correspondence-day-scan {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-day-content {
    padding: 0 18px 18px;
    border-top: 1px solid #edf2f8;
}

.correspondence-day-actions {
    min-height: 70px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.correspondence-day-empty {
    padding: 22px;
    border: 1px dashed #d7e2f0;
    border-radius: 10px;
    background: #f8fbff;
}

.correspondence-day-context {
    padding: 14px;
    border: 1px solid #dbe6f4;
    border-radius: 10px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.correspondence-day-context-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #edf4ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.correspondence-day-context span:not(.correspondence-day-context-icon) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.correspondence-day-context strong {
    color: #17233d;
    font-weight: 900;
}

.correspondence-day-context small {
    color: #65758f;
    font-weight: 700;
}

.correspondence-day-context a {
    margin-left: auto;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #edf4ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 900;
}

@media (max-width: 1400px) {
    .correspondence-page .correspondence-filter-form {
        grid-template-columns: minmax(260px, 1fr) minmax(430px, 1.2fr);
        gap: 14px;
    }

    .correspondence-page .correspondence-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .correspondence-page .correspondence-table-head {
        display: none;
    }

    .correspondence-page .correspondence-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        border: 1px solid #e4ebf5;
        border-radius: 10px;
        padding: 16px;
        margin-bottom: 10px;
    }
}

@media (max-width: 760px) {
    .correspondence-page .correspondence-stat-card,
    .correspondence-page .correspondence-filter-form,
    .correspondence-page .correspondence-filter-tabs,
    .correspondence-page .correspondence-row {
        grid-template-columns: 1fr;
    }

    .correspondence-page .correspondence-filter-form {
        gap: 12px;
    }

    .correspondence-page .correspondence-stat-card {
        min-height: 124px;
        gap: 14px;
    }

    .correspondence-page .correspondence-pagination {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .correspondence-day-summary {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .correspondence-day-summary .correspondence-status-pill,
    .correspondence-day-summary .correspondence-day-scan,
    .correspondence-day-summary .correspondence-muted-inline {
        grid-column: 2;
        justify-self: start;
    }

    .correspondence-day-context {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .correspondence-day-context a {
        margin-left: 54px;
    }
}

/* ======================================================================
   Korespondencja — pulpit (karty zbiorów + prawy panel) i widok dnia
   ====================================================================== */

.correspondence-side-stack {
    display: grid;
    gap: 20px;
    align-items: start;
}

/* Karty zbiorów dziennych na pulpicie */
.correspondence-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 16px;
}

.correspondence-add-tile {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    border: 2px dashed #c6d6ee;
    border-radius: 12px;
    background: #f6faff;
    color: #0f63ea;
    text-decoration: none;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.correspondence-add-tile:hover {
    border-color: #0f63ea;
    background: #eef5ff;
    transform: translateY(-2px);
}

.correspondence-add-plus {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f63ea;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 10px 22px rgba(18, 92, 234, 0.24);
}

.correspondence-add-tile strong {
    color: #17233d;
    font-size: 16px;
    font-weight: 900;
}

.correspondence-add-tile small {
    color: #65758f;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-day-card {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dde6f2;
    border-radius: 12px;
    background: #ffffff;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(34, 54, 90, 0.06);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.correspondence-day-card:hover {
    border-color: #bcd6ff;
    box-shadow: 0 16px 34px rgba(34, 54, 90, 0.12);
    transform: translateY(-2px);
}

.correspondence-day-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.correspondence-day-card-date {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #17233d;
}

.correspondence-day-card-date i {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #0f63ea;
    font-size: 17px;
}

.correspondence-day-card-date strong {
    font-size: 18px;
    font-weight: 900;
}

.correspondence-bell {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff4df;
    color: #ea8700;
    font-size: 14px;
}

.correspondence-day-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.correspondence-day-card-count {
    color: #42516c;
    font-size: 14px;
    font-weight: 800;
}

.correspondence-day-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #edf2f8;
}

.correspondence-day-card-scan,
.correspondence-day-card .correspondence-muted-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #65758f;
    font-size: 13px;
    font-weight: 750;
}

.correspondence-day-card-scan {
    color: #15824f;
}

.correspondence-day-card-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0f63ea;
    font-size: 13px;
    font-weight: 900;
}

/* Prawy panel — najbliższe przypomnienia */
.correspondence-reminder-list {
    display: grid;
    gap: 10px;
}

.correspondence-reminder-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #e6edf6;
    border-radius: 10px;
    background: #fbfdff;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.correspondence-reminder-row:hover {
    border-color: #cfe0ff;
    background: #f4f9ff;
}

.correspondence-reminder-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff6e8;
    color: #df7900;
}

.correspondence-reminder-icon.is-due {
    background: #fff1f2;
    color: #dc2626;
}

.correspondence-reminder-icon.is-sent {
    background: #eaf8f0;
    color: #158d58;
}

.correspondence-reminder-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.correspondence-reminder-copy strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-reminder-copy small {
    color: #65758f;
    font-size: 12px;
    font-weight: 700;
}

/* ===================== Widok pojedynczego dnia ===================== */
.correspondence-day-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
    color: #17233d;
}

.correspondence-day-page .service-kicker {
    width: fit-content;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 12px;
    background: #eef5ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.correspondence-day-page .correspondence-hero h1 {
    margin: 14px 0 6px;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 900;
    letter-spacing: 0;
}

.correspondence-day-page .correspondence-panel {
    border: 1px solid #dde6f2;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(34, 54, 90, 0.08);
}

.correspondence-day-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 20px;
    align-items: start;
}

.correspondence-items-head {
    align-items: center;
}

.correspondence-add-item-btn {
    margin-left: auto;
    min-height: 42px;
}

.correspondence-items-scroll {
    display: grid;
    gap: 12px;
    max-height: 640px;
    overflow-y: auto;
    padding-right: 4px;
}

.correspondence-item-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 11px;
    background: #fbfdff;
}

.correspondence-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #0f63ea;
    font-size: 19px;
}

.correspondence-item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.correspondence-item-line {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.correspondence-item-line strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 900;
}

.correspondence-pdf-chip {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffeceb;
    color: #e23b3b;
    text-decoration: none;
}

.correspondence-item-desc {
    margin: 0;
    color: #42516c;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.correspondence-item-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.correspondence-item-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 7px;
    background: #eef2f8;
    color: #52617b;
    font-size: 13px;
    font-weight: 800;
}

.correspondence-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.correspondence-icon-button.is-danger:hover {
    border-color: #ffd6d9;
    color: #dc2626;
    background: #fff5f5;
}

/* Panel skanu zbiorczego z podglądem */
.correspondence-scan-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.correspondence-scan-preview {
    border: 1px solid #e1e8f2;
    border-radius: 11px;
    background: #f6f8fb;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.correspondence-scan-preview.has-file {
    background: #ffffff;
}

.correspondence-detail-section .correspondence-scan-preview + .correspondence-scan-link {
    margin-top: 12px;
}

.correspondence-scan-preview img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
}

.correspondence-scan-preview iframe {
    width: 100%;
    height: 560px;
    border: 0;
    display: block;
}

.correspondence-scan-doc,
.correspondence-scan-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 36px 22px;
    text-align: center;
}

.correspondence-scan-doc i {
    font-size: 54px;
    color: #e23b3b;
}

.correspondence-scan-empty i {
    font-size: 48px;
    color: #9fb1ca;
}

.correspondence-scan-doc strong,
.correspondence-scan-empty strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 900;
    word-break: break-word;
}

.correspondence-scan-doc small,
.correspondence-scan-empty small {
    color: #65758f;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-scan-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #edf2f8;
}

.correspondence-scan-upload-label {
    color: #17233d;
    font-size: 14px;
    font-weight: 900;
}

.correspondence-scan-form .btn-primary {
    align-self: flex-start;
}

@media (max-width: 1180px) {
    .correspondence-day-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .correspondence-day-grid {
        grid-template-columns: 1fr;
    }

    .correspondence-items-head {
        flex-wrap: wrap;
    }

    .correspondence-add-item-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

.correspondence-page .correspondence-toolbar {
    padding: 16px 18px;
}

.correspondence-page .correspondence-filter-form {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) 270px auto;
    gap: 18px;
    align-items: center;
}

.correspondence-select-shell {
    position: relative;
    display: block;
    min-width: 0;
}

.correspondence-select-shell i {
    position: absolute;
    left: 16px;
    top: 50%;
    z-index: 1;
    color: #53647d;
    font-size: 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.correspondence-page .correspondence-select-shell select {
    padding-left: 46px;
    appearance: none;
}

.correspondence-page .correspondence-clear-filters {
    padding: 0 16px;
    border: 1px solid #d9e3f0;
    background: #ffffff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

.correspondence-main-stack {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.correspondence-main-stack.is-reminder-view .correspondence-items-panel {
    order: -1;
}

.correspondence-page .correspondence-workspace {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    min-width: 0;
}

.correspondence-page .correspondence-panel,
.correspondence-page .correspondence-side-panel {
    min-width: 0;
}

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

.correspondence-page .correspondence-panel-head p {
    margin: 6px 0 0;
    color: #65758f;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-panel-link {
    min-height: 32px;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
}

.correspondence-panel-link:hover {
    color: #0a4bc5;
}

.correspondence-day-grid-scroll {
    padding: 2px;
}

.correspondence-page .correspondence-day-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.correspondence-page .correspondence-add-tile,
.correspondence-page .correspondence-day-card {
    min-height: 162px;
    border-radius: 8px;
}

.correspondence-page .correspondence-add-tile {
    border-color: #cbd9ed;
    background: #f8fbff;
}

.correspondence-page .correspondence-day-card {
    gap: 12px;
    box-shadow: none;
}

.correspondence-page .correspondence-day-card-date > span {
    display: grid;
    gap: 3px;
}

.correspondence-page .correspondence-day-card-date small {
    color: #65758f;
    font-size: 12px;
    font-weight: 800;
}

.correspondence-page .correspondence-day-card-meta {
    margin-top: 0;
}

.correspondence-page .correspondence-day-card-foot {
    margin-top: auto;
}

.correspondence-page .correspondence-items-panel {
    overflow: hidden;
}

.correspondence-page .correspondence-table {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.correspondence-page .correspondence-table-head,
.correspondence-page .correspondence-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.05fr) minmax(150px, 0.9fr) minmax(230px, 1.12fr) 74px 112px;
    gap: 16px;
    min-width: 820px;
    align-items: center;
}

.correspondence-page .correspondence-table-head {
    padding: 0 10px 12px;
}

.correspondence-page .correspondence-row {
    min-height: 80px;
    padding: 16px 10px;
}

.correspondence-reminder-cell {
    display: grid;
    gap: 6px;
}

.correspondence-reminder-cell strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 900;
}

.correspondence-reminder-cell span {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.correspondence-reminder-cell i {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #eef5ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.correspondence-reminder-cell .bi-envelope-fill {
    background: #fff6e8;
    color: #df7900;
}

.correspondence-page .correspondence-status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-style: normal;
}

.correspondence-page .correspondence-doc-pill {
    width: 40px;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
}

.correspondence-page .correspondence-doc-pill i {
    color: currentColor;
}

.correspondence-page .correspondence-doc-pill.is-empty {
    background: #f6f8fb;
    color: #9aa8ba;
}

.correspondence-details-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.correspondence-page .correspondence-pagination {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto auto;
    align-items: center;
    gap: 16px;
}

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

.correspondence-per-page-form label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #65758f;
    font-size: 13px;
    font-weight: 800;
}

.correspondence-per-page-form select {
    min-width: 76px;
    min-height: 38px;
    border: 1px solid #d9e3f0;
    border-radius: 8px;
    background: #ffffff;
    color: #17233d;
    font-weight: 900;
}

.correspondence-page .correspondence-side-panel {
    min-height: auto;
    padding: 20px 18px;
}

.correspondence-page .correspondence-side-panel .correspondence-panel-head {
    margin-bottom: 14px;
}

.correspondence-page .correspondence-side-panel .correspondence-panel-head h2 {
    font-size: 16px;
}

.correspondence-page .correspondence-reminder-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 10px;
}

.correspondence-page .correspondence-reminder-icon {
    width: 34px;
    height: 34px;
}

.correspondence-reminder-days {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid #ffdfb4;
    border-radius: 7px;
    background: #fff6e8;
    color: #df7900;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 900;
}

.correspondence-page .correspondence-activity-list {
    gap: 14px;
    padding-left: 0;
}

.correspondence-page .correspondence-activity-list::before {
    left: 19px;
    top: 36px;
    bottom: 36px;
}

.correspondence-page .correspondence-activity-item {
    display: flex;
    gap: 12px;
}

.correspondence-page .correspondence-activity-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.correspondence-page .correspondence-activity-item strong,
.correspondence-page .correspondence-activity-item small,
.correspondence-page .correspondence-activity-item em {
    display: block;
}

.correspondence-page .correspondence-activity-item strong {
    font-size: 14px;
}

.correspondence-page .correspondence-activity-item em {
    color: #65758f;
    font-size: 12px;
    font-weight: 750;
}

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

.correspondence-scan-summary-grid > div {
    min-height: 108px;
    padding: 16px;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #fbfdff;
    display: grid;
    align-content: center;
    gap: 7px;
}

.correspondence-scan-summary-grid span {
    color: #52617b;
    font-size: 13px;
    font-weight: 850;
}

.correspondence-scan-summary-grid strong {
    color: #17233d;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.correspondence-scan-summary-grid small {
    color: #0f63ea;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .correspondence-page .correspondence-filter-form {
        grid-template-columns: 1fr 240px;
    }

    .correspondence-page .correspondence-clear-filters {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .correspondence-page .correspondence-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .correspondence-page .correspondence-filter-form {
        grid-template-columns: 1fr;
    }

    .correspondence-page .correspondence-day-grid {
        grid-template-columns: 1fr;
    }

    .correspondence-page .correspondence-pagination {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .correspondence-scan-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Align the correspondence dashboard with the vehicle dashboard rhythm. */
.correspondence-page {
    gap: 24px;
}

.correspondence-page .correspondence-stats-grid {
    gap: 22px;
    margin-bottom: 0;
}

.correspondence-page .correspondence-stat-card {
    height: 112px;
    min-height: 112px;
    padding: 24px 18px;
    display: flex;
    flex-direction: row;
    grid-template-columns: none;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.correspondence-page .correspondence-stat-card:hover {
    transform: translateY(-2px);
    border-color: #dce5f2;
    box-shadow: var(--shadow-md);
}

.correspondence-page .correspondence-stat-card .stat-left {
    min-width: 0;
    flex: 1 1 auto;
}

.correspondence-page .correspondence-stat-card .stat-left > div:last-child {
    min-width: 0;
    overflow: hidden;
}

.correspondence-page .correspondence-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.correspondence-page .correspondence-stat-card .stat-icon.blue-soft {
    background: #6c7c96;
}

.correspondence-page .correspondence-stat-card .stat-icon.yellow-soft {
    background: var(--yellow);
}

.correspondence-page .correspondence-stat-card .stat-icon.red-soft {
    background: var(--red);
}

.correspondence-page .correspondence-stat-card .stat-icon.green-soft {
    background: var(--green);
}

.correspondence-page .correspondence-stat-card .stat-icon i {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    line-height: 1;
}

.correspondence-page .correspondence-stat-card .stat-label {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.15;
    overflow: hidden;
    white-space: normal;
}

.correspondence-page .correspondence-stat-card .stat-subtext {
    color: #7c8aa0;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-page .correspondence-stat-card .stat-value,
.correspondence-page .correspondence-stat-card .stat-counter {
    flex: 0 0 auto;
}

.correspondence-page .correspondence-toolbar {
    width: 100%;
    margin-bottom: 0;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
}

.correspondence-page .correspondence-filter-form {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.correspondence-page .correspondence-toolbar-main {
    flex: 1 1 auto;
    min-width: 0;
}

.correspondence-page .correspondence-toolbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.correspondence-page .correspondence-search-box {
    flex: 1 1 520px;
    min-width: 360px;
    height: 56px;
    margin: 0;
    padding: 0 14px 0 18px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

.correspondence-page .correspondence-search-box input {
    height: 48px;
    min-height: 0;
    padding-left: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text);
    font-size: 17px;
    font-weight: 500;
}

.correspondence-page .correspondence-archive-chip {
    height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    white-space: nowrap;
}

.correspondence-date-range {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.correspondence-date-field {
    height: 48px;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #64758f;
    font-size: 13px;
    font-weight: 850;
}

.correspondence-date-field input {
    width: 128px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #24324a;
    font-size: 14px;
    font-weight: 850;
    outline: 0;
}

.correspondence-date-field .flatpickr-input {
    cursor: pointer;
}

.correspondence-page .correspondence-select-shell {
    min-width: 220px;
    height: 48px;
}

.correspondence-page .correspondence-select-shell i {
    left: 16px;
    color: #66758e;
    font-size: 16px;
}

.correspondence-page .correspondence-select-shell select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 38px 0 44px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #60708a 50%),
        linear-gradient(135deg, #60708a 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    box-shadow: none;
    color: #24324a;
    font-size: 15px;
    font-weight: 800;
}

.correspondence-page .correspondence-clear-filters {
    height: 48px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    color: #334155;
    font-size: 14px;
    font-weight: 850;
}

.correspondence-page .correspondence-workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
}

.correspondence-page .correspondence-panel,
.correspondence-page .correspondence-side-panel {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.correspondence-page .correspondence-panel {
    padding: 24px;
}

.correspondence-page .correspondence-day-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.correspondence-page .correspondence-add-tile,
.correspondence-page .correspondence-day-card {
    min-height: 158px;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.correspondence-page .correspondence-day-card {
    border-color: var(--line-soft);
    box-shadow: 0 5px 16px rgba(39, 63, 96, 0.06);
}

.correspondence-page .correspondence-day-card-top {
    gap: 10px;
}

.correspondence-archive-badge {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #d9e3f0;
    border-radius: 999px;
    background: #f6f9fe;
    color: #64758f;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 900;
}

.correspondence-archive-badge i {
    color: #6c7c96;
}

.correspondence-page .correspondence-add-tile:hover,
.correspondence-page .correspondence-day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.correspondence-page .correspondence-table-head,
.correspondence-page .correspondence-row {
    grid-template-columns:
        minmax(150px, 0.85fr)
        minmax(145px, 0.82fr)
        minmax(260px, 1.35fr)
        minmax(210px, 1.05fr)
        68px
        112px;
    min-width: 1120px;
}

.correspondence-page .correspondence-row {
    min-height: 88px;
}

.correspondence-panel-title-row {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
}

.correspondence-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef5ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    font-size: 18px;
}

.correspondence-page .correspondence-description-cell {
    color: #334155;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.correspondence-sender-inline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.correspondence-row-document-icon {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eef5ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    font-size: 15px;
}

.correspondence-item-scan-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #1769e8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(23, 105, 232, .28);
    font-size: 9px;
    line-height: 1;
}

.correspondence-item-scan-badge i {
    font-size: inherit;
}

.correspondence-reminder-cell.is-muted strong,
.correspondence-reminder-cell.is-muted span,
.correspondence-reminder-cell.is-muted small {
    color: #9aa8ba;
}

.correspondence-reminder-cell span small {
    color: #9aa8ba;
    font-size: 12px;
    font-weight: 800;
}

/* ======================================================================
   Korespondencja — osobna strona przypomnień
   ====================================================================== */

.correspondence-reminders-page .correspondence-reminders-workspace {
    align-items: start;
}

.correspondence-reminders-page .correspondence-reminders-panel {
    min-width: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.correspondence-reminder-list-full {
    gap: 10px;
}

.correspondence-reminders-page .correspondence-reminder-row-full {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    grid-template-columns: 46px minmax(0, 1fr) minmax(180px, 205px) auto 18px;
    min-height: 98px;
    padding: 15px 16px 15px 18px;
    gap: 15px;
    border-color: #dfe7f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(29, 52, 86, 0.045);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.correspondence-reminders-page .correspondence-reminder-row-full::before {
    position: absolute;
    inset: 12px auto 12px 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #3b82f6;
    content: "";
}

.correspondence-reminders-page .correspondence-reminder-row-full.is-due::before {
    background: #dc2626;
}

.correspondence-reminders-page .correspondence-reminder-row-full.is-soon::before {
    background: #e28a09;
}

.correspondence-reminders-page .correspondence-reminder-row-full.is-sent::before {
    background: #158d58;
}

.correspondence-reminders-page .correspondence-reminder-row-full:hover,
.correspondence-reminders-page .correspondence-reminder-row-full:focus-visible {
    border-color: #b9d0f0;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(29, 52, 86, 0.1);
    transform: translateY(-1px);
    outline: none;
}

.correspondence-reminder-row-full .correspondence-reminder-icon {
    width: 46px;
    height: 46px;
    border: 1px solid #d5e3fb;
    border-radius: 13px;
    background: #edf4ff;
    color: #2563eb;
    font-size: 17px;
}

.correspondence-reminders-page .correspondence-reminder-icon.is-due {
    border-color: #fecdd3;
}

.correspondence-reminders-page .correspondence-reminder-icon.is-soon {
    border-color: #ffdfb4;
    background: #fff6e8;
    color: #df7900;
}

.correspondence-reminders-page .correspondence-reminder-icon.is-planned {
    border-color: #cfe0ff;
    background: #edf4ff;
    color: #195fd8;
}

.correspondence-reminders-page .correspondence-reminder-icon.is-sent {
    border-color: #bce8d0;
}

.correspondence-reminder-row-full .correspondence-reminder-copy strong {
    color: #15223a;
    font-size: 15px;
    font-weight: 900;
}

.correspondence-reminder-row-full .correspondence-reminder-copy em {
    display: block;
    overflow: hidden;
    color: #71809a;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-reminder-schedule {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid #e5ebf4;
    border-radius: 11px;
    background: #f7f9fc;
}

.correspondence-reminder-schedule small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #71809a;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.correspondence-reminder-schedule small i {
    color: #3b82f6;
    font-size: 11px;
}

.correspondence-reminder-schedule strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 900;
}

.correspondence-reminder-schedule strong span {
    margin-left: 5px;
    color: #53637f;
    font-size: 12px;
    font-weight: 800;
}

.correspondence-reminder-row-arrow {
    color: #9aa8ba;
    font-size: 14px;
    transition: color 160ms ease, transform 160ms ease;
}

.correspondence-reminder-row-full:hover .correspondence-reminder-row-arrow,
.correspondence-reminder-row-full:focus-visible .correspondence-reminder-row-arrow {
    color: #2563eb;
    transform: translateX(2px);
}

.correspondence-reminders-page .correspondence-reminder-days {
    border-color: #ffdfb4;
}

.correspondence-reminders-page .correspondence-reminder-days.is-due {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #dc2626;
}

.correspondence-reminders-page .correspondence-reminder-days.is-soon {
    border-color: #ffdfb4;
    background: #fff6e8;
    color: #df7900;
}

.correspondence-reminders-page .correspondence-reminder-days.is-planned {
    border-color: #cfe0ff;
    background: #edf4ff;
    color: #195fd8;
}

.correspondence-reminders-page .correspondence-reminder-days.is-sent {
    border-color: #bce8d0;
    background: #eaf8f0;
    color: #158d58;
}

.correspondence-reminder-summary-list {
    display: grid;
    gap: 10px;
}

.correspondence-reminder-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #e4ebf5;
    border-radius: 10px;
    background: #fbfdff;
}

.correspondence-reminder-summary-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #53637f;
    font-size: 13px;
    font-weight: 800;
}

.correspondence-reminder-summary-row span i {
    font-size: 15px;
}

.correspondence-reminder-summary-row strong {
    font-size: 16px;
    font-weight: 900;
}

.correspondence-reminder-summary-row.is-due span,
.correspondence-reminder-summary-row.is-due strong {
    color: #dc2626;
}

.correspondence-reminder-summary-row.is-soon span,
.correspondence-reminder-summary-row.is-soon strong {
    color: #df7900;
}

.correspondence-reminder-summary-row.is-planned span,
.correspondence-reminder-summary-row.is-planned strong {
    color: #195fd8;
}

.correspondence-reminder-info-panel {
    background: linear-gradient(135deg, #f7fbff, #ffffff);
}

.correspondence-reminder-info-panel .correspondence-reminder-head {
    align-items: flex-start;
}

.correspondence-reminder-info-panel .correspondence-reminder-head > i {
    flex: 0 0 34px;
}

.correspondence-reminder-info-panel .correspondence-reminder-head strong {
    color: #17233d;
    font-size: 14px;
}

.correspondence-reminder-info-panel .correspondence-reminder-head small {
    color: #65758f;
    line-height: 1.45;
}

.correspondence-reminders-empty {
    min-height: 300px;
    margin: 0;
}

@media (max-width: 720px) {
    .correspondence-reminders-page .correspondence-reminder-row-full {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 14px 14px 14px 17px;
    }

    .correspondence-reminders-page .correspondence-reminder-row-full .correspondence-reminder-icon {
        width: 38px;
        height: 38px;
    }

    .correspondence-reminder-row-full .correspondence-reminder-schedule,
    .correspondence-reminder-row-full .correspondence-reminder-days {
        grid-column: 2;
        justify-self: start;
    }

    .correspondence-reminder-row-full .correspondence-reminder-schedule {
        width: 100%;
    }

    .correspondence-reminder-row-arrow {
        display: none;
    }
}

.correspondence-page .correspondence-pagination {
    margin: 22px 0 0;
    padding: 14px 0 2px;
    border-top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    color: #64758f;
    font-size: 13px;
    font-weight: 850;
}

.correspondence-page .vehicles-page-btn {
    min-width: 36px;
    width: auto;
    height: 36px;
    border-radius: 10px;
    font-size: 14px;
}

.correspondence-page .vehicles-page-btn.active {
    border-color: #2f66d8;
    background: #2f66d8;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(47, 102, 216, 0.22);
}

.correspondence-page .vehicles-page-btn.disabled {
    color: #a8b4c5;
    background: #f8fbff;
    box-shadow: none;
}

.correspondence-page .vehicles-per-page-form {
    justify-content: flex-end;
}

.correspondence-page .vehicles-per-page-form select {
    min-width: 78px;
    height: 42px;
    min-height: 42px;
    border-radius: 12px;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #60708a 50%),
        linear-gradient(135deg, #60708a 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding: 0 38px 0 14px;
}

@media (max-width: 1320px) {
    .correspondence-page .correspondence-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1500px) {
    .correspondence-page .correspondence-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .correspondence-page .correspondence-search-box {
        min-width: 0;
    }

    .correspondence-page .correspondence-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .correspondence-page .correspondence-select-shell,
    .correspondence-page .correspondence-clear-filters,
    .correspondence-page .correspondence-archive-chip {
        flex: 1 1 0;
    }

    .correspondence-date-range {
        flex: 1 1 100%;
    }

    .correspondence-date-field {
        flex: 1 1 0;
    }

    .correspondence-date-field input {
        width: 100%;
    }
}

@media (max-width: 860px) {
    .correspondence-page .correspondence-pagination {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .correspondence-page .vehicles-per-page-form {
        justify-content: flex-start;
    }
}

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

/* ======================================================================
   Korespondencja — formularz "Dodaj / Edytuj list" (redesign)
   ====================================================================== */

.correspondence-form-page {
    gap: 20px;
    color: #17233d;
    padding: 0;
}

.correspondence-form-page .correspondence-hero {
    padding-top: 6px;
    align-items: flex-start;
}

.correspondence-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.correspondence-breadcrumb a {
    color: #53647d;
    text-decoration: none;
    transition: color 140ms ease;
}

.correspondence-breadcrumb a:hover {
    color: #0f63ea;
}

.correspondence-breadcrumb i {
    color: #b7c2d4;
    font-size: 10px;
}

.correspondence-breadcrumb .is-current {
    color: #0f63ea;
}

.correspondence-form-page .correspondence-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 900;
    letter-spacing: 0;
}

.correspondence-form-page .correspondence-hero p {
    color: #53637f;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

/* --- Układ kolumn --- */
.correspondence-form-page .correspondence-form-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 20px;
}

.correspondence-form-page .correspondence-form-card {
    gap: 26px;
    padding: 26px;
    border: 1px solid #dde6f2;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(34, 54, 90, 0.07);
}

/* --- Baner z kontekstem dnia --- */
.correspondence-form-page .correspondence-day-context {
    padding: 16px 18px;
    border: 1px solid #d4e4fb;
    border-radius: 12px;
    background: linear-gradient(180deg, #f2f7ff, #e9f1ff);
}

.correspondence-form-page .correspondence-day-context-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: #ffffff;
    color: #0f63ea;
    box-shadow: 0 5px 14px rgba(15, 99, 234, 0.14);
    font-size: 20px;
}

.correspondence-form-page .correspondence-day-context strong {
    font-size: 16px;
    font-weight: 900;
}

.correspondence-form-page .correspondence-day-context small {
    font-size: 13px;
    font-weight: 750;
}

.correspondence-context-ok {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #15824f;
    font-weight: 850;
}

.correspondence-context-muted {
    color: #53647d;
    font-weight: 850;
}

/* --- Nagłówki sekcji z numerem --- */
.correspondence-form-page .correspondence-form-section {
    gap: 16px;
}

.correspondence-form-page .correspondence-form-section-head {
    align-items: center;
    gap: 13px;
}

.correspondence-step-badge {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #125cea;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 6px 14px rgba(18, 92, 234, 0.28);
}

.correspondence-form-page .correspondence-form-section-head h2 {
    font-size: 19px;
    font-weight: 900;
}

.correspondence-form-page .correspondence-form-section-head p {
    margin-top: 3px;
    color: #66758f;
    font-size: 14px;
    font-weight: 650;
}

/* --- Pola formularza --- */
.correspondence-form-page .form-group label {
    font-size: 13px;
    font-weight: 750;
    color: #4a5972;
}

.correspondence-form-page .field-required {
    color: #e0483f;
}

.correspondence-form-page .form-group input,
.correspondence-form-page .form-group select,
.correspondence-form-page .form-group textarea {
    border-radius: 10px;
    border-color: #d9e3f0;
    font-weight: 600;
}

.correspondence-form-page .form-group input::placeholder,
.correspondence-form-page .form-group textarea::placeholder {
    color: #596b83;
    font-weight: 600;
}

.correspondence-form-page .form-group select {
    min-height: 44px;
    padding: 0 38px 0 14px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #60708a 50%),
        linear-gradient(135deg, #60708a 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #17233d;
    appearance: none;
    cursor: pointer;
}

/* Licznik znaków w polach tekstowych */
.correspondence-textarea-wrap {
    position: relative;
}

.correspondence-char-counter {
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: #596b83;
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
}

.correspondence-char-counter.is-near {
    color: #df7900;
}

.correspondence-form-page .correspondence-textarea-wrap textarea {
    padding-bottom: 28px;
}

/* Ikona w polu (kalendarz) */
.correspondence-field-icon {
    position: relative;
}

.correspondence-field-icon i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #53647d;
    font-size: 17px;
    pointer-events: none;
}

.correspondence-field-icon input {
    padding-right: 40px;
}

.correspondence-reminder-addresses {
    align-self: start;
}

.correspondence-reminder-address-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.correspondence-reminder-address-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
}

.correspondence-reminder-address-remove {
    display: inline-flex;
    width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0c7c7;
    border-radius: 10px;
    color: #b42318;
    background: #fff7f6;
    cursor: pointer;
}

.correspondence-reminder-address-remove:hover {
    border-color: #e89b96;
    background: #ffefed;
}

.correspondence-reminder-address-remove[hidden] {
    display: none;
}

.correspondence-reminder-address-remove:disabled,
.correspondence-reminder-address-add:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.correspondence-reminder-address-add {
    width: fit-content;
    min-height: 38px;
    margin-top: 8px;
    padding: 8px 12px;
}

.correspondence-reminder-addresses > small {
    color: #53647d;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

/* --- Strefa upuszczania pliku --- */
.correspondence-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 22px;
    border: 1.5px dashed #cdd9ec;
    border-radius: 12px;
    background: #fafcff;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease;
}

.correspondence-dropzone.is-dragover {
    border-color: #0f63ea;
    background: #eef5ff;
}

.correspondence-dropzone.has-file {
    border-style: solid;
    border-color: #bcd6ff;
    background: #f4f9ff;
}

.correspondence-dropzone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.correspondence-dropzone-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.correspondence-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f63ea;
    font-size: 24px;
}

.correspondence-dropzone-btn {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: #ffffff;
    color: #17233d;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 54, 90, 0.05);
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.correspondence-dropzone-btn:hover {
    border-color: #bcd6ff;
    color: #0f63ea;
    background: #f6faff;
}

.correspondence-dropzone-hint {
    color: #66758f;
    font-size: 14px;
    font-weight: 700;
}

.correspondence-dropzone-formats {
    color: #596b83;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-dropzone-file {
    margin-top: 2px;
    padding: 7px 14px;
    border-radius: 9px;
    background: #e9f2ff;
    color: #0f4fc2;
    font-size: 13px;
    font-weight: 850;
    word-break: break-all;
}

/* --- Karty przełączników przypomnień --- */
.correspondence-form-page .correspondence-switch-grid {
    gap: 14px;
}

.correspondence-form-page .correspondence-switch {
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border: 1px solid #dde6f2;
    border-radius: 11px;
    background: #fbfdff;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.correspondence-form-page .correspondence-switch:hover {
    border-color: #cfe0ff;
    background: #f6faff;
}

.correspondence-form-page .correspondence-switch:has(input:checked) {
    border-color: #9cc2ff;
    background: #f0f6ff;
    box-shadow: 0 6px 16px rgba(18, 92, 234, 0.1);
}

.correspondence-switch-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #0f63ea;
    font-size: 19px;
}

.correspondence-switch-icon.is-mail {
    background: #edf4ff;
    color: #0f63ea;
}

.correspondence-form-page .correspondence-switch input[type="checkbox"] {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin: 0;
    accent-color: #125cea;
    cursor: pointer;
}

.correspondence-switch-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.correspondence-switch-copy strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 850;
}

.correspondence-switch-copy small {
    color: #66758f;
    font-size: 13px;
    font-weight: 650;
}

/* --- Akcje formularza --- */
.correspondence-form-page .correspondence-form-actions {
    justify-content: flex-end;
    gap: 12px;
    padding-top: 4px;
}

.correspondence-form-page .correspondence-form-actions .btn-secondary {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    font-weight: 850;
}

.correspondence-form-page .correspondence-form-actions .btn-primary {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    background: #125cea;
    box-shadow: 0 12px 26px rgba(18, 92, 234, 0.24);
    font-weight: 850;
}

.correspondence-form-page .correspondence-form-actions .btn-danger-solid {
    margin-right: auto;
    min-height: 46px;
    border-radius: 10px;
    font-weight: 850;
}

/* --- Prawy panel boczny --- */
.correspondence-form-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.correspondence-summary-card,
.correspondence-tips-card,
.correspondence-note-card {
    padding: 22px;
    border: 1px solid #dde6f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(34, 54, 90, 0.06);
}

.correspondence-summary-card h3,
.correspondence-tips-card h3,
.correspondence-note-card h3 {
    margin: 0 0 16px;
    color: #17233d;
    font-size: 16px;
    font-weight: 900;
}

.correspondence-summary-list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.correspondence-summary-list li {
    display: flex;
    align-items: center;
    gap: 13px;
}

.correspondence-summary-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #0f63ea;
    font-size: 17px;
}

.correspondence-summary-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.correspondence-summary-text small {
    color: #53647d;
    font-size: 12px;
    font-weight: 750;
}

.correspondence-summary-text strong {
    color: #17233d;
    font-size: 15px;
    font-weight: 850;
}

.correspondence-summary-text strong.is-ok {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #15824f;
}

.correspondence-summary-text strong.is-muted {
    color: #53647d;
}

.correspondence-tips-card ul {
    display: grid;
    gap: 11px;
    margin: 0;
    padding-left: 18px;
}

.correspondence-tips-card li {
    color: #53637f;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.45;
}

.correspondence-tips-card li::marker {
    color: #0f63ea;
}

.correspondence-note-card {
    background: #f6f9ff;
    border-color: #d9e4f5;
    box-shadow: none;
}

.correspondence-note-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
}

.correspondence-note-head i {
    color: #0f63ea;
    font-size: 18px;
}

.correspondence-note-head h3 {
    margin: 0;
    font-size: 15px;
}

.correspondence-note-card p {
    margin: 0;
    color: #53637f;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.5;
}

/* --- Kompaktowy formularz listu --- */
.correspondence-item-form-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    gap: 18px;
}

.correspondence-form-page .correspondence-item-form-layout {
    width: 100%;
    margin: 0 auto;
    grid-template-columns: minmax(0, 760px) minmax(260px, 300px);
    gap: 16px;
}

.correspondence-form-page .correspondence-item-form-card {
    gap: 18px;
    padding: 20px;
    border-radius: 10px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-form-section {
    gap: 12px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-form-section-head {
    gap: 10px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-form-section-head h2 {
    font-size: 17px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-form-section-head p {
    font-size: 13px;
}

.correspondence-form-page .correspondence-item-form-card .form-grid {
    gap: 12px;
}

.correspondence-form-page .correspondence-item-form-card .form-group input,
.correspondence-form-page .correspondence-item-form-card .form-group select {
    min-height: 42px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-textarea-wrap textarea {
    min-height: 90px;
}

.correspondence-form-page .correspondence-item-form-card #reminder_message {
    min-height: 78px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-dropzone {
    align-items: flex-start;
    padding: 16px;
    text-align: left;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-dropzone-main {
    justify-content: flex-start;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-dropzone-icon {
    font-size: 21px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-dropzone-btn {
    min-height: 36px;
    padding: 0 14px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-switch-grid {
    gap: 10px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-switch {
    padding: 11px 12px;
    gap: 10px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-switch-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
    font-size: 16px;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-form-actions {
    padding-top: 0;
}

.correspondence-form-page .correspondence-item-form-card .correspondence-item-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px 18px;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #edf2f8;
}

.correspondence-form-page .correspondence-item-action-left {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-right: 0;
}

.correspondence-item-action-center {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.correspondence-item-action-right {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.correspondence-item-save-status {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #718096;
    font-size: 12px;
}

.correspondence-item-save-status.is-error {
    color: #b91c1c;
}

.correspondence-item-save-status[hidden],
.correspondence-item-save-status [hidden],
.correspondence-existing-file-row[hidden] {
    display: none;
}

.correspondence-archive-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 20px;
    padding: 20px 24px;
    border: 1px solid #e4ebf5;
    border-radius: 12px;
    background: #fff;
}

.correspondence-archive-settings > div {
    flex: 1 1 300px;
}

.correspondence-archive-settings h2 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #17233d;
}

.correspondence-archive-settings p {
    margin: 0;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.correspondence-archive-settings label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.correspondence-archive-settings-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.correspondence-archive-settings select {
    padding: 10px 12px;
    border: 1px solid #d6e0ee;
    border-radius: 8px;
    background: #fff;
    color: #17233d;
}

.correspondence-form-page .correspondence-item-form-side {
    gap: 14px;
}

.correspondence-form-page .correspondence-item-form-side .correspondence-summary-card,
.correspondence-form-page .correspondence-item-form-side .correspondence-tips-card,
.correspondence-form-page .correspondence-item-form-side .correspondence-note-card {
    padding: 18px;
    border-radius: 10px;
}

/* --- Kompaktowy formularz zbioru korespondencji --- */
.correspondence-day-form-page {
    width: min(100%, 1280px);
    margin: 0 auto;
    gap: 18px;
}

.correspondence-day-form-page.is-create {
    width: min(100%, 980px);
}

.correspondence-form-page .correspondence-day-form-hero {
    min-height: 106px;
    padding: 4px 4px 0;
}

.correspondence-form-page .correspondence-day-form-hero h1 {
    font-size: clamp(27px, 3vw, 34px);
}

.correspondence-form-page .correspondence-day-form-hero p {
    max-width: 640px;
    font-size: 14px;
}

.correspondence-form-page .correspondence-day-form-layout {
    width: min(100%, 1280px);
    margin: 0 auto;
    grid-template-columns: minmax(0, 760px) minmax(270px, 320px);
    gap: 16px;
}

.correspondence-form-page .correspondence-day-form-layout.is-create {
    width: 100%;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr);
}

.correspondence-form-page .correspondence-day-form-card {
    gap: 16px;
    padding: 20px;
    border-radius: 10px;
}

.correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-day-form-card {
    grid-template-columns: minmax(260px, 0.8fr) minmax(380px, 1.2fr);
    gap: 16px;
    padding: 18px;
    border-color: #d8e3f2;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(35, 55, 90, 0.08);
}

.correspondence-day-create-intro {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #d6e6ff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f1f6ff 0%, #f8fbff 55%, #eef7ff 100%);
}

.correspondence-day-create-intro-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    background: #ffffff;
    color: #125cea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(18, 92, 234, 0.14);
    font-size: 21px;
}

.correspondence-day-create-intro-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.correspondence-day-create-intro-copy small {
    color: #125cea;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.correspondence-day-create-intro-copy strong {
    color: #17233d;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.3;
}

.correspondence-day-create-intro-copy > span {
    color: #65758e;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-form-section {
    min-width: 0;
    padding: 18px;
    border: 1px solid #e0e8f3;
    border-radius: 12px;
    background: #fbfdff;
}

.correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-form-section:first-of-type {
    background: linear-gradient(180deg, #fbfdff, #f6f9fd);
}

.correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-form-actions {
    grid-column: 1 / -1;
    padding-top: 2px;
}

.correspondence-form-page .correspondence-day-form-card .correspondence-form-section {
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf2f8;
}

.correspondence-form-page .correspondence-day-form-card .correspondence-form-section:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-form-section:last-of-type {
    padding: 18px;
    border: 1px solid #e0e8f3;
}

.correspondence-form-page .correspondence-day-form-card .correspondence-form-section-head {
    gap: 10px;
}

.correspondence-form-page .correspondence-day-form-card .correspondence-form-section-head h2 {
    font-size: 17px;
}

.correspondence-optional-badge {
    min-height: 22px;
    margin-left: 6px;
    padding: 0 8px;
    border: 1px solid #d7e2f0;
    border-radius: 999px;
    background: #f7f9fc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    vertical-align: 2px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.correspondence-form-page .correspondence-day-form-card .correspondence-form-section-head p {
    font-size: 13px;
}

.correspondence-form-page .correspondence-day-form-card .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.correspondence-form-page .correspondence-day-form-card .form-group input {
    min-height: 42px;
}

.correspondence-form-page .correspondence-day-form-layout.is-create .form-group {
    max-width: none;
}

.correspondence-day-current-scan {
    padding: 12px;
    border: 1px solid #dce7f5;
    border-radius: 10px;
    background: #f8fbff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.correspondence-day-current-scan a {
    min-width: 0;
    color: #17233d;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.correspondence-day-current-scan a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-day-current-scan a i {
    color: #0f63ea;
}

.correspondence-day-current-scan label {
    color: #b42318;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
}

.correspondence-day-current-scan input {
    accent-color: #dc2626;
}

.correspondence-day-dropzone {
    align-items: flex-start;
    padding: 18px;
    text-align: left;
}

.correspondence-day-dropzone .correspondence-dropzone-main {
    justify-content: flex-start;
}

.correspondence-day-dropzone .correspondence-dropzone-btn {
    min-height: 36px;
    padding: 0 14px;
}

.correspondence-form-page .correspondence-day-form-card .correspondence-form-actions {
    padding-top: 0;
}

.correspondence-form-page .correspondence-day-form-side {
    gap: 14px;
}

.correspondence-form-page .correspondence-day-form-side .correspondence-summary-card,
.correspondence-form-page .correspondence-day-form-side .correspondence-tips-card,
.correspondence-form-page .correspondence-day-form-side .correspondence-note-card {
    padding: 18px;
    border-radius: 10px;
}

.correspondence-form-page .correspondence-day-form-side .correspondence-summary-list {
    gap: 13px;
}

.correspondence-form-page .correspondence-day-form-side .correspondence-summary-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
}

@media (max-width: 1180px) {
    .correspondence-form-page .correspondence-form-layout {
        grid-template-columns: 1fr;
    }

    .correspondence-form-page .correspondence-item-form-layout,
    .correspondence-form-page .correspondence-day-form-layout {
        width: 100%;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .correspondence-form-page .correspondence-switch-grid {
        grid-template-columns: 1fr;
    }

    .correspondence-form-page .correspondence-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .correspondence-form-page .correspondence-form-actions .btn-danger-solid {
        margin-right: 0;
    }

    .correspondence-form-page .correspondence-item-form-card .correspondence-item-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .correspondence-form-page .correspondence-item-action-left,
    .correspondence-item-action-center,
    .correspondence-item-action-right {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        justify-self: stretch;
    }

    .correspondence-archive-settings {
        padding: 16px;
    }

    .correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-day-form-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .correspondence-day-create-intro,
    .correspondence-form-page .correspondence-day-form-layout.is-create .correspondence-form-actions {
        grid-column: 1;
    }

    .correspondence-day-current-scan {
        grid-template-columns: 1fr;
    }

    .correspondence-day-current-scan label {
        white-space: normal;
    }
}

/* ======================================================================
   Korespondencja — widok zbioru dziennego (redesign)
   ====================================================================== */

.correspondence-day-page .correspondence-day-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #53637f;
    font-size: 15px;
    font-weight: 700;
}

.correspondence-day-subtitle-sep {
    color: #c4cede;
}

.correspondence-day-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.correspondence-day-side {
    display: grid;
    gap: 16px;
    align-content: start;
    min-width: 0;
    position: sticky;
    top: 92px;
}

.correspondence-day-page .correspondence-panel {
    padding: 20px;
}

.correspondence-day-page .correspondence-day-layout {
    grid-template-columns: minmax(600px, 1.08fr) minmax(380px, 0.92fr);
    gap: 22px;
}

.correspondence-day-side .correspondence-dv-scan-card {
    order: -1;
}

.correspondence-day-date-editor {
    position: fixed;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.correspondence-day-date-trigger.is-saving i {
    animation: correspondence-date-spin 800ms linear infinite;
}

.correspondence-day-date-trigger {
    min-width: 142px;
}

.correspondence-day-date-trigger.is-saved {
    border-color: #bce8d0;
    background: #effaf4;
    color: #158d58;
}

.correspondence-day-date-status {
    align-self: center;
    max-width: 240px;
    color: #158d58;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.correspondence-day-date-status.is-error {
    color: #c73737;
}

.correspondence-day-date-status.is-success {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.correspondence-day-date-status[hidden] {
    display: none;
}

@keyframes correspondence-date-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .correspondence-day-date-trigger.is-saving i {
        animation: none;
    }
}

/* --- Nagłówek panelu --- */
.correspondence-dv-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.correspondence-dv-panel-head h2 {
    margin: 0;
    color: #17233d;
    font-size: 18px;
    font-weight: 900;
}

.correspondence-dv-add-btn {
    min-height: 42px;
    border-radius: 10px;
    font-weight: 850;
}

/* --- Pasek narzędzi --- */
.correspondence-dv-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.correspondence-dv-search {
    position: relative;
    flex: 1 1 320px;
    min-width: 0;
}

.correspondence-dv-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #53647d;
    font-size: 16px;
    pointer-events: none;
}

.correspondence-dv-search input {
    width: 100%;
    min-height: 40px;
    padding: 0 14px 0 40px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: #ffffff;
    color: #17233d;
    font-size: 14px;
    font-weight: 600;
}

.correspondence-dv-search input:focus {
    outline: none;
    border-color: #b9c9e7;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.08);
}

.correspondence-dv-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 1 150px;
    min-width: 0;
}

.correspondence-dv-toolbar .correspondence-dv-select:nth-child(2) {
    flex-basis: 120px;
}

.correspondence-dv-toolbar .correspondence-dv-select:nth-child(3) {
    flex-basis: 160px;
}

.correspondence-dv-toolbar .correspondence-dv-select:nth-child(4) {
    flex-basis: 140px;
}

.correspondence-dv-select select {
    width: 100%;
    min-height: 40px;
    min-width: 0;
    padding: 0 30px 0 12px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: #ffffff;
    color: #17233d;
    font-size: 13px;
    font-weight: 750;
    appearance: none;
    cursor: pointer;
}

.correspondence-dv-select select:focus {
    outline: none;
    border-color: #b9c9e7;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.08);
}

.correspondence-dv-select i {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #53647d;
    font-size: 13px;
    pointer-events: none;
}

/* --- Tabela przesyłek --- */
.correspondence-dv-table {
    width: 100%;
    border: 1px solid #e2e9f3;
    border-radius: 11px;
    background: #ffffff;
    overflow: hidden;
}

.correspondence-dv-head,
.correspondence-dv-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) minmax(120px, 0.75fr) minmax(150px, 0.85fr) 88px;
    gap: 12px;
    align-items: center;
}

.correspondence-dv-head {
    padding: 11px 14px;
    border-bottom: 1px solid #e2e9f3;
    background: #f7faff;
    color: #61718b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.correspondence-dv-head-actions {
    text-align: right;
}

.correspondence-dv-body {
    display: block;
    max-height: 430px;
    overflow-y: auto;
}

.correspondence-dv-row {
    grid-template-areas:
        "main to reminder actions";
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f8;
    background: #ffffff;
    transition: background 140ms ease;
}

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

.correspondence-dv-row[hidden] {
    display: none;
}

.correspondence-dv-row:hover {
    background: #f9fbff;
}

.correspondence-dv-main {
    grid-area: main;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.correspondence-dv-main-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.correspondence-dv-main-copy strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-dv-main-copy small {
    color: #65758f;
    font-size: 12px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-dv-to {
    grid-area: to;
    color: #42516c;
    font-size: 13px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-dv-reminder {
    grid-area: reminder;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #42516c;
    font-size: 13px;
    font-weight: 800;
    min-width: 0;
}

.correspondence-dv-reminder.is-muted {
    color: #9aa8ba;
    font-weight: 750;
}

.correspondence-dv-reminder-channels {
    display: inline-flex;
    gap: 6px;
    font-size: 12px;
}

.correspondence-dv-reminder-channels .bi-bell-fill {
    color: #df7900;
}

.correspondence-dv-reminder-channels .bi-envelope-fill {
    color: #0f63ea;
}

.correspondence-dv-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.correspondence-day-page .correspondence-icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid #dde6f2;
    border-radius: 9px;
    background: #ffffff;
    color: #63728a;
    box-shadow: 0 4px 10px rgba(34, 54, 90, 0.04);
}

.correspondence-day-page .correspondence-icon-button:hover {
    border-color: #cfe0ff;
    color: #0f63ea;
    background: #f6faff;
}

/* --- Pusty wynik filtra --- */
.correspondence-dv-empty-filtered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 20px;
    text-align: center;
    color: #65758f;
}

.correspondence-dv-empty-filtered[hidden] {
    display: none;
}

.correspondence-dv-empty-filtered i {
    font-size: 34px;
    color: #9fb1ca;
}

.correspondence-dv-empty-filtered p {
    margin: 0;
    font-weight: 700;
}

/* --- Paginacja --- */
.correspondence-dv-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #edf2f8;
}

.correspondence-dv-count {
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.correspondence-dv-pages {
    display: flex;
    gap: 6px;
}

.correspondence-dv-page {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #dde6f2;
    border-radius: 9px;
    background: #ffffff;
    color: #52617b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.correspondence-dv-page:hover {
    border-color: #cfe0ff;
    color: #0f63ea;
}

.correspondence-dv-page.is-current {
    background: #125cea;
    border-color: #125cea;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(18, 92, 234, 0.22);
    cursor: default;
}

.correspondence-dv-page.is-disabled {
    opacity: 0.5;
    cursor: default;
}

.correspondence-dv-perpage {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #64758f;
    font-size: 13px;
    font-weight: 800;
}

.correspondence-dv-perpage select {
    min-height: 36px;
    padding: 0 32px 0 12px;
    border: 1px solid #d9e3f0;
    border-radius: 9px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #60708a 50%),
        linear-gradient(135deg, #60708a 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #17233d;
    font-weight: 850;
    appearance: none;
    cursor: pointer;
}

/* --- Oś czasu aktywności --- */
.correspondence-dv-activity {
    display: grid;
}

.correspondence-dv-activity-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #edf2f8;
}

.correspondence-dv-activity-row:first-child {
    padding-top: 0;
}

.correspondence-dv-activity-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.correspondence-dv-activity-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.correspondence-dv-activity-dot.is-blue {
    background: #edf4ff;
    color: #0f63ea;
}

.correspondence-dv-activity-dot.is-amber {
    background: #fff4e3;
    color: #df7900;
}

.correspondence-dv-activity-dot.is-red {
    background: #ffecee;
    color: #dc2626;
}

.correspondence-dv-activity-dot.is-green {
    background: #e7f7ef;
    color: #15824f;
}

.correspondence-dv-activity-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.correspondence-dv-activity-copy strong {
    color: #17233d;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

.correspondence-dv-activity-copy small {
    color: #65758f;
    font-size: 12.5px;
    font-weight: 700;
}

.correspondence-dv-activity-time {
    color: #53647d;
    font-size: 12.5px;
    font-weight: 750;
    white-space: nowrap;
}

/* --- Karta podsumowania w układzie 2-kolumnowym --- */
.correspondence-summary-card.is-grid .correspondence-summary-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.correspondence-summary-card.is-grid .correspondence-summary-text strong {
    font-size: 14px;
}

/* --- Karta skanu zbiorczego --- */
.correspondence-dv-scan-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.correspondence-dv-scan-card .correspondence-scan-preview {
    min-height: 240px;
}

.correspondence-dv-scan-card .correspondence-scan-preview.has-file {
    height: clamp(405px, 51vh, 585px);
    min-height: 405px;
    align-items: stretch;
}

.correspondence-dv-scan-card .correspondence-scan-preview.has-file img {
    height: 100%;
    max-height: none;
    object-fit: contain;
}

.correspondence-dv-scan-card .correspondence-scan-preview.has-file iframe {
    height: 100%;
    min-height: 405px;
}

.correspondence-dv-scan-card .correspondence-dv-panel-head {
    margin-bottom: 0;
}

.correspondence-scan-picker {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.correspondence-scan-picker > span,
.correspondence-scan-source > span {
    color: #6b7b94;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.correspondence-scan-picker select {
    width: 100%;
    min-height: 42px;
    padding: 0 38px 0 12px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: #ffffff;
    color: #17233d;
    font-weight: 750;
}

.correspondence-scan-source {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.correspondence-scan-source strong {
    min-width: 0;
    color: #17233d;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-dv-scan-card .correspondence-scan-link {
    min-width: 0;
}

.correspondence-dv-scan-card .correspondence-scan-link small {
    min-width: 0;
    margin-left: auto;
    color: #60708a;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-dv-scan-change {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #edf2f8;
}

.correspondence-dv-scan-change-title {
    color: #17233d;
    font-size: 14px;
    font-weight: 850;
}

.correspondence-dv-scan-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.correspondence-dv-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #d9e3f0;
    border-radius: 10px;
    background: #fbfdff;
    cursor: pointer;
}

.correspondence-dv-file-chip {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    background: #eef4ff;
    color: #0f63ea;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 850;
}

.correspondence-dv-file-name {
    min-width: 0;
    color: #65758f;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correspondence-dv-file input[type="file"] {
    display: none;
}

.correspondence-dv-scan-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.correspondence-dv-scan-actions .btn-primary {
    min-height: 42px;
    border-radius: 10px;
    font-weight: 850;
}

.correspondence-dv-scan-remove-form {
    display: inline-flex;
}

.correspondence-dv-scan-remove {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #ffd6d9;
    border-radius: 10px;
    background: #ffffff;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.correspondence-dv-scan-remove:hover {
    background: #fff5f5;
}

.correspondence-dv-file-hint {
    color: #596b83;
    font-size: 12.5px;
    font-weight: 700;
}

@media (max-width: 1240px) {
    .correspondence-day-page .correspondence-day-layout {
        grid-template-columns: 1fr;
    }

    .correspondence-day-side {
        position: static;
    }

    .correspondence-day-side .correspondence-dv-scan-card {
        order: 0;
    }

    .correspondence-dv-body {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

@media (max-width: 820px) {
    .correspondence-dv-head {
        display: none;
    }

    .correspondence-dv-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "to"
            "reminder"
            "actions";
        gap: 7px;
        padding: 14px 4px;
    }

    .correspondence-dv-actions {
        justify-content: flex-start;
    }

    .correspondence-dv-scan-card .correspondence-scan-preview.has-file {
        height: clamp(315px, 48vh, 465px);
        min-height: 315px;
    }

    .correspondence-dv-scan-card .correspondence-scan-preview.has-file iframe {
        min-height: 315px;
    }
}

/* ======================================================================
   Korespondencja — jasne kafelki zbiorów z subtelnym motywem koperty
   ====================================================================== */

.correspondence-page .correspondence-day-grid {
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 14px;
}

.correspondence-page .correspondence-add-tile,
.correspondence-page .correspondence-day-card {
    min-height: 166px;
    border-radius: 15px;
}

.correspondence-page .correspondence-add-tile {
    gap: 7px;
    padding: 18px;
    border: 1.5px dashed #8eb8f8;
    background: linear-gradient(145deg, #f3f8ff 0%, #ffffff 72%);
    box-shadow: none;
}

.correspondence-page .correspondence-add-tile:hover,
.correspondence-page .correspondence-add-tile:focus-visible {
    border-color: #3b82f6;
    background: linear-gradient(145deg, #ebf4ff 0%, #ffffff 72%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
    outline: none;
}

.correspondence-page .correspondence-add-plus {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.correspondence-page .correspondence-add-tile strong {
    color: #2563eb;
    font-size: 15px;
    font-weight: 850;
}

.correspondence-page .correspondence-add-tile small {
    color: #718099;
    font-size: 12px;
    font-weight: 700;
}

.correspondence-page .correspondence-day-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    gap: 11px;
    padding: 17px 16px 13px 18px;
    border: 1px solid #e1e8f1;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(38, 60, 94, 0.07);
}

.correspondence-page .correspondence-day-card::before,
.correspondence-page .correspondence-day-card::after {
    position: absolute;
    z-index: 0;
    content: "";
    pointer-events: none;
}

.correspondence-page .correspondence-day-card::before {
    top: 0;
    right: 0;
    width: 54%;
    height: 55%;
    border-bottom: 1px solid rgba(121, 139, 165, 0.11);
    background: linear-gradient(145deg, transparent 49%, rgba(243, 246, 250, 0.82) 50%);
    clip-path: polygon(18% 0, 100% 0, 100% 100%);
}

.correspondence-page .correspondence-day-card::after {
    right: -22px;
    bottom: -36px;
    width: 116px;
    height: 84px;
    border: 1px solid rgba(121, 139, 165, 0.08);
    border-radius: 22px;
    transform: rotate(-18deg);
}

.correspondence-page .correspondence-day-card > * {
    position: relative;
    z-index: 1;
}

.correspondence-page .correspondence-day-card:hover,
.correspondence-page .correspondence-day-card:focus-visible {
    border-color: #b9d0f0;
    background: #ffffff;
    box-shadow: 0 13px 28px rgba(32, 61, 104, 0.12);
    outline: none;
}

.correspondence-page .correspondence-day-card-mail-edge {
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 0;
    z-index: 2;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(
        180deg,
        #6398e7 0 38%,
        transparent 38% 50%,
        #eb8b86 50% 88%,
        transparent 88% 100%
    );
    opacity: 0.82;
}

.correspondence-page .correspondence-day-card-top {
    align-items: flex-start;
    gap: 8px;
}

.correspondence-page .correspondence-day-card-date {
    min-width: 0;
    color: #192946;
}

.correspondence-page .correspondence-day-card-date > span {
    gap: 2px;
}

.correspondence-page .correspondence-day-card-date strong {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 880;
    letter-spacing: -0.01em;
}

.correspondence-page .correspondence-day-card-date small {
    color: #53647d;
    font-size: 11px;
    font-weight: 700;
}

.correspondence-page .correspondence-archive-badge {
    min-height: 24px;
    padding: 0 8px;
    border-color: #dfe7f1;
    background: rgba(248, 250, 253, 0.94);
    color: #6d7b91;
    font-size: 10px;
    font-weight: 800;
}

.correspondence-page .correspondence-day-card-meta {
    justify-content: flex-start;
    gap: 6px;
    margin-top: 1px;
    padding-right: 26px;
}

.correspondence-page .correspondence-day-card-count {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid #e8edf4;
    border-radius: 8px;
    background: #f7f9fc;
    color: #40506a;
    font-size: 11px;
    font-weight: 780;
}

.correspondence-page .correspondence-day-card-count i {
    color: #73839c;
    font-size: 12px;
}

.correspondence-page .correspondence-day-card-foot {
    align-items: flex-end;
    margin-top: auto;
    padding-top: 0;
    border-top: 0;
}

.correspondence-page .correspondence-day-card-scan,
.correspondence-page .correspondence-day-card .correspondence-muted-inline {
    min-width: 0;
    padding-bottom: 3px;
    color: #7a879b;
    font-size: 11px;
    font-weight: 740;
}

.correspondence-page .correspondence-day-card-scan {
    color: #20925d;
}

.correspondence-page .correspondence-day-card-scan i,
.correspondence-page .correspondence-day-card .correspondence-muted-inline i {
    font-size: 6px;
}

.correspondence-page .correspondence-day-card-seal {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 2px solid #aeb9c8;
    border-radius: 50%;
    background: #edf1f6;
    color: #69778c;
    font-size: 13px;
    font-weight: 900;
    box-shadow: inset 0 0 0 3px #ffffff, 0 3px 7px rgba(50, 67, 91, 0.11);
}

.correspondence-page .correspondence-day-card-seal.is-ready {
    border-color: #65b889;
    background: #e4f5eb;
    color: #208354;
}

@media (max-width: 760px) {
    .correspondence-page .correspondence-day-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .correspondence-page .correspondence-add-tile,
    .correspondence-page .correspondence-day-card {
        min-height: 154px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .correspondence-page .correspondence-add-tile,
    .correspondence-page .correspondence-day-card {
        transition: none;
    }
}



/* Source: css/pages/maintenance.css */
.service-shell {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.service-sidebar {
    position: sticky;
    top: 92px;
}

.service-sidebar-card,
.service-header,
.service-panel,
.service-stat-card,
.service-workshop-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.service-sidebar-card {
    padding: 12px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-side-nav a {
    min-height: 42px;
    padding: 0 11px;
    border-radius: 12px;
    color: #51627e;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: background 0.18s ease, color 0.18s ease;
}

.service-side-nav a i {
    width: 22px;
    color: #6d7d96;
    font-size: 17px;
}

.service-side-nav a:hover,
.service-side-nav a.active {
    background: #eef4ff;
    color: #2364d8;
}

.service-side-nav a:hover i,
.service-side-nav a.active i {
    color: #2364d8;
}

.service-sidebar-help {
    padding: 11px;
    border-radius: 14px;
    background: #f6f9ff;
    color: #62738d;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.service-sidebar-help i {
    color: #2f66d8;
    font-size: 18px;
}

.service-sidebar-help strong,
.service-sidebar-help span {
    display: block;
}

.service-sidebar-help strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.service-sidebar-help span {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 650;
}

.service-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.service-header {
    min-height: 108px;
    padding: 20px 22px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.service-kicker {
    width: fit-content;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f66d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.service-header h1 {
    margin: 0;
    color: #22314d;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: 0;
}

.service-header p {
    margin: 7px 0 0;
    color: #75859c;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.service-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.service-stats-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-stat-card {
    min-height: 90px;
    padding: 16px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.service-stat-card span,
.service-stat-card strong {
    display: block;
    position: relative;
    z-index: 1;
}

.service-stat-card span {
    color: #718198;
    font-size: 13px;
    font-weight: 800;
}

.service-stat-card strong {
    margin-top: 8px;
    color: #22314d;
    font-size: 25px;
    line-height: 1;
    font-weight: 900;
}

.service-stat-card i {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    font-size: 20px;
}

.service-stat-card.is-orange i {
    background: #fff2cc;
    color: #b98000;
}

.service-stat-card.is-blue i {
    background: #eaf2ff;
    color: #2f66d8;
}

.service-stat-card.is-green i {
    background: #dcf8eb;
    color: #169458;
}

.service-content-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
    align-items: stretch;
}

.service-content-grid.compact {
    grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
    align-items: start;
}

.service-panel {
    border-radius: 20px;
    padding: 16px;
}

.service-panel-head,
.service-detail-head,
.service-vehicle-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.service-panel-head {
    margin-bottom: 14px;
}

.service-panel h2,
.service-panel-head h2,
.service-detail-head h2 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.service-panel-head p,
.service-detail-head p {
    margin: 5px 0 0;
    color: #74839a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 650;
}

.service-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-order-list.is-scrollable {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.service-main .vehicles-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.service-main .vehicles-pagination-pages {
    max-width: 100%;
    flex-wrap: wrap;
}

.service-orders-panel .vehicles-pagination {
    align-items: flex-start;
    flex-direction: column;
}

.service-order-filters {
    margin: -2px 0 12px;
    padding: 4px;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    background: #f7faff;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.service-order-filters a {
    flex: 1 1 104px;
    min-width: fit-content;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 11px;
    color: #64748c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 850;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.service-order-filters a.active,
.service-order-filters a:hover {
    background: #ffffff;
    color: #2364d8;
    box-shadow: 0 8px 18px rgba(47, 102, 216, 0.1);
}

.service-order-filters strong {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #edf4ff;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

.service-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 18px;
    align-items: stretch;
}

.service-overview-card {
    min-height: 100%;
}

.service-overview-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-overview-event,
.service-overview-order,
.service-overview-actions a {
    color: inherit;
    text-decoration: none;
}

.service-overview-event {
    padding: 12px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.service-overview-event:hover {
    border-color: #9ab9f2;
    background: #f5f8ff;
    box-shadow: 0 10px 22px rgba(47, 102, 216, 0.1);
}

.service-overview-date {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2364d8;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-overview-date strong,
.service-overview-date small,
.service-overview-copy small,
.service-overview-copy strong,
.service-overview-copy em {
    display: block;
}

.service-overview-date strong {
    font-size: 19px;
    line-height: 1;
    font-weight: 900;
}

.service-overview-date small {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 900;
}

.service-overview-copy small {
    color: #6f7f97;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.service-overview-copy small i {
    margin-right: 6px;
}

.service-overview-copy strong {
    margin-top: 4px;
    color: #22314d;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 900;
}

.service-overview-copy em {
    margin-top: 4px;
    color: #708098;
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
}

.service-overview-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.service-overview-status div {
    min-height: 92px;
    padding: 14px;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    background: #fbfdff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-overview-status strong {
    color: #22314d;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
}

.service-overview-status span {
    margin-top: 8px;
    color: #6f7f97;
    font-size: 12px;
    font-weight: 850;
}

.service-overview-status .danger {
    background: #fff8f7;
    border-color: #ffd0cc;
}

.service-overview-status .warning {
    background: #fffaf0;
    border-color: #ffe2a3;
}

.service-overview-status .ok {
    background: #f6fff9;
    border-color: #c8efd8;
}

.service-overview-actions {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.service-overview-actions a {
    min-height: 64px;
    padding: 12px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.service-overview-actions i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2364d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.service-overview-actions strong,
.service-overview-actions small {
    display: block;
}

.service-overview-actions strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.service-overview-actions small {
    margin-top: 3px;
    color: #74839a;
    font-size: 12px;
    font-weight: 750;
}

.service-overview-orders {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.service-overview-order {
    min-height: 138px;
    padding: 14px;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    background: #fbfdff;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.service-overview-order:hover {
    border-color: #9ab9f2;
    background: #f5f8ff;
}

.service-overview-order strong,
.service-overview-order small,
.service-overview-order em {
    display: block;
}

.service-overview-order strong {
    color: #22314d;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 900;
}

.service-overview-order small,
.service-overview-order em {
    color: #708098;
    font-size: 12px;
    line-height: 1.35;
    font-style: normal;
    font-weight: 750;
}

.service-overview-vehicles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.service-overview-vehicle {
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: #fbfdff;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
}

.service-overview-vehicle:hover {
    border-color: #9ab9f2;
    background: #f5f8ff;
}

.service-overview-vehicle strong,
.service-overview-vehicle span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-overview-vehicle strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.service-overview-vehicle span {
    margin-top: 4px;
    color: #61718a;
    font-size: 12px;
    font-weight: 850;
}

.service-order-item {
    padding: 12px;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.service-order-item:hover,
.service-order-item.active {
    border-color: #5d8df1;
    background: #f4f8ff;
    box-shadow: 0 10px 24px rgba(47, 102, 216, 0.12);
}

.service-order-thumb,
.service-vehicle-image,
.service-fleet-image {
    background: #eef2f7;
    color: #8090a8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-order-thumb {
    height: 72px;
    border-radius: 12px;
}

.service-order-thumb img,
.service-vehicle-image img,
.service-fleet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-order-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.service-order-copy strong,
.service-order-copy span,
.service-order-copy p,
.service-order-copy small {
    display: block;
}

.service-order-copy strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.service-order-copy > span {
    margin-top: 3px;
    color: #6c7c95;
    font-size: 12px;
    font-weight: 800;
}

.service-order-copy p {
    margin: 7px 0 0;
    color: #33445f;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.service-order-copy small {
    margin-top: 8px;
    color: #73839c;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 650;
}

.service-status-pill {
    width: fit-content;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 900;
}

.service-status-pill.waiting {
    background: #e8f1ff;
    color: #2364d8;
}

.service-status-pill.in_progress {
    background: #fff2cc;
    color: #9a6e00;
}

.service-status-pill.completed {
    background: #dcf8eb;
    color: #12804c;
}

.service-status-pill.cancelled {
    background: #ffe8e6;
    color: #b5231b;
}

.service-status-pill.due {
    background: #ffe8e6;
    color: #b5231b;
}

.service-status-pill.soon {
    background: #fff2cc;
    color: #946900;
}

.service-status-pill.empty,
.service-status-pill.missing {
    background: #edf1f7;
    color: #617089;
}

.service-status-pill.ok {
    background: #dcf8eb;
    color: #12804c;
}

.service-vehicle-hero {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 16px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 16px;
}

.service-vehicle-hero.detail {
    grid-template-columns: 340px minmax(0, 1fr);
}

.service-vehicle-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.service-vehicle-hero.detail .service-vehicle-image {
    min-height: 0;
    aspect-ratio: 16 / 10;
}

.service-vehicle-info h3 {
    margin: 0 0 8px;
    color: #22314d;
    font-size: 23px;
    letter-spacing: 0;
}

.service-plate-chip {
    width: fit-content;
    margin-bottom: 14px;
}

.service-vehicle-info dl {
    margin: 14px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 12px 14px;
}

.service-vehicle-info dl div {
    min-width: 0;
}

.service-vehicle-hero.detail .service-vehicle-info dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-vehicle-info dt {
    color: #74839a;
    font-size: 12px;
    font-weight: 800;
}

.service-vehicle-info dd {
    margin: 4px 0 0;
    color: #22314d;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.service-detail-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.service-detail-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-detail-grid.wide {
    margin-top: 0;
}

.service-mini-card {
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #ffffff;
}

.service-mini-card h3,
.service-parts-table h3 {
    margin: 0 0 9px;
    color: #22314d;
    font-size: 15px;
}

.service-mini-card p,
.service-muted {
    margin: 0;
    color: #65758d;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 650;
}

.service-progress {
    height: 12px;
    margin: 10px 0;
    border-radius: 999px;
    background: #edf2f7;
    overflow: hidden;
}

.service-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f6df6, #4a86ff);
}

.service-parts-table,
.service-table-wrap {
    margin-top: 16px;
}

.service-detail-summary {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-detail-summary span {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid #e4ebf5;
    color: #607089;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 850;
}

.service-detail-summary i {
    color: #2f66d8;
}

.service-parts-table table,
.service-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.service-parts-table th,
.service-parts-table td,
.service-table-wrap th,
.service-table-wrap td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    color: #34445c;
    font-size: 13px;
}

.service-parts-table th,
.service-table-wrap th {
    color: #6f7f97;
    font-size: 12px;
    font-weight: 900;
}

.service-empty-card {
    min-height: 156px;
    border: 1px dashed #dce6f2;
    border-radius: 16px;
    background: #fbfcff;
    color: #6d7e97;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 22px;
}

.service-empty-card.large {
    min-height: 260px;
}

.service-empty-card i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.service-empty-card h3 {
    margin: 0 0 6px;
    color: #22314d;
}

.service-status-summary,
.service-fleet-actions,
.service-status-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.service-status-summary span {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4f7fb;
    color: #607089;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 850;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #ffffff;
    color: #5f7089;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover {
    border-color: #bcd0ee;
    background: #f4f8ff;
    color: #2364d8;
    transform: translateY(-1px);
}

.service-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.service-fleet-card {
    border: 1px solid #e6edf6;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 194px;
}

.service-fleet-image {
    height: 194px;
    min-height: 0;
}

.service-fleet-copy {
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.service-fleet-copy h3 {
    margin: 0 0 8px;
    color: #22314d;
    font-size: 18px;
}

.service-fleet-copy span,
.service-fleet-copy p {
    color: #607089;
    font-size: 13px;
    font-weight: 800;
}

.service-fleet-copy p {
    margin: 8px 0 16px;
}

.service-fleet-actions {
    margin-top: auto;
}

.service-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-task-row {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #e6edf6;
    border-radius: 12px;
    background: #fbfcff;
    color: #53647d;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 110px 150px 120px;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.service-task-list.small .service-task-row {
    grid-template-columns: minmax(0, 1fr) 110px 90px;
}

.service-task-row strong {
    color: #22314d;
}

.service-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

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

.service-form-tips {
    position: sticky;
    top: 92px;
}

.service-order-tips {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.service-order-tips .vehicle-create-tips-head {
    grid-column: 1 / -1;
    padding: 24px 24px 20px;
}

.service-order-tips .vehicle-tip {
    padding: 20px 24px;
}

.service-order-tips .vehicle-tip p {
    font-size: 14px;
    line-height: 1.55;
}

.service-tip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-tip-row {
    padding: 12px;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
}

.service-tip-row i {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.service-tip-row strong,
.service-tip-row small {
    display: block;
}

.service-tip-row strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 900;
}

.service-tip-row small {
    margin-top: 4px;
    color: #718198;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 650;
}

.service-parts-form-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-part-line {
    display: grid;
    grid-template-columns: minmax(190px, 1.3fr) minmax(140px, 0.8fr) minmax(220px, 1.35fr) 90px 130px 44px;
    gap: 10px;
    align-items: center;
}

.service-part-line input,
.service-document-input-row input,
.service-document-upload input,
.service-inventory-filters select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #fcfdff;
    padding: 0 12px;
    color: #34445c;
    font-weight: 750;
}

.service-add-line {
    width: fit-content;
}

.service-document-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
}

.service-remove-line {
    align-self: center;
}

.service-document-upload {
    margin-top: 14px;
}

.service-document-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-existing-documents {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-existing-documents a {
    max-width: 100%;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid #e2eaf5;
    color: #34445c;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 850;
}

.service-shell.service-compact-page {
    display: block;
}

.page-wrap-service-compact {
    max-width: 1560px;
    padding-left: 30px;
    padding-right: 30px;
}

.service-compact-page .service-main {
    width: min(100%, 1280px);
    margin: 0 auto;
    gap: 18px;
}

.service-compact-page .service-header {
    min-height: auto;
    padding: 8px 10px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.service-compact-page .service-header h1 {
    color: #17233d;
    font-size: 31px;
    line-height: 1.08;
    font-weight: 900;
}

.service-compact-page .service-header p {
    max-width: 780px;
    color: #53637f;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 650;
}

.service-form-back {
    min-width: 102px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #ffffff;
    color: #263654;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(39, 63, 96, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.service-form-back:hover {
    border-color: #bdd0ea;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(39, 63, 96, 0.08);
}

.service-compact-workspace {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1060px) 330px;
    justify-content: center;
    gap: 22px;
    align-items: start;
}

.service-compact-editor,
.service-side-card {
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(38, 60, 92, 0.06);
}

.service-compact-editor {
    min-width: 0;
    overflow: hidden;
}

.service-compact-section {
    padding: 18px;
    border-bottom: 1px solid #e7edf5;
}

.service-compact-section-heading {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.service-step-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2f7bf4 0%, #165ee7 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(25, 94, 231, 0.26);
}

.service-compact-section-heading h2 {
    margin: 0;
    color: #192741;
    font-size: 18px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: 0;
}

.service-compact-section-heading p {
    margin: 4px 0 0;
    color: #64748f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.service-compact-grid,
.service-description-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
    row-gap: 14px;
}

.service-compact-grid.is-three,
.service-description-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-compact-grid + .service-compact-grid {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e7edf5;
}

.service-compact-page .form-group {
    min-width: 0;
    gap: 7px;
}

.service-compact-page .form-group label {
    color: #354761;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 850;
}

.service-compact-page .field-required {
    color: #f04438;
}

.service-compact-page .form-group > input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.service-compact-page .form-group > select,
.service-compact-page .form-group > textarea,
.service-unit-field {
    min-height: 42px;
    border: 1px solid #d9e3f0;
    border-radius: 8px;
    background: #ffffff;
    color: #17233d;
    box-shadow: 0 7px 16px rgba(39, 63, 96, 0.026);
}

.service-compact-page .form-group > input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.service-compact-page .form-group > select {
    padding: 0 13px;
}

.service-compact-page input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.service-compact-page input[type="number"]::-webkit-outer-spin-button,
.service-compact-page input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.service-compact-page .form-group > textarea {
    min-height: 66px;
    padding: 12px 13px;
    line-height: 1.45;
    resize: vertical;
}

.service-compact-page .form-group > input:focus,
.service-compact-page .form-group > select:focus,
.service-compact-page .form-group > textarea:focus,
.service-unit-field:focus-within {
    border-color: #9ebdff;
    outline: 3px solid rgba(47, 102, 216, 0.12);
}

.service-unit-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
}

.service-unit-field input {
    min-width: 0;
    width: 100%;
    height: 40px;
    border: 0;
    background: transparent;
    color: #17233d;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    outline: 0;
}

.service-unit-field i,
.service-unit-field span {
    color: #60718c;
    font-size: 13px;
    font-weight: 850;
}

.service-notes-field,
.service-description-grid .form-group {
    position: relative;
}

.service-notes-field textarea {
    min-height: 98px;
    padding-bottom: 28px;
}

.service-description-grid textarea {
    padding-bottom: 24px;
}

.service-text-counter {
    position: absolute;
    right: 12px;
    bottom: 9px;
    color: #73839b;
    font-size: 12px;
    font-weight: 850;
    pointer-events: none;
}

.service-reminder-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.service-reminder-card {
    min-height: 112px;
    padding: 18px;
    border: 1px solid #dfe7f2;
    border-radius: 9px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.service-reminder-card > i {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #1769e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.service-reminder-card strong,
.service-reminder-card p {
    display: block;
}

.service-reminder-card strong {
    color: #1f2f4c;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
}

.service-reminder-card p {
    margin: 8px 0 0;
    color: #536680;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}

.service-compact-toggle {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #dfe7f2;
    border-radius: 9px;
    background: #fbfdff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.service-compact-toggle strong,
.service-compact-toggle span {
    display: block;
}

.service-compact-toggle strong {
    color: #1f2f4c;
    font-size: 13px;
    font-weight: 900;
}

.service-compact-toggle span {
    margin-top: 4px;
    color: #667892;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.service-compact-actions {
    padding: 16px 18px;
    background: #f8fbff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.service-compact-actions .btn-secondary,
.service-compact-actions .btn-primary {
    min-height: 38px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 900;
}

.service-compact-actions .btn-secondary {
    min-width: 88px;
}

.service-compact-actions .btn-primary {
    min-width: 150px;
    background: linear-gradient(180deg, #2d78f3 0%, #1764e8 100%);
    box-shadow: 0 10px 18px rgba(23, 100, 232, 0.2);
}

.service-form-sidebar {
    min-width: 0;
    position: sticky;
    top: 94px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.service-side-card {
    padding: 16px;
}

.service-side-card-head {
    min-height: 42px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6edf5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.service-side-card-head span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff4df;
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    font-size: 20px;
}

.service-side-card-head .service-eye-icon {
    background: #eaf2ff;
    color: #1769e8;
}

.service-side-card-head h3 {
    margin: 0;
    color: #17233d;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
}

.service-side-tip {
    min-height: 76px;
    padding: 16px 0;
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.service-side-tip:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.service-side-tip > i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef5ff;
    color: #1769e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.service-side-tip p {
    margin: 0;
    color: #344763;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 750;
}

.service-preview-card {
    padding-bottom: 18px;
}

.service-preview-list {
    display: flex;
    flex-direction: column;
}

.service-preview-row {
    min-height: 40px;
    border-bottom: 1px solid #e6edf5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.service-preview-row span {
    min-width: 0;
    color: #40536e;
    font-size: 12px;
    font-weight: 800;
}

.service-preview-row strong {
    max-width: 150px;
    color: #1d2b45;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-preview-card > p {
    margin: 16px 0 4px;
    color: #7c899c;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 750;
}

.service-parts-table {
    min-width: 0;
    overflow-x: auto;
}

.service-compact-page .service-parts-table .service-dynamic-list {
    gap: 7px;
}

.service-compact-page .service-part-line {
    min-width: 840px;
    grid-template-columns: minmax(190px, 1.2fr) minmax(140px, 0.8fr) minmax(220px, 1.3fr) 74px 110px 36px;
    gap: 8px;
}

.service-compact-page .service-part-header {
    margin-bottom: 5px;
    min-height: 24px;
    color: #354761;
    font-size: 12px;
    font-weight: 900;
}

.service-compact-page .service-part-line input {
    min-height: 34px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 750;
}

.service-compact-page .service-remove-line {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.service-compact-page .service-add-line {
    margin-top: 8px;
    min-height: 32px;
    border-radius: 7px;
}

.service-compact-page .service-document-upload {
    margin-top: 14px;
}

.service-compact-page .service-document-input-row {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
}

.service-file-drop {
    position: relative;
    min-height: 58px;
    padding: 10px 16px;
    border: 1px dashed #1769e8;
    border-radius: 8px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.service-file-drop:hover,
.service-file-drop:focus-within {
    background: #f5f9ff;
    border-color: #0f5fe8;
}

.service-file-drop input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.service-file-icon {
    color: #1769e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.service-file-copy strong,
.service-file-copy small {
    display: block;
}

.service-file-copy strong {
    color: #20324f;
    font-size: 12px;
    font-weight: 900;
}

.service-file-copy small {
    margin-top: 3px;
    color: #718198;
    font-size: 10px;
    font-weight: 750;
}

.service-file-button {
    min-height: 34px;
    padding: 0 15px;
    border: 1px solid #d9e3f0;
    border-radius: 7px;
    background: #ffffff;
    color: #20324f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.service-document-row {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #e6edf6;
    border-radius: 12px;
    background: #fbfcff;
    color: #34445c;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.service-calendar-list,
.service-inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-inventory-list {
    max-height: 650px;
    overflow-y: auto;
    padding-right: 4px;
}

.service-calendar-row {
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 16px;
    background: #fbfcff;
    color: inherit;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    text-decoration: none;
}

.service-calendar-date {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    background: #eef4ff;
    color: #2364d8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.service-calendar-date strong {
    font-size: 24px;
    line-height: 1;
}

.service-calendar-date span,
.service-calendar-row small {
    font-size: 12px;
    font-weight: 800;
}

.service-calendar-row h3,
.service-workshop-card h2 {
    margin: 0;
    color: #22314d;
}

.service-calendar-row p {
    margin: 5px 0;
    color: #607089;
    font-weight: 750;
}

.service-calendar-panel {
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(35, 100, 216, 0.06), rgba(20, 132, 79, 0.04) 42%, rgba(255, 183, 35, 0.05)),
        #ffffff;
}

.service-calendar-toolbar {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.service-calendar-toolbar h2 {
    margin: 0;
    color: #22314d;
    font-size: 24px;
    line-height: 1.2;
    text-align: center;
}

.service-calendar-toolbar p {
    margin: 5px 0 0;
    color: #718198;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.service-calendar-weekdays,
.service-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.service-calendar-weekdays {
    margin-bottom: 8px;
    gap: 8px;
}

.service-calendar-weekdays span {
    color: #7c8aa1;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.service-calendar-grid {
    gap: 8px;
}

.service-calendar-day {
    min-height: 202px;
    padding: 10px;
    border: 1px solid #e3eaf4;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.service-calendar-day:hover {
    border-color: #b7cbf5;
    box-shadow: 0 12px 26px rgba(47, 102, 216, 0.08);
    transform: translateY(-1px);
}

.service-calendar-day.is-muted {
    background: #f7f9fc;
    opacity: 0.72;
}

.service-calendar-day.is-today {
    border-color: #8eb1f4;
    box-shadow: inset 0 0 0 1px #8eb1f4;
    background: #f8fbff;
}

.service-calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.service-calendar-day-head strong {
    color: #22314d;
    font-size: 15px;
    font-weight: 900;
}

.service-calendar-day-head span {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2364d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}

.service-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 154px;
    overflow-y: auto;
    padding-right: 2px;
}

.service-calendar-event {
    padding: 7px;
    border: 1px solid #e4ebf5;
    border-radius: 12px;
    background: #fbfcff;
    color: inherit;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.service-calendar-event:hover {
    border-color: #9ab9f2;
    background: #f5f8ff;
}

.service-calendar-event i {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    background: #eef4ff;
    color: #2364d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.service-calendar-event.type-inspection i,
.service-calendar-event.type-insurance i {
    background: #dcf8eb;
    color: #13844f;
}

.service-calendar-event.type-maintenance i {
    background: #fff2cc;
    color: #a36e00;
}

.service-calendar-event.type-order {
    border-color: #d8e6ff;
    background: #f6f9ff;
}

.service-calendar-event.type-order i {
    background: #e9f1ff;
    color: #2364d8;
}

.service-calendar-event.status-in_progress {
    border-color: #ffe2a3;
    background: #fffaf0;
}

.service-calendar-event.status-completed {
    border-color: #c8efd8;
    background: #f6fff9;
}

.service-calendar-event small,
.service-calendar-event strong,
.service-calendar-event em {
    display: block;
    min-width: 0;
}

.service-calendar-event small {
    color: #6f7f97;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.service-calendar-event strong {
    margin-top: 2px;
    color: #22314d;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-calendar-event em {
    margin-top: 2px;
    color: #72829a;
    font-size: 11px;
    line-height: 1.25;
    font-style: normal;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-calendar-more {
    color: #607089;
    font-size: 12px;
    font-weight: 900;
}

.service-calendar-empty {
    margin-top: 18px;
}

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

.service-workshop-card {
    padding: 18px;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 14px;
}

.service-workshop-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2364d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.service-workshop-card p {
    margin: 5px 0 12px;
    color: #6b7b94;
    font-weight: 700;
}

.service-workshop-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-workshop-stats span {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f4f7fb;
    color: #607089;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 850;
}

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

.service-full-btn {
    width: 100%;
    margin-top: 14px;
}

.service-inventory-filters {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 10px;
}

.service-consumable-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 12px;
    align-items: center;
}

.service-consumable-filters select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
    color: #34445c;
    font-size: 14px;
    font-weight: 800;
}

.service-list-meta {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #fbfcff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #66768d;
    font-size: 13px;
    font-weight: 850;
}

.service-inventory-row {
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 16px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.service-inventory-row:hover {
    border-color: #c9daf4;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(39, 63, 96, 0.08);
}

.service-inventory-row.is-editing {
    border-color: #2f6ff2;
    background: #f4f8ff;
    box-shadow: 0 16px 34px rgba(47, 111, 242, 0.16);
}

.service-inventory-row.is-editing::before {
    content: "Edytujesz";
    align-self: stretch;
    justify-self: start;
    grid-column: 1 / -1;
    margin: -4px 0 0;
    width: max-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #1f5bd7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.service-inventory-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.service-inventory-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.service-inventory-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.service-inventory-category {
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #edf4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 900;
}

.service-inventory-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.service-inventory-row strong,
.service-inventory-row p {
    display: block;
}

.service-inventory-main > div > span,
.service-inventory-stock span {
    display: block;
}

.service-inventory-row strong {
    color: #22314d;
    font-size: 15px;
    line-height: 1.25;
}

.service-inventory-main > div > span,
.service-inventory-row p {
    margin: 4px 0 0;
    color: #6f7f97;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.service-inventory-stock {
    text-align: right;
    flex-shrink: 0;
}

.service-inventory-stock strong {
    font-size: 17px;
}

.service-inventory-stock span {
    margin-top: 4px;
    color: #708098;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.service-inventory-delete {
    color: #b5231b;
}

.service-inventory-edit {
    color: #2364d8;
}

.service-inventory-edit:hover {
    background: #eef4ff;
    color: #174fb3;
    border-color: #cfe0ff;
}

.service-inventory-delete:hover {
    background: #ffe8e6;
    color: #9a1b15;
    border-color: #ffc6c1;
}

.service-inventory-row.category-oil .service-inventory-icon {
    background: #f3efe8;
    color: #2d2721;
}

.service-inventory-row.category-filters .service-inventory-icon {
    background: #eaf7ff;
    color: #0b72b9;
}

.service-inventory-row.category-tires .service-inventory-icon {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc 0%, #edf3fb 100%);
    color: transparent;
    border: 1px solid #dbe5f2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.service-inventory-row.category-tires .service-inventory-icon i {
    display: none;
}

.service-inventory-row.category-tires .service-inventory-icon::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #f8fafc 0 8px, #9aa7ba 9px 10px, transparent 11px),
        repeating-conic-gradient(from -10deg, #111827 0 10deg, #334155 10deg 17deg);
    box-shadow:
        inset 0 0 0 4px #111827,
        inset 0 0 0 9px #243044,
        0 6px 12px rgba(17, 24, 39, 0.14);
}

.service-inventory-row.category-tires .service-inventory-icon::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 0 0 2px #c6d0de;
}

.tire-visual-icon {
    --tire-size: 34px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc 0%, #edf3fb 100%) !important;
    color: transparent !important;
    border: 1px solid #dbe5f2 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.tire-visual-icon i {
    display: none;
}

.tire-visual-icon::before {
    content: "";
    width: var(--tire-size);
    height: var(--tire-size);
    border-radius: 50%;
    background:
        radial-gradient(circle, #f8fafc 0 24%, #9aa7ba 25% 29%, transparent 30%),
        repeating-conic-gradient(from -10deg, #111827 0 10deg, #334155 10deg 17deg);
    box-shadow:
        inset 0 0 0 4px #111827,
        inset 0 0 0 9px #243044,
        0 6px 12px rgba(17, 24, 39, 0.14);
}

.tire-visual-icon::after {
    content: "";
    position: absolute;
    width: calc(var(--tire-size) * 0.29);
    height: calc(var(--tire-size) * 0.29);
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 0 0 2px #c6d0de;
}

.service-mini-tire-icon {
    width: 15px;
    height: 15px;
    border: 3px solid #243044;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: inset 0 0 0 2px #9aa7ba;
}

.service-inventory-row.category-fluids .service-inventory-icon {
    background: #eff7ff;
    color: #0b72b9;
}

.service-inventory-row.category-brakes .service-inventory-icon {
    background: #ffffff;
    color: #1f2937;
    border: 2px solid #1f2937;
}

.inventory-assignment-details {
    border: 1px solid #dfe7f2;
    border-radius: 14px;
    background: #fbfcff;
    overflow: hidden;
}

.inventory-assignment-details summary {
    min-height: 50px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.inventory-assignment-details summary::-webkit-details-marker {
    display: none;
}

.inventory-assignment-details summary > span,
.inventory-assignment-details summary strong,
.inventory-assignment-details summary small {
    display: block;
    min-width: 0;
}

.inventory-assignment-details summary strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.inventory-assignment-details summary small {
    margin-top: 2px;
    color: #74839a;
    font-size: 12px;
    font-weight: 750;
}

.inventory-assignment-details summary i {
    color: #73839c;
    transition: transform 0.18s ease;
}

.inventory-assignment-details[open] summary i {
    transform: rotate(180deg);
}

.inventory-assignment-box {
    padding: 0 10px 10px;
    display: grid;
    gap: 8px;
}

.inventory-assignment-choice {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #e5edf7;
    border-radius: 12px;
    background: #ffffff;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    cursor: pointer;
    position: relative;
    isolation: isolate;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.inventory-assignment-choice:hover,
.inventory-assignment-choice.is-active {
    border-color: #b8cdf7;
    background: #f6f9ff;
}

.inventory-assignment-choice.is-active {
    box-shadow: 0 8px 18px rgba(35, 100, 216, 0.08);
}

.inventory-assignment-choice .inventory-assignment-input,
.inventory-vehicle-check .inventory-vehicle-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.inventory-assignment-mark,
.inventory-check-mark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #b9c7db;
    background: #ffffff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    pointer-events: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.inventory-assignment-mark {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inventory-assignment-mark::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.inventory-assignment-choice input:checked + .inventory-assignment-mark {
    border-color: #2364d8;
    background: #2364d8;
    box-shadow: 0 0 0 4px rgba(35, 100, 216, 0.1);
}

.inventory-assignment-choice input:checked + .inventory-assignment-mark::after {
    opacity: 1;
}

.inventory-assignment-choice > span:last-child {
    min-width: 0;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.inventory-assignment-choice strong,
.inventory-assignment-choice small {
    display: block;
}

.inventory-assignment-choice strong {
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
}

.inventory-assignment-choice small {
    margin-top: 3px;
    color: #75849b;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.inventory-vehicle-checks {
    max-height: 148px;
    overflow: auto;
    padding: 2px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
}

.inventory-vehicle-checks[hidden] {
    display: none;
}

.inventory-vehicle-check {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid #e3ebf6;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    isolation: isolate;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.inventory-check-mark {
    border-radius: 6px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.inventory-check-mark i {
    opacity: 0;
}

.inventory-vehicle-check input:checked + .inventory-check-mark {
    background: #2364d8;
    border-color: #2364d8;
}

.inventory-vehicle-check input:checked + .inventory-check-mark i {
    opacity: 1;
}

.inventory-vehicle-check span {
    min-width: 0;
    color: #354762;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.inventory-vehicle-check small {
    display: block;
    margin-top: 2px;
    color: #708098;
    font-size: 11px;
    font-weight: 900;
}

.inventory-vehicle-check:hover,
.inventory-vehicle-check.is-active,
.inventory-vehicle-check:has(input:checked) {
    border-color: #9fc0ff;
    background: #eef5ff;
}

.service-inventory-row.category-other .service-inventory-icon {
    background: #f4f7fb;
    color: #607089;
}

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

.service-consumable-vehicle-card {
    min-height: 244px;
    border: 1px solid #e1e9f5;
    border-radius: 18px;
    background: #ffffff;
    color: inherit;
    display: grid;
    grid-template-columns: minmax(220px, 0.82fr) minmax(270px, 1fr);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.service-consumable-vehicle-card:hover {
    border-color: #8eb1f4;
    box-shadow: 0 14px 28px rgba(47, 102, 216, 0.12);
    transform: translateY(-2px);
}

.service-consumable-vehicle-media,
.service-consumable-detail-media {
    background: linear-gradient(180deg, #f7faff 0%, #edf3fb 100%);
    color: #8090a8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-consumable-vehicle-media {
    min-height: 244px;
    padding: 0;
}

.service-consumable-vehicle-media img,
.service-consumable-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-consumable-vehicle-media i,
.service-consumable-detail-media i {
    font-size: 34px;
}

.service-consumable-vehicle-body {
    padding: 16px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-consumable-vehicle-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 8px;
}

.service-consumable-vehicle-head > div {
    min-width: 0;
}

.service-consumable-vehicle-head h3 {
    margin: 0;
    color: #22314d;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0;
}

.service-consumable-vehicle-head p {
    margin: 5px 0 0;
    color: #61718a;
    font-size: 13px;
    font-weight: 800;
    white-space: normal;
}

.service-consumable-vehicle-head .service-status-pill {
    max-width: 100%;
    min-height: 24px;
    padding: 5px 9px;
    justify-self: start;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
}

.service-fleet-copy p,
.service-vehicle-info dd {
    white-space: normal;
}

.service-vehicle-info dl div:first-child dd {
    white-space: nowrap;
}

.service-consumable-summary,
.service-consumable-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-consumable-summary span {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid #e3eaf3;
    color: #5d6e86;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 850;
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
}

.service-consumable-preview span {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    background: #f7faff;
    border: 1px solid #e6edf6;
    color: #53647d;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 850;
}

.service-consumable-preview span.status-due {
    background: #fff7f6;
    border-color: #ffd0cc;
    color: #a92820;
}

.service-consumable-preview span.status-soon {
    background: #fffaf0;
    border-color: #ffe2a3;
    color: #946900;
}

.service-consumable-preview span.status-ok {
    background: #f6fff9;
    border-color: #c8efd8;
    color: #12804c;
}

.service-consumable-open {
    margin-top: auto;
    color: #2364d8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
}

.service-consumable-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.service-consumable-icon.tire-visual-icon {
    --tire-size: 28px;
}

.service-consumable-detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.service-consumable-detail-media {
    min-height: 210px;
    border-radius: 16px;
    padding: 10px;
}

.service-consumable-detail-copy h2 {
    margin: 0;
    color: #22314d;
    font-size: 22px;
    line-height: 1.2;
}

.service-consumable-detail-copy p {
    margin: 9px 0 16px;
    color: #697990;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 650;
}

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

.service-consumable-side-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.service-tire-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.service-current-tire {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: #f8fbff;
}

.service-current-tire-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #356fe6;
    font-size: 21px;
}

.service-current-tire strong,
.service-current-tire small {
    display: block;
}

.service-current-tire strong {
    color: #22314d;
    font-size: 17px;
    line-height: 1.2;
}

.service-current-tire small {
    margin-top: 3px;
    color: #718198;
    font-size: 12px;
    font-weight: 700;
}

.service-tire-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.service-tire-option {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #dfe8f4;
    border-radius: 13px;
    background: #fff;
    color: #53647d;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.service-tire-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-tire-option:hover,
.service-tire-option:has(input:checked) {
    border-color: #9fbbf0;
    background: #eef4ff;
    color: #245ecf;
    box-shadow: inset 0 0 0 1px rgba(47, 102, 243, 0.04);
}

.service-tire-option:has(input:disabled) {
    cursor: default;
    opacity: 0.72;
}

.service-tire-submit {
    width: 100%;
}

.service-consumable-rule-list,
.service-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-consumable-rule-card {
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 16px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.service-consumable-rule-card.status-due {
    border-color: #ffd0cc;
    background: #fff8f7;
}

.service-consumable-rule-card.status-soon {
    border-color: #ffe2a3;
    background: #fffaf0;
}

.service-consumable-rule-card.status-ok {
    border-color: #c8efd8;
    background: #f8fffb;
}

.service-consumable-rule-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.service-consumable-rule-title h3 {
    margin: 0;
    color: #22314d;
    font-size: 16px;
    line-height: 1.25;
}

.service-consumable-rule-main p {
    margin: 6px 0 12px;
    color: #6e7f97;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 650;
}

.service-consumable-rule-meta {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.service-consumable-rule-meta div {
    min-width: 0;
    padding: 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #e6edf6;
}

.service-consumable-rule-meta dt {
    color: #78889e;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.service-consumable-rule-meta dd {
    margin: 4px 0 0;
    color: #263650;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 850;
}

.service-history-row {
    padding: 11px;
    border: 1px solid #e6edf6;
    border-radius: 13px;
    background: #fbfcff;
    color: inherit;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    text-decoration: none;
}

.service-history-row i {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.service-history-row strong,
.service-history-row small {
    display: block;
}

.service-history-row strong {
    color: #22314d;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 900;
}

.service-history-row small {
    margin-top: 3px;
    color: #72829a;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

.service-side-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}

.service-side-section h3 {
    margin: 0 0 10px;
    color: #22314d;
    font-size: 15px;
}

/* Vehicle consumables: aligned readings, restrained status colour. */
.consumable-detail {
    max-width: 1420px;
    margin: 0 auto;
    color: #243248;
    font-size: 14px;
}

.consumable-detail [hidden] { display: none !important; }
.consumable-detail .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.consumable-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0 26px;
    color: #738095;
    font-size: 13px;
}

.consumable-detail a { text-decoration: none; }
.consumable-detail-breadcrumb a { display: inline-flex; align-items: center; gap: 9px; color: #56657b; }
.consumable-detail a:hover { color: #175bc6; text-decoration: underline; }
.consumable-detail a:focus-visible,
.consumable-detail button:focus-visible,
.consumable-detail summary:focus-visible { outline: 2px solid #2874ea; outline-offset: 4px; }

.consumable-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.consumable-detail-identity { display: flex; align-items: center; gap: 20px; min-width: 0; }
.consumable-detail-identity > div:last-child { min-width: 0; }
.consumable-detail-photo {
    width: 88px;
    height: 72px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dde3eb;
    border-radius: 8px;
    background: #e9edf2;
    color: #7b8797;
    font-size: 30px;
}
.consumable-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.consumable-detail h1 { margin: 0 0 10px; color: #202d40; font-size: 30px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.consumable-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: #6b7789; font-size: 13px; }
.consumable-detail-registration { padding: 3px 8px; border: 1px solid #d5dce5; border-radius: 4px; background: #fff; color: #344359; font-weight: 650; letter-spacing: .04em; }
.consumable-detail-mileage { padding-left: 26px; border-left: 1px solid #dce2ea; flex-shrink: 0; }
.consumable-detail-mileage > span { display: block; margin-bottom: 7px; color: #6b7789; font-size: 12px; }
.consumable-detail-mileage strong { font-size: 26px; line-height: 1.15; font-weight: 650; font-variant-numeric: tabular-nums; }
.consumable-detail-mileage small { font-size: 15px; font-weight: 400; color: #6b7789; }

.consumable-detail-schedule { overflow: hidden; border: 1px solid #dce2ea; border-radius: 10px; background: #fff; }
.consumable-detail-section-head { padding: 24px 24px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.consumable-detail-section-head h2 { margin: 0; font-size: 18px; font-weight: 650; line-height: 1.3; }
.consumable-detail-section-head p { margin: 5px 0 0; color: #6b7789; font-size: 13px; }
.consumable-detail-total { color: #6b7789; font-size: 12px; white-space: nowrap; }
.consumable-detail-filters { display: flex; gap: 24px; padding: 0 24px; border-bottom: 1px solid #e3e7ed; }
.consumable-detail-filters button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; min-height: 44px; padding: 0 0 13px; border: 0; border-radius: 0; background: none; box-shadow: none; color: #6b7789; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.consumable-detail-filters button:hover { color: #175bc6; }
.consumable-detail-filters button[aria-pressed="true"] { color: #175bc6; }
.consumable-detail-filters button[aria-pressed="true"]::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #2874ea; }
.consumable-detail-filters button span { min-width: 20px; padding: 2px 6px; border-radius: 4px; background: #f0f2f5; color: #56657b; font-size: 11px; font-variant-numeric: tabular-nums; }
.consumable-detail-filters button .is-due { color: #b33b32; background: #fbeeea; }
.consumable-detail-filters button .is-soon { color: #95630e; background: #fbf3df; }

.consumable-detail-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; border-spacing: 0; text-align: left; font-variant-numeric: tabular-nums; }
.consumable-detail-table thead { background: #f8f9fb; }
.consumable-detail-table thead th { height: 46px; padding: 10px 14px; border-bottom: 1px solid #e7ebf0; color: #6b7789; font-size: 11px; font-weight: 500; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.consumable-detail-table thead th:first-child { width: 26%; padding-left: 24px; }
.consumable-detail-table thead th:nth-child(2) { width: 13%; }
.consumable-detail-table thead th:nth-child(3) { width: 19%; }
.consumable-detail-table thead th:nth-child(4) { width: 18%; }
.consumable-detail-table thead th:nth-child(5) { width: 14%; }
.consumable-detail-table tbody th,
.consumable-detail-table tbody td { height: 88px; padding: 18px 14px; border-bottom: 1px solid #edf0f4; background: transparent; vertical-align: middle; text-align: left; font-size: 13px; line-height: 1.45; }
.consumable-detail-table tbody tr:last-child > * { border-bottom: 0; }
.consumable-detail-table tbody tr:hover { background: #fafbfd; }
.consumable-detail-table tbody th { padding-left: 24px; font-weight: 600; }
.consumable-detail-task { display: flex; align-items: center; gap: 12px; }
.consumable-detail-task-icon { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: #f2f4f7; color: #748094; font-size: 17px; }
.consumable-detail-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 500; color: #6b7789; }
.consumable-detail-status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #9ba5b4; }
.consumable-detail-status.due { color: #b33b32; }
.consumable-detail-status.due::before { background: #d65348; }
.consumable-detail-status.soon { color: #95630e; }
.consumable-detail-status.soon::before { background: #d29c37; }
.consumable-detail-status.ok { color: #39795b; }
.consumable-detail-status.ok::before { background: #5b9879; }
.consumable-detail-reading time,
.consumable-detail-reading span,
.consumable-detail-reading small,
.consumable-detail-interval span { display: block; }
.consumable-detail-reading small { margin-top: 3px; color: #738095; font-size: 12px; }
.consumable-detail-next time,
.consumable-detail-next span { font-weight: 600; }
.consumable-detail-row.status-due .consumable-detail-next time,
.consumable-detail-row.status-due .consumable-detail-next span:not(.consumable-detail-muted) { color: #b33b32; }
.consumable-detail-interval span { color: #56657b; font-size: 12px; }
.consumable-detail-interval small { color: #738095; font-size: inherit; }
.consumable-detail .consumable-detail-muted { color: #788496; font-weight: 400; }
.consumable-detail-table .consumable-detail-action { padding-right: 24px; text-align: right; }
.consumable-detail-action a,
.consumable-detail-tires > a { min-height: 44px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; color: #2864bd; font-size: 12px; font-weight: 500; white-space: nowrap; }
.consumable-detail-action i,
.consumable-detail-tires > a i { font-size: 12px; }
.consumable-detail-footnote { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 15px 24px; border-top: 1px solid #e7ebf0; color: #6b7789; font-size: 12px; line-height: 1.5; }
.consumable-detail-empty { margin: 0; padding: 50px 24px; color: #6b7789; text-align: center; }

.consumable-detail-tires { display: flex; align-items: center; gap: 24px; margin-top: 18px; padding: 16px 24px; border: 1px solid #dce2ea; border-radius: 10px; background: #fff; }
.consumable-detail-tires-title { display: flex; align-items: center; gap: 12px; }
.consumable-detail-tires h2 { margin: 0 0 3px; font-size: 14px; font-weight: 600; }
.consumable-detail-tires p { margin: 0; color: #6b7789; font-size: 12px; }
.consumable-detail-tires > strong { padding-left: 24px; border-left: 1px solid #e3e7ed; font-size: 13px; font-weight: 500; }
.consumable-detail-tires > a { margin-left: auto; }
.consumable-detail-help { margin-top: 20px; color: #6b7789; font-size: 12px; line-height: 1.65; }
.consumable-detail-help summary { width: fit-content; cursor: pointer; }
.consumable-detail-help p { max-width: 760px; margin: 10px 0; }

@media (max-width: 1180px) and (min-width: 761px) {
    .consumable-detail-table thead th,
    .consumable-detail-table tbody th,
    .consumable-detail-table tbody td { padding-right: 10px; padding-left: 10px; }
    .consumable-detail-table tbody th,
    .consumable-detail-table thead th:first-child { padding-left: 18px; }
    .consumable-detail-task { gap: 8px; }
    .consumable-detail-task-icon { display: none; }
    .consumable-detail-filters { gap: 20px; }
}

@media (max-width: 760px) {
    .consumable-detail-breadcrumb { margin-bottom: 20px; }
    .consumable-detail-header { align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 24px; }
    .consumable-detail-identity { gap: 14px; width: 100%; }
    .consumable-detail-photo { width: 64px; height: 64px; }
    .consumable-detail h1 { font-size: 24px; margin-bottom: 8px; }
    .consumable-detail-meta { gap: 8px; font-size: 12px; }
    .consumable-detail-mileage { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 0 0; border-left: 0; border-top: 1px solid #dce2ea; }
    .consumable-detail-mileage > span { margin: 0; }
    .consumable-detail-mileage strong { font-size: 22px; }
    .consumable-detail-section-head { padding: 20px 16px 16px; }
    .consumable-detail-section-head h2 { font-size: 17px; }
    .consumable-detail-section-head p { max-width: 240px; font-size: 12px; }
    .consumable-detail-total { display: none; }
    .consumable-detail-filters { flex-wrap: wrap; gap: 0 20px; padding: 0 16px; }
    .consumable-detail-filters button { min-height: 44px; padding: 8px 0; font-size: 12px; }
    .consumable-detail-table,
    .consumable-detail-table tbody { display: block; }
    .consumable-detail-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .consumable-detail-table .consumable-detail-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 12px; padding: 20px 16px 14px; border-bottom: 1px solid #e3e7ed; }
    .consumable-detail-table .consumable-detail-row:last-child { border-bottom: 0; }
    .consumable-detail-table tbody th,
    .consumable-detail-table tbody td { height: auto; padding: 0; border: 0; }
    .consumable-detail-table tbody th { grid-column: 1 / -1; }
    .consumable-detail-task { font-size: 14px; }
    .consumable-detail-table .consumable-detail-status-cell { grid-column: 1 / -1; margin-top: -10px; padding-left: 46px; }
    .consumable-detail-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: #6b7789; font-size: 11px; }
    .consumable-detail-interval > div { display: flex; flex-wrap: wrap; gap: 4px; }
    .consumable-detail-table .consumable-detail-action { align-self: end; text-align: right; }
    .consumable-detail-footnote { padding: 14px 16px; font-size: 11px; }
    .consumable-detail-tires { flex-wrap: wrap; gap: 14px; padding: 16px; }
    .consumable-detail-tires > strong { margin-left: auto; padding: 0; border: 0; }
    .consumable-detail-tires > a { width: 100%; min-height: 36px; padding-top: 10px; border-top: 1px solid #edf0f4; }
}

.maintenance-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.maintenance-hero,
.maintenance-panel,
.maintenance-stat-card,
.maintenance-preset-card,
.maintenance-vehicle-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.maintenance-hero {
    min-height: 128px;
    padding: 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.maintenance-kicker {
    width: fit-content;
    margin-bottom: 9px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f66d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.maintenance-hero h1 {
    margin: 0;
    color: #22314d;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
}

.maintenance-hero p {
    max-width: 700px;
    margin: 8px 0 0;
    color: #75859c;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.maintenance-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.maintenance-stat-card {
    min-height: 104px;
    padding: 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.maintenance-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.maintenance-stat-card.is-green .maintenance-stat-icon {
    background: #dcf8eb;
    color: #169458;
}

.maintenance-stat-card.is-orange .maintenance-stat-icon {
    background: #fff2cc;
    color: #b98000;
}

.maintenance-stat-card.is-dark .maintenance-stat-icon {
    background: #edf1f7;
    color: #5d6b7f;
}

.maintenance-stat-card span {
    display: block;
    margin-bottom: 5px;
    color: #718198;
    font-size: 13px;
    font-weight: 800;
}

.maintenance-stat-card strong {
    color: #22314d;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.maintenance-panel {
    padding: 20px;
    border-radius: 24px;
}

.maintenance-consumables-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.maintenance-consumables-intro h2,
.maintenance-vehicle-head h2,
.maintenance-preset-card h3 {
    margin: 0;
    color: #22314d;
    letter-spacing: 0;
}

.maintenance-consumables-intro h2 {
    font-size: 20px;
}

.maintenance-consumables-intro p,
.maintenance-preset-card p,
.maintenance-vehicle-head p {
    margin: 7px 0 0;
    color: #75859c;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.maintenance-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.maintenance-preset-card {
    padding: 18px;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
}

.maintenance-preset-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.maintenance-preset-card h3 {
    font-size: 16px;
    line-height: 1.25;
}

.maintenance-preset-meta {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.maintenance-preset-meta span,
.maintenance-status-pill {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid #e3eaf3;
    color: #56677e;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 900;
}

.maintenance-consumables-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.maintenance-vehicle-card {
    border-radius: 24px;
    overflow: hidden;
}

.maintenance-vehicle-head {
    padding: 18px;
    border-bottom: 1px solid #edf2f7;
    background: #fbfcff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.maintenance-vehicle-head h2 {
    font-size: 20px;
}

.maintenance-consumable-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.maintenance-consumable-row {
    min-height: 86px;
    padding: 15px 18px;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.maintenance-consumable-row:nth-child(odd) {
    border-right: 1px solid #edf2f7;
}

.maintenance-consumable-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: #f1f6ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.maintenance-consumable-row strong,
.maintenance-consumable-row small {
    display: block;
}

.maintenance-consumable-row strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
}

.maintenance-consumable-row small {
    margin-top: 4px;
    color: #76869d;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 650;
}

.maintenance-consumable-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.maintenance-status-pill.ok {
    background: #dcf8eb;
    border-color: #b9efcf;
    color: #12804c;
}

.maintenance-status-pill.soon {
    background: #fff2cc;
    border-color: #ffe2a3;
    color: #946900;
}

.maintenance-status-pill.due {
    background: #ffe8e6;
    border-color: #ffd0cc;
    color: #b5231b;
}

.maintenance-status-pill.empty,
.maintenance-status-pill.missing {
    background: #edf1f7;
    border-color: #dde6f1;
    color: #617089;
}

.maintenance-card {
    max-width: 980px;
}

.maintenance-form .form-grid {
    gap: 20px;
}

.maintenance-form .form-group label {
    font-size: 13px;
    color: #66758c;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.maintenance-form input:not([type="checkbox"]):not([type="radio"]),
.maintenance-form select,
.maintenance-form textarea {
    background: #fcfdff;
}

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

.maintenance-actions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf2f7;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 18px;
    border: 1px solid #e7edf6;
    border-radius: 18px;
    background: linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.toggle-copy {
    min-width: 0;
    flex: 1;
}

.toggle-title {
    font-size: 15px;
    font-weight: 700;
    color: #22314d;
    line-height: 1.2;
}

.toggle-subtitle {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: #7f8da3;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 32px;
    margin-left: auto;
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

.switch-slider {
    position: relative;
    display: block;
    width: 56px;
    height: 32px;
    border-radius: 999px;
    background: #d9e2ef;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

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

.switch input:checked + .switch-slider {
    background: linear-gradient(135deg, #2f6df6 0%, #4f86ff 100%);
}

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

.switch input:focus + .switch-slider {
    box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.12);
}

@media (max-width: 1240px) {
    .service-compact-workspace {
        grid-template-columns: 1fr;
    }

    .service-form-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .service-compact-grid,
    .service-compact-grid.is-three,
    .service-description-grid,
    .service-reminder-cards,
    .service-form-sidebar {
        grid-template-columns: 1fr;
    }

    .service-file-drop {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .service-file-button {
        grid-column: 2;
        width: fit-content;
    }

    .service-parts-table {
        overflow-x: visible;
    }

    .service-compact-page .service-part-header {
        display: none;
    }

    .service-compact-page .service-part-line {
        min-width: 0;
        padding: 10px;
        border: 1px solid #e6edf6;
        border-radius: 10px;
        background: #fbfdff;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .service-compact-page .service-part-line input {
        width: 100%;
    }

    .service-compact-page .service-remove-line {
        justify-self: end;
    }
}

@media (max-width: 768px) {
    .service-shell,
    .service-content-grid,
    .service-content-grid.compact,
    .service-stats-grid,
    .service-stats-grid-four,
    .service-vehicle-grid,
    .service-workshop-grid,
    .service-detail-grid,
    .service-form-layout,
    .service-consumable-card-grid,
    .service-consumable-detail-layout,
    .service-consumable-detail-hero,
    .service-consumable-vehicle-card,
    .service-consumable-rule-meta {
        grid-template-columns: 1fr;
    }

    .service-sidebar {
        position: static;
    }

    .service-form-tips {
        position: static;
    }

    .service-order-tips {
        position: static;
    }

    .service-sidebar-card {
        min-height: 0;
    }

    .service-header,
    .service-panel-head,
    .service-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .service-vehicle-hero,
    .service-vehicle-hero.detail,
    .service-fleet-card,
    .service-calendar-row,
    .service-task-row,
    .service-task-list.small .service-task-row,
    .service-part-line,
    .service-inventory-filters {
        grid-template-columns: 1fr;
    }

    .service-vehicle-info dl,
    .service-vehicle-hero.detail .service-vehicle-info dl,
    .service-inventory-form .form-grid {
        grid-template-columns: 1fr;
    }

    .service-inventory-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .service-order-tips,
    .service-consumable-filters {
        grid-template-columns: 1fr;
    }

    .service-order-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .service-calendar-weekdays {
        display: none;
    }

    .service-calendar-grid {
        grid-template-columns: 1fr;
    }

    .service-calendar-day {
        min-height: 0;
    }

    .service-calendar-events {
        max-height: none;
    }

    .service-inventory-main {
        grid-template-columns: 46px minmax(0, 1fr);
        align-items: flex-start;
    }

    .service-inventory-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 21px;
    }

    .service-inventory-actions {
        width: 100%;
        justify-content: space-between;
    }

    .service-consumable-vehicle-media {
        min-height: 210px;
    }

    .service-fleet-image {
        height: 210px;
    }

    .service-consumable-vehicle-head {
        align-items: stretch;
        flex-direction: column;
    }

    .service-consumable-rule-card {
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: flex-start;
    }

    .service-consumable-rule-card .btn-secondary {
        grid-column: 1 / -1;
        width: fit-content;
    }

    .service-consumable-rule-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-consumable-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .service-inventory-stock {
        text-align: left;
    }

    .maintenance-hero,
    .maintenance-consumables-intro,
    .maintenance-vehicle-head {
        align-items: stretch;
        flex-direction: column;
    }

    .maintenance-stats-grid,
    .maintenance-presets-grid,
    .maintenance-consumable-items {
        grid-template-columns: 1fr;
    }

    .maintenance-consumable-row:nth-child(odd) {
        border-right: 0;
    }

    .maintenance-consumable-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .maintenance-consumable-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

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

    .switch {
        margin-left: 0;
        margin-top: 6px;
    }
}



/* Source: css/pages/alerts.css */
.alerts-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alerts-panel,
.alerts-toolbar,
.alerts-stat-card,
.alerts-side-card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.alerts-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.alerts-stat-card {
    min-height: 112px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.alerts-stat-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 14px 92px;
    height: 4px;
    border-radius: 999px;
    background: var(--stat-accent, var(--blue));
    opacity: 0.22;
}

.alerts-stat-icon,
.alerts-row-icon,
.alerts-subject-mark,
.alerts-mini-icon,
.alerts-owner-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alerts-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 23px;
}

.alerts-stat-card p {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 800;
}

.alerts-stat-card strong {
    display: block;
    color: var(--text);
    font-size: 30px;
    line-height: 1;
}

.alerts-stat-card small {
    display: block;
    margin-top: 9px;
    color: var(--stat-accent, var(--blue));
    font-size: 12px;
    font-weight: 850;
}

.alerts-stat-card.is-blue {
    --stat-accent: #2563eb;
}

.alerts-stat-card.is-danger {
    --stat-accent: #ef4444;
}

.alerts-stat-card.is-warning {
    --stat-accent: #f59e0b;
}

.alerts-stat-card.is-red-soft {
    --stat-accent: #d92d55;
}

.alerts-stat-card.is-blue-strong {
    --stat-accent: #2563eb;
}

.alerts-stat-card.is-green {
    --stat-accent: #16a34a;
}

.alert-notifications-page,
.alert-notifications-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alert-notifications-section {
    padding: 22px;
}

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

.alert-notifications-section-head > div {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

.alert-notifications-section-head h2,
.alert-notifications-section-head p {
    margin: 0;
}

.alert-notifications-section-head h2 {
    color: var(--text);
    font-size: 19px;
}

.alert-notifications-section-head p {
    grid-column: 2;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.alert-notifications-step {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    grid-row: span 2;
    border-radius: 10px;
    background: #eaf2ff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 850;
}

.alert-notifications-channel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 14px;
}

.alert-notifications-channel-card,
.alert-notifications-level-card,
.alert-notifications-category {
    cursor: pointer;
}

.alert-notifications-channel-card {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: #fbfdff;
}

.alert-notifications-channel-card input,
.alert-notifications-level-card input,
.alert-notifications-category input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.alert-notifications-channel-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    font-size: 20px;
}

.alert-notifications-channel-icon.is-email {
    color: #2563eb;
    background: #eaf2ff;
}

.alert-notifications-channel-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.alert-notifications-channel-copy strong,
.alert-notifications-level-card strong {
    color: var(--text);
    font-size: 15px;
}

.alert-notifications-channel-copy small,
.alert-notifications-level-card small,
.alert-notifications-address-field small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.alert-notifications-toggle {
    width: 42px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    border-radius: 999px;
    background: #d8e0ed;
    transition: background 160ms ease;
}

.alert-notifications-toggle::after {
    content: "";
    width: 18px;
    height: 18px;
    position: absolute;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(31, 47, 77, 0.18);
    transition: transform 160ms ease;
}

.alert-notifications-channel-card input:checked + .alert-notifications-toggle {
    background: #2563eb;
}

.alert-notifications-channel-card input:checked + .alert-notifications-toggle::after {
    transform: translateX(18px);
}

.alert-notifications-address-field {
    justify-content: center;
    padding: 9px 0;
}

.alert-notifications-address-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-notifications-address-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 43px;
    gap: 8px;
}

.alert-notifications-address-field input {
    min-height: 43px;
}

.alert-notifications-address-remove {
    display: inline-flex;
    width: 43px;
    height: 43px;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0c7c7;
    border-radius: 10px;
    color: #b42318;
    background: #fff7f6;
    cursor: pointer;
}

.alert-notifications-address-remove:hover {
    border-color: #e89b96;
    background: #ffefed;
}

.alert-notifications-address-remove[hidden] {
    display: none;
}

.alert-notifications-address-add {
    width: fit-content;
    min-height: 38px;
    padding: 8px 12px;
}

.alert-notifications-address-add:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.alert-notifications-level-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.alert-notifications-level-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    align-items: start;
    gap: 7px 10px;
    padding: 15px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: #fbfdff;
}

.alert-notifications-level-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    grid-row: span 2;
    border-radius: 12px;
    color: #2563eb;
    background: #eaf2ff;
}

.alert-notifications-level-card.is-danger .alert-notifications-level-icon {
    color: #ef4444;
    background: #fee5e2;
}

.alert-notifications-level-card.is-warning .alert-notifications-level-icon {
    color: #d97706;
    background: #fff1cf;
}

.alert-notifications-check,
.alert-notifications-category-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd7e8;
    color: transparent;
    background: #fff;
}

.alert-notifications-check {
    width: 22px;
    height: 22px;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    border-radius: 7px;
    font-size: 13px;
}

.alert-notifications-level-card strong {
    grid-column: 2;
    grid-row: 1;
}

.alert-notifications-level-card small {
    grid-column: 2 / 4;
    grid-row: 2;
}

.alert-notifications-level-card:has(input:checked),
.alert-notifications-category:has(input:checked) {
    border-color: #9ec0ff;
    background: #f5f9ff;
}

.alert-notifications-level-card input:checked ~ .alert-notifications-check,
.alert-notifications-category input:checked + .alert-notifications-category-check {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.alert-notifications-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.alert-notifications-group {
    min-width: 0;
    margin: 0;
    padding: 15px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: #fbfdff;
}

.alert-notifications-group legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.alert-notifications-group legend i {
    color: #2563eb;
}

.alert-notifications-category-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 7px;
}

.alert-notifications-category {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #40506f;
    font-size: 13px;
    font-weight: 750;
}

.alert-notifications-category-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 5px;
    font-size: 11px;
}

.alert-notifications-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid #cfe0fb;
    border-radius: 16px;
    background: #f7faff;
}

.alert-notifications-footer strong {
    color: var(--text);
    font-size: 14px;
}

.alert-notifications-footer p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.alerts-stat-card.is-blue .alerts-stat-icon {
    background: #eaf2ff;
    color: #2563eb;
}

.alerts-stat-card.is-danger .alerts-stat-icon,
.alerts-row-icon.danger,
.alerts-mini-icon.danger {
    background: var(--red-soft);
    color: var(--red);
}

.alerts-stat-card.is-warning .alerts-stat-icon,
.alerts-row-icon.warning,
.alerts-mini-icon.warning {
    background: var(--yellow-soft);
    color: #c48600;
}

.alerts-stat-card.is-red-soft .alerts-stat-icon {
    background: #ffe8ec;
    color: #d92d55;
}

.alerts-stat-card.is-blue-strong .alerts-stat-icon,
.alerts-row-icon.info,
.alerts-mini-icon.info {
    background: #eaf2ff;
    color: #2563eb;
}

.alerts-stat-card.is-green .alerts-stat-icon {
    background: var(--green-soft);
    color: var(--green);
}

.theme-red {
    --alert-accent: #ef4444;
    --alert-soft: #fff1f2;
    --alert-border: #fecdd3;
    --alert-text: #b91c1c;
}

.theme-orange {
    --alert-accent: #f59e0b;
    --alert-soft: #fff7ed;
    --alert-border: #fed7aa;
    --alert-text: #b45309;
}

.theme-amber {
    --alert-accent: #d97706;
    --alert-soft: #fffbeb;
    --alert-border: #fde68a;
    --alert-text: #92400e;
}

.theme-green {
    --alert-accent: #16a34a;
    --alert-soft: #ecfdf5;
    --alert-border: #bbf7d0;
    --alert-text: #15803d;
}

.theme-emerald {
    --alert-accent: #0f766e;
    --alert-soft: #ecfeff;
    --alert-border: #a5f3fc;
    --alert-text: #0f766e;
}

.theme-blue {
    --alert-accent: #2563eb;
    --alert-soft: #eff6ff;
    --alert-border: #bfdbfe;
    --alert-text: #1d4ed8;
}

.theme-indigo {
    --alert-accent: #4f46e5;
    --alert-soft: #eef2ff;
    --alert-border: #c7d2fe;
    --alert-text: #4338ca;
}

.theme-violet {
    --alert-accent: #7c3aed;
    --alert-soft: #f5f3ff;
    --alert-border: #ddd6fe;
    --alert-text: #6d28d9;
}

.theme-cyan {
    --alert-accent: #0891b2;
    --alert-soft: #ecfeff;
    --alert-border: #a5f3fc;
    --alert-text: #0e7490;
}

.theme-rose {
    --alert-accent: #e11d48;
    --alert-soft: #fff1f2;
    --alert-border: #fecdd3;
    --alert-text: #be123c;
}

.theme-slate {
    --alert-accent: #475569;
    --alert-soft: #f1f5f9;
    --alert-border: #cbd5e1;
    --alert-text: #334155;
}

.alerts-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
}

.alerts-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.alerts-status-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.alerts-status-tab {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid #e1e8f2;
    border-radius: 13px;
    background: #f7f9fd;
    color: #53627a;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.alerts-status-tab:hover {
    border-color: #c9d9f2;
    background: #f0f5fd;
    color: #1d4ed8;
}

.alerts-status-tab.active {
    border-color: #9fc0fb;
    background: #eaf2ff;
    color: #1556c9;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.alerts-status-tab strong {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font-size: 12px;
}

.alerts-toolbar-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.alerts-search-box {
    flex: 1 1 420px;
    min-width: 300px;
}

.alerts-search-box input {
    height: 46px;
}

.alerts-selects {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.alerts-select-shell {
    height: 46px;
    min-width: 190px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #f8fbff;
    color: var(--text-soft);
}

.alerts-select-shell i {
    font-size: 16px;
    color: var(--blue);
}

.alerts-select-shell select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.alerts-filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.alerts-filter-chip {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #e5ebf4;
    border-radius: 12px;
    background: #f2f6fc;
    color: #43516b;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.alerts-filter-chip:hover {
    background: #eaf1fd;
    color: #1f4fcf;
}

.alerts-filter-chip.active {
    background: #ffffff;
    border-color: #cfe0ff;
    color: #195bdc;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
}

.alerts-filter-chip.danger {
    color: #dc2626;
}

.alerts-filter-chip.warning {
    color: #b45309;
}

.alerts-filter-chip.info {
    color: #1d4ed8;
}

.alerts-filter-chip.contracts {
    color: #6d28d9;
}

.alerts-filter-chip.fines {
    color: #be123c;
}

.alerts-filter-chip.fuel {
    color: #15803d;
}

.alerts-filter-chip.service {
    color: #d97706;
}

.alerts-filter-chip.drivers {
    color: #1d4ed8;
}

.alerts-filter-chip.vehicles {
    color: #2563eb;
}

.alerts-filter-chip strong {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
    color: inherit;
    font-size: 12px;
}

.alerts-clear-filters {
    height: 46px;
    flex-shrink: 0;
}

.alerts-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 14px;
    align-items: start;
}

.alerts-panel {
    padding: 18px;
}

.alerts-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.alerts-panel-head h2,
.alerts-side-head h3 {
    margin: 0;
    color: var(--text);
}

.alerts-panel-head h2 {
    font-size: 22px;
}

.alerts-panel-head p {
    margin: 5px 0 0;
    color: var(--text-soft);
    font-weight: 700;
}

.alerts-table {
    border: 1px solid #e5ebf4;
    border-radius: 14px;
    overflow: visible;
    background: #fff;
}

.alerts-table-head,
.alerts-row-main {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.3fr)
        minmax(135px, 0.85fr)
        minmax(100px, 0.45fr)
        minmax(86px, 0.35fr)
        minmax(116px, 0.5fr)
        minmax(132px, 0.38fr);
    gap: 10px;
    align-items: center;
}

.alerts-table-head {
    min-height: 48px;
    padding: 0 16px;
    background: #f8fbff;
    border-bottom: 1px solid #e5ebf4;
    color: #617089;
    font-size: 12px;
    font-weight: 900;
}

.alerts-row {
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    position: relative;
}

.alerts-row::before {
    display: none;
}

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

.alerts-row.danger {
    background: #ffffff;
}

.alerts-row.warning {
    background: #ffffff;
}

.alerts-row.info {
    background: #ffffff;
}

.alerts-row:hover {
    background: #fbfdff;
}

.alerts-row-main {
    min-height: 78px;
    padding: 14px 16px;
}

.alerts-row-main > * {
    min-width: 0;
}

.alerts-type-cell,
.alerts-subject-cell,
.alerts-owner-cell,
.alerts-actions-cell {
    display: flex;
    align-items: center;
    min-width: 0;
}

.alerts-type-cell,
.alerts-subject-cell,
.alerts-owner-cell {
    gap: 10px;
}

.alerts-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 18px;
}

.alerts-row-icon.tire-visual-icon {
    --tire-size: 28px;
}

.alerts-row-icon.theme-red,
.alerts-row-icon.theme-orange,
.alerts-row-icon.theme-amber,
.alerts-row-icon.theme-green,
.alerts-row-icon.theme-emerald,
.alerts-row-icon.theme-blue,
.alerts-row-icon.theme-indigo,
.alerts-row-icon.theme-violet,
.alerts-row-icon.theme-cyan,
.alerts-row-icon.theme-rose,
.alerts-row-icon.theme-slate,
.alerts-subject-mark.theme-red,
.alerts-subject-mark.theme-orange,
.alerts-subject-mark.theme-amber,
.alerts-subject-mark.theme-green,
.alerts-subject-mark.theme-emerald,
.alerts-subject-mark.theme-blue,
.alerts-subject-mark.theme-indigo,
.alerts-subject-mark.theme-violet,
.alerts-subject-mark.theme-cyan,
.alerts-subject-mark.theme-rose,
.alerts-subject-mark.theme-slate,
.alerts-mini-icon.theme-red,
.alerts-mini-icon.theme-orange,
.alerts-mini-icon.theme-amber,
.alerts-mini-icon.theme-green,
.alerts-mini-icon.theme-emerald,
.alerts-mini-icon.theme-blue,
.alerts-mini-icon.theme-indigo,
.alerts-mini-icon.theme-violet,
.alerts-mini-icon.theme-cyan,
.alerts-mini-icon.theme-rose,
.alerts-mini-icon.theme-slate {
    background: var(--alert-soft);
    color: var(--alert-accent);
    border: 1px solid var(--alert-border);
}

.alerts-title-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alerts-title-stack strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.alerts-title-stack small {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.alerts-subject-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef4ff;
    color: var(--blue);
    font-size: 16px;
    overflow: hidden;
}

.alerts-subject-mark img,
.alerts-owner-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.alerts-date-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.alerts-date-cell strong {
    color: var(--blue);
    font-size: 14px;
    line-height: 1.2;
}

.alerts-date-cell small {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.alerts-date-cell.danger strong,
.alerts-date-cell.overdue strong,
.alerts-date-cell.overdue small {
    color: #dc2626;
}

.alerts-date-cell.warning strong,
.alerts-date-cell.warning small {
    color: #d97706;
}

.alerts-level-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 900;
}

.alerts-level-pill.danger {
    background: var(--red-soft);
    color: #b91c1c;
}

.alerts-level-pill.warning {
    background: var(--yellow-soft);
    color: #9a6a00;
}

.alerts-level-pill.info {
    background: #eaf2ff;
    color: #1d4ed8;
}

.alerts-owner-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef2f8;
    color: #41526f;
    font-size: 11px;
    font-weight: 900;
    overflow: hidden;
}

.alerts-owner-label {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.alerts-owner-label small {
    display: block;
    margin-top: 2px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
}

.alerts-owner-cell.is-manual .alerts-owner-avatar {
    background: var(--blue-soft);
    color: var(--blue);
    box-shadow: 0 0 0 2px #dbeafe;
}

.alerts-owner-picker {
    position: relative;
    flex: 0 0 32px;
}

.alerts-owner-picker > summary {
    width: 32px;
    height: 32px;
    min-height: 32px;
    list-style: none;
    border-color: #dbe6f7;
    background: var(--blue-soft);
    color: var(--blue);
    cursor: pointer;
}

.alerts-owner-picker > summary::-webkit-details-marker {
    display: none;
}

.alerts-owner-picker > summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.alerts-owner-picker[open] {
    z-index: 20;
}

.alerts-owner-picker .alerts-assignee-form {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: min(280px, calc(100vw - 40px));
    margin: 0;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(31, 45, 71, 0.16);
}

.alerts-actions-cell {
    justify-content: flex-end;
    gap: 7px;
    overflow: visible;
}

.alerts-actions-cell form {
    margin: 0;
    flex: 0 0 auto;
}

.alerts-icon-button {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid #dfe6ef;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #334155;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.alerts-icon-button:hover {
    background: #f5f8fd;
    border-color: #cbd7e8;
    color: var(--blue);
}

.alerts-icon-button.success {
    color: var(--green);
}

.alerts-icon-button.success:hover {
    background: var(--green-soft);
    border-color: #b9ebd0;
}

.alerts-icon-button.todo {
    color: #6d28d9;
}

.alerts-icon-button.todo:hover {
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.alerts-more-menu {
    position: relative;
    flex: 0 0 38px;
}

.alerts-more-menu summary {
    list-style: none;
}

.alerts-more-menu summary::-webkit-details-marker {
    display: none;
}

.alerts-more-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 12;
    min-width: 178px;
    padding: 8px;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(31, 45, 71, 0.16);
}

.alerts-more-popover a,
.alerts-menu-form button,
.alerts-single-notification-menu summary,
.alerts-assignee-menu summary {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.alerts-menu-form {
    margin: 0;
}

.alerts-menu-form button {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.alerts-single-notification-menu,
.alerts-assignee-menu {
    display: block;
}

.alerts-single-notification-menu summary,
.alerts-assignee-menu summary {
    list-style: none;
    cursor: pointer;
}

.alerts-single-notification-menu summary::-webkit-details-marker,
.alerts-assignee-menu summary::-webkit-details-marker {
    display: none;
}

.alerts-more-popover a:hover,
.alerts-menu-form button:hover,
.alerts-single-notification-menu summary:hover,
.alerts-assignee-menu summary:hover {
    background: #f3f7ff;
    color: #0f5fe8;
}

.alerts-single-notification-form {
    width: 236px;
    margin: 8px 0 4px;
    padding: 10px;
    border: 1px solid #e4ebf5;
    border-radius: 11px;
    background: #f8fbff;
}

.alerts-single-notification-form label {
    display: grid;
    gap: 5px;
}

.alerts-single-notification-form label span {
    color: #5c6e87;
    font-size: 11px;
    font-weight: 850;
}

.alerts-single-notification-form input {
    width: 100%;
    min-width: 0;
    height: 36px;
    border: 1px solid #d8e2ef;
    border-radius: 9px;
    background: #ffffff;
    color: #213049;
    font-size: 13px;
    font-weight: 750;
    padding: 0 9px;
}

.alerts-single-notification-form button {
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    border: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--blue);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.alerts-single-notification-form button:hover {
    background: #0f5fe8;
}

.alerts-assignee-form {
    width: 252px;
    margin: 8px 0 4px;
    padding: 10px;
    border: 1px solid #e4ebf5;
    border-radius: 11px;
    background: #f8fbff;
}

.alerts-assignee-form label {
    display: grid;
    gap: 5px;
}

.alerts-assignee-form label > span {
    color: #5c6e87;
    font-size: 11px;
    font-weight: 850;
}

.alerts-assignee-form select {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 32px 0 9px;
    border: 1px solid #d8e2ef;
    border-radius: 9px;
    background: #ffffff;
    color: #213049;
    font-size: 13px;
    font-weight: 750;
}

.alerts-assignee-form button {
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    border: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--blue);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.alerts-assignee-form button:hover {
    background: #0f5fe8;
}

.alerts-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.alerts-row-followup {
    padding: 0 16px 14px 72px;
}

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

.alerts-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    background: #f8fbff;
}

.alerts-inline-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 148px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
}

.alerts-inline-form input,
.alerts-inline-form select {
    min-height: 38px;
    border: 1px solid #d7e2ef;
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    padding: 0 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.alerts-inline-form input[type="number"] {
    width: 148px;
}

.alerts-inline-form select {
    min-width: 190px;
}

.alerts-inline-form-wide label {
    min-width: 136px;
}

.alerts-inline-form-document {
    width: min(100%, 720px);
}

.alerts-inline-form .alerts-inline-document-upload {
    min-width: min(300px, 100%);
}

.alerts-inline-document-upload {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
}

.alerts-inline-document-title {
    display: block;
}

.alerts-inline-form .alerts-inline-file-picker {
    min-width: 300px;
    min-height: 40px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 6px;
    border: 1px solid #d7e2ef;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.alerts-inline-form .alerts-inline-file-picker:hover,
.alerts-inline-form .alerts-inline-file-picker.is-file-dragover {
    border-color: #79a7ea;
    background: #f8fbff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.alerts-inline-form .alerts-inline-file-picker.has-selected-file {
    border-color: #65a586;
    background: #f5fbf7;
}

.alerts-inline-form .alerts-inline-file-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
}

.alerts-inline-file-button {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: #edf4ff;
    color: #135fcf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.alerts-inline-file-name {
    min-width: 0;
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alerts-inline-document-upload small {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.alerts-registration-decision {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.alerts-registration-decision > .alerts-action-form {
    align-items: stretch;
}

.alerts-registration-change-form {
    flex: 1 1 520px;
}

.alerts-document-upload {
    width: min(100%, 860px);
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #f3f8ff 100%);
}

.alerts-document-dropzone {
    min-height: 64px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border: 1px dashed #a9c4ea;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.alerts-document-dropzone:hover,
.alerts-document-dropzone.is-file-dragover {
    border-color: #397bea;
    background: #f4f8ff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .1);
}

.alerts-document-dropzone.has-selected-file {
    border-style: solid;
    border-color: #65a586;
    background: #f4fbf7;
}

.alerts-document-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.alerts-document-dropzone-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eaf2ff;
    color: #2563eb;
    font-size: 20px;
}

.alerts-document-dropzone > span:nth-child(3) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.alerts-document-dropzone strong {
    color: #17233b;
    font-size: 13px;
    font-weight: 900;
}

.alerts-document-dropzone small {
    overflow: hidden;
    color: #68758b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alerts-document-dropzone em {
    padding: 7px 10px;
    border-radius: 9px;
    background: #edf4ff;
    color: #1d5fd0;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.alerts-document-status,
.alerts-document-mismatch {
    grid-column: 1 / -1;
}

.alerts-document-status {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #eef5ff;
    color: #2859a4;
    font-size: 12px;
    font-weight: 800;
}

.alerts-document-status.is-ok { background: #edf9f2; color: #16724a; }
.alerts-document-status.is-warning { background: #fff7e8; color: #9a5a08; }
.alerts-document-status.is-error { background: #fff0f0; color: #b4232e; }

.alerts-inline-form .alerts-document-status {
    flex: 1 0 100%;
}

.alerts-document-mismatch {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid #f3c56a;
    border-radius: 13px;
    background: #fffaf0;
    color: #74480b;
}

.alerts-document-mismatch[hidden] { display: none; }
.alerts-document-mismatch > span { font-size: 22px; color: #d48613; }
.alerts-document-mismatch strong { font-size: 13px; }
.alerts-document-mismatch ul { margin: 7px 0 10px; padding-left: 18px; font-size: 12px; }
.alerts-document-mismatch-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.alerts-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.alerts-side-card {
    padding: 16px;
}

.alerts-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.alerts-side-head h3 {
    font-size: 16px;
}

.alerts-side-head span {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red-soft);
    color: #b91c1c;
    font-size: 12px;
    font-weight: 900;
}

.alerts-urgent-list,
.alerts-activity-list,
.alerts-structure-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alerts-urgent-item,
.alerts-activity-item,
.alerts-structure-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.alerts-urgent-item {
    color: inherit;
    text-decoration: none;
}

.alerts-urgent-item strong,
.alerts-activity-item strong,
.alerts-structure-row strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
}

.alerts-urgent-item small,
.alerts-activity-item small {
    display: block;
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.alerts-urgent-item em,
.alerts-activity-item em,
.alerts-structure-row em {
    color: #dc2626;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
    text-align: right;
}

.alerts-urgent-item em strong {
    display: block;
    color: inherit;
    font-size: 12px;
    line-height: 1.2;
}

.alerts-mini-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 15px;
}

.alerts-mini-icon.tire-visual-icon {
    --tire-size: 22px;
}

.alerts-mini-icon.is-info {
    background: #eef4ff;
    color: var(--blue);
}

.alerts-structure-donut-wrap {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.alerts-structure-donut {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    position: relative;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 10px 22px rgba(32, 54, 92, 0.12);
}

.alerts-structure-donut > div {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px #e8edf4;
}

.alerts-donut-svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(-90deg);
}

.alerts-donut-track,
.alerts-donut-segment {
    fill: none;
    stroke-width: 8;
}

.alerts-donut-track {
    stroke: #edf2f8;
}

.alerts-donut-segment {
    stroke-linecap: round;
}

.alerts-donut-segment.danger {
    stroke: #ef4444;
}

.alerts-donut-segment.warning {
    stroke: #f59e0b;
}

.alerts-donut-segment.info {
    stroke: #2563eb;
}

.alerts-structure-donut strong {
    color: var(--text);
    font-size: 28px;
    line-height: 1;
}

.alerts-structure-donut span {
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.alerts-structure-legend {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.alerts-structure-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.alerts-structure-legend-row > span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.alerts-structure-legend-row.danger > span {
    background: #ef4444;
}

.alerts-structure-legend-row.warning > span {
    background: #f59e0b;
}

.alerts-structure-legend-row.info > span {
    background: #2563eb;
}

.alerts-structure-legend-row strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.alerts-structure-legend-row em {
    color: var(--text-soft);
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}

.alerts-module-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.alerts-module-chip {
    min-width: 0;
    padding: 8px;
    border: 1px solid #edf2f8;
    border-radius: 13px;
    background: #fbfdff;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.alerts-module-chip .alerts-mini-icon {
    width: 30px;
    height: 30px;
}

.alerts-module-chip strong,
.alerts-module-chip small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.alerts-module-chip strong {
    color: var(--text);
    font-size: 12px;
    line-height: 1.2;
}

.alerts-module-chip small {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
}

.alerts-module-chip.contracts .alerts-mini-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.alerts-module-chip.vehicles .alerts-mini-icon {
    background: #eff6ff;
    color: #2563eb;
}

.alerts-module-chip.fines .alerts-mini-icon {
    background: #fff1f2;
    color: #e11d48;
}

.alerts-module-chip.fuel .alerts-mini-icon {
    background: #ecfdf5;
    color: #16a34a;
}

.alerts-module-chip.service .alerts-mini-icon {
    background: #fff7ed;
    color: #d97706;
}

.alerts-module-chip.drivers .alerts-mini-icon {
    background: #eff6ff;
    color: #2563eb;
}

.alerts-side-empty {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.alerts-pagination {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(160px, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 2px 0;
}

.alerts-page-summary,
.alerts-per-page-form label span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 850;
}

.alerts-page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.alerts-page-button,
.alerts-page-ellipsis {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}

.alerts-page-button {
    border: 1px solid #dce5f1;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(28, 45, 79, 0.05);
}

.alerts-page-button.active {
    border-color: #0f5fe8;
    background: #0f65ea;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.alerts-page-button.disabled {
    color: #b8c4d4;
    background: #f7f9fc;
}

.alerts-page-ellipsis {
    color: var(--text-soft);
}

.alerts-per-page-form {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.alerts-per-page-form label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.alerts-per-page-form select {
    height: 38px;
    min-width: 72px;
    border: 1px solid #dce5f1;
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 1240px) {
    .alerts-workspace {
        grid-template-columns: 1fr;
    }

    .alerts-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alerts-list-panel {
        order: 1;
    }

    .alerts-sidebar {
        order: 2;
    }

    .alerts-sidebar .alerts-side-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1120px) {
    .alerts-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .alerts-toolbar,
    .alerts-toolbar-main,
    .alerts-selects {
        flex-direction: column;
        align-items: stretch;
    }

    .alerts-search-box,
    .alerts-select-shell,
    .alerts-clear-filters {
        width: 100%;
        min-width: 0;
    }

    .alerts-table {
        border-radius: 16px;
    }

    .alerts-table-head {
        display: none;
    }

    .alerts-row-main {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
    }

    .alerts-actions-cell {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .alerts-more-popover {
        right: auto;
        left: 0;
    }

    .alerts-row-followup {
        padding-left: 16px;
    }

    .alerts-pagination {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .alerts-page-summary,
    .alerts-per-page-form {
        justify-self: stretch;
    }

    .alerts-per-page-form {
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .alerts-page {
        gap: 14px;
    }

    .alerts-panel,
    .alerts-toolbar,
    .alerts-side-card {
        width: 100%;
        min-width: 0;
    }

    .alerts-panel {
        padding: 12px;
    }

    .alerts-stats-grid,
    .alerts-sidebar {
        grid-template-columns: 1fr;
    }

    .alerts-status-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alerts-status-tab {
        min-width: 0;
        padding: 0 8px;
    }

    .alerts-filter-chip {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .alerts-inline-form,
    .alerts-inline-form label,
    .alerts-inline-form input,
    .alerts-inline-form select,
    .alerts-inline-form .btn-primary,
    .alerts-action-form .btn-secondary,
    .alerts-registration-decision > .alerts-action-form,
    .alerts-registration-decision > .alerts-action-form .btn-secondary {
        width: 100%;
        min-width: 0;
    }

    .alerts-document-upload {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .alerts-document-dropzone {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .alerts-document-dropzone em {
        grid-column: 1 / -1;
        text-align: center;
    }

    .alerts-row-main {
        padding: 14px 12px;
    }

    .alerts-row-followup {
        padding: 0 12px 14px;
    }

    .alerts-actions-cell {
        width: 100%;
    }

    .alerts-more-popover {
        max-width: min(280px, calc(100vw - 48px));
    }

    .alert-notifications-channel-grid,
    .alert-notifications-level-grid,
    .alert-notifications-groups {
        grid-template-columns: 1fr;
    }

    .alert-notifications-footer {
        align-items: stretch;
        flex-direction: column;
    }
}



/* Source: css/pages/users.css */
.users-page,
.users-form-page,
.users-detail-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.users-hero,
.users-panel,
.users-detail-main-card,
.users-detail-side-card,
.users-sidebar-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.users-hero {
    min-height: 124px;
    padding: 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.users-kicker {
    width: fit-content;
    margin-bottom: 9px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f66d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.users-hero h1 {
    margin: 0;
    color: #22314d;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
}

.users-hero p {
    max-width: 680px;
    margin: 8px 0 0;
    color: #75859c;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.users-add-btn {
    flex-shrink: 0;
}

.users-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.users-stat-card {
    min-height: 106px;
    padding: 18px;
    border: 1px solid #e5ebf4;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(39, 63, 96, 0.06);
    display: flex;
    align-items: center;
    gap: 14px;
}

.users-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef4ff;
    color: #356fe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.users-stat-card.is-success .users-stat-icon {
    background: #dcf8eb;
    color: #169458;
}

.users-stat-card.is-warning .users-stat-icon {
    background: #fff2cc;
    color: #b98000;
}

.users-stat-card.is-danger .users-stat-icon {
    background: #ffe3e1;
    color: #d93025;
}

.users-stat-card.is-neutral .users-stat-icon {
    background: #edf1f7;
    color: #5d6b7f;
}

.users-stat-card span {
    display: block;
    margin-bottom: 5px;
    color: #718198;
    font-size: 13px;
    font-weight: 800;
}

.users-stat-card strong {
    color: #22314d;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.users-panel {
    border-radius: 24px;
    overflow: hidden;
}

.users-filters {
    padding: 18px;
    border-bottom: 1px solid #edf2f7;
    background: #fbfcff;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 190px 190px;
    gap: 14px;
    align-items: end;
}

.users-search-box {
    height: 52px;
    box-shadow: none;
    border-color: #dfe7f2;
}

.users-search-box i {
    color: #7a8aa1;
    font-size: 18px;
}

.users-filter-select {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.users-filter-select label {
    color: #667790;
    font-size: 12px;
    font-weight: 900;
}

.users-filter-select select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
    color: #34445c;
    font-size: 14px;
    font-weight: 800;
}

.users-filter-select select:focus {
    outline: none;
    border-color: #b9c9e7;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.08);
}

.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1080px;
}

.users-table th,
.users-table td {
    padding: 16px 18px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
}

.users-table th {
    background: #f8fafd;
    color: #74839a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

.users-table tbody tr {
    transition: background 0.18s ease;
}

.users-table tbody tr:hover {
    background: #fbfdff;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.users-identity,
.users-detail-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.users-avatar,
.users-detail-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef4ff, #dbe8ff);
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0;
}

.users-detail-avatar {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    font-size: 19px;
}

.users-name {
    color: #22314d;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.users-meta {
    max-width: 340px;
    margin-top: 4px;
    color: #7c8aa1;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-role-pill,
.users-status-badge,
.users-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid #e1e8f2;
    background: #f7f9fc;
    color: #52647d;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.users-role-pill.role-admin {
    background: #eef4ff;
    border-color: #d7e5ff;
    color: #255fcf;
}

.users-role-pill.role-manager {
    background: #f0fdf4;
    border-color: #ccefdc;
    color: #147b4c;
}

.users-role-pill.role-operator {
    background: #fff8e1;
    border-color: #f2dfac;
    color: #a06f00;
}

.users-role-pill.role-viewer {
    background: #f4f7fb;
    border-color: #e3eaf3;
    color: #56677e;
}

.users-status-badge.status-active {
    background: #e1f8ee;
    border-color: #c6efd9;
    color: #137a49;
}

.users-status-badge.status-pending {
    background: #fff3d6;
    border-color: #f4dda8;
    color: #a06f00;
}

.users-status-badge.status-blocked,
.users-status-badge.status-expired {
    background: #ffe8e6;
    border-color: #f8c9c5;
    color: #c12d25;
}

.users-status-badge.status-deactivated {
    background: #edf1f7;
    border-color: #dde5ef;
    color: #5d6b7f;
}

.users-activity-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.users-activity-cell strong,
.users-table td {
    color: #40506a;
    font-size: 14px;
    font-weight: 700;
}

.users-activity-cell span,
.users-muted {
    color: #7d8da3;
    font-size: 13px;
    font-weight: 700;
}

.users-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.users-row-actions form {
    margin: 0;
}

.users-row-actions .btn-ghost {
    min-height: 36px;
    gap: 7px;
}

.users-row-actions .btn-ghost i {
    font-size: 14px;
}

.users-empty-card {
    margin: 20px;
}

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

.users-form .form-card {
    border-radius: 22px;
}

.users-form .section-title,
.users-detail-page h1 {
    letter-spacing: 0;
}

.users-radio-grid,
.users-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.users-radio-grid-roles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.users-choice-card,
.users-check-pill {
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
    color: #34445c;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.users-choice-card:hover,
.users-check-pill:hover {
    border-color: #c8d7ee;
    box-shadow: 0 8px 18px rgba(39, 63, 96, 0.08);
}

.users-choice-card input,
.users-check-pill input {
    width: 18px;
    height: 18px;
    accent-color: #2874ea;
    flex-shrink: 0;
}

.users-choice-card:has(input:checked),
.users-check-pill:has(input:checked) {
    border-color: #b7cdf7;
    background: #f4f8ff;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.07);
}

.users-permission-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.users-permission-card {
    padding: 18px;
    border: 1px solid #e3eaf4;
    border-radius: 18px;
    background: #fbfcff;
}

.users-permission-card h3,
.users-sidebar-card h3,
.users-detail-side-card h3 {
    margin: 0 0 14px;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.users-side-card-title {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-side-card-title i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.users-side-card-title h3 {
    margin: 0;
}

.users-sidebar-card {
    position: sticky;
    top: 110px;
}

.users-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.users-sidebar-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid #edf2f7;
}

.users-sidebar-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.users-sidebar-list span {
    display: block;
    margin-bottom: 5px;
    color: #7c8aa1;
    font-size: 12px;
    font-weight: 900;
}

.users-sidebar-list strong {
    color: #22314d;
    font-size: 15px;
    font-weight: 900;
}

.users-submit-btn,
.users-full-btn {
    width: 100%;
}

.users-detail-header {
    padding: 22px 24px;
    border: 1px solid #e4ebf5;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.users-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.users-detail-main-card,
.users-detail-side-card {
    border-radius: 24px;
}

.users-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.users-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.users-detail-info-item {
    min-height: 94px;
    padding: 16px;
    border: 1px solid #e6edf6;
    border-radius: 18px;
    background: #fbfcff;
}

.users-detail-info-item span {
    display: block;
    margin-bottom: 8px;
    color: #73839a;
    font-size: 12px;
    font-weight: 900;
}

.users-detail-info-item strong {
    color: #22314d;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 900;
}

.users-detail-section {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #e6edf6;
    border-radius: 18px;
    background: #fbfcff;
}

.users-detail-section h3 {
    margin: 0 0 8px;
    color: #22314d;
    font-size: 17px;
}

.users-detail-section p {
    margin: 0;
    color: #607089;
    line-height: 1.55;
}

.users-audit-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.users-audit-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid #edf2f7;
}

.users-audit-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.users-audit-row:last-child {
    padding-bottom: 0;
}

.users-audit-row strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.users-audit-row p {
    margin-top: 4px;
    font-size: 13px;
}

.users-audit-row span {
    color: #7d8da3;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.users-audit-side-card .users-audit-row {
    flex-direction: column;
    gap: 5px;
}

.users-audit-side-card .users-audit-row span {
    white-space: normal;
}

.users-audit-empty {
    margin: 0;
    color: #73839a;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.users-detail-highlight {
    background: #fff8e8;
    border-color: #f3dfb0;
}

.users-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.users-detail-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.users-detail-actions-stack form {
    margin: 0;
}

.users-full-btn {
    min-height: 46px;
    border-radius: 14px;
    gap: 9px;
}

.users-detail-side-card h4 {
    margin: 18px 0 10px;
    color: #667790;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.users-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.users-tag {
    min-height: 28px;
    font-size: 11px;
}

.users-form button[disabled],
.users-page button[disabled],
.users-detail-page button[disabled] {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.users-form input.is-disabled,
.users-form .flatpickr-input.is-disabled {
    background: #f4f7fb !important;
    color: #8a98ad !important;
    border-color: #e3eaf4 !important;
    cursor: not-allowed;
}

@media (max-width: 1220px) {
    .users-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .users-filters {
        grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(160px, 190px));
    }
}

@media (max-width: 1080px) {
    .users-form-layout,
    .users-detail-grid {
        grid-template-columns: 1fr;
    }

    .users-sidebar-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .users-hero,
    .users-detail-header {
        align-items: stretch;
        flex-direction: column;
    }

    .users-add-btn {
        width: 100%;
    }

    .users-stats-grid,
    .users-filters,
    .users-detail-info-grid {
        grid-template-columns: 1fr;
    }

    .users-radio-grid,
    .users-radio-grid-roles,
    .users-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .users-hero,
    .users-panel,
    .users-detail-header,
    .users-detail-main-card,
    .users-detail-side-card,
    .users-sidebar-card {
        border-radius: 18px;
    }

    .users-hero,
    .users-detail-header {
        padding: 18px;
    }

    .users-hero h1 {
        font-size: 24px;
    }

    .users-filters {
        padding: 14px;
    }

    .users-table th,
    .users-table td {
        padding: 14px;
    }
}

/* --- Konta administracji systemu: zablokowane akcje w panelu organizacji --- */
.users-system-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px dashed #c9ced9;
    border-radius: 999px;
    background: #f4f6fa;
    color: #5b6472;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.users-system-lock i {
    color: #8a93a3;
}

.users-system-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e2e6ee;
    border-left: 3px solid #f2b532;
    border-radius: 10px;
    background: #f8f9fc;
    color: #3f4756;
    font-size: 13px;
    line-height: 1.45;
}

.users-system-notice i {
    margin-top: 2px;
    color: #b3820f;
    font-size: 16px;
    flex-shrink: 0;
}



/* Source: css/pages/account.css */
.account-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-hero,
.account-card,
.account-side-card {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.account-hero {
    min-height: 128px;
    padding: 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.account-hero-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: linear-gradient(135deg, #eef4ff, #dbe8ff);
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    font-weight: 900;
    flex-shrink: 0;
    overflow: hidden;
}

.account-avatar img,
.account-avatar-preview img,
.user-menu-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.account-kicker {
    width: fit-content;
    margin-bottom: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f66d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.account-hero h1 {
    margin: 0;
    color: #22314d;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
}

.account-hero p {
    margin: 7px 0 0;
    color: #75859c;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.account-main,
.account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-card,
.account-side-card {
    border-radius: 24px;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.account-form input:disabled {
    background: #f4f7fb;
    color: #718198;
    cursor: not-allowed;
}

.account-avatar-editor {
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 18px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.account-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef4ff, #dbe8ff);
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
}

.account-avatar-fields {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-avatar-fields label {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.account-field-note {
    color: #7d8da3;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.account-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.account-actions .btn-primary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.account-password-note {
    padding: 13px 14px;
    border: 1px solid #dce8ff;
    border-radius: 16px;
    background: #f5f8ff;
    color: #52647d;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.account-password-note i {
    color: #2f66d8;
    font-size: 17px;
    flex-shrink: 0;
}

.account-side-title {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-side-title i {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.account-side-title h3 {
    margin: 0;
    color: #22314d;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.account-status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-status-list div {
    padding: 13px 14px;
    border: 1px solid #e6edf6;
    border-radius: 16px;
    background: #fbfcff;
}

.account-status-list span {
    display: block;
    margin-bottom: 6px;
    color: #73839a;
    font-size: 12px;
    font-weight: 900;
}

.account-status-list strong {
    color: #22314d;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 900;
}

.account-audit-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.account-audit-row {
    padding: 12px 0;
    border-top: 1px solid #edf2f7;
}

.account-audit-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.account-audit-row:last-child {
    padding-bottom: 0;
}

.account-audit-row strong {
    color: #22314d;
    font-size: 14px;
    font-weight: 900;
}

.account-audit-row p {
    margin: 4px 0 0;
    color: #607089;
    font-size: 13px;
    line-height: 1.5;
}

.account-audit-row span,
.account-empty-text {
    display: block;
    margin-top: 6px;
    color: #7d8da3;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
}

.account-empty-text {
    margin: 0;
    font-size: 13px;
}

.account-history-link {
    width: 100%;
    margin-top: 14px;
}

@media (max-width: 1080px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .account-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .account-hero-main {
        align-items: flex-start;
    }

    .account-actions {
        justify-content: stretch;
    }

    .account-actions .btn-primary,
    .account-hero .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .account-hero,
    .account-card,
    .account-side-card {
        border-radius: 18px;
    }

    .account-hero {
        padding: 18px;
    }

    .account-avatar {
        width: 54px;
        height: 54px;
        border-radius: 18px;
        font-size: 18px;
    }

    .account-avatar-editor {
        grid-template-columns: 1fr;
    }

    .account-hero h1 {
        font-size: 24px;
    }
}

/* Account workspace refresh: denser layout and visual hierarchy matching the product shell. */
.page-wrap:has(.account-page) {
    width: 100%;
    max-width: min(1608px, calc(100vw - 56px));
    padding: 20px 0 30px;
}

.account-page {
    gap: 14px;
}

.account-hero,
.account-card,
.account-side-card {
    border-color: #e3eaf4;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(39, 63, 96, 0.055);
}

.account-hero {
    min-height: 105px;
    padding: 18px 20px;
}

.account-hero-main {
    gap: 14px;
}

.account-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef4ff 0%, #e0ebff 100%);
    font-size: 20px;
}

.account-kicker {
    margin-bottom: 5px;
    padding: 5px 9px;
    background: #eaf2ff;
    color: #286be4;
    font-size: 10px;
    letter-spacing: .01em;
}

.account-hero h1 {
    font-size: 22px;
    letter-spacing: -.02em;
}

.account-hero p {
    margin-top: 4px;
    color: #73839a;
    font-size: 12px;
}

.account-hero .btn-secondary {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: 12px;
}

.account-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
}

.account-main,
.account-sidebar {
    gap: 14px;
}

.account-top-grid {
    display: grid;
    grid-template-columns: minmax(280px, 348px) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.account-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.23fr) minmax(360px, .87fr);
    gap: 20px;
    align-items: stretch;
}

.account-card,
.account-side-card {
    padding: 20px 26px;
}

.account-card.form-section {
    gap: 15px;
}

.account-card > .section-head {
    padding-bottom: 0;
    border-bottom: 0;
}

.account-card .section-title {
    color: #21324e;
    font-size: 17px;
    letter-spacing: -.015em;
}

.account-card .section-subtitle {
    margin-top: 3px;
    color: #7c8ca4;
    font-size: 11px;
    line-height: 1.45;
}

.account-form {
    gap: 14px;
}

.account-profile-photo,
.account-profile-details {
    min-height: 289px;
}

.account-profile-photo .account-form {
    height: 100%;
    justify-content: space-between;
}

.account-avatar-editor {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 13px;
    padding: 0;
    border: 0;
    background: transparent;
}

.account-avatar-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    font-size: 24px;
}

.account-avatar-fields {
    gap: 7px;
}

.account-upload-zone {
    min-height: 68px;
    padding: 9px 10px;
    border: 1px dashed #c8d7ec;
    border-radius: 8px;
    background: #fff;
    color: #2c6fdf;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.account-upload-zone:hover,
.account-upload-zone:focus-within {
    border-color: #77a6ee;
    background: #f7faff;
    box-shadow: 0 5px 14px rgba(47, 102, 216, .08);
}

.account-upload-zone span {
    font-size: 11px;
    font-weight: 800;
}

.account-upload-zone strong {
    max-width: 100%;
    overflow: hidden;
    color: #52647d;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.account-profile-photo .account-field-note {
    max-width: 170px;
}

.account-field-note {
    color: #74859d;
    font-size: 10px;
    line-height: 1.4;
}

.account-actions {
    gap: 8px;
}

.account-actions .btn-primary,
.account-actions .btn-secondary,
.account-actions .btn-danger {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    gap: 7px;
    font-size: 11px;
}

.account-profile-photo .account-actions {
    margin-top: auto;
}

.account-profile-details .account-form {
    gap: 14px;
}

.account-profile-details .form-grid {
    gap: 10px 22px;
}

.account-profile-details .form-group {
    gap: 5px;
}

.account-profile-details .form-group label,
.account-security-card .form-group label,
.account-data-card .form-group label {
    color: #6d7d94;
    font-size: 10px;
    font-weight: 800;
}

.account-profile-details .form-group input,
.account-security-card .form-group input,
.account-security-card .form-group select,
.account-data-card .form-group input {
    min-height: 37px;
    padding: 0 11px;
    border-color: #dce5f0;
    border-radius: 8px;
    background: #fff;
    color: #31425e;
    font-size: 11px;
}

.account-profile-details .form-group input:disabled {
    background: #f7f9fc;
    color: #63748d;
}

.account-profile-details .account-field-note {
    font-size: 9px;
}

.account-profile-details .account-actions {
    margin-top: auto;
}

.account-wide-card {
    min-height: 110px;
}

.account-wide-card .account-form {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-wide-card .account-password-note {
    flex: 1 1 auto;
}

.account-wide-card .account-actions {
    flex: 0 0 auto;
}

.account-password-note {
    padding: 10px 11px;
    border-color: #d8e5fb;
    border-radius: 8px;
    background: #f5f8ff;
    color: #63748d;
    gap: 8px;
    font-size: 10px;
    line-height: 1.45;
}

.account-password-note i {
    color: #3177e5;
    font-size: 15px;
}

.account-security-card,
.account-data-card {
    min-height: 290px;
}

.account-security-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(205px, .78fr);
    gap: 16px;
    min-height: 0;
}

.account-security-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-security-main .account-password-note {
    min-height: 50px;
    align-items: center;
}

.account-security-main .account-form {
    gap: 0;
}

.account-security-main .account-actions {
    justify-content: flex-start;
    margin-top: 13px;
}

.account-security-info {
    padding: 12px;
    border: 1px solid #e1e9f4;
    border-radius: 9px;
    background: #fbfcff;
}

.account-security-info h3 {
    margin: 0 0 11px;
    color: #263854;
    font-size: 10px;
    font-weight: 900;
}

.account-security-benefit {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
}

.account-security-benefit:first-of-type {
    margin-top: 0;
}

.account-security-benefit > i {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #edf4ff;
    color: #347be9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    font-size: 12px;
}

.account-security-benefit span {
    min-width: 0;
}

.account-security-benefit strong,
.account-security-benefit small {
    display: block;
}

.account-security-benefit strong {
    color: #30415d;
    font-size: 9px;
    line-height: 1.35;
}

.account-security-benefit small {
    margin-top: 2px;
    color: #7b8ba2;
    font-size: 8px;
    line-height: 1.4;
}

.account-data-card .account-password-note {
    font-size: 10px;
}

.account-data-card .account-form {
    gap: 11px;
}

.account-data-card .account-actions {
    justify-content: flex-start;
}

.account-side-card {
    padding: 20px;
}

.account-side-title {
    margin-bottom: 12px;
    gap: 9px;
}

.account-side-title i {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
}

.account-side-title h3 {
    font-size: 15px;
}

.account-status-list {
    gap: 7px;
}

.account-status-list div {
    min-height: 46px;
    padding: 8px 10px;
    border-color: #e1e8f2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-status-list span {
    margin: 0;
    color: #7b8ba2;
    font-size: 9px;
    font-weight: 800;
}

.account-status-list strong {
    color: #263854;
    font-size: 10px;
    text-align: right;
}

.account-status-value {
    min-height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f0f3f8;
    color: #7c8ca2 !important;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.account-status-value i {
    font-size: 16px;
    line-height: 1;
}

.account-status-value.is-active {
    background: #e9f8ef;
    color: #2caa63 !important;
}

.account-status-value.is-blocked,
.account-status-value.is-locked,
.account-status-value.is-deactivated {
    background: #fff0ef;
    color: #de635c !important;
}

.account-audit-row {
    padding: 10px 0;
}

.account-audit-row strong {
    font-size: 11px;
}

.account-audit-row p {
    font-size: 10px;
}

.account-audit-row span,
.account-empty-text {
    font-size: 10px;
}

.account-history-link {
    min-height: 36px;
    margin-top: 12px;
    padding: 0 12px;
    border-radius: 8px;
    gap: 7px;
    font-size: 10px;
}

@media (max-width: 1180px) {
    .page-wrap:has(.account-page) {
        max-width: calc(100vw - 40px);
    }

    .account-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 16px;
    }

    .account-top-grid,
    .account-bottom-grid {
        gap: 14px;
    }

    .account-top-grid {
        grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
    }

    .account-card,
    .account-side-card {
        padding: 18px;
    }
}

@media (max-width: 980px) {
    .account-layout,
    .account-top-grid,
    .account-bottom-grid {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .account-profile-photo,
    .account-profile-details,
    .account-security-card,
    .account-data-card {
        min-height: 0;
    }
}

@media (max-width: 680px) {
    .page-wrap:has(.account-page) {
        max-width: calc(100vw - 24px);
        padding-top: 12px;
    }

    .account-hero {
        padding: 15px;
    }

    .account-hero h1 {
        font-size: 19px;
    }

    .account-hero p {
        font-size: 10px;
    }

    .account-hero .btn-secondary {
        align-self: flex-start;
    }

    .account-wide-card .account-form {
        flex-direction: column;
        align-items: stretch;
    }

    .account-wide-card .account-actions {
        justify-content: flex-end;
    }

    .account-security-grid,
    .account-sidebar {
        grid-template-columns: 1fr;
    }

    .account-profile-details .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Keep the account page on the same scale as the administration module. */
.page-wrap:has(.account-page):not(.page-wrap-module) {
    max-width: var(--container);
    padding: 28px 22px 34px;
}

.page-wrap.page-wrap-module:has(.account-page) {
    max-width: calc(var(--module-sidebar-content-offset) + var(--container) + var(--module-content-gutter));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--module-sidebar-content-offset);
    padding-right: var(--module-content-gutter);
}

.account-page {
    gap: 24px;
}

.account-hero,
.account-card,
.account-side-card {
    border-radius: 24px;
    border-color: #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.account-hero {
    min-height: 124px;
    padding: 24px;
}

.account-hero-main {
    gap: 18px;
}

.account-avatar {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    font-size: 23px;
}

.account-kicker {
    margin-bottom: 9px;
    padding: 7px 11px;
    font-size: 12px;
}

.account-hero h1 {
    font-size: 30px;
    letter-spacing: 0;
}

.account-hero p {
    margin-top: 8px;
    font-size: 15px;
}

.account-hero .btn-secondary {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
}

.account-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.account-main,
.account-sidebar {
    gap: 24px;
}

.account-top-grid,
.account-bottom-grid {
    gap: 24px;
}

.account-top-grid {
    grid-template-columns: minmax(280px, 348px) minmax(0, 1fr);
}

.account-bottom-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
}

.account-card,
.account-side-card {
    padding: 28px;
}

.account-card.form-section {
    gap: 22px;
}

.account-card > .section-head {
    padding-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
}

.account-card .section-title {
    font-size: 22px;
    letter-spacing: 0;
}

.account-card .section-subtitle {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.account-form {
    gap: 18px;
}

.account-profile-photo,
.account-profile-details {
    min-height: 360px;
}

.account-profile-photo .account-form {
    height: 100%;
}

.account-avatar-editor {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 16px;
}

.account-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    font-size: 26px;
}

.account-avatar-fields {
    gap: 8px;
}

.account-upload-zone {
    min-height: 68px;
    border-radius: 10px;
}

.account-upload-zone span,
.account-upload-zone strong {
    font-size: 12px;
}

.account-field-note {
    font-size: 12px;
    line-height: 1.45;
}

.account-profile-photo .account-field-note {
    max-width: 220px;
}

.account-actions {
    gap: 10px;
}

.account-actions .btn-primary,
.account-actions .btn-secondary,
.account-actions .btn-danger {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    gap: 12px;
    font-size: 14px;
}

.account-profile-details .account-form {
    gap: 18px;
}

.account-profile-details .form-grid {
    gap: 18px;
}

.account-profile-details .form-group,
.account-security-card .form-group,
.account-data-card .form-group {
    gap: 8px;
}

.account-profile-details .form-group label,
.account-security-card .form-group label,
.account-data-card .form-group label {
    font-size: 13px;
    font-weight: 600;
}

.account-profile-details .form-group input,
.account-security-card .form-group input,
.account-security-card .form-group select,
.account-data-card .form-group input {
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
}

.account-profile-details .account-field-note {
    font-size: 12px;
}

.account-wide-card {
    min-height: 0;
}

.account-wide-card .account-form {
    flex-direction: row;
    align-items: center;
    gap: 18px;
}

.account-password-note {
    padding: 13px 14px;
    border-radius: 16px;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.account-password-note i {
    font-size: 17px;
}

.account-security-card,
.account-data-card {
    min-height: 340px;
}

.account-security-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
    gap: 20px;
}

.account-security-main {
    gap: 18px;
}

.account-security-main .account-password-note {
    min-height: 58px;
}

.account-security-main .account-actions {
    margin-top: 18px;
}

.account-security-info {
    padding: 16px;
    border-radius: 12px;
}

.account-security-info h3 {
    margin-bottom: 14px;
    font-size: 13px;
}

.account-security-benefit {
    gap: 10px;
    margin-top: 14px;
}

.account-security-benefit > i {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    flex-basis: 28px;
    font-size: 15px;
}

.account-security-benefit strong {
    font-size: 12px;
    line-height: 1.4;
}

.account-security-benefit small {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.45;
}

.account-data-card .account-password-note {
    font-size: 13px;
}

.account-side-card {
    padding: 28px;
}

.account-side-title {
    margin-bottom: 16px;
    gap: 10px;
}

.account-side-title i {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 17px;
}

.account-side-title h3 {
    font-size: 18px;
}

.account-status-list {
    gap: 10px;
}

.account-status-list div {
    min-height: 0;
    padding: 13px 14px;
    border-radius: 16px;
    display: block;
}

.account-status-list span {
    margin-bottom: 6px;
    font-size: 12px;
}

.account-status-list strong {
    font-size: 14px;
    text-align: left;
}

.account-status-value {
    min-height: 22px;
    padding: 0 8px;
}

.account-status-value i {
    font-size: 17px;
}

.account-audit-row {
    padding: 12px 0;
}

.account-audit-row strong {
    font-size: 14px;
}

.account-audit-row p {
    font-size: 13px;
}

.account-audit-row span,
.account-empty-text {
    font-size: 12px;
}

.account-history-link {
    min-height: 44px;
    margin-top: 14px;
    padding: 0 18px;
    border-radius: 12px;
    gap: 12px;
    font-size: 14px;
}

@media (max-width: 1080px) {
    .page-wrap.page-wrap-module:has(.account-page) {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 22px;
        padding-right: 22px;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* The administration shell is narrower on standard laptop widths. Stack the
   compound account cards there so the fields keep the same readable measure
   as the rest of the admin screens. */
@media (max-width: 1400px) and (min-width: 1081px) {
    .page-wrap.page-wrap-module:has(.account-page) .account-top-grid,
    .page-wrap.page-wrap-module:has(.account-page) .account-bottom-grid {
        grid-template-columns: 1fr;
    }

    .page-wrap.page-wrap-module:has(.account-page) .account-profile-photo,
    .page-wrap.page-wrap-module:has(.account-page) .account-profile-details,
    .page-wrap.page-wrap-module:has(.account-page) .account-security-card,
    .page-wrap.page-wrap-module:has(.account-page) .account-data-card {
        min-height: 0;
    }
}

@media (max-width: 860px) {
    .account-top-grid,
    .account-bottom-grid {
        grid-template-columns: 1fr;
    }

    .account-profile-photo,
    .account-profile-details,
    .account-security-card,
    .account-data-card {
        min-height: 0;
    }
}

@media (max-width: 680px) {
    .page-wrap:has(.account-page):not(.page-wrap-module),
    .page-wrap.page-wrap-module:has(.account-page) {
        max-width: none;
        padding: 18px 14px 28px;
    }

    .account-sidebar {
        grid-template-columns: 1fr;
    }

    .account-wide-card .account-form {
        flex-direction: column;
        align-items: stretch;
    }
}



/* Source: css/pages/organization.css */
/* ==========================================================================
   Ustawienia organizacji — spójne z systemem designu (tokeny z variables.css).
   Układ: hero + statystyki + zakładki (Dane / Grupy / Partnerzy) + panel boczny.
   ========================================================================== */

.organization-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Hero --- */

.organization-hero {
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.organization-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.organization-avatar {
    width: 66px;
    height: 66px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--blue-soft), #dbe8ff);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    flex-shrink: 0;
    overflow: hidden;
}

.organization-avatar img {
    width: 100%;
    height: 100%;
    padding: 8px;
    background: var(--surface);
    object-fit: contain;
}

.organization-kicker {
    width: fit-content;
    margin-bottom: 8px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.organization-hero h1 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    line-height: 1.15;
}

/* Podtytuł w hero (używany m.in. przez „Dane i konto organizacji"). */
.organization-hero p {
    margin: 7px 0 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.organization-hero-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.organization-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 700;
}

.organization-hero-tag i {
    color: var(--text-muted);
    font-size: 13px;
}

.organization-hero-tag.is-status {
    border-color: var(--green-soft);
    background: var(--green-soft);
    color: #1a7a4a;
}

.organization-hero-tag.is-status i {
    color: var(--green);
}

.organization-hero-back {
    flex-shrink: 0;
}

/* --- Statystyki --- */

.organization-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.organization-stat-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
}

.organization-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}

.organization-stat-icon.is-green {
    background: var(--green-soft);
    color: var(--green);
}

.organization-stat-icon.is-yellow {
    background: var(--yellow-soft);
    color: #b98000;
}

.organization-stat-icon.is-dark {
    background: #edf1f7;
    color: var(--dark-soft);
}

.organization-stat-card span:not(.organization-stat-icon) {
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.organization-stat-card strong {
    color: var(--text);
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

/* --- Układ główny + panel boczny --- */

.organization-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.organization-main,
.organization-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.organization-sidebar {
    position: sticky;
    top: 20px;
}

.organization-card {
    border-radius: var(--radius-lg);
}

.organization-import-file-field {
    grid-column: 1 / -1;
}

.form-group .organization-import-upload {
    width: 100%;
    min-height: 82px;
    padding: 14px 16px;
    border: 1px dashed #c8d7ec;
    border-radius: 14px;
    background: #fbfcff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.form-group .organization-import-upload:hover,
.form-group .organization-import-upload:focus-within {
    border-color: #7aa7ee;
    background: #f6f9ff;
    box-shadow: 0 8px 22px rgba(47, 102, 216, .08);
}

.organization-import-upload.has-file {
    border-color: #9bd7bd;
    background: #f7fffb;
}

.organization-import-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.organization-import-upload-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.organization-import-upload.has-file .organization-import-upload-icon {
    background: var(--green-soft);
    color: var(--green);
}

.organization-import-upload-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.organization-import-upload-copy strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.organization-import-upload-copy small {
    max-width: 100%;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-import-upload-action {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #d8e4f6;
    border-radius: 10px;
    background: #fff;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.organization-import-upload:hover .organization-import-upload-action,
.organization-import-upload:focus-within .organization-import-upload-action {
    border-color: #b9cff1;
}

/* --- Zakładki (CSS-only, radio + :checked) --- */

.org-tabs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.org-tab-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.org-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.org-tab {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.org-tab i {
    font-size: 16px;
}

.org-tab:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.org-tab-count {
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

#org-tab-dane:checked ~ .org-tabbar .org-tab[for="org-tab-dane"],
#org-tab-grupy:checked ~ .org-tabbar .org-tab[for="org-tab-grupy"],
#org-tab-partnerzy:checked ~ .org-tabbar .org-tab[for="org-tab-partnerzy"] {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(40, 116, 234, 0.28);
}

#org-tab-dane:checked ~ .org-tabbar .org-tab[for="org-tab-dane"] .org-tab-count,
#org-tab-grupy:checked ~ .org-tabbar .org-tab[for="org-tab-grupy"] .org-tab-count,
#org-tab-partnerzy:checked ~ .org-tabbar .org-tab[for="org-tab-partnerzy"] .org-tab-count {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

#org-tab-dane:focus-visible ~ .org-tabbar .org-tab[for="org-tab-dane"],
#org-tab-grupy:focus-visible ~ .org-tabbar .org-tab[for="org-tab-grupy"],
#org-tab-partnerzy:focus-visible ~ .org-tabbar .org-tab[for="org-tab-partnerzy"] {
    outline: 2px solid var(--blue-dark);
    outline-offset: 2px;
}

.org-tabpanel {
    display: none;
}

#org-tab-dane:checked ~ .org-tabpanels .org-tabpanel[data-tab="dane"],
#org-tab-grupy:checked ~ .org-tabpanels .org-tabpanel[data-tab="grupy"],
#org-tab-partnerzy:checked ~ .org-tabpanels .org-tabpanel[data-tab="partnerzy"] {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: org-fade-in 0.2s ease;
}

@keyframes org-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Formularze: sekcje pól --- */

.organization-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.org-fieldset {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.org-fieldset-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.org-fieldset-label i {
    color: var(--blue);
    font-size: 15px;
}

.organization-form input:disabled,
.organization-form select:disabled {
    background: var(--surface-soft);
    color: var(--text-muted);
    cursor: not-allowed;
}

.organization-readonly-field {
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.organization-readonly-field span,
.organization-status-list span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.organization-readonly-field strong,
.organization-status-list strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
}

.organization-readonly-field small {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.organization-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.organization-note {
    padding: 12px 14px;
    border: 1px solid var(--blue-soft);
    border-radius: var(--radius-sm);
    background: var(--blue-soft);
    color: #3a5170;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.organization-note i {
    color: var(--blue);
    font-size: 16px;
    flex-shrink: 0;
}

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

.organization-setting-toggle {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.organization-setting-toggle-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 19px;
}

.organization-setting-toggle-copy strong,
.organization-setting-toggle-copy small {
    display: block;
}

.organization-setting-toggle-copy strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.organization-setting-toggle-copy small,
.organization-setting-note {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.organization-setting-toggle-copy small {
    margin-top: 4px;
}

.organization-switch {
    position: relative;
    width: 44px;
    height: 25px;
    flex: 0 0 auto;
}

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

.organization-switch > span {
    width: 44px;
    height: 25px;
    border-radius: 999px;
    background: #b5c0d1;
    display: block;
    transition: background 0.16s ease;
}

.organization-switch > span::after {
    content: "";
    width: 19px;
    height: 19px;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(25, 40, 70, 0.25);
    transition: transform 0.16s ease;
}

.organization-switch input:checked + span {
    background: var(--blue);
}

.organization-switch input:checked + span::after {
    transform: translateX(19px);
}

.organization-setting-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--blue-soft);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.organization-setting-note i {
    color: var(--blue);
    font-size: 15px;
}

/* --- Rozwijany panel "Dodaj ..." --- */

.org-add {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    overflow: hidden;
}

.org-add-summary {
    min-height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
}

.org-add-summary::-webkit-details-marker {
    display: none;
}

.org-add-summary-main {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.org-add-summary-main i {
    font-size: 18px;
}

.org-add-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.org-add[open] {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.org-add[open] .org-add-summary {
    border-bottom: 1px solid var(--line-soft);
}

.org-add[open] .org-add-chevron {
    transform: rotate(180deg);
}

.org-add-body {
    padding: 18px;
}

.organization-group-create,
.organization-group-form,
.organization-partner-create,
.organization-partner-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* --- Przypisywanie pojazdów (details wewnątrz formularza dodawania) --- */

.organization-group-assign {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

.organization-group-assign summary {
    min-height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.organization-group-assign summary::-webkit-details-marker {
    display: none;
}

.organization-vehicle-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.organization-group-assign .organization-vehicle-check-grid {
    padding: 0 14px 14px;
}

.organization-vehicle-check {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.organization-vehicle-check input:checked + span strong {
    color: var(--blue-dark);
}

.organization-vehicle-check:hover,
.organization-vehicle-check.is-selected {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: var(--shadow-sm);
}

.organization-vehicle-check input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--blue);
}

.organization-vehicle-check strong,
.organization-vehicle-check small {
    display: block;
    min-width: 0;
}

.organization-vehicle-check strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.organization-vehicle-check small {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

/* --- Lista grup --- */

.organization-groups-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.organization-group-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.organization-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.organization-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.organization-group-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.organization-group-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.organization-group-title strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.organization-group-title small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.organization-group-edit summary,
.organization-partner-edit summary {
    list-style: none;
    cursor: pointer;
}

.organization-group-edit summary::-webkit-details-marker,
.organization-partner-edit summary::-webkit-details-marker {
    display: none;
}

.organization-group-edit[open] {
    flex-basis: 100%;
}

.organization-group-edit[open] summary {
    width: fit-content;
    margin-left: auto;
}

.organization-group-edit-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.organization-edit-subhead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.organization-edit-subhead strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.organization-edit-subhead span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.organization-group-edit-actions {
    display: flex;
    justify-content: flex-end;
}

.organization-group-delete {
    display: flex;
    justify-content: flex-end;
}

.organization-group-readonly-description {
    margin: 12px 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 650;
}

.organization-group-vehicle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.organization-group-vehicle-list span {
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
}

.organization-group-vehicle-list span.is-empty {
    border-style: dashed;
    color: var(--text-muted);
}

.organization-empty-groups {
    padding: 32px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.organization-empty-groups i {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.organization-empty-groups h3 {
    margin: 14px 0 6px;
    color: var(--text);
    font-size: 17px;
}

.organization-empty-groups p {
    max-width: 440px;
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 650;
}

/* --- Logo organizacji --- */

.organization-branding-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.organization-branding-preview {
    min-height: 126px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    display: grid;
    place-items: center;
}

.organization-branding-preview img {
    max-width: 100%;
    max-height: 94px;
    object-fit: contain;
}

.organization-branding-preview.is-empty {
    border-style: dashed;
    background: var(--surface-soft);
    color: var(--text-muted);
    align-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 750;
}

.organization-branding-preview.is-empty i {
    font-size: 30px;
}

.organization-branding-content > strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.organization-branding-content > p {
    margin: 7px 0 16px;
    max-width: 680px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 600;
}

.organization-branding-actions,
.organization-logo-upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.organization-logo-file input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.organization-logo-file > span {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 800;
}

.organization-logo-file:focus-within > span,
.organization-logo-file > span:hover {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.organization-logo-upload-form.is-uploading .organization-logo-file {
    opacity: 0.7;
    pointer-events: none;
}

.organization-logo-upload-spinner {
    animation: organization-logo-spin 0.8s linear infinite;
}

@keyframes organization-logo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Partnerzy --- */

.organization-partner-sections {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.organization-partner-section {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: visible;
}

.organization-partner-section-head {
    min-height: 64px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    gap: 12px;
}

.organization-partner-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
}

.organization-partner-section-head strong,
.organization-partner-summary strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
}

.organization-partner-section-head small,
.organization-partner-summary small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
}

.organization-partner-summary .organization-partner-meta {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 750;
}

.organization-partner-list {
    display: grid;
    gap: 0;
}

.organization-partner-card {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    position: relative;
}

.organization-partner-card:last-child {
    border-bottom: 0;
}

.organization-partner-card.is-inactive {
    opacity: 0.72;
}

.organization-partner-summary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.organization-partner-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue-soft), #dbe8ff);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 850;
}

.organization-partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    background: var(--surface);
}

.organization-partner-edit-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    width: min(720px, calc(100vw - 80px));
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.organization-partner-edit-actions,
.organization-partner-delete {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.organization-partner-current-logo {
    margin-bottom: 8px;
    min-height: 44px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.organization-partner-current-logo img {
    max-width: 92px;
    max-height: 34px;
    object-fit: contain;
}

.organization-partner-empty {
    min-height: 72px;
    padding: 16px;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
}

.organization-partner-empty i {
    color: var(--text-muted);
}

/* --- Katalog partnerów --- */

#organization-partners > .section-head,
#organization-partners > .org-add,
#organization-partners > .organization-partner-sections {
    display: none;
}

.partner-workspace {
    min-width: 0;
}

.partner-workspace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.partner-workspace-head h2,
.partner-workspace-head p {
    margin: 0;
}

.partner-workspace-head h2 {
    color: var(--text);
    font-size: 22px;
    line-height: 1.2;
}

.partner-workspace-head p {
    max-width: 660px;
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}

.partner-create-button {
    min-height: 40px;
    padding: 0 15px;
    flex: 0 0 auto;
}

.partner-workspace-tools {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
}

.partner-search,
.partner-sort,
.partner-filter {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.partner-search,
.partner-sort {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
}

.partner-search i,
.partner-sort i {
    color: var(--text-muted);
    font-size: 14px;
}

.partner-search input,
.partner-sort select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
}

.partner-search input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.partner-sort select {
    min-width: 138px;
    cursor: pointer;
}

.partner-filter-group {
    display: flex;
    gap: 8px;
}

.partner-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    cursor: pointer;
}

.partner-filter i {
    font-size: 12px;
}

.partner-filter[data-partner-filter="active"] i {
    color: var(--green);
    font-size: 9px;
}

.partner-filter:hover,
.partner-filter.is-active {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--blue);
}

.partner-workspace-body {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(410px, 1.06fr);
    align-items: stretch;
    gap: 14px;
}

.partner-directory,
.partner-editor {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
}

.partner-directory {
    display: flex;
    min-height: 540px;
    flex-direction: column;
}

.partner-directory-head,
.partner-directory-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.7fr) minmax(86px, 0.85fr) minmax(72px, 0.78fr) minmax(100px, 1.02fr) 40px;
    column-gap: 10px;
    align-items: center;
}

.partner-directory-head {
    min-height: 40px;
    padding: 0 15px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
}

.partner-directory-row {
    width: 100%;
    min-height: 74px;
    padding: 11px 15px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface);
    color: var(--text-soft);
    text-align: left;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.partner-directory-row:hover {
    background: var(--surface-soft);
}

.partner-directory-row.is-selected {
    padding-left: 12px;
    border-left: 3px solid var(--blue);
    background: #f3f7ff;
    box-shadow: inset 0 1px 0 rgba(40, 116, 234, 0.12), inset 0 -1px 0 rgba(40, 116, 234, 0.12);
}

.partner-directory-row.is-inactive {
    opacity: 0.68;
}

.partner-directory-row > span:not(.partner-directory-name) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-directory-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.partner-directory-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.partner-directory-logo,
.partner-editor-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 850;
}

.partner-directory-logo img,
.partner-editor-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    background: var(--surface);
    object-fit: contain;
}

.partner-directory-logo img[hidden],
.partner-editor-logo img[hidden],
.partner-icon-button[hidden] {
    display: none;
}

.partner-status {
    width: fit-content;
    max-width: 100%;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 800;
}

.partner-status.is-active {
    background: var(--green-soft);
    color: #187548;
}

.partner-directory-edit {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    font-size: 14px;
}

.partner-directory-empty {
    flex: 1;
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.partner-directory-empty[hidden] {
    display: none;
}

.partner-directory-footer {
    min-height: 48px;
    margin-top: auto;
    padding: 0 15px;
    border-top: 1px solid var(--line-soft);
    color: var(--text-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 750;
}

.partner-directory-pagination {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text-muted);
}

.partner-directory-pagination strong {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.partner-editor {
    padding: 12px;
    overflow: visible;
}

.partner-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 10px;
}

.partner-editor-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.partner-editor-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
}

.partner-editor-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.partner-editor-section {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.partner-editor-section h4 {
    margin: 0 0 9px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
}

.partner-editor .form-grid {
    gap: 9px 14px;
}

.partner-editor .form-group {
    gap: 4px;
}

.partner-editor .form-group label {
    font-size: 10px;
}

.partner-editor .form-group input,
.partner-editor .form-group select,
.partner-editor .form-group textarea {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 11px;
}

.partner-editor .form-group textarea {
    min-height: 58px;
    resize: vertical;
}

.partner-editor .form-group input:disabled,
.partner-editor .form-group select:disabled,
.partner-editor .form-group textarea:disabled {
    background: var(--surface-soft);
    color: var(--text-soft);
}

.partner-logo-controls {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.partner-editor-logo {
    width: 34px;
    height: 34px;
}

.partner-logo-upload {
    min-height: 34px;
    padding: 0 9px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.partner-logo-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.partner-icon-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.partner-icon-button:hover {
    border-color: #f6b1b1;
    color: #c53131;
}

.partner-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 2px 0 0;
}

.partner-editor-actions .btn-primary,
.partner-editor-actions .btn-secondary,
.partner-editor-delete-form .btn-danger {
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
}

.partner-editor-delete-form {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.partner-hidden-form {
    display: none;
}

/* --- Katalog grup pojazdów --- */

#organization-groups > .section-head,
#organization-groups > .org-add,
#organization-groups > .organization-groups-list {
    display: none;
}

.group-directory-head,
.group-directory-row {
    grid-template-columns: minmax(150px, 1.35fr) minmax(160px, 1.55fr) minmax(74px, 0.68fr) 40px;
}

.group-directory-icon {
    background: var(--blue-soft);
    color: var(--blue);
}

.group-directory-icon i {
    font-size: 16px;
}

.group-vehicle-count {
    width: fit-content;
    min-width: 34px;
    padding: 5px 8px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 800;
}

.group-vehicle-count i {
    color: var(--blue);
    font-size: 12px;
}

.group-editor .partner-editor-section h4 i {
    margin-right: 5px;
    color: var(--blue);
}

.group-vehicle-editor-section {
    min-height: 224px;
}

.group-editor-hint {
    margin: -3px 0 10px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
}

.group-vehicle-check-grid {
    max-height: 230px;
    overflow: auto;
    padding-right: 3px;
}

.group-vehicle-option[hidden],
.group-vehicle-empty[hidden],
.group-editor [data-group-delete][hidden] {
    display: none;
}

.group-vehicle-empty {
    min-height: 112px;
    margin-bottom: 10px;
    padding: 15px;
    border: 1px dashed #cbd9ef;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-soft);
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.group-vehicle-empty-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.group-vehicle-empty strong {
    color: var(--text);
    font-size: 12px;
}

.group-vehicle-empty p {
    max-width: 300px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.group-information-section {
    padding-bottom: 10px;
}

.group-assignment-note {
    margin: 0;
    border-color: #d8e5fb;
    background: #f4f8ff;
    color: var(--text-soft);
    font-size: 11px;
}

.group-readonly-description {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.group-readonly-vehicles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-readonly-vehicles span {
    padding: 7px 9px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}

.group-readonly-vehicles .is-empty {
    color: var(--text-muted);
}

/* --- Panel boczny --- */

.organization-side-card {
    border-radius: var(--radius-lg);
}

.organization-side-title {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.organization-side-title i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.organization-side-title h3 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.2;
}

.organization-status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.organization-status-list div {
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.organization-admin-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.organization-admin-link {
    width: 100%;
    justify-content: flex-start;
}

/* --- Responsywność --- */

@media (max-width: 1180px) {
    .organization-layout {
        grid-template-columns: 1fr;
    }

    .organization-sidebar {
        position: static;
    }
}

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

    .organization-page .form-grid,
    .organization-branding-layout,
    .partner-editor .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1380px) {
    .partner-workspace-body {
        grid-template-columns: 1fr;
    }

    .partner-workspace-tools {
        grid-template-columns: minmax(220px, 1fr) auto;
    }

    .partner-filter-group {
        grid-column: 1 / -1;
    }

    .partner-directory {
        min-height: 360px;
    }
}

@media (max-width: 760px) {
    .organization-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-hero-main {
        align-items: flex-start;
    }

    .organization-stats-grid {
        grid-template-columns: 1fr;
    }

    .org-tab {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .organization-page .section-head,
    .organization-branding-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-actions,
    .organization-actions .btn-primary,
    .organization-hero .btn-secondary {
        width: 100%;
    }

    .organization-group-head {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-group-head .btn-secondary,
    .organization-group-delete .btn-danger {
        width: 100%;
    }

    .organization-vehicle-check-grid {
        grid-template-columns: 1fr;
    }

    .partner-workspace-head,
    .partner-workspace-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .partner-workspace-head {
        display: flex;
    }

    .partner-workspace-tools {
        display: flex;
    }

    .partner-filter-group {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .partner-filter {
        flex: 0 0 auto;
    }

    .partner-sort select {
        min-width: 0;
    }

    .partner-directory {
        overflow-x: auto;
    }

    .partner-directory-head,
    .partner-directory-row {
        min-width: 640px;
    }
}

@media (max-width: 640px) {
    .organization-hero,
    .organization-card,
    .organization-side-card {
        border-radius: var(--radius-md);
    }

    .organization-hero {
        padding: 18px;
    }

    .organization-card,
    .organization-side-card {
        padding: 18px;
    }

    .organization-avatar {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }

    .organization-hero h1 {
        font-size: 23px;
    }

    .organization-branding-layout {
        grid-template-columns: 1fr;
    }

    .organization-branding-preview {
        min-height: 110px;
    }

    .partner-workspace-head h2 {
        font-size: 19px;
    }

    .partner-editor .form-grid {
        grid-template-columns: 1fr;
    }

    .partner-editor-actions {
        flex-direction: column-reverse;
    }

    .partner-editor-actions .btn-primary,
    .partner-editor-actions .btn-secondary {
        width: 100%;
    }

    .organization-setting-toggle {
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
    }

    .organization-setting-toggle .organization-switch {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .form-group .organization-import-upload {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: flex-start;
    }

    .organization-import-upload-action {
        width: 100%;
        grid-column: 1 / -1;
    }
}



/* Source: css/pages/activity.css */
.activity-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.activity-hero,
.activity-panel {
    background: #ffffff;
    border: 1px solid #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.activity-hero {
    min-height: 124px;
    padding: 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.activity-kicker {
    width: fit-content;
    margin-bottom: 9px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2f66d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.activity-hero h1 {
    margin: 0;
    color: #22314d;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
}

.activity-hero p {
    max-width: 680px;
    margin: 8px 0 0;
    color: #75859c;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.activity-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.activity-stat-card {
    min-height: 104px;
    padding: 18px;
    border: 1px solid #e5ebf4;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(39, 63, 96, 0.06);
    display: flex;
    align-items: center;
    gap: 14px;
}

.activity-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #edf1f7;
    color: #5d6b7f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.activity-stat-card.is-blue .activity-stat-icon {
    background: #eef4ff;
    color: #2f66d8;
}

.activity-stat-card.is-green .activity-stat-icon {
    background: #dcf8eb;
    color: #169458;
}

.activity-stat-card.is-orange .activity-stat-icon {
    background: #fff2cc;
    color: #b98000;
}

.activity-stat-card span {
    display: block;
    margin-bottom: 5px;
    color: #718198;
    font-size: 13px;
    font-weight: 800;
}

.activity-stat-card strong {
    color: #22314d;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.activity-panel {
    border-radius: 24px;
    overflow: hidden;
}

.activity-filters {
    padding: 18px;
    border-bottom: 1px solid #edf2f7;
    background: #fbfcff;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 170px 190px 190px 150px 150px auto;
    gap: 14px;
    align-items: end;
}

.activity-auth-filters {
    grid-template-columns: minmax(320px, 1fr) 190px 190px 150px 150px auto;
}

.activity-context-note {
    margin: 14px 18px 0;
    padding: 12px 14px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: #f5f9ff;
    color: #53657f;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
}

.activity-context-note i {
    color: #2f66d8;
}

.activity-context-note strong {
    color: #22314d;
}

.activity-context-note a {
    margin-left: auto;
    color: #2f66d8;
    font-weight: 900;
    text-decoration: none;
}

.activity-context-note a:hover {
    text-decoration: underline;
}

.activity-search-box {
    height: 52px;
    box-shadow: none;
    border-color: #dfe7f2;
}

.activity-search-box i {
    color: #7a8aa1;
    font-size: 18px;
}

.activity-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.activity-filter-field label {
    color: #667790;
    font-size: 12px;
    font-weight: 900;
}

.activity-filter-field select,
.activity-filter-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dfe7f2;
    border-radius: 16px;
    background: #ffffff;
    color: #34445c;
    font-size: 14px;
    font-weight: 800;
}

.activity-filter-field select:focus,
.activity-filter-field input:focus {
    outline: none;
    border-color: #b9c9e7;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.08);
}

.activity-clear-filters {
    min-height: 52px;
    border-radius: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-row {
    padding: 18px;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
}

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

.activity-row-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2f66d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.activity-row-icon.module-fuel_cards {
    background: #fff2cc;
    color: #b98000;
}

.activity-row-icon.module-documents {
    background: #f0fdf4;
    color: #147b4c;
}

.activity-row-icon.module-maintenance {
    background: #ffe8e6;
    color: #c12d25;
}

.activity-row-icon.module-users,
.activity-row-icon.module-account {
    background: #edf1f7;
    color: #5d6b7f;
}

.activity-row-icon.auth-event-login-success {
    background: #dcf8eb;
    color: #169458;
}

.activity-row-icon.auth-event-login-failed {
    background: #ffe8e6;
    color: #c12d25;
}

.activity-row-icon.auth-event-logout {
    background: #eef4ff;
    color: #2f66d8;
}

.activity-row-main {
    min-width: 0;
}

.activity-row-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.activity-row-head h3 {
    margin: 7px 0 0;
    color: #22314d;
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: 0;
}

.activity-row-head time {
    color: #7d8da3;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.activity-module-pill {
    width: fit-content;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid #e3eaf3;
    color: #56677e;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 900;
}

.activity-row-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-row-meta span {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: #fbfcff;
    border: 1px solid #e5ebf4;
    color: #617089;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
}

.activity-details-wrap {
    margin-top: 12px;
}

.activity-details-wrap summary {
    width: fit-content;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #dfe7f2;
    border-radius: 999px;
    background: #ffffff;
    color: #52647d;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    list-style: none;
}

.activity-details-wrap summary::-webkit-details-marker {
    display: none;
}

.activity-details-wrap summary i {
    font-size: 12px;
    transition: transform 0.18s ease;
}

.activity-details-wrap[open] summary i {
    transform: rotate(90deg);
}

.activity-details {
    margin: 10px 0 0;
    padding: 12px 14px;
    border: 1px solid #e6edf6;
    border-radius: 14px;
    background: #fbfcff;
    color: #465872;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.activity-pagination {
    padding: 16px 18px;
    border-top: 1px solid #edf2f7;
    background: #fbfcff;
    color: #718198;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    font-weight: 800;
}

.activity-pagination-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-empty-card {
    margin: 20px;
}

@media (max-width: 1220px) {
    .activity-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-filters {
        grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(150px, 1fr));
    }

    .activity-clear-filters {
        width: fit-content;
    }
}

@media (max-width: 780px) {
    .activity-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .activity-stats-grid,
    .activity-filters {
        grid-template-columns: 1fr;
    }

    .activity-clear-filters,
    .activity-hero .btn-secondary {
        width: 100%;
    }

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

    .activity-row-head,
    .activity-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .activity-hero,
    .activity-panel {
        border-radius: 18px;
    }

    .activity-hero {
        padding: 18px;
    }

    .activity-hero h1 {
        font-size: 24px;
    }
}



/* Source: css/pages/help.css */
.topbar-account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 8px;
    min-width: 0;
}

.context-tip[hidden],
.cookie-notice[hidden],
.fleet-assistant-panel[hidden] {
    display: none !important;
}

.context-tip {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto 38px;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid #dce7f9;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(48, 72, 108, 0.06);
}

.context-tip-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f1ff;
    color: #4d8bff;
    font-size: 22px;
}

.context-tip-copy strong {
    display: block;
    margin-bottom: 3px;
    color: #304261;
    font-size: 14px;
}

.context-tip-copy p {
    margin: 0;
    color: #6f7f9a;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.55;
}

.context-tip-more {
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d7e2f5;
    border-radius: 10px;
    color: #1768e9;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.context-tip-more:hover {
    border-color: #b7d0fb;
    background: #f5f9ff;
}

.context-tip-dismiss {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8796ad;
    cursor: pointer;
}

.context-tip-dismiss:hover {
    background: #f3f6fb;
    color: #53647f;
}

.cookie-notice {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1800;
    width: min(440px, calc(100vw - 44px));
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid #d8e4f6;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 20px 52px rgba(36, 56, 90, 0.18);
}

.cookie-notice > i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf4ff;
    color: #2673ed;
}

.cookie-notice strong {
    display: block;
    color: #263958;
    font-size: 14px;
}

.cookie-notice p {
    margin: 4px 0 12px;
    color: #6b7b94;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

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

.cookie-notice-actions a {
    color: #1868e6;
    font-size: 12px;
    font-weight: 800;
}

.cookie-notice-actions button {
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 9px;
    background: #2670ed;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.help-page {
    display: grid;
    gap: 18px;
}

.help-hero,
.help-search-panel,
.help-results {
    border: 1px solid #dde6f4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(54, 75, 109, 0.06);
}

.help-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.help-hero-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e9f2ff;
    color: #2672ed;
    font-size: 24px;
}

.help-hero h1 {
    margin: 3px 0 5px;
    color: #213453;
    font-size: 28px;
}

.help-hero p,
.help-results-head p {
    margin: 0;
    color: #6f7f99;
    font-size: 13px;
    font-weight: 650;
}

.help-search-panel {
    padding: 16px;
}

.help-search-form {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 6px 7px 6px 15px;
    border: 1px solid #dce5f4;
    border-radius: 13px;
    background: #fbfdff;
}

.help-search-form > i {
    color: #71819a;
    font-size: 17px;
}

.help-search-form input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: #263858;
    font-size: 14px;
    outline: 0;
}

.help-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    color: #8795ab;
    font-size: 12px;
    font-weight: 750;
}

.help-suggestions a {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f6fc;
    color: #55708e;
}

.help-suggestions a:hover {
    background: #e9f2ff;
    color: #1769ea;
}

.help-results {
    padding: 18px;
}

.help-results-head h2 {
    margin: 0 0 3px;
    color: #263957;
    font-size: 18px;
}

.help-answer-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.help-answer-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 15px;
    border: 1px solid #e0e8f4;
    border-radius: 12px;
    background: #ffffff;
}

.help-answer-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #edf4ff;
    color: #2873ed;
    font-size: 16px;
}

.help-answer-card small {
    display: block;
    color: #4b84e8;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.help-answer-card h3 {
    margin: 3px 0 6px;
    color: #263957;
    font-size: 14px;
    line-height: 1.35;
}

.help-answer-card p,
.help-empty p {
    margin: 0;
    color: #6e7e97;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
}

.help-answer-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #1769ea;
    font-size: 11px;
    font-weight: 800;
}

.help-answer-action:hover {
    color: #0b4fb9;
}

.help-empty {
    padding: 46px 16px 34px;
    text-align: center;
}

.help-empty i {
    color: #2f75ea;
    font-size: 28px;
}

.help-empty h3 {
    margin: 10px 0 5px;
    color: #2c3f5f;
    font-size: 16px;
}

.fleet-assistant {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 1750;
}

.fleet-assistant-launcher {
    position: relative;
    width: 68px;
    height: 68px;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(204, 216, 235, 0.88);
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 18px 38px rgba(40, 65, 104, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fleet-assistant-launcher:hover,
.fleet-assistant.is-open .fleet-assistant-launcher {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 22px 48px rgba(40, 84, 156, 0.24);
}

.fleet-assistant-launcher img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.fleet-assistant-status {
    position: absolute;
    right: 3px;
    bottom: 6px;
    width: 14px;
    height: 14px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #20b96b;
}

.fleet-assistant-unread {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
    animation: fleet-assistant-unread-pop 0.28s ease both, fleet-assistant-unread-pulse 1.8s ease-in-out 0.4s infinite;
}

.fleet-assistant-unread[hidden] {
    display: none;
}

.fleet-assistant.has-unread .fleet-assistant-launcher {
    box-shadow: 0 18px 38px rgba(40, 65, 104, 0.18), 0 0 0 6px rgba(239, 68, 68, 0.08);
}

.fleet-assistant-panel {
    position: absolute;
    right: 0;
    bottom: 82px;
    width: min(390px, calc(100vw - 32px));
    max-height: min(690px, calc(100vh - 126px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    overflow: hidden;
    border: 1px solid #dce5f2;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(32, 52, 86, 0.2);
    transform-origin: bottom right;
    animation: fleet-assistant-pop 0.2s ease both;
}

.fleet-assistant-panel.is-closing {
    pointer-events: none;
    animation: fleet-assistant-pop-out 0.18s ease both;
}

@keyframes fleet-assistant-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fleet-assistant-pop-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
}

@keyframes fleet-assistant-unread-pop {
    from {
        opacity: 0;
        transform: scale(0.62);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fleet-assistant-unread-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.fleet-assistant-head {
    min-height: 68px;
    padding: 11px 13px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e4eaf3;
    background: #ffffff;
}

.fleet-assistant-head img,
.fleet-assistant-message.is-bot > img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(38, 60, 96, 0.12);
}

.fleet-assistant-head strong {
    display: block;
    color: #233550;
    font-size: 15px;
}

.fleet-assistant-head span {
    color: #71819a;
    font-size: 11px;
    font-weight: 700;
}

.fleet-assistant-head button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8290a5;
    cursor: pointer;
}

.fleet-assistant-head button:hover {
    background: #f2f6fc;
    color: #53647c;
}

.fleet-assistant-chat {
    min-height: 330px;
    padding: 12px;
    overflow-y: auto;
    background: #fbfcff;
    scrollbar-color: #cbd6e6 transparent;
}

.fleet-assistant-day {
    margin: 14px 0 10px;
    color: #8a98ad;
    font-size: 10px;
    font-weight: 850;
    text-align: center;
    text-transform: uppercase;
}

.fleet-assistant-message {
    display: flex;
    align-items: end;
    gap: 7px;
    margin-top: 10px;
}

.fleet-assistant-message.is-bot > img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.fleet-assistant-message > div {
    max-width: 82%;
    padding: 10px 11px;
    border: 1px solid #dce5f2;
    border-radius: 13px 13px 13px 4px;
    background: #ffffff;
}

.fleet-assistant-message.is-user {
    justify-content: flex-end;
}

.fleet-assistant-message.is-user > div {
    border-color: #2c70e6;
    border-radius: 13px 13px 4px 13px;
    background: #2c70e6;
}

.fleet-assistant-message p {
    margin: 0;
    color: #40516e;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.fleet-assistant-message.is-user p {
    color: #ffffff;
}

.fleet-assistant-message small {
    display: block;
    margin-bottom: 3px;
    color: #2670e8;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.fleet-assistant-message-action {
    display: inline-flex;
    margin-top: 7px;
    color: #1769ea;
    font-size: 11px;
    font-weight: 800;
}

.fleet-assistant-message-action:hover {
    color: #0b4fb9;
}

.fleet-assistant-message.is-typing p {
    min-width: 42px;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.fleet-assistant-message.is-typing p span {
    width: 6px;
    height: 6px;
    display: block;
    border-radius: 50%;
    background: #7f91ad;
    animation: fleet-assistant-dot 0.82s ease-in-out infinite;
}

.fleet-assistant-message.is-typing p span:nth-child(2) {
    animation-delay: 0.14s;
}

.fleet-assistant-message.is-typing p span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes fleet-assistant-dot {
    0%,
    60%,
    100% {
        opacity: 0.5;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

.fleet-assistant-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0 0 35px;
}

.fleet-assistant-topics button {
    min-height: 33px;
    padding: 0 10px;
    border: 1px solid #b9c9e3;
    border-radius: 10px;
    background: #ffffff;
    color: #314a73;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.fleet-assistant-topics button:hover {
    border-color: #3e7ce9;
    color: #1e65dd;
}

.fleet-assistant-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    padding: 11px 12px;
    border-top: 1px solid #e2e9f3;
    background: #ffffff;
}

.fleet-assistant-compose input {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d8e2f1;
    border-radius: 11px;
    color: #31425f;
    outline: 0;
}

.fleet-assistant-compose input:focus {
    border-color: #78a5ef;
    box-shadow: 0 0 0 3px rgba(61, 125, 232, 0.1);
}

.fleet-assistant-compose button {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: #286ee7;
    color: #ffffff;
    cursor: pointer;
    font-size: 17px;
}

.fleet-assistant-foot {
    padding: 0 12px 11px;
    background: #ffffff;
}

.fleet-assistant-foot a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #2167df;
    font-size: 11px;
    font-weight: 850;
}

@media (max-width: 900px) {
    .context-tip {
        grid-template-columns: 42px minmax(0, 1fr) 38px;
    }

    .context-tip-more {
        grid-column: 2;
        justify-self: start;
    }

    .context-tip-dismiss {
        grid-column: 3;
        grid-row: 1;
    }

    .help-answer-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar-account-actions {
        flex-wrap: wrap;
    }

    .context-tip {
        gap: 10px;
        padding: 12px;
    }

    .context-tip-copy p {
        font-size: 11px;
    }

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

    .help-search-form .btn-primary {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .fleet-assistant {
        right: 14px;
        bottom: 14px;
    }

    .fleet-assistant-launcher {
        width: 60px;
        height: 60px;
    }

    .fleet-assistant-panel {
        right: 0;
        bottom: 72px;
        width: min(370px, calc(100vw - 28px));
        max-height: calc(100vh - 104px);
    }
}

.fleet-assistant-steps {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #52627a;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
}

.fleet-assistant-steps li + li {
    margin-top: 5px;
}

.fleet-assistant-permission-warning {
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid #f0d7a6;
    border-radius: 10px;
    background: #fff8ea;
    color: #7c5b19;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.45;
}


.fleet-assistant-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.fleet-assistant-quick-action {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #d7e3f4;
    border-radius: 999px;
    background: #f8fbff;
    color: #245f9e;
    cursor: pointer;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.1;
    text-decoration: none;
}

.fleet-assistant-quick-action:hover {
    border-color: #bad0f4;
    background: #eef6ff;
    color: #175dcc;
}

.fleet-assistant-quick-action.is-primary {
    border-color: #2c70e6;
    background: #2c70e6;
    color: #ffffff;
}

.fleet-assistant-quick-action.is-primary:hover {
    border-color: #1f61d4;
    background: #1f61d4;
    color: #ffffff;
}

.fleet-assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.fleet-assistant-suggestions small {
    flex: 1 0 100%;
    color: #7a8aa3;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.fleet-assistant-suggestions button {
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid #d9e4f6;
    border-radius: 999px;
    background: #f8fbff;
    color: #235b9f;
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
    text-align: left;
}

.fleet-assistant-suggestions button:hover {
    border-color: #bdd2f5;
    background: #eef6ff;
}

.help-answer-steps {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #5f6f88;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.help-answer-steps li + li {
    margin-top: 4px;
}

.fleet-assistant-feedback {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #edf2f8;
}

.fleet-assistant-feedback-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.fleet-assistant-feedback-row > span {
    color: #7b8aa3;
    font-size: 10px;
    font-weight: 850;
}

.fleet-assistant-feedback-choice,
.fleet-assistant-feedback-reasons button,
.fleet-assistant-feedback-send {
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid #dbe6f5;
    border-radius: 999px;
    background: #ffffff;
    color: #315174;
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
    flex: 0 0 auto;
}

.fleet-assistant-feedback-choice:hover,
.fleet-assistant-feedback-reasons button:hover,
.fleet-assistant-feedback-send:hover {
    border-color: #bcd2f4;
    background: #f4f8ff;
    color: #1f61c9;
}

.fleet-assistant-feedback button:disabled {
    cursor: progress;
    opacity: 0.6;
}

.fleet-assistant-feedback.is-expanded {
    align-items: flex-start;
}

.fleet-assistant-feedback-details {
    width: 100%;
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.fleet-assistant-feedback-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fleet-assistant-feedback-reasons button.is-selected {
    border-color: #2c70e6;
    background: #edf5ff;
    color: #195bc7;
}

.fleet-assistant-feedback-details input {
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #dbe6f5;
    border-radius: 10px;
    color: #31425f;
    font-size: 11px;
    font-weight: 650;
    outline: 0;
}

.fleet-assistant-feedback-details input:focus {
    border-color: #78a5ef;
    box-shadow: 0 0 0 3px rgba(61, 125, 232, 0.1);
}

.fleet-assistant-feedback-send {
    justify-self: start;
    border-color: #2c70e6;
    background: #2c70e6;
    color: #ffffff;
}

.fleet-assistant-feedback-send:hover {
    background: #1f61d4;
    color: #ffffff;
}

.fleet-assistant-feedback-thanks {
    color: #28744f !important;
    text-transform: none !important;
}

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

.help-admin-hero,
.help-admin-panel,
.help-admin-card,
.help-admin-stat-card {
    border: 1px solid #dde6f4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(54, 75, 109, 0.06);
}

.help-admin-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.help-admin-hero-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf4ff;
    color: #2672ed;
    font-size: 24px;
}

.help-admin-hero h1 {
    margin: 3px 0 5px;
    color: #213453;
    font-size: 28px;
}

.help-admin-hero p,
.help-admin-card-head p {
    margin: 0;
    color: #6f7f99;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
}

.help-admin-panel {
    padding: 16px;
}

.help-admin-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 170px));
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.help-admin-search {
    min-height: 46px;
}

.help-admin-filter-select {
    display: grid;
    gap: 5px;
}

.help-admin-filter-select span {
    color: #728199;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.help-admin-filter-select select {
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid #d7e1f1;
    border-radius: 12px;
    background: #fbfdff;
    color: #263958;
    font-size: 13px;
    font-weight: 800;
}

.help-admin-results {
    display: grid;
    gap: 16px;
}

.help-admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.help-admin-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
}

.help-admin-stat-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #edf4ff;
    color: #2672ed;
    font-size: 20px;
}

.help-admin-stat-card small {
    display: block;
    color: #728199;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.help-admin-stat-card strong {
    display: block;
    margin-top: 2px;
    color: #213453;
    font-size: 24px;
    line-height: 1;
}

.help-admin-stat-card.is-danger .help-admin-stat-icon,
.help-admin-stat-card.is-negative .help-admin-stat-icon {
    background: #fff1f1;
    color: #d23d3d;
}

.help-admin-stat-card.is-warning .help-admin-stat-icon {
    background: #fff8e7;
    color: #b67700;
}

.help-admin-stat-card.is-success .help-admin-stat-icon {
    background: #eaf8ef;
    color: #27874d;
}

.help-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .85fr);
    gap: 16px;
}

.help-admin-card {
    min-width: 0;
    padding: 18px;
}

.help-admin-card-wide {
    min-height: 220px;
}

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

.help-admin-card-head h2 {
    margin: 0 0 4px;
    color: #213453;
    font-size: 18px;
}

.help-admin-stack,
.help-admin-feedback-list,
.help-admin-reasons {
    display: grid;
    gap: 10px;
}

.help-admin-issue-card {
    border: 1px solid #e1e9f5;
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}

.help-admin-issue-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
}

.help-admin-issue-card summary::-webkit-details-marker {
    display: none;
}

.help-admin-issue-main {
    min-width: 0;
}

.help-admin-issue-main strong {
    display: block;
    color: #263958;
    font-size: 13px;
}

.help-admin-issue-main small,
.help-admin-table small,
.help-admin-feedback-item small {
    display: block;
    margin-top: 3px;
    color: #7b8aa3;
    font-size: 11px;
    font-weight: 700;
}

.help-admin-issue-count {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #236be7;
    font-size: 12px;
    font-weight: 900;
}

.help-admin-issue-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}

.help-admin-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.help-admin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #236be7;
    font-size: 11px;
    font-weight: 850;
}

.help-admin-badge.is-danger {
    background: #fff1f1;
    color: #c93535;
}

.help-admin-badge.is-warning {
    background: #fff8e7;
    color: #a66c00;
}

.help-admin-copy-block {
    display: grid;
    gap: 6px;
}

.help-admin-copy-block span {
    color: #728199;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.help-admin-copy-block textarea {
    width: 100%;
    resize: vertical;
    padding: 12px;
    border: 1px solid #d8e3f2;
    border-radius: 12px;
    background: #ffffff;
    color: #263958;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
}

.help-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-admin-reason-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #e2eaf5;
    border-radius: 12px;
    background: #fbfdff;
    color: #354965;
    font-size: 13px;
    font-weight: 800;
}

.help-admin-reason-row strong {
    color: #d23d3d;
}

.help-admin-table-wrap {
    overflow-x: auto;
}

.help-admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.help-admin-table th,
.help-admin-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e6edf7;
    text-align: left;
    vertical-align: top;
    color: #324761;
    font-size: 12px;
}

.help-admin-table th {
    color: #7a8aa3;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.help-admin-table td strong {
    display: block;
    color: #223653;
    font-size: 12px;
}

.help-admin-feedback-item {
    display: grid;
    gap: 6px;
    padding: 13px;
    border: 1px solid #e2eaf5;
    border-left: 4px solid #49a66b;
    border-radius: 13px;
    background: #fbfdff;
}

.help-admin-feedback-item.is-negative {
    border-left-color: #d23d3d;
}

.help-admin-feedback-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #60718b;
    font-size: 11px;
    font-weight: 850;
}

.help-admin-feedback-item strong {
    color: #263958;
    font-size: 13px;
}

.help-admin-feedback-item p {
    margin: 0;
    color: #354965;
    font-size: 12px;
    line-height: 1.5;
}

.help-admin-feedback-item blockquote {
    margin: 2px 0 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f3f6fb;
    color: #66758c;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.45;
}

.help-admin-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 28px;
    border: 1px dashed #d8e3f2;
    border-radius: 14px;
    background: #fbfdff;
    color: #728199;
    text-align: center;
}

.help-admin-empty.is-small {
    padding: 22px;
}

.help-admin-empty i {
    color: #8aa0bd;
    font-size: 28px;
}

.help-admin-empty strong {
    color: #334761;
    font-size: 13px;
}

.help-admin-empty span {
    font-size: 12px;
    font-weight: 650;
}

@media (max-width: 1180px) {
    .help-admin-filters,
    .help-admin-stats-grid,
    .help-admin-grid {
        grid-template-columns: 1fr;
    }
}

.platform-admin-tabs {
    margin-bottom: 1rem;
    gap: .55rem;
    flex-wrap: wrap;
}

.platform-admin-tabs .btn-ghost.active {
    background: rgba(37, 99, 235, .1);
    border-color: rgba(37, 99, 235, .24);
    color: var(--text-primary, #172033);
}

.platform-admin-inline-form {
    display: flex;
    gap: .35rem;
    align-items: center;
    flex-wrap: wrap;
}

.platform-admin-inline-form .btn-ghost {
    white-space: nowrap;
}

/* --- Zgłoszenia problemów / feedback (help.report) --- */
.help-hero-report {
    margin-left: auto;
    white-space: nowrap;
}

.help-report-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 860px) {
    .help-report-grid {
        grid-template-columns: 1fr;
    }
    .help-hero-report {
        margin-left: 0;
    }
}

.help-card {
    border: 1px solid #dde6f4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(54, 75, 109, 0.06);
    padding: 20px 22px;
}

.help-card-head h2 {
    margin: 0 0 3px;
    color: #213453;
    font-size: 18px;
}

.help-card-head p {
    margin: 0 0 14px;
    color: #6f7f99;
    font-size: 12.5px;
    font-weight: 650;
}

.help-report-form {
    display: grid;
    gap: 14px;
}

.help-field {
    display: grid;
    gap: 6px;
}

.help-field > span {
    color: #40506f;
    font-size: 12.5px;
    font-weight: 750;
}

.help-field input,
.help-field select,
.help-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d3ddec;
    border-radius: 10px;
    background: #fbfdff;
    font: inherit;
    color: #213453;
}

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

.help-report-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.help-ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.help-ticket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e4ecf7;
    border-radius: 12px;
    background: #f8fbff;
}

.help-ticket-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.help-ticket-main strong {
    color: #213453;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.help-ticket-main small {
    color: #6f7f99;
    font-size: 12px;
}

.help-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 26px 12px;
    color: #8091ab;
}

.help-empty i {
    font-size: 26px;
}

.help-empty p {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
}



/* Source: css/pages/board.css */
/* ==========================================================================
   Tablica ogłoszeń + dzwonek powiadomień
   ========================================================================== */

/* Bell i menu konta obok siebie (topbar-account-actions ma teraz 2 elementy). */
.topbar-account-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   Tablica — wspólne komponenty trzech sekcji

   Ta warstwa jest jedynym źródłem wymiarów dla nawigacji, filtrów, kolumn,
   kart listy i paneli bocznych na: Komunikatach, Forum i Powiadomieniach.
   Osobne reguły stron odpowiadają już tylko za treść i kolorystykę.
   -------------------------------------------------------------------------- */
.board-page {
    --board-shell-width: 1400px;
    --board-sidebar-width: 390px;
    --board-column-gap: 24px;
    --board-control-height: 54px;
    --board-feed-card-height: 104px;
    --board-card-radius: 15px;
    --board-border: #dfe6f1;
    --board-muted: #617394;
    --board-blue: #2467e8;
    width: min(var(--board-shell-width), 100%);
    max-width: var(--board-shell-width);
    margin: 0 auto;
}

.page-wrap .board-page > .board-hub-hero,
.page-wrap .board-page > .forum-hero,
.page-wrap .board-page > .notifications-hero {
    height: 244px;
    min-height: 244px;
    margin: 0;
    border-radius: 18px;
}

.page-wrap .board-page .board-hero-icon,
.page-wrap .board-page .forum-hero-icon,
.page-wrap .board-page .notifications-hero-icon {
    width: 108px;
    height: 108px;
    border-radius: 26px;
    font-size: 48px;
}

.page-wrap .board-page .board-hero-main h1,
.page-wrap .board-page .forum-hero h1,
.page-wrap .board-page .notifications-hero h1 {
    font-size: 50px;
}

/* Wspólny wybór sekcji — zawsze podkreślenie, bez kapsuły aktywnej zakładki. */
.board-section-nav {
    width: 100%;
    height: 58px;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 32px;
    margin: 18px 0;
    overflow: visible;
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(39, 63, 96, 0.05);
}

.board-section-nav__item {
    position: relative;
    height: 58px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    color: #566887;
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.board-section-nav__item::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: var(--board-blue);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.board-section-nav__item:hover,
.board-section-nav__item.is-active {
    color: #1d5fdb;
}

.board-section-nav__item.is-active::after { opacity: 1; }
.board-section-nav__item i { font-size: 16px; }

.board-section-nav__count {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef5350;
    color: #ffffff;
    font-size: 10px;
    font-weight: 850;
}

/* Jedna siatka treści i jedna szerokość panelu bocznego. */
.board-page .board-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--board-sidebar-width);
    align-items: start;
    gap: var(--board-column-gap);
}

.board-main-column,
.board-sidebar { min-width: 0; }

.board-page .board-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Jeden pasek wyszukiwania i filtrów — wariant z Forum firm. */
.board-filter-bar {
    position: relative;
    z-index: 5;
    width: 100%;
    height: var(--board-control-height);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 142px;
    margin: 0 0 18px;
    overflow: visible;
    border: 1px solid var(--board-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(36, 65, 110, 0.04);
}

.board-filter-bar__search {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 18px;
    cursor: text;
}

.board-filter-bar__search > i {
    flex: 0 0 auto;
    color: #6a7d9f;
    font-size: 21px;
}

.board-filter-bar__search input[type="search"] {
    min-width: 0;
    height: calc(var(--board-control-height) - 2px);
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #27395b;
    font: inherit;
    font-size: 13.5px;
}

.board-filter-bar__search input::placeholder { color: #8996aa; }

.board-filter-bar__menu {
    position: relative;
    min-width: 0;
    border-left: 1px solid #e3eaf4;
}

.board-filter-bar__menu summary {
    height: calc(var(--board-control-height) - 2px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 17px;
    list-style: none;
    color: #526586;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.board-filter-bar__menu summary::marker,
.board-filter-bar__menu summary::-webkit-details-marker { display: none; content: ""; }
.board-filter-bar__menu summary:hover { background: #f6f9ff; color: var(--board-blue); }
.board-filter-bar__menu summary > i:first-child { color: #5874a8; font-size: 15px; }
.board-filter-bar__menu summary > i:last-child { margin-left: 1px; font-size: 11px; transition: transform 0.15s ease; }
.board-filter-bar__menu[open] summary > i:last-child { transform: rotate(180deg); }

.board-filter-bar__options {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 190px;
    display: grid;
    gap: 2px;
    padding: 7px;
    border: 1px solid var(--board-border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(34, 59, 101, 0.16);
}

.board-filter-bar__options a {
    padding: 9px 10px;
    border-radius: 8px;
    color: #536785;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}

.board-filter-bar__options a:hover { background: #f0f5ff; color: #255fdd; }

/* Wspólny rozmiar i rytm pigułek kategorii. */
.board-page .board-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 13px;
    padding: 0 4px;
    margin: 0 0 20px;
}

.board-page .board-filter-pills > a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 18px;
    border: 1px solid var(--board-border);
    border-radius: 999px;
    background: #ffffff;
    color: #536785;
    font-size: 12.5px;
    font-weight: 750;
    text-decoration: none;
}

.board-page .board-filter-pills > a:hover { border-color: rgba(42, 107, 231, 0.42); color: #255fdd; }
.board-page .board-filter-pills > a.is-active { border-color: #2872ec; background: linear-gradient(135deg, #3478f2, #1f5de7); color: #ffffff; box-shadow: 0 6px 12px rgba(34, 96, 227, 0.2); }

/* Jedna wysokość, siatka oraz ikona dla każdego wpisu na trzech listach. */
.board-page :is(.announcements-feed, .forum-thread-feed, .notifications-list) {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-wrap .board-page :is(.announcements-feed, .forum-thread-feed, .notifications-list) > :is(.announcement-row, .forum-thread-row, .notification-card-form) :is(.notification-card),
.page-wrap .board-page :is(.announcements-feed, .forum-thread-feed) > :is(.announcement-row, .forum-thread-row) {
    width: 100%;
    height: var(--board-feed-card-height);
    min-height: var(--board-feed-card-height);
    grid-template-columns: 72px minmax(0, 1fr) 132px;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-radius: var(--board-card-radius);
}

.page-wrap .board-page .announcements-feed > .announcement-row.is-pinned {
    height: var(--board-feed-card-height);
    min-height: var(--board-feed-card-height);
}

.page-wrap .board-page :is(.announcement-row, .forum-thread-row, .notification-card) :is(.announcement-row-icon, .forum-thread-symbol, .notification-card-icon) {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    font-size: 27px;
}

.page-wrap .board-page .announcement-row .announcement-read-more { display: none; }
.page-wrap .board-page .notification-card .notification-card-content { gap: 5px; }
.page-wrap .board-page .notification-card .notification-card-meta { min-width: 0; }

/* Cały kafelek otwiera szczegóły; dodatkowe akcje pozostają niezależne. */
.board-feed-card {
    position: relative;
    cursor: pointer;
}

.board-feed-card-link::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: inherit;
}

.board-feed-card :is(.announcement-read-more, .forum-thread-activity a) {
    position: relative;
    z-index: 2;
}

.board-feed-card:focus-within {
    outline: 2px solid rgba(36, 103, 232, 0.58);
    outline-offset: 2px;
}

.board-feed-card-link:focus-visible { outline: 0; }

/* Panele po prawej używają tego samego promienia, paddingu i nagłówka. */
.board-page .board-side-card {
    padding: 20px;
    border: 1px solid #e0e7f1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(33, 61, 105, 0.05);
}

.board-page .board-side-card h2 {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 17px;
    color: #273a60;
    font-size: 15px;
    font-weight: 800;
}

.board-page .announcements-stat-grid > div,
.board-page .notifications-stat-grid > div { min-height: 104px; }

.forum-active-organizations ul {
    display: grid;
    gap: 11px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.forum-active-organizations li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: #324362;
    font-size: 12px;
    font-weight: 750;
}

.forum-active-organizations li > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-active-organizations li strong {
    color: #71809a;
    font-size: 10.5px;
    font-weight: 650;
    white-space: nowrap;
}

.forum-organization-avatar {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1d2b4f;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 850;
}

.forum-organization-avatar.tone-2 { background: #57bd78; }
.forum-organization-avatar.tone-3 { background: #6941d4; }
.forum-organization-avatar.tone-4 { background: #ef8424; }
.forum-organization-avatar.tone-5 { background: #36466f; }

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

.forum-stat-grid > div {
    min-height: 104px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid #e4eaf3;
    border-radius: 13px;
    background: linear-gradient(180deg, #ffffff, #fafcff);
}

.forum-stat-grid span { color: #2168e7; font-size: 21px; line-height: 1; }
.forum-stat-grid strong { color: #23375b; font-size: 20px; line-height: 1.2; }
.forum-stat-grid small { color: #6f7f9b; font-size: 10.5px; }

/* --------------------------------------------------------------------------
   Wspólny szczegół komunikatu i wątku
   -------------------------------------------------------------------------- */
.page-wrap:has(.board-detail-page) {
    width: 100%;
    max-width: none;
    padding: 28px 20px 36px;
}

.page-wrap .board-detail-page {
    --board-detail-sidebar: 390px;
    --board-detail-gap: 28px;
    width: min(1400px, 100%);
    max-width: 1400px;
}

.board-detail-back {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px 2px;
    color: #1262e8;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.board-detail-back:hover { color: #0e4fc3; }

.board-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--board-detail-sidebar);
    align-items: start;
    gap: var(--board-detail-gap);
}

.board-detail-main,
.board-detail-sidebar { min-width: 0; }

.board-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.page-wrap .board-detail-page .board-detail-article {
    min-height: 395px;
    display: flex;
    flex-direction: column;
    padding: 30px 32px 27px;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 17px rgba(35, 62, 105, 0.045);
}

.page-wrap .board-detail-page .board-detail-announcement { min-height: 515px; }

.board-detail-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.board-detail-badges {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.board-detail-topline > time {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #70809a;
    font-size: 13px;
    white-space: nowrap;
}

.board-detail-topline > time i { color: #587198; font-size: 18px; }
.board-detail-page .board-topic { padding: 7px 13px; font-size: 13px; }
.board-detail-page .board-pin { padding: 7px 13px; border-radius: 999px; background: #edf3ff; font-size: 13px; }
.board-detail-page .board-card-views { font-size: 13px; }
.board-detail-page .board-card-views i { font-size: 18px; }

.page-wrap .board-detail-page .board-article-title {
    margin: 27px 0 20px;
    color: #152440;
    font-size: 40px;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.page-wrap .board-detail-page .board-thread-author {
    margin: 0 0 32px;
}

.board-detail-page .board-author { color: #283b5c; font-size: 13.5px; }
.board-detail-page .board-author i { font-size: 18px; }

.page-wrap .board-detail-page .board-article-body {
    color: #263a5d;
    font-size: 15.5px;
    line-height: 1.7;
}

.page-wrap .board-detail-page .board-detail-announcement .board-article-body { flex: 1 1 auto; }

.page-wrap .board-detail-page .board-article-foot {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid #dfe6ef;
}

.page-wrap .board-detail-page .board-article-brand { gap: 11px; font-size: 14px; }
.page-wrap .board-detail-page .board-article-brand i { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #edf4ff; font-size: 18px; }

.page-wrap .board-detail-page .board-thread-toolbar {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid #dfe6ef;
}

.board-detail-page .board-thread-toolbar .btn-ghost,
.board-detail-page .board-thread-toolbar .btn-ghost-danger {
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13.5px;
}

.board-detail-page .board-thread-toolbar .btn-ghost-danger { min-width: 54px; padding-right: 14px; padding-left: 14px; }

/* Boczne panele współdzielone przez oba typy szczegółu. */
.board-detail-side-card {
    padding: 28px 27px;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 17px rgba(35, 62, 105, 0.045);
}

.board-detail-side-card > h2,
.board-detail-side-head h2 {
    margin: 0;
    color: #152440;
    font-size: 19px;
    line-height: 1.3;
}

.board-detail-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.board-detail-side-head > span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #edf4ff;
    color: #1767e8;
    font-size: 18px;
}

.board-detail-facts {
    display: grid;
    gap: 22px;
    padding: 0;
    margin: 0;
}

.board-detail-facts > div {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px 12px;
}

.board-detail-facts dt {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: #536784;
    font-size: 13px;
}

.board-detail-facts dt i {
    color: #597197;
    font-size: 21px;
    text-align: center;
}

.board-detail-facts dd {
    grid-column: 2;
    margin: -4px 0 0;
    color: #172b4d;
    font-size: 13px;
    line-height: 1.55;
}

.board-detail-fact-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 999px;
    background: #edf3ff;
    color: #1767e8;
    font-weight: 750;
}

.board-detail-facts.is-compact { gap: 0; }
.board-detail-facts.is-compact > div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 65px;
    border-bottom: 1px solid #e3e9f1;
}
.board-detail-facts.is-compact > div:last-child { border-bottom: 0; }
.board-detail-facts.is-compact dt { grid-column: 1; display: grid; grid-template-columns: 32px minmax(0, 1fr); }
.board-detail-facts.is-compact dd { grid-column: 2; margin: 0; text-align: right; }
.board-detail-facts.is-compact dd strong { color: #1262e8; }

/* Komunikat ma bardziej zwarty panel informacji niż wątek — zgodnie z makietą. */
.board-detail-page:not(.board-thread-detail-page) .board-detail-facts.is-compact > div { min-height: 59px; }

/* Powiązane komunikaty i podobne tematy korzystają z jednej listy. */
.board-related-card > h2 { margin-bottom: 20px; }
.board-related-list { display: grid; }

.board-related-item {
    min-height: 104px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 13px;
    padding: 13px 0;
    border-bottom: 1px solid #dfe6ef;
    color: inherit;
    text-decoration: none;
}

.board-related-icon {
    grid-row: 1 / -1;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf4ff;
    color: #1267eb;
    font-size: 22px;
}

.board-related-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.board-related-copy strong {
    overflow: hidden;
    color: #1c2f50;
    font-size: 13px;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.board-related-copy small { overflow: hidden; color: #657795; font-size: 11.5px; line-height: 1.4; text-overflow: ellipsis; }
.board-related-item time { grid-column: 3; grid-row: 2; color: #71809a; font-size: 10.5px; white-space: nowrap; }
.board-related-arrow { grid-column: 3; grid-row: 1 / -1; color: #486587; font-size: 17px; }
.board-related-item:has(.board-related-arrow) time { grid-column: 2; }
.board-related-item:hover .board-related-copy strong { color: #1262e8; }

.board-detail-page:not(.board-thread-detail-page) .board-related-item { min-height: 115px; }

.board-related-empty { margin: 6px 0 20px; color: #71809a; font-size: 12.5px; line-height: 1.55; }
.board-related-all { display: flex; align-items: center; gap: 10px; padding-top: 20px; color: #1262e8; font-size: 12.5px; font-weight: 800; text-decoration: none; }

/* Odpowiedzi i formularz zachowują wspólny rytm kart szczegółu. */
.page-wrap .board-detail-page .board-comments { margin: 32px 8px 0; }
.page-wrap .board-detail-page .board-comments-head { margin: 0 0 18px; color: #172945; font-size: 24px; }
.page-wrap .board-detail-page .board-comments-empty { margin: 0 0 29px; padding: 0; color: #6d7e99; font-size: 13px; }

.board-detail-empty-replies {
    min-height: 225px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 58px;
    padding: 28px;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 17px rgba(35, 62, 105, 0.035);
}

.board-empty-chat-art {
    position: relative;
    width: 150px;
    height: 130px;
    display: block;
    border-radius: 50%;
    background: radial-gradient(circle, #edf3ff 0 57%, transparent 58%);
}

.board-empty-chat-art span {
    position: absolute;
    width: 80px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(145deg, #347cf3, #1f5de7);
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 12px 24px rgba(33, 94, 225, 0.22);
}

.board-empty-chat-art span:first-child { top: 22px; left: 12px; z-index: 2; }
.board-empty-chat-art span:last-child { right: 6px; bottom: 12px; border: 1px solid #d7e4fb; background: #ffffff; color: #78a3ef; box-shadow: none; }
.board-detail-empty-replies h3 { margin: 0 0 12px; color: #182b4b; font-size: 17px; }
.board-detail-empty-replies p { margin: 0; color: #6b7d99; font-size: 13px; line-height: 1.6; }

.page-wrap .board-detail-page .board-comment { padding: 20px 22px; border-radius: 15px; }
.page-wrap .board-detail-page .board-comment-form {
    margin-top: 15px;
    padding: 22px 23px;
    gap: 18px;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 17px rgba(35, 62, 105, 0.035);
}

.page-wrap .board-detail-page .board-comment-form textarea {
    min-height: 96px;
    padding: 15px 16px;
    border-color: #d5dfec;
    border-radius: 12px;
    font-size: 13px;
}

.board-detail-page .board-comment-form .btn-primary { min-height: 48px; padding: 10px 22px; border-radius: 12px; }

@media (max-width: 1050px) {
    .board-detail-page { --board-detail-sidebar: 330px; --board-detail-gap: 18px; }
}

@media (max-width: 820px) {
    .board-detail-layout { grid-template-columns: 1fr; }
    .board-detail-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 640px) {
    .page-wrap:has(.board-detail-page) { padding: 16px 14px 28px; }
    .board-detail-back { margin-bottom: 15px; }
    .page-wrap .board-detail-page .board-detail-article { min-height: 0; padding: 20px 18px; }
    .page-wrap .board-detail-page .board-article-title { margin: 20px 0 14px; font-size: 29px; }
    .board-detail-topline { align-items: flex-start; flex-direction: column; gap: 12px; }
    .page-wrap .board-detail-page .board-thread-author { margin-bottom: 22px; }
    .page-wrap .board-detail-page .board-thread-toolbar { margin-top: 24px; }
    .board-detail-sidebar { grid-template-columns: 1fr; }
    .board-detail-side-card { padding: 21px 18px; }
    .page-wrap .board-detail-page .board-comments { margin-right: 0; margin-left: 0; }
    .board-detail-empty-replies { min-height: 0; flex-direction: column; gap: 18px; text-align: center; }
    .board-empty-chat-art { transform: scale(0.82); margin: -10px 0; }
    .board-related-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
}

@media (max-width: 1180px) {
    .board-page { --board-sidebar-width: 330px; --board-column-gap: 18px; }
}

@media (max-width: 900px) {
    .board-page .board-workspace { grid-template-columns: 1fr; }
    .board-page .board-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .board-page .board-sidebar > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .board-page > .board-hub-hero,
    .board-page > .forum-hero,
    .board-page > .notifications-hero { height: auto; min-height: 0; }

    .board-section-nav {
        height: 54px;
        min-height: 54px;
        gap: 12px;
        padding: 0 13px;
        margin: 13px 0 16px;
        overflow-x: auto;
        border-radius: 15px;
    }

    .board-section-nav__item { height: 54px; padding: 0 6px; font-size: 12px; }
    .board-section-nav__item i { font-size: 14px; }

    .board-filter-bar {
        --board-control-height: 48px;
        grid-template-columns: minmax(0, 1fr) 118px;
        margin-bottom: 13px;
    }

    .board-filter-bar__search { gap: 9px; padding: 0 13px; }
    .board-filter-bar__search > i { font-size: 17px; }
    .board-filter-bar__search input[type="search"] { font-size: 12px; }
    .board-filter-bar__menu summary { gap: 7px; padding: 0 10px; font-size: 11px; }
    .board-filter-bar__options { width: 176px; }

    .board-page .board-filter-pills { flex-wrap: nowrap; padding: 1px 1px 7px; margin-bottom: 12px; overflow-x: auto; }
    .board-page .board-filter-pills > a { flex: 0 0 auto; min-height: 34px; padding: 6px 14px; font-size: 11.5px; }

    .page-wrap .board-page :is(.announcements-feed, .forum-thread-feed, .notifications-list) > :is(.announcement-row, .forum-thread-row, .notification-card-form) :is(.notification-card),
    .page-wrap .board-page :is(.announcements-feed, .forum-thread-feed) > :is(.announcement-row, .forum-thread-row),
    .page-wrap .board-page .announcements-feed > .announcement-row.is-pinned {
        height: auto;
        min-height: 0;
        grid-template-columns: 47px minmax(0, 1fr);
        gap: 11px;
        padding: 12px;
        border-radius: 13px;
    }

    .page-wrap .board-page :is(.announcement-row, .forum-thread-row, .notification-card) :is(.announcement-row-icon, .forum-thread-symbol, .notification-card-icon) {
        width: 43px;
        height: 43px;
        border-radius: 11px;
        font-size: 20px;
    }

    .board-page .board-sidebar { grid-template-columns: 1fr; gap: 12px; }
    .board-page .board-sidebar > :last-child { grid-column: auto; }
}

/* --------------------------------------------------------------------------
   Dzwonek w navbarze
   -------------------------------------------------------------------------- */
.notif-menu {
    position: relative;
    z-index: 1300;
}

.notif-menu-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(134, 152, 184, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #20304d;
    font-size: 19px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(42, 63, 95, 0.08);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.notif-menu-toggle:hover,
.notif-menu.open .notif-menu-toggle {
    transform: translateY(-1px);
    border-color: rgba(40, 116, 234, 0.38);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(42, 80, 140, 0.14);
}

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    border: 2px solid #ffffff;
}

.notif-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: min(360px, calc(100vw - 32px));
    border: 1px solid rgba(134, 152, 184, 0.25);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(31, 45, 72, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    transform-origin: top right;
    transition:
        opacity 0.16s ease,
        transform 0.22s cubic-bezier(0.2, 0.85, 0.2, 1.1),
        visibility 0s linear 0.18s;
    overflow: hidden;
    z-index: 1400;
}

.notif-menu.open > .notif-menu-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.notif-menu-dropdown.is-closing {
    visibility: visible;
    pointer-events: none;
}

.notif-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
}

.notif-menu-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.notif-menu-readall-form {
    margin: 0;
}

.notif-menu-readall {
    border: none;
    background: none;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.notif-menu-readall:hover {
    text-decoration: underline;
}

.notif-menu-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item-form {
    margin: 0;
}

.notif-item {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 1px solid var(--line-soft);
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: var(--surface-soft);
}

.notif-item.is-unread {
    background: rgba(40, 116, 234, 0.05);
}

.notif-item-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 15px;
}

.notif-item-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notif-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.notif-item-text {
    font-size: 12.5px;
    color: var(--text-soft);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-menu-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 16px;
    color: var(--text-muted);
}

.notif-menu-empty i {
    font-size: 26px;
}

.notif-menu-empty span {
    font-size: 13px;
    font-weight: 600;
}

.notif-menu-foot {
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--line-soft);
    background: var(--surface-soft);
}

.notif-menu-foot-link {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    color: var(--blue);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.notif-menu-foot-link:hover {
    background: var(--blue-soft);
}

.notif-menu-foot-link + .notif-menu-foot-link {
    border-left: 1px solid var(--line-soft);
}

/* --------------------------------------------------------------------------
   Strona Tablicy (feed komunikatów)
   -------------------------------------------------------------------------- */
.board-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 8px 0 40px;
}

.board-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 26px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.board-hero-icon {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 12px 26px rgba(40, 116, 234, 0.28);
}

.board-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}

.board-hero-main h1 {
    margin: 2px 0 4px;
    font-size: 24px;
    color: var(--text);
}

.board-hero-main p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.board-hero-link,
.board-hero-form {
    flex: 0 0 auto;
    margin: 0;
}

.board-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.board-card {
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(40, 116, 234, 0.28);
}

.board-card.is-pinned {
    border-color: rgba(40, 116, 234, 0.4);
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 40%);
}

.board-card-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.board-topic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--blue-soft);
    color: var(--blue-dark);
}

.board-topic-pricing {
    background: var(--yellow-soft);
    color: #a9720a;
}

.board-topic-feature {
    background: var(--green-soft);
    color: #147c4c;
}

.board-topic-maintenance {
    background: #ffe9e2;
    color: #b5502f;
}

.board-pin {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--blue);
}

.board-card-date {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--text-muted);
}

.board-card-views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.board-card-views i {
    color: #6680a7;
    font-size: 14px;
}

.board-card-title {
    margin: 0 0 8px;
    font-size: 18.5px;
    line-height: 1.3;
}

.board-card-title a {
    color: var(--text);
    text-decoration: none;
}

.board-card-title a:hover {
    color: var(--blue);
}

.board-card-excerpt {
    margin: 0 0 12px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.board-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    transition: gap 0.15s ease;
}

.board-card-more:hover {
    gap: 9px;
}

/* --------------------------------------------------------------------------
   Szczegół ogłoszenia
   -------------------------------------------------------------------------- */
.board-page-detail {
    max-width: 760px;
}

.board-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
    color: var(--text-soft);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}

.board-back:hover {
    color: var(--blue);
}

.board-article {
    padding: 30px 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.board-article-title {
    margin: 12px 0 18px;
    font-size: 27px;
    line-height: 1.25;
    color: var(--text);
}

.board-article-body {
    white-space: pre-wrap;
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.75;
}

.board-article-foot {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.board-article-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
}

/* --------------------------------------------------------------------------
   Strona powiadomień
   -------------------------------------------------------------------------- */
.notif-page-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-row-form {
    margin: 0;
}

.notif-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.notif-row:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: rgba(40, 116, 234, 0.28);
}

.notif-row.is-unread {
    border-color: rgba(40, 116, 234, 0.35);
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 60%);
}

.notif-row-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 18px;
}

.notif-row.is-unread .notif-row-icon {
    background: var(--blue);
    color: #ffffff;
}

.notif-row-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notif-row-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.notif-row-text {
    font-size: 13.5px;
    color: var(--text-soft);
    line-height: 1.5;
}

.notif-row-time {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Panel systemowy: opcje publikacji komunikatu
   -------------------------------------------------------------------------- */
.pa-board-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 4px;
}

.pa-board-options .pa-check {
    min-height: 56px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    background: #fbfcff;
    color: #4d617f;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.pa-board-options .pa-check:hover {
    border-color: #b9cff2;
    background: #f6f9ff;
    color: #245fbf;
}

.pa-board-options .pa-check:has(input:checked) {
    border-color: #9fbee9;
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgba(47, 102, 216, 0.08);
    color: #1f5bbb;
}

.pa-board-options .pa-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue);
    cursor: pointer;
}

.pa-board-options .pa-check span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.35;
}

.pa-board-options .pa-check span i {
    color: #3774d8;
    font-size: 16px;
}

.pa-board-options .pa-check:focus-within {
    border-color: #7ca8e8;
    box-shadow: 0 0 0 3px rgba(47, 102, 216, 0.14);
}

/* --------------------------------------------------------------------------
   Forum firm — sub-nawigacja
   -------------------------------------------------------------------------- */
.board-subnav {
    display: flex;
    gap: 6px;
    padding: 6px;
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.board-subnav-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.board-subnav-tab:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.board-subnav-tab.is-active {
    background: var(--blue);
    color: #ffffff;
}

.board-subnav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.board-subnav-tab.is-active .board-subnav-count {
    background: rgba(255, 255, 255, 0.28);
}

/* --------------------------------------------------------------------------
   Forum — filtr i tematy
   -------------------------------------------------------------------------- */
.board-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.board-filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.board-filter-search i {
    color: var(--text-muted);
}

.board-filter-search input {
    flex: 1 1 auto;
    min-height: 44px;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.board-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.board-topic-pill {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.board-topic-pill:hover {
    border-color: rgba(40, 116, 234, 0.4);
    color: var(--blue);
}

.board-topic-pill.is-active {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Forum — karta wątku
   -------------------------------------------------------------------------- */
.board-topic-general { background: var(--blue-soft); color: var(--blue-dark); }
.board-topic-costs { background: var(--green-soft); color: #147c4c; }
.board-topic-service { background: #ffe9e2; color: #b5502f; }
.board-topic-leasing { background: var(--blue-soft); color: var(--blue-dark); }
.board-topic-legal { background: var(--yellow-soft); color: #a9720a; }
.board-topic-market { background: #efe7ff; color: #6d43c7; }

.board-thread-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.board-author {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.board-author.is-anon {
    color: var(--text-soft);
}

.board-author i {
    color: var(--text-muted);
}

.board-author-reveal {
    font-size: 11px;
    font-weight: 700;
    color: #a9720a;
    background: var(--yellow-soft);
    padding: 2px 7px;
    border-radius: 999px;
}

.board-thread-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
}

.board-mod-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--red);
    background: var(--red-soft);
    padding: 3px 9px;
    border-radius: 999px;
}

.board-card.is-hidden,
.board-comment.is-hidden {
    opacity: 0.62;
    border-style: dashed;
}

/* --------------------------------------------------------------------------
   Wątek — widok szczegółowy
   -------------------------------------------------------------------------- */
.board-thread-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -6px 0 18px;
}

.board-thread-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.board-follow-form {
    margin: 0;
}

.btn-ghost.is-active {
    border-color: rgba(40, 116, 234, 0.4);
    color: var(--blue);
    background: var(--blue-soft);
}

.board-mod-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.board-mod-actions form {
    margin: 0;
}

.board-mod-actions-comment {
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Komentarze
   -------------------------------------------------------------------------- */
.board-comments {
    margin-top: 22px;
}

.board-comments-head {
    font-size: 17px;
    color: var(--text);
    margin: 0 0 14px;
}

.board-comments-head span {
    color: var(--text-muted);
    font-weight: 600;
}

.board-comment {
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.board-comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.board-comment-date {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.board-comment-body {
    white-space: pre-wrap;
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.65;
}

.board-comments-empty {
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px 2px 14px;
}

.board-comments-closed {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    padding: 12px 14px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: var(--surface-muted);
}

/* --------------------------------------------------------------------------
   Formularze (nowy wątek, komentarz)
   -------------------------------------------------------------------------- */
.board-form,
.board-comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.board-comment-form {
    margin-top: 8px;
    padding: 16px 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.board-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.board-field > span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
}

.board-field input[type="text"],
.board-field select,
.board-field textarea,
.board-comment-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.board-field input[type="text"]:focus,
.board-field select:focus,
.board-field textarea:focus,
.board-comment-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(40, 116, 234, 0.14);
}

.board-field textarea,
.board-comment-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.board-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-soft);
    font-weight: 600;
    cursor: pointer;
}

.board-check input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--blue);
    cursor: pointer;
}

.board-check span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.board-check-inline {
    align-items: center;
}

.board-form-actions,
.board-comment-form-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.board-comment-form-row {
    justify-content: space-between;
}

/* --------------------------------------------------------------------------
   Responsywność
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .board-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .board-hero-link,
    .board-hero-form {
        align-self: stretch;
    }

    .board-article {
        padding: 22px 20px;
    }

    .board-article-title {
        font-size: 23px;
    }

    .board-subnav {
        overflow-x: auto;
    }

    .board-subnav-tab {
        white-space: nowrap;
    }

    .board-thread-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .board-mod-actions {
        justify-content: flex-end;
    }
}

/* --------------------------------------------------------------------------
   Forum firm — widok społeczności
   -------------------------------------------------------------------------- */
.forum-page {
    max-width: 1380px;
    padding-top: 2px;
}

.forum-hero {
    position: relative;
    isolation: isolate;
    min-height: 244px;
    display: grid;
    grid-template-columns: 112px minmax(390px, 1fr) 320px 178px;
    align-items: center;
    gap: 22px;
    padding: 30px 48px;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid #dce6f5;
    border-radius: 22px;
    background:
        radial-gradient(circle at 77% 75%, rgba(63, 131, 255, 0.16), transparent 18%),
        radial-gradient(circle at 48% -25%, rgba(96, 152, 255, 0.12), transparent 38%),
        linear-gradient(113deg, #ffffff 0%, #f7faff 58%, #edf4ff 100%);
    box-shadow: 0 9px 28px rgba(36, 70, 121, 0.08);
}

.forum-hero::before,
.forum-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.forum-hero::before {
    width: 520px;
    height: 520px;
    right: 165px;
    top: -346px;
    border: 1px solid rgba(88, 144, 243, 0.1);
    border-radius: 50%;
    box-shadow:
        0 0 0 42px rgba(96, 151, 247, 0.035),
        0 0 0 92px rgba(96, 151, 247, 0.025);
    transform: rotate(-26deg);
}

.forum-hero::after {
    width: 310px;
    height: 280px;
    right: 182px;
    bottom: -235px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(38, 111, 238, 0.1) 1.5px, transparent 2px) 0 0 / 14px 14px;
    opacity: 0.7;
}

.forum-hero-orbit {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(93, 151, 246, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.forum-hero-orbit-one {
    width: 490px;
    height: 180px;
    right: 113px;
    top: 38px;
    transform: rotate(-15deg);
}

.forum-hero-orbit-two {
    width: 400px;
    height: 145px;
    right: 42px;
    top: 61px;
    transform: rotate(17deg);
}

.forum-hero-icon {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 23px;
    background: linear-gradient(145deg, #3478f2 0%, #1f5de7 100%);
    color: #ffffff;
    font-size: 42px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 18px 30px rgba(33, 94, 225, 0.28);
}

.forum-hero-main {
    align-self: center;
    min-width: 0;
}

.forum-kicker {
    width: fit-content;
    padding: 5px 13px;
    margin-bottom: 7px;
    border: 1px solid #dbe8ff;
    border-radius: 999px;
    background: #eff5ff;
    color: #174ec5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.forum-hero h1 {
    margin: 0;
    color: #162645;
    font-size: clamp(38px, 4.1vw, 56px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.forum-hero-main > p {
    margin: 8px 0 17px;
    color: #617394;
    font-size: 14px;
    line-height: 1.55;
}

.forum-hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 23px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: #526789;
    font-size: 12.5px;
    font-weight: 650;
}

.forum-hero-benefits li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.forum-hero-benefits i {
    color: #2673ed;
    font-size: 18px;
}

.forum-new-thread {
    position: relative;
    z-index: 1;
    min-width: 178px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 14px;
    background: linear-gradient(135deg, #3476f0 0%, #1e5be3 100%);
    box-shadow: 0 14px 24px rgba(30, 91, 227, 0.22);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.forum-new-thread:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(30, 91, 227, 0.3);
    color: #ffffff;
}

.forum-new-thread i {
    font-size: 20px;
    font-weight: 400;
}

.forum-hero-art {
    position: relative;
    z-index: 1;
    height: 160px;
    min-width: 0;
}

.forum-art-card {
    position: absolute;
    display: flex;
    border: 1px solid rgba(159, 190, 241, 0.65);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(214, 230, 255, 0.84));
    box-shadow: 0 18px 34px rgba(38, 86, 176, 0.16);
}

.forum-art-card-back {
    width: 165px;
    height: 114px;
    right: 4px;
    bottom: 3px;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 17px 22px;
    border-radius: 17px;
    color: #3780f4;
    font-size: 37px;
    transform: rotate(3deg);
}

.forum-art-card-top {
    width: 114px;
    height: 76px;
    top: 2px;
    right: 31px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding-left: 25px;
    border-radius: 15px;
    transform: rotate(7deg);
}

.forum-art-card-top span {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3e92f6, #2470ed);
    box-shadow: 0 2px 4px rgba(34, 105, 229, 0.14);
}

.forum-art-card-top span:nth-child(1) { width: 61px; }
.forum-art-card-top span:nth-child(2) { width: 48px; }
.forum-art-card-top span:nth-child(3) { width: 31px; }

.forum-art-card-main {
    width: 193px;
    height: 122px;
    left: 0;
    bottom: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 19px;
    background: linear-gradient(145deg, #fafdff 0%, #d1e3ff 100%);
    transform: rotate(-1deg);
}

.forum-art-people {
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -23px;
    border: 1px solid #1d63dd;
    border-radius: 20px;
    background: linear-gradient(145deg, #3c84f4, #1e59dd);
    color: #ffffff;
    font-size: 39px;
    box-shadow: 0 11px 20px rgba(26, 85, 214, 0.31);
}

.forum-art-lines {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    margin-left: 13px;
}

.forum-art-lines span {
    height: 7px;
    border-radius: 999px;
    background: #3b86f3;
    box-shadow: 0 2px 5px rgba(35, 106, 226, 0.18);
}

.forum-art-lines span:nth-child(1) { width: 62px; }
.forum-art-lines span:nth-child(2) { width: 39px; }

.forum-art-dots {
    position: absolute;
    right: 15px;
    bottom: 12px;
    display: flex;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 99px;
    background: rgba(91, 146, 239, 0.22);
}

.forum-art-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3580ef;
}

.forum-page .board-subnav {
    gap: 20px;
    padding: 0 26px;
    margin-bottom: 18px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(39, 63, 96, 0.05);
}

.forum-page .board-subnav-tab {
    position: relative;
    min-height: 48px;
    padding: 13px 10px 12px;
    border-radius: 0;
    color: #66738e;
}

.forum-page .board-subnav-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: #2568ec;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.forum-page .board-subnav-tab:hover,
.forum-page .board-subnav-tab.is-active {
    background: transparent;
    color: #1d55cb;
}

.forum-page .board-subnav-tab.is-active::after {
    opacity: 1;
}

.forum-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 375px;
    align-items: start;
    gap: 16px;
}

.forum-main-column {
    min-width: 0;
}

.forum-filter {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 21px;
}

.forum-filter-search {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding-left: 19px;
    overflow: hidden;
    border: 1px solid #dce5f1;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(40, 67, 108, 0.035);
}

.forum-filter-search > i {
    margin-right: 13px;
    color: #71809a;
    font-size: 21px;
}

.forum-filter-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    border: 0;
    outline: 0;
    color: #273755;
    font-family: inherit;
    font-size: 13.5px;
}

.forum-filter-search input::placeholder {
    color: #8b95a8;
}

.forum-filter-submit {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 21px;
    border: 0;
    border-left: 1px solid #e3eaf4;
    background: #ffffff;
    color: #526586;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.forum-filter-submit:hover {
    background: #f6f9ff;
    color: #2465e8;
}

.forum-filter-submit .bi-funnel { font-size: 15px; }
.forum-filter-submit .bi-chevron-down { font-size: 11px; }

.forum-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
    padding: 3px 5px;
}

.forum-topic-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 17px;
    border: 1px solid #e0e7f0;
    border-radius: 999px;
    background: #ffffff;
    color: #63718d;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.forum-topic-pill:hover {
    border-color: #9dbfff;
    color: #1e60de;
    box-shadow: 0 5px 12px rgba(45, 105, 226, 0.08);
}

.forum-topic-pill.is-active {
    border-color: #2b6ce9;
    background: linear-gradient(135deg, #347cf3, #2461df);
    box-shadow: 0 7px 13px rgba(35, 96, 222, 0.18);
    color: #ffffff;
}

.forum-welcome {
    margin: 0 0 10px;
    border: 1px solid #cddfff;
    border-radius: 16px;
    background: linear-gradient(105deg, #f7fbff, #ffffff 72%);
    box-shadow: 0 5px 16px rgba(48, 105, 206, 0.06);
}

.forum-welcome summary {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    cursor: pointer;
    list-style: none;
}

.forum-welcome summary::-webkit-details-marker { display: none; }

.forum-welcome-pin {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d2e1ff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f1f6ff, #e4eeff);
    color: #235bd9;
    font-size: 25px;
    transform: rotate(-15deg);
}

.forum-welcome-copy {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.forum-welcome-copy small {
    color: #2455bc;
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: 0.03em;
}

.forum-welcome-copy strong {
    color: #21345b;
    font-size: 14px;
}

.forum-welcome-copy em {
    overflow: hidden;
    color: #617393;
    font-size: 12.5px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-welcome-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #dce6f7;
    border-radius: 9px;
    background: #f5f8ff;
    color: #235bd9;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.forum-welcome[open] .forum-welcome-action i {
    transform: rotate(90deg);
}

.forum-welcome-rules {
    padding: 0 20px 15px 88px;
    color: #5d708f;
    font-size: 12.5px;
    line-height: 1.6;
}

.forum-thread-feed {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.forum-thread-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 134px;
    align-items: center;
    gap: 16px;
    min-height: 103px;
    padding: 15px 19px;
    border: 1px solid #e0e7f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 11px rgba(40, 67, 108, 0.035);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.forum-thread-row:hover {
    z-index: 1;
    border-color: #b9d2ff;
    box-shadow: 0 10px 22px rgba(40, 82, 150, 0.09);
    transform: translateY(-1px);
}

.forum-thread-symbol {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-size: 27px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.27), 0 8px 14px rgba(50, 101, 208, 0.15);
}

.forum-thread-symbol-general { background: linear-gradient(145deg, #77a9ff, #3974e6); }
.forum-thread-symbol-costs { background: linear-gradient(145deg, #85e8ad, #29ae64); }
.forum-thread-symbol-service { background: linear-gradient(145deg, #ffcb72, #f39127); }
.forum-thread-symbol-leasing { background: linear-gradient(145deg, #af85ff, #7242dc); }
.forum-thread-symbol-legal { background: linear-gradient(145deg, #6a9cff, #375ed3); }
.forum-thread-symbol-market { background: linear-gradient(145deg, #b69aff, #7154d9); }

.forum-thread-content {
    min-width: 0;
}

.forum-thread-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 21px;
}

.forum-thread-topic {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 800;
}

.forum-thread-topic-general { background: #edf3ff; color: #245fda; }
.forum-thread-topic-costs { background: #e8f8ed; color: #248a4d; }
.forum-thread-topic-service { background: #fff2e0; color: #db791b; }
.forum-thread-topic-leasing { background: #f1ebff; color: #7246cf; }
.forum-thread-topic-legal { background: #ebf1ff; color: #355ec9; }
.forum-thread-topic-market { background: #f1edff; color: #7150c9; }

.forum-thread-content h2 {
    margin: 3px 0 2px;
    color: #1e2d4c;
    font-size: 14px;
    line-height: 1.35;
}

.forum-thread-content h2 a {
    color: inherit;
    text-decoration: none;
}

.forum-thread-content h2 a:hover { color: #1e61df; }

.forum-thread-content > p {
    overflow: hidden;
    margin: 0;
    color: #75829a;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-thread-meta {
    margin-top: 8px;
}

.forum-thread-author {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #384b6a;
    font-size: 11.5px;
    font-weight: 750;
}

.forum-thread-author > i { color: #71809b; font-size: 14px; }
.forum-thread-author.is-anon { color: #6d7890; }

.forum-thread-author small {
    padding: 2px 5px;
    border-radius: 5px;
    background: #fff0d5;
    color: #a86d16;
    font-size: 9px;
}

.forum-thread-activity {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    padding: 2px 0 3px;
}

.forum-thread-activity time {
    color: #74839c;
    font-size: 11.5px;
    white-space: nowrap;
}

.forum-thread-activity a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #526887;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.forum-thread-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #71809b;
    font-size: 11.5px;
    font-weight: 750;
}

.forum-thread-views i {
    color: #6680a7;
    font-size: 16px;
}

.forum-thread-activity a:hover { color: #2465e4; }
.forum-thread-activity a i { color: #526f9c; font-size: 17px; }

.forum-load-more {
    display: flex;
    justify-content: center;
    min-height: 22px;
    padding: 8px 0 0;
}

.forum-load-more-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 9px;
    color: #2467e8;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
}

.forum-load-more-link:hover { background: #edf4ff; color: #174fca; }

.forum-load-more-link .htmx-indicator {
    display: none;
    align-items: center;
    gap: 6px;
}

.forum-load-more-link.htmx-request > span:not(.htmx-indicator),
.forum-load-more-link.htmx-request > i { display: none; }
.forum-load-more-link.htmx-request .htmx-indicator { display: inline-flex; }
.forum-load-more-link.htmx-request .htmx-indicator i { display: inline-block; animation: forum-spin 0.75s linear infinite; }

@keyframes forum-spin {
    to { transform: rotate(360deg); }
}

.forum-sidebar {
    min-width: 0;
}

.forum-side-card {
    padding: 19px 22px 14px;
    border: 1px solid #e0e7f0;
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(40, 67, 108, 0.045);
}

.forum-side-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    color: #30436a;
    font-size: 14px;
}

.forum-side-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2469e8;
    font-size: 20px;
}

.forum-side-icon.is-flame { color: #ff6b36; }

.forum-popular-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.forum-popular-list a {
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: #506382;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.forum-popular-list a:hover .forum-popular-name { color: #2467e8; }

.forum-popular-rank {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f2f5f9;
    color: #59687f;
    font-size: 10px;
    font-weight: 850;
}

.forum-popular-list li:nth-child(1) .forum-popular-rank,
.forum-popular-list li:nth-child(2) .forum-popular-rank { background: #fff1dc; color: #e28b28; }

.forum-popular-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-popular-count {
    min-width: 31px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #edf3ff;
    color: #2662dc;
    font-size: 10px;
    font-weight: 850;
    text-align: center;
}

.forum-popular-list li:nth-child(2) .forum-popular-count { background: #eaf8ef; color: #2b9854; }
.forum-popular-list li:nth-child(3) .forum-popular-count { background: #f2edff; color: #7148cf; }
.forum-popular-list li:nth-child(4) .forum-popular-count { background: #edf2fb; color: #3b5fae; }
.forum-popular-list li:nth-child(5) .forum-popular-count { background: #fff1df; color: #d87721; }

.forum-side-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid #edf1f7;
    color: #2766df;
    font-size: 11.5px;
    font-weight: 800;
    text-decoration: none;
}

.forum-side-link:hover { color: #174fca; }

.forum-side-empty {
    margin: 0;
    color: #7c89a0;
    font-size: 12.5px;
    line-height: 1.5;
}

@media (max-width: 1180px) {
    .forum-hero {
        grid-template-columns: 92px minmax(0, 1fr) 154px;
        padding: 28px 34px;
    }

    .forum-hero-art { display: none; }

    .forum-workspace { grid-template-columns: minmax(0, 1fr) 310px; }
}

@media (max-width: 900px) {
    .forum-hero {
        grid-template-columns: 82px minmax(0, 1fr) auto;
        gap: 19px;
        padding: 28px;
    }

    .forum-hero-icon { width: 72px; height: 72px; border-radius: 19px; font-size: 32px; }
    .forum-hero-benefits { display: none; }
    .forum-hero-main > p { margin-bottom: 0; }
    .forum-workspace { grid-template-columns: 1fr; }
    .forum-sidebar { order: -1; }
    .forum-side-card { padding: 16px 19px; }
    .forum-popular-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .forum-side-link { display: none; }
}

@media (max-width: 640px) {
    .forum-page { padding-top: 0; }

    .forum-hero {
        grid-template-columns: 1fr auto;
        min-height: 0;
        gap: 18px;
        padding: 23px;
        border-radius: 18px;
    }

    .forum-hero-icon { grid-column: 2; grid-row: 1; width: 58px; height: 58px; border-radius: 16px; font-size: 26px; }
    .forum-hero-main { grid-column: 1 / -1; grid-row: 1; padding-right: 62px; }
    .forum-kicker { margin-bottom: 5px; font-size: 9px; }
    .forum-hero h1 { font-size: 37px; }
    .forum-hero-main > p { margin-top: 8px; font-size: 12.5px; }
    .forum-desktop-break { display: none; }
    .forum-new-thread { grid-column: 1 / -1; min-width: 0; padding: 13px; }

    .forum-page .board-subnav { gap: 12px; padding: 0 13px; overflow-x: auto; }
    .forum-page .board-subnav-tab { min-height: 45px; padding-right: 4px; padding-left: 4px; font-size: 12px; }

    .forum-filter { gap: 13px; margin-bottom: 16px; }
    .forum-filter-search { min-height: 48px; padding-left: 14px; }
    .forum-filter-search input { height: 46px; font-size: 12px; }
    .forum-filter-search > i { margin-right: 9px; font-size: 17px; }
    .forum-filter-submit { padding: 0 13px; gap: 7px; font-size: 11px; }
    .forum-topics { flex-wrap: nowrap; padding: 2px 1px 7px; overflow-x: auto; }
    .forum-topic-pill { flex: 0 0 auto; min-height: 31px; padding: 5px 13px; font-size: 11.5px; }

    .forum-welcome summary { gap: 12px; padding: 11px; }
    .forum-welcome-pin { width: 42px; height: 42px; border-radius: 10px; font-size: 20px; }
    .forum-welcome-copy em { display: none; }
    .forum-welcome-copy strong { font-size: 12.5px; }
    .forum-welcome-action { padding: 8px; font-size: 0; }
    .forum-welcome-action i { font-size: 15px; }
    .forum-welcome-rules { padding: 0 14px 14px; font-size: 12px; }

    .forum-thread-row { grid-template-columns: 47px minmax(0, 1fr); gap: 11px; min-height: 0; padding: 13px; border-radius: 14px; }
    .forum-thread-symbol { width: 43px; height: 43px; border-radius: 11px; font-size: 21px; }
    .forum-thread-content h2 { font-size: 12.5px; }
    .forum-thread-content > p { font-size: 11px; }
    .forum-thread-heading { min-height: 18px; }
    .forum-thread-topic { padding: 3px 6px; font-size: 9px; }
    .forum-thread-meta { margin-top: 6px; }
    .forum-thread-author { font-size: 10.5px; }
    .forum-thread-activity { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; padding: 3px 0 0; }
    .forum-thread-activity time { font-size: 10px; }
    .forum-thread-activity a { font-size: 11px; }
    .forum-thread-activity a i { font-size: 15px; }
    .forum-thread-views { font-size: 10.5px; }
    .forum-thread-views i { font-size: 14px; }

    .forum-popular-list { grid-template-columns: 1fr; gap: 9px; }
}

/* --------------------------------------------------------------------------
   Wspólny rytm trzech zakładek Tablicy + widok powiadomień
   -------------------------------------------------------------------------- */
.announcements-page,
.notifications-page {
    max-width: 1380px;
    padding-top: 2px;
}

/* Komunikaty zachowują własną treść, ale ich nagłówek ma ten sam oddech co
   forum i powiadomienia. Dzięki temu zmiana zakładki nie przesuwa listy o
   całą wysokość starego, krótkiego nagłówka. */
.announcements-page .board-hub-hero {
    position: relative;
    min-height: 202px;
    gap: 26px;
    padding: 30px 48px;
    margin-bottom: 18px;
    overflow: hidden;
    border-color: #dce6f5;
    border-radius: 22px;
    background:
        radial-gradient(circle at 84% 74%, rgba(73, 139, 255, 0.13), transparent 20%),
        radial-gradient(circle at 52% -35%, rgba(102, 160, 255, 0.11), transparent 42%),
        linear-gradient(113deg, #ffffff 0%, #f7faff 58%, #edf4ff 100%);
    box-shadow: 0 9px 28px rgba(36, 70, 121, 0.08);
}

.announcements-page .board-hub-hero::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    right: 80px;
    bottom: -315px;
    border: 1px solid rgba(90, 148, 246, 0.13);
    border-radius: 50%;
    box-shadow:
        0 0 0 42px rgba(96, 151, 247, 0.035),
        0 0 0 92px rgba(96, 151, 247, 0.022);
    pointer-events: none;
}

.announcements-page .board-hub-hero > * { position: relative; z-index: 1; }
.announcements-page .board-hero-icon { width: 92px; height: 92px; border-radius: 23px; font-size: 40px; }
.announcements-page .board-hero-main h1 { margin: 0 0 7px; font-size: clamp(34px, 3.5vw, 48px); letter-spacing: -0.04em; }
.announcements-page .board-hero-main p { max-width: 720px; font-size: 14px; }
.announcements-page .board-hero-link { padding: 13px 18px; }

.notifications-page .board-subnav {
    gap: 20px;
    min-height: 64px;
    padding: 6px 26px;
    margin-bottom: 16px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(39, 63, 96, 0.05);
}

.notifications-page .board-subnav-tab {
    min-height: 46px;
    padding: 12px 16px;
    color: #65738e;
}

.notifications-page .board-subnav-tab.is-active {
    padding-right: 22px;
    padding-left: 22px;
    background: linear-gradient(135deg, #3478f2 0%, #1f5de7 100%);
    color: #ffffff;
    box-shadow: 0 9px 17px rgba(35, 97, 226, 0.2);
}

/* --------------------------------------------------------------------------
   Powiadomienia — nagłówek
   -------------------------------------------------------------------------- */
.notifications-hero {
    position: relative;
    isolation: isolate;
    min-height: 202px;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: 30px 54px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #dce6f5;
    border-radius: 22px;
    background:
        radial-gradient(circle at 71% 112%, rgba(62, 133, 255, 0.13), transparent 22%),
        linear-gradient(126deg, #ffffff 0%, #f8fbff 56%, #edf4ff 100%);
    box-shadow: 0 9px 28px rgba(36, 70, 121, 0.08);
}

.notifications-hero::before,
.notifications-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.notifications-hero::before {
    width: 690px;
    height: 350px;
    top: -278px;
    right: -20px;
    border: 1px solid rgba(94, 151, 244, 0.13);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(103, 160, 249, 0.035),
        0 0 0 105px rgba(103, 160, 249, 0.022);
    transform: rotate(-15deg);
}

.notifications-hero::after {
    width: 340px;
    height: 250px;
    right: -12px;
    bottom: -188px;
    background: radial-gradient(circle, rgba(40, 112, 235, 0.12) 1.5px, transparent 2px) 0 0 / 14px 14px;
    opacity: 0.7;
}

.notifications-hero-icon {
    width: 114px;
    height: 114px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background: linear-gradient(145deg, #3478f2 0%, #1f5de7 100%);
    color: #ffffff;
    font-size: 52px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 18px 30px rgba(33, 94, 225, 0.28);
}

.notifications-hero-main { min-width: 0; }

.notifications-kicker {
    width: fit-content;
    padding: 5px 13px;
    margin-bottom: 7px;
    border: 1px solid #dbe8ff;
    border-radius: 999px;
    background: #eff5ff;
    color: #174ec5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.notifications-hero h1 {
    margin: 0;
    color: #162645;
    font-size: clamp(38px, 4.1vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.notifications-hero p {
    margin: 9px 0 0;
    color: #617394;
    font-size: 15px;
    line-height: 1.55;
}

.notifications-read-all-form { margin: 0; }

.notifications-read-all {
    min-height: 47px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 21px;
    border: 1px solid #d1dceb;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 5px 12px rgba(37, 65, 111, 0.08);
    color: #3f5377;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.notifications-read-all:hover {
    transform: translateY(-1px);
    border-color: rgba(41, 108, 234, 0.42);
    box-shadow: 0 10px 19px rgba(37, 65, 111, 0.12);
    color: #245bda;
}

.notifications-read-all i { color: #245fdf; font-size: 17px; }
.notifications-read-all.is-complete { border-color: #dceae2; color: #347354; cursor: default; }
.notifications-read-all.is-complete i { color: #32a464; }

/* --------------------------------------------------------------------------
   Powiadomienia — lista i filtry
   -------------------------------------------------------------------------- */
.notifications-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 403px;
    align-items: start;
    gap: 18px;
}

.notifications-main-column { min-width: 0; }

.notifications-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin-bottom: 14px;
}

.notifications-search {
    min-height: 51px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 0 16px;
    border: 1px solid #dfe6f1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(36, 65, 110, 0.04);
}

.notifications-search > i { color: #6a7d9f; font-size: 21px; }

.notifications-search input {
    min-width: 0;
    flex: 1 1 auto;
    height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #27395b;
    font-size: 13.5px;
}

.notifications-search input::placeholder { color: #8996aa; }

.notifications-search-submit {
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #255fdd;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.notifications-search-submit:hover { background: #edf4ff; }

.notifications-filter-menu {
    position: relative;
    z-index: 4;
    min-width: 132px;
}

.notifications-filter-menu summary {
    min-height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    list-style: none;
    border: 1px solid #dfe6f1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(36, 65, 110, 0.04);
    color: #4d6083;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.notifications-filter-menu summary::-webkit-details-marker { display: none; }
.notifications-filter-menu summary > i:first-child { color: #4d6eae; font-size: 16px; }
.notifications-filter-menu summary > i:last-child { margin-left: 2px; font-size: 11px; transition: transform 0.15s ease; }
.notifications-filter-menu[open] summary > i:last-child { transform: rotate(180deg); }

.notifications-filter-options {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 176px;
    display: grid;
    gap: 2px;
    padding: 7px;
    border: 1px solid #dfe6f1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(34, 59, 101, 0.16);
}

.notifications-filter-options a {
    padding: 9px 10px;
    border-radius: 8px;
    color: #536785;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}

.notifications-filter-options a:hover { background: #f0f5ff; color: #255fdd; }

.notifications-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.notifications-filter-pills a {
    min-height: 37px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 20px;
    border: 1px solid #dfe6f1;
    border-radius: 999px;
    background: #ffffff;
    color: #536785;
    font-size: 12.5px;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.notifications-filter-pills a:hover { border-color: rgba(42, 107, 231, 0.42); color: #255fdd; }
.notifications-filter-pills a.is-active { border-color: #2872ec; background: linear-gradient(135deg, #3478f2, #1f5de7); color: #ffffff; box-shadow: 0 6px 12px rgba(34, 96, 227, 0.2); }
.notifications-filter-pills span { min-width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; border-radius: 99px; background: #eaf1ff; color: #2260df; font-size: 10px; }
.notifications-filter-pills .is-active span { background: rgba(255, 255, 255, 0.25); color: #ffffff; }

.notifications-list { display: flex; flex-direction: column; gap: 9px; }
.notification-card-form { margin: 0; }

.notifications-load-more {
    display: flex;
    justify-content: center;
    padding: 11px 0 1px;
}

.notifications-load-more a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border-radius: 9px;
    color: #2462df;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.notifications-load-more a:hover { background: #edf4ff; }
.notifications-load-more a i { font-size: 12px; }

.notification-card {
    width: 100%;
    min-height: 89px;
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 21px 13px 19px;
    border: 1px solid #e0e7f1;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 3px 11px rgba(35, 62, 105, 0.035);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.notification-card:hover {
    transform: translateY(-1px);
    border-color: rgba(42, 107, 231, 0.34);
    box-shadow: 0 10px 20px rgba(35, 62, 105, 0.09);
}

.notification-card.is-unread {
    border-color: #cee0ff;
    background: linear-gradient(100deg, #f5f9ff 0%, #ffffff 72%);
}

.notification-card-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #eaf1ff;
    color: #276de9;
    font-size: 27px;
}

.notification-card-icon.is-community { background: #efe9ff; color: #7944d9; }
.notification-card-icon.is-system { background: #e2f6e8; color: #35a461; }
.notification-card-icon.is-announcement { background: #e5f6fa; color: #2099b4; }
.notification-card-icon.is-service { background: #fff0df; color: #ea841e; }

.notification-card-content { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.notification-card-heading { min-width: 0; display: flex; align-items: center; gap: 9px; }
.notification-card-title { overflow: hidden; color: #1d2d4f; font-size: 15px; font-weight: 800; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.notification-card-text { overflow: hidden; color: #627492; font-size: 13px; line-height: 1.38; text-overflow: ellipsis; white-space: nowrap; }

.notification-card-type {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 6px;
    background: #edf2f8;
    color: #60708a;
    font-size: 10px;
    font-weight: 800;
}

.notification-card-type.is-community { background: #f0eaff; color: #7144c7; }
.notification-card-type.is-system { background: #e4f6e9; color: #2d9455; }
.notification-card-type.is-announcement { background: #e3f4fb; color: #197e9b; }
.notification-card-type.is-service { background: #fff0df; color: #ca721d; }

.notification-card-meta {
    align-self: stretch;
    min-width: 116px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column;
    gap: 13px;
    color: #657795;
}

.notification-card-meta time { font-size: 11.5px; white-space: nowrap; }
.notification-card-meta > i { color: #276de9; font-size: 11px; }

.notifications-empty {
    min-height: 290px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border: 1px solid #e0e7f1;
    border-radius: 16px;
    background: #ffffff;
    color: #617394;
    text-align: center;
}

.notifications-empty > span { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; border-radius: 16px; background: #edf4ff; color: #286fe9; font-size: 26px; }
.notifications-empty h2 { margin: 0 0 5px; color: #233556; font-size: 17px; }
.notifications-empty p { max-width: 320px; margin: 0; font-size: 13px; line-height: 1.55; }
.notifications-empty a { display: inline-flex; align-items: center; gap: 7px; margin-top: 15px; color: #2462df; font-size: 13px; font-weight: 800; text-decoration: none; }

/* --------------------------------------------------------------------------
   Powiadomienia — panel boczny
   -------------------------------------------------------------------------- */
.notifications-sidebar { display: flex; flex-direction: column; gap: 15px; }

.notifications-side-card {
    padding: 22px 20px;
    border: 1px solid #e0e7f1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(33, 61, 105, 0.055);
}

.notifications-side-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: #273a60;
    font-size: 15px;
    font-weight: 800;
}

.notifications-side-card h2 > span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #edf4ff; color: #2166e4; font-size: 19px; }

.notifications-shortcuts { padding: 22px 19px 17px; }
.notifications-shortcuts h2 { margin-left: 1px; }
.notifications-shortcuts a,
.notifications-shortcuts button,
.notifications-shortcuts-complete {
    width: 100%;
    min-height: 55px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    margin: 0 0 9px;
    border: 1px solid #e0e7f1;
    border-radius: 11px;
    background: #ffffff;
    color: #2b3d61;
    font: inherit;
    font-size: 13.5px;
    font-weight: 750;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.notifications-shortcuts a:hover,
.notifications-shortcuts button:hover { transform: translateY(-1px); border-color: rgba(42, 107, 231, 0.35); background: #f8fbff; color: #235fd9; }
.notifications-shortcuts a > i:first-child,
.notifications-shortcuts button > i:first-child { color: #2168e7; font-size: 22px; }
.notifications-shortcuts a > i:last-child,
.notifications-shortcuts button > i:last-child { margin-left: auto; color: #527098; font-size: 15px; }
.notifications-shortcuts form { margin: 0; }
.notifications-shortcuts-complete { justify-content: center; border-color: #dceae2; background: #f9fdf9; color: #478060; cursor: default; }
.notifications-shortcuts-complete i { color: #32a464; font-size: 19px; }

.notifications-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.notifications-stat-grid > div { min-height: 112px; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid #e4eaf3; border-radius: 13px; background: linear-gradient(180deg, #ffffff, #fafcff); }
.notifications-stat-grid > div > span { color: #2168e7; font-size: 23px; line-height: 1; }
.notifications-stat-grid strong { color: #23375b; font-size: 21px; line-height: 1.2; }
.notifications-stat-grid small { color: #6f7f9b; font-size: 11px; }

.notifications-types ul { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; }
.notifications-types li { display: flex; align-items: center; gap: 11px; color: #61718d; font-size: 13.5px; }
.notifications-types li strong { min-width: 29px; padding: 3px 7px; margin-left: auto; border-radius: 7px; background: #f1f4f9; color: #3c4e70; font-size: 11.5px; text-align: center; }
.notifications-type-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #8290a6; }
.notifications-type-dot.is-system { background: #42b670; }
.notifications-type-dot.is-community { background: #7a45dc; }
.notifications-type-dot.is-announcement { background: #296fe6; }
.notifications-type-dot.is-service { background: #ee8420; }

@media (max-width: 1180px) {
    .notifications-workspace { grid-template-columns: minmax(0, 1fr) 330px; }
    .notifications-hero { padding-right: 36px; padding-left: 36px; }
    .notifications-side-card { padding-right: 16px; padding-left: 16px; }
    .notifications-shortcuts { padding-right: 15px; padding-left: 15px; }
}

@media (max-width: 900px) {
    .notifications-workspace { grid-template-columns: 1fr; }
    .notifications-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .notifications-types { grid-column: 1 / -1; }
    .notifications-types ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notifications-hero { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 23px; padding: 28px 32px; }
    .notifications-hero-icon { width: 86px; height: 86px; border-radius: 23px; font-size: 40px; }
}

@media (max-width: 640px) {
    .announcements-page,
    .notifications-page { padding-top: 0; }

    .announcements-page .board-hub-hero,
    .notifications-hero { min-height: 0; padding: 23px; border-radius: 18px; }

    .announcements-page .board-hub-hero { gap: 15px; }
    .announcements-page .board-hero-icon { width: 58px; height: 58px; border-radius: 16px; font-size: 25px; }
    .announcements-page .board-hero-main h1 { font-size: 31px; }
    .announcements-page .board-hero-main p { font-size: 12.5px; }
    .announcements-page .board-hero-link { width: 100%; justify-content: center; }

    .notifications-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 15px; }
    .notifications-hero-icon { grid-column: 2; grid-row: 1; width: 58px; height: 58px; border-radius: 16px; font-size: 27px; }
    .notifications-hero-main { grid-column: 1 / -1; grid-row: 1; padding-right: 58px; }
    .notifications-kicker { margin-bottom: 5px; font-size: 9px; }
    .notifications-hero h1 { font-size: 36px; }
    .notifications-hero p { margin-top: 8px; font-size: 12.5px; }
    .notifications-read-all-form,
    .notifications-read-all { grid-column: 1 / -1; width: 100%; }

    .notifications-page .board-subnav { gap: 12px; min-height: 0; padding: 6px 13px; overflow-x: auto; }
    .notifications-page .board-subnav-tab { min-height: 45px; padding-right: 8px; padding-left: 8px; font-size: 12px; white-space: nowrap; }
    .notifications-page .board-subnav-tab.is-active { padding-right: 12px; padding-left: 12px; }

    .notifications-filter { grid-template-columns: 1fr; gap: 8px; }
    .notifications-search { min-height: 48px; }
    .notifications-search input { height: 46px; font-size: 12.5px; }
    .notifications-filter-menu { min-width: 0; }
    .notifications-filter-menu summary { min-height: 44px; justify-content: flex-start; }
    .notifications-filter-options { left: 0; right: auto; width: 100%; }
    .notifications-filter-pills { flex-wrap: nowrap; padding: 1px 1px 7px; margin-bottom: 12px; overflow-x: auto; }
    .notifications-filter-pills a { flex: 0 0 auto; min-height: 34px; padding: 6px 14px; font-size: 11.5px; }

    .notification-card { min-height: 0; grid-template-columns: 47px minmax(0, 1fr); gap: 11px; padding: 12px; border-radius: 13px; }
    .notification-card-icon { width: 43px; height: 43px; border-radius: 11px; font-size: 20px; }
    .notification-card-heading { gap: 6px; }
    .notification-card-title { font-size: 12.5px; }
    .notification-card-text { font-size: 11px; }
    .notification-card-type { max-width: 80px; overflow: hidden; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
    .notification-card-meta { grid-column: 2; min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px; }
    .notification-card-meta time { font-size: 10px; }
    .notification-card-meta > i { font-size: 9px; }

    .notifications-sidebar { grid-template-columns: 1fr; gap: 12px; }
    .notifications-types { grid-column: auto; }
    .notifications-types ul { grid-template-columns: 1fr; gap: 11px; }
    .notifications-side-card { padding: 17px 16px; border-radius: 14px; }
    .notifications-side-card h2 { margin-bottom: 14px; font-size: 14px; }
    .notifications-shortcuts a,
    .notifications-shortcuts button,
    .notifications-shortcuts-complete { min-height: 49px; font-size: 12px; }
    .notifications-stat-grid > div { min-height: 94px; }
    .notifications-stat-grid strong { font-size: 19px; }
}

/* --------------------------------------------------------------------------
   Tablica — stała siatka 1400 px wspólna dla komunikatów, forum i dzwonka
   -------------------------------------------------------------------------- */
.page-wrap:has(.announcements-page),
.page-wrap:has(.notifications-page),
.page-wrap:has(.forum-page) {
    width: 100%;
    max-width: none;
    padding: 16px 20px 32px;
}

.announcements-page,
.notifications-page,
.forum-page {
    width: min(1400px, 100%);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 24px;
}

/* Ten sam wymiar kontenera wyboru sekcji niezależnie od aktywnej zakładki. */
.announcements-page .board-subnav,
.notifications-page .board-subnav,
.forum-page .board-subnav {
    align-items: center;
    min-height: 58px;
    height: 58px;
    gap: 24px;
    padding: 0 32px;
    margin: 18px 0 20px;
    overflow: visible;
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(39, 63, 96, 0.05);
}

.announcements-page .board-subnav-tab,
.notifications-page .board-subnav-tab,
.forum-page .board-subnav-tab {
    min-height: 58px;
    height: 58px;
    padding: 0 13px;
    border-radius: 0;
    color: #566887;
    font-size: 14px;
    font-weight: 750;
}

.announcements-page .board-subnav-tab i,
.notifications-page .board-subnav-tab i,
.forum-page .board-subnav-tab i { font-size: 16px; }

/* Makieta komunikatów ma aktywną, niebieską kapsułę; rozmiar paska pozostaje
   wspólny z podkreślonym wyborem forum i powiadomień. */
.announcements-page .board-subnav-tab.is-active {
    min-height: 44px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #347cf3, #2461df);
    box-shadow: 0 7px 13px rgba(35, 96, 222, 0.18);
    color: #ffffff;
}

.notifications-page .board-subnav-tab,
.forum-page .board-subnav-tab { position: relative; }

.notifications-page .board-subnav-tab::after,
.forum-page .board-subnav-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: #2568ec;
    opacity: 0;
}

.notifications-page .board-subnav-tab:hover,
.notifications-page .board-subnav-tab.is-active,
.forum-page .board-subnav-tab:hover,
.forum-page .board-subnav-tab.is-active {
    padding: 0 13px;
    background: transparent;
    color: #1d5fdb;
    box-shadow: none;
}

.notifications-page .board-subnav-tab.is-active::after,
.forum-page .board-subnav-tab.is-active::after { opacity: 1; }

.notifications-page .board-subnav { margin-top: 16px; margin-bottom: 18px; }

.board-subnav-count { margin-left: 1px; }

/* --------------------------------------------------------------------------
   Komunikaty — układ i wymiary z makiety
   -------------------------------------------------------------------------- */
.announcements-page .board-hub-hero {
    min-height: 252px;
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr) 300px 162px;
    align-items: center;
    gap: 56px;
    padding: 32px 56px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #dce6f5;
    border-radius: 18px;
    background:
        radial-gradient(circle at 82% 43%, rgba(109, 160, 255, 0.11), transparent 24%),
        linear-gradient(112deg, #ffffff 0%, #f7faff 58%, #edf4ff 100%);
    box-shadow: 0 8px 24px rgba(39, 70, 120, 0.06);
}

.announcements-page .board-hub-hero::after {
    width: 520px;
    height: 520px;
    right: 150px;
    bottom: -390px;
    border-color: rgba(90, 148, 246, 0.12);
    box-shadow:
        0 0 0 46px rgba(96, 151, 247, 0.034),
        0 0 0 103px rgba(96, 151, 247, 0.021);
}

.announcements-page .board-hero-icon {
    width: 124px;
    height: 124px;
    border-radius: 28px;
    font-size: 54px;
    background: linear-gradient(145deg, #347cf3, #1f5de7);
}

.announcements-page .board-hero-main h1 {
    margin: 0 0 12px;
    color: #142444;
    font-size: 50px;
    line-height: 1.02;
    letter-spacing: -0.052em;
}

.announcements-page .board-hero-main p {
    max-width: 540px;
    color: #617394;
    font-size: 15.5px;
    line-height: 1.55;
}

.announcements-page .service-kicker,
.notifications-kicker {
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
}

.announcements-page .board-hero-link {
    min-width: 162px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid #d5dfed;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 5px 13px rgba(35, 63, 108, 0.08);
    color: #223657;
    font-size: 14px;
    font-weight: 800;
}

.announcements-page .board-hero-link i { color: #235fde; font-size: 19px; }

.announcements-hero-art {
    position: relative;
    z-index: 1;
    height: 170px;
    min-width: 0;
}

.announcements-art-orbit {
    position: absolute;
    width: 302px;
    height: 302px;
    top: -64px;
    left: 0;
    border: 1px solid rgba(87, 146, 248, 0.12);
    border-radius: 50%;
}

.announcements-art-back,
.announcements-art-card {
    position: absolute;
    display: block;
    border: 1px solid rgba(174, 198, 241, 0.52);
    box-shadow: 0 16px 30px rgba(44, 87, 165, 0.12);
}

.announcements-art-back {
    width: 148px;
    height: 82px;
    top: 45px;
    right: 0;
    border-radius: 15px;
    background: linear-gradient(145deg, #eef5ff, #dceaff);
    transform: rotate(7deg);
}

.announcements-art-card {
    width: 214px;
    height: 84px;
    top: 51px;
    left: 2px;
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: repeat(3, 1fr);
    align-items: center;
    gap: 7px 12px;
    padding: 17px 20px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.96);
    transform: rotate(3deg);
}

.announcements-art-card i {
    grid-row: 1 / -1;
    color: #2b70ed;
    font-size: 38px;
}

.announcements-art-card b {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4c91f7, #2e70ea);
}

.announcements-art-card b:nth-of-type(1) { width: 104px; }
.announcements-art-card b:nth-of-type(2) { width: 79px; }
.announcements-art-card b:nth-of-type(3) { width: 52px; }

.announcements-workspace,
.notifications-workspace,
.forum-workspace {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 24px;
}

.announcements-workspace {
    display: grid;
    align-items: start;
}

.announcements-main-column,
.notifications-main-column,
.forum-main-column { min-width: 0; }

.announcements-filter,
.notifications-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 152px;
    gap: 24px;
    margin-bottom: 17px;
}

.announcements-search,
.notifications-search {
    min-height: 54px;
    border-radius: 12px;
}

.announcements-search {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 13px 0 18px;
    border: 1px solid #dfe6f1;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(36, 65, 110, 0.04);
}

.announcements-search > i { color: #6a7d9f; font-size: 21px; }

.announcements-search input {
    min-width: 0;
    flex: 1 1 auto;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #27395b;
    font: inherit;
    font-size: 13.5px;
}

.announcements-search input::placeholder { color: #8996aa; }

.announcements-search-submit {
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #255fdd;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.announcements-search-submit:hover { background: #edf4ff; }

.announcements-filter-menu,
.notifications-filter-menu { min-width: 152px; }

.announcements-filter-menu summary,
.notifications-filter-menu summary {
    min-height: 54px;
    padding: 0 18px;
    border-radius: 12px;
}

.announcements-filter-menu summary::-webkit-details-marker { display: none; }

.announcements-filter-options {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 182px;
    display: grid;
    gap: 2px;
    padding: 7px;
    border: 1px solid #dfe6f1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(34, 59, 101, 0.16);
}

.announcements-filter-options a {
    padding: 9px 10px;
    border-radius: 8px;
    color: #536785;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}

.announcements-filter-options a:hover { background: #f0f5ff; color: #255fdd; }

.announcements-filter-pills,
.notifications-filter-pills {
    gap: 13px;
    margin-bottom: 20px;
}

.announcements-filter-pills {
    display: flex;
    flex-wrap: wrap;
}

.announcements-filter-pills a,
.notifications-filter-pills a {
    min-height: 36px;
    padding: 6px 20px;
    border-radius: 999px;
    font-size: 12.5px;
}

.announcements-filter-pills a {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dfe6f1;
    background: #ffffff;
    color: #536785;
    font-weight: 750;
    text-decoration: none;
}

.announcements-filter-pills a:hover { border-color: rgba(42, 107, 231, 0.42); color: #255fdd; }

.announcements-filter-pills a.is-active {
    border-color: #2872ec;
    background: linear-gradient(135deg, #3478f2, #1f5de7);
    box-shadow: 0 6px 12px rgba(34, 96, 227, 0.2);
    color: #ffffff;
}

.announcements-feed { display: flex; flex-direction: column; gap: 15px; }

.announcement-row {
    min-height: 113px;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 128px;
    align-items: center;
    gap: 14px;
    padding: 15px 20px 15px 25px;
    border: 1px solid #e0e7f1;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 4px 13px rgba(35, 62, 105, 0.035);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.announcement-row:hover {
    transform: translateY(-1px);
    border-color: #bfd5ff;
    box-shadow: 0 10px 20px rgba(35, 62, 105, 0.08);
}

.announcement-row.is-pinned {
    min-height: 144px;
    border-color: #9fc2ff;
    background: linear-gradient(104deg, #f6faff 0%, #ffffff 78%);
}

.announcement-row-icon {
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #edf3ff;
    color: #276de9;
    font-size: 30px;
}

.announcement-row-icon.is-update,
.announcement-row-icon.is-notice { background: #eaf2ff; color: #2f71e9; }
.announcement-row-icon.is-maintenance { background: #e8f8ee; color: #31a05c; }
.announcement-row-icon.is-feature { background: #f1eaff; color: #7a48dc; }
.announcement-row-icon.is-pricing { background: #fff0df; color: #ef881f; }

.announcement-row-content { min-width: 0; }
.announcement-row-heading { display: flex; align-items: center; gap: 8px; min-height: 21px; }
.announcement-topic,
.announcement-pin { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; font-size: 10.5px; font-weight: 800; }
.announcement-topic.is-update,
.announcement-topic.is-notice { background: #eaf2ff; color: #2363dc; }
.announcement-topic.is-maintenance { background: #e6f7eb; color: #278b50; }
.announcement-topic.is-feature { background: #f0e9ff; color: #7442d0; }
.announcement-topic.is-pricing { background: #fff0df; color: #d97819; }
.announcement-pin { background: #edf3ff; color: #2463dc; }

.announcement-row h2 { margin: 3px 0 3px; color: #1b2d4d; font-size: 16px; line-height: 1.35; }
.announcement-row h2 a { color: inherit; text-decoration: none; }
.announcement-row h2 a:hover { color: #1e61df; }
.announcement-row p { overflow: hidden; margin: 0; color: #667896; font-size: 12.5px; line-height: 1.42; text-overflow: ellipsis; white-space: nowrap; }
.announcement-read-more { display: inline-flex; align-items: center; gap: 9px; margin-top: 8px; color: #2465e2; font-size: 12px; font-weight: 800; text-decoration: none; }
.announcement-read-more:hover { gap: 12px; }

.announcement-row-meta { align-self: stretch; display: flex; align-items: flex-end; flex-direction: column; justify-content: space-between; padding: 3px 0; color: #657795; }
.announcement-row-meta time { font-size: 11.5px; white-space: nowrap; }
.announcement-row-meta span { display: inline-flex; align-items: center; gap: 6px; color: #56709b; font-size: 12px; font-weight: 750; }
.announcement-row-meta span i { font-size: 16px; }

.announcements-load-more { display: flex; justify-content: center; min-height: 40px; margin-top: -8px; }
.announcements-load-more a { display: inline-flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 9px; color: #2465e2; font-size: 12.5px; font-weight: 800; text-decoration: none; }
.announcements-load-more a:hover { background: #edf4ff; }

.announcements-empty { min-height: 290px; display: flex; align-items: center; flex-direction: column; justify-content: center; padding: 30px; border: 1px solid #e0e7f1; border-radius: 16px; background: #ffffff; color: #617394; text-align: center; }
.announcements-empty > span { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; border-radius: 16px; background: #edf4ff; color: #286fe9; font-size: 26px; }
.announcements-empty h2 { margin: 0 0 5px; color: #233556; font-size: 17px; }
.announcements-empty p { max-width: 320px; margin: 0; font-size: 13px; line-height: 1.55; }
.announcements-empty a { display: inline-flex; align-items: center; gap: 7px; margin-top: 15px; color: #2462df; font-size: 13px; font-weight: 800; text-decoration: none; }

/* --------------------------------------------------------------------------
   Równe panele boczne obu widoków list
   -------------------------------------------------------------------------- */
.announcements-sidebar,
.notifications-sidebar { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.announcements-side-card,
.notifications-side-card {
    padding: 20px;
    border: 1px solid #e0e7f1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(33, 61, 105, 0.05);
}

.announcements-side-card h2,
.notifications-side-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 17px;
    color: #273a60;
    font-size: 15px;
    font-weight: 800;
}

.announcements-side-card h2 > span,
.notifications-side-card h2 > span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #edf4ff; color: #2166e4; font-size: 19px; }

.announcements-categories ul,
.notifications-types ul { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; }
.announcements-categories li { display: flex; align-items: center; gap: 12px; color: #61718d; font-size: 13.5px; }
.announcements-category-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #edf3ff; color: #2363dc; font-size: 15px; }
.announcements-category-icon.is-maintenance { background: #e6f7eb; color: #278b50; }
.announcements-category-icon.is-feature { background: #f0e9ff; color: #7442d0; }
.announcements-category-icon.is-pricing { background: #fff0df; color: #d97819; }
.announcements-categories li strong { min-width: 29px; padding: 3px 7px; margin-left: auto; border-radius: 7px; background: #f1f4f9; color: #3c4e70; font-size: 11.5px; text-align: center; }
.announcements-side-link { display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #edf1f7; color: #2766df; font-size: 11.5px; font-weight: 800; text-decoration: none; }

.announcements-quick-links { padding-bottom: 15px; }
.announcements-quick-links a { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 13px; padding: 8px 12px; margin: 0 0 7px; border: 1px solid #e0e7f1; border-radius: 10px; color: #536785; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.announcements-quick-links a:hover { border-color: #c8daf8; background: #f8fbff; color: #235fd9; }
.announcements-quick-links a > i:first-child { color: #2168e7; font-size: 18px; }
.announcements-quick-links a > i:last-child { margin-left: auto; color: #527098; font-size: 13px; }

.announcements-stat-grid,
.notifications-stat-grid { gap: 12px; }
.announcements-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.announcements-stat-grid > div,
.notifications-stat-grid > div { min-height: 119px; }
.announcements-stat-grid > div { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid #e4eaf3; border-radius: 13px; background: linear-gradient(180deg, #ffffff, #fafcff); }
.announcements-stat-grid > div > span { color: #2168e7; font-size: 23px; line-height: 1; }
.announcements-stat-grid strong { color: #23375b; font-size: 21px; line-height: 1.2; }
.announcements-stat-grid small { color: #6f7f9b; font-size: 11px; text-align: center; }

/* Gęstość powiadomień zgodna z makietą: jedna wysokość wiersza i jeden panel. */
.notifications-hero { min-height: 208px; grid-template-columns: 114px minmax(0, 1fr) auto; gap: 40px; padding: 30px 58px; margin: 0; border-radius: 18px; }
.notifications-hero-icon { width: 114px; height: 114px; border-radius: 27px; font-size: 51px; }
.notifications-hero h1 { font-size: 52px; }
.notifications-hero p { font-size: 15px; }
.notification-card { min-height: 91px; grid-template-columns: 106px minmax(0, 1fr) 128px; border-radius: 14px; }
.notification-card-icon { width: 60px; height: 60px; }
.notifications-side-card { padding: 20px; }
.notifications-shortcuts { padding: 20px 19px 15px; }
.notifications-stat-grid > div { min-height: 119px; }

/* Forum korzysta z identycznej szerokości strony, kolumny i paska wyboru. */
.forum-page { max-width: 1400px; }
.forum-workspace { grid-template-columns: minmax(0, 1fr) 400px; }
.forum-side-card { border-radius: 16px; }

@media (max-width: 1180px) {
    .announcements-page .board-hub-hero { grid-template-columns: 100px minmax(0, 1fr) 154px; gap: 32px; padding: 28px 36px; }
    .announcements-page .board-hero-icon { width: 92px; height: 92px; font-size: 42px; }
    .announcements-hero-art { display: none; }
    .announcements-page .board-hero-main h1 { font-size: 42px; }
    .announcements-workspace,
    .notifications-workspace,
    .forum-workspace { grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
    .announcements-filter,
    .notifications-filter { gap: 10px; }
}

@media (max-width: 900px) {
    .announcements-workspace,
    .notifications-workspace,
    .forum-workspace { grid-template-columns: 1fr; }
    .announcements-sidebar,
    .notifications-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .announcements-stats,
    .notifications-types { grid-column: 1 / -1; }
    .notifications-types ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .announcements-page .board-hub-hero { grid-template-columns: 82px minmax(0, 1fr) auto; gap: 22px; padding: 28px 30px; }
    .announcements-page .board-hero-icon { width: 78px; height: 78px; border-radius: 20px; font-size: 35px; }
    .announcements-page .board-hero-main h1 { font-size: 38px; }
}

@media (max-width: 640px) {
    .page-wrap:has(.announcements-page),
    .page-wrap:has(.notifications-page),
    .page-wrap:has(.forum-page) { padding: 12px 14px 26px; }

    .announcements-page .board-subnav,
    .notifications-page .board-subnav,
    .forum-page .board-subnav { height: 52px; min-height: 52px; gap: 12px; padding: 0 13px; margin: 13px 0 16px; overflow-x: auto; }
    .announcements-page .board-subnav-tab,
    .notifications-page .board-subnav-tab,
    .forum-page .board-subnav-tab { min-height: 52px; height: 52px; padding: 0 6px; font-size: 12px; white-space: nowrap; }
    .announcements-page .board-subnav-tab.is-active { min-height: 38px; height: 38px; padding: 0 13px; }

    .announcements-page .board-hub-hero { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; gap: 15px; padding: 23px; border-radius: 18px; }
    .announcements-page .board-hero-icon { grid-column: 2; grid-row: 1; width: 58px; height: 58px; border-radius: 16px; font-size: 26px; }
    .announcements-page .board-hero-main { grid-column: 1 / -1; grid-row: 1; padding-right: 60px; }
    .announcements-page .board-hero-main h1 { margin-bottom: 8px; font-size: 31px; }
    .announcements-page .board-hero-main p { font-size: 12.5px; }
    .announcements-desktop-break { display: none; }
    .announcements-page .board-hero-link { grid-column: 1 / -1; width: 100%; min-height: 47px; }

    .announcements-filter,
    .notifications-filter { grid-template-columns: 1fr; gap: 8px; }
    .announcements-filter-menu,
    .notifications-filter-menu { min-width: 0; }
    .announcements-filter-menu summary,
    .notifications-filter-menu summary { min-height: 44px; justify-content: flex-start; }
    .announcements-filter-options,
    .notifications-filter-options { left: 0; right: auto; width: 100%; }
    .announcements-filter-pills,
    .notifications-filter-pills { flex-wrap: nowrap; padding: 1px 1px 7px; margin-bottom: 12px; overflow-x: auto; }
    .announcements-filter-pills a,
    .notifications-filter-pills a { flex: 0 0 auto; min-height: 34px; padding: 6px 14px; font-size: 11.5px; }

    .pa-board-options { grid-template-columns: 1fr; }

    .announcement-row { min-height: 0; grid-template-columns: 47px minmax(0, 1fr); gap: 11px; padding: 12px; border-radius: 13px; }
    .announcement-row.is-pinned { min-height: 0; }
    .announcement-row-icon { width: 43px; height: 43px; border-radius: 11px; font-size: 20px; }
    .announcement-row h2 { font-size: 12.5px; }
    .announcement-row p { font-size: 11px; }
    .announcement-row-meta { grid-column: 2; min-width: 0; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding-top: 3px; }
    .announcement-row-meta time { font-size: 10px; }
    .announcement-read-more { display: none; }
    .announcement-topic,
    .announcement-pin { padding: 3px 6px; font-size: 8.5px; }

    .announcements-sidebar,
    .notifications-sidebar { grid-template-columns: 1fr; gap: 12px; }
    .announcements-stats,
    .notifications-types { grid-column: auto; }
    .notifications-types ul { grid-template-columns: 1fr; }
    .announcements-side-card,
    .notifications-side-card { padding: 17px 16px; border-radius: 14px; }
}



/* Source: css/pages/platform-admin.css */
/* Panel administratora systemu (platform admin).
   Zbudowany na wspólnych komponentach (buttons, badges, modals, pagination)
   i zmiennych z base/variables.css — bez klas help-admin-*. */

.pa-page {
    display: grid;
    gap: 18px;
}

.pa-hero,
.pa-card,
.pa-stat-card,
.pa-panel {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* --- Hero --- */

.pa-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
}

.pa-hero-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.pa-hero-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 24px;
}

.pa-kicker {
    width: fit-content;
    margin-bottom: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pa-hero h1 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: 0;
}

.pa-hero p {
    margin: 6px 0 0;
    max-width: 720px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.pa-hero-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* --- Zakładki panelu --- */

.pa-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pa-tabs .btn-ghost.active {
    border-color: rgba(40, 116, 234, 0.45);
    background: var(--blue-soft);
    color: var(--blue-dark);
}

/* --- Filtry --- */

.pa-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(auto-fit, minmax(150px, 190px));
    gap: 12px;
    align-items: end;
}

.pa-search {
    min-height: 48px;
    box-shadow: none;
    border-color: var(--line);
}

.pa-filter-select {
    display: grid;
    gap: 5px;
}

.pa-filter-select > span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pa-filter-select select,
.pa-filter-select input {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.pa-filter-select select:focus,
.pa-filter-select input:focus {
    outline: none;
    border-color: #b9c9e7;
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.08);
}

/* Wariant filtrów z wieloma polami (moderacja forum) — zawijany flex zamiast
   sztywnej siatki, żeby 7 filtrów ładnie się układało na wąskich ekranach. */
.pa-filters-wrap {
    display: flex;
    flex-wrap: wrap;
}

.pa-filters-wrap .pa-search {
    flex: 1 1 240px;
}

.pa-filters-wrap .pa-filter-select {
    flex: 0 1 168px;
}

/* Drugi wiersz treści w komórce tabeli (np. fragment komentarza pod tytułem). */
.pa-td-sub {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Siatka metadanych w podglądzie komunikatu. */
.pa-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.pa-meta-grid dt {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pa-meta-grid dd {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

/* --- Statystyki --- */

.pa-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.pa-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
}

.pa-stat-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 20px;
}

.pa-stat-card small {
    display: block;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pa-stat-card strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.pa-stat-card.is-danger .pa-stat-icon,
.pa-stat-card.is-negative .pa-stat-icon {
    background: var(--red-soft);
    color: var(--red);
}

.pa-stat-card.is-warning .pa-stat-icon {
    background: var(--yellow-soft);
    color: #b67700;
}

.pa-stat-card.is-success .pa-stat-icon {
    background: var(--green-soft);
    color: var(--green);
}

.pa-stat-card.is-neutral .pa-stat-icon {
    background: #edf1f7;
    color: var(--dark-soft);
}

/* --- Karty i siatki --- */

.pa-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
    gap: 16px;
    align-items: start;
}

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

.pa-card {
    min-width: 0;
    padding: 18px;
}

.pa-card-wide {
    min-height: 220px;
}

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

.pa-card-head h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 18px;
    letter-spacing: 0;
}

.pa-card-head p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
}

.pa-card-body {
    display: grid;
    gap: 12px;
}

.pa-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Odznaki statusów --- */

.pa-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--dark-soft);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.pa-badge.is-success {
    background: var(--green-soft);
    border-color: #c6efd9;
    color: #137a49;
}

.pa-badge.is-warning {
    background: var(--yellow-soft);
    border-color: #f4dda8;
    color: #785200;
}

.pa-badge.is-danger {
    background: var(--red-soft);
    border-color: #f8c9c5;
    color: #c12d25;
}

.pa-badge.is-neutral {
    background: #edf1f7;
    border-color: #dde5ef;
    color: var(--dark-soft);
}

.pa-badge.is-info {
    background: var(--blue-soft);
    border-color: #d7e5ff;
    color: var(--blue-dark);
}

/* --- Tabele --- */

.pa-table-wrap {
    overflow-x: auto;
}

.pa-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pa-table th,
.pa-table td {
    padding: 13px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line-soft);
    color: #40506a;
    font-size: 14px;
    font-weight: 700;
}

.pa-table th {
    color: #74839a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.pa-table tbody tr:hover {
    background: #fbfdff;
}

.pa-table tbody tr:last-child td {
    border-bottom: 0;
}

.pa-table td strong {
    display: block;
    color: var(--text);
    font-weight: 900;
}

.pa-table td small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.pa-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pa-row-actions form {
    margin: 0;
}

.pa-row-actions .btn-ghost {
    min-height: 34px;
    padding: 6px 11px;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.pa-row-actions .btn-ghost i {
    font-size: 13px;
}

/* Akcje komunikatów zawsze tworzą jeden, czytelny zestaw przycisków.
   Bez kontenera formularze układały się pionowo, a sam kosz wyglądał jak
   niepowiązany element następnego wiersza. */
.pa-board-row-actions,
.pa-moderation-row-actions {
    flex-wrap: nowrap;
}

.pa-board-row-actions .btn-ghost,
.pa-moderation-row-actions .btn-ghost {
    min-width: 104px;
}

.pa-board-row-actions .btn-ghost-danger,
.pa-moderation-row-actions .btn-ghost-danger {
    min-width: 72px;
}

/* --- Puste stany --- */

.pa-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 34px 20px;
    text-align: center;
    color: var(--text-soft);
}

.pa-empty i {
    font-size: 30px;
    color: var(--text-muted);
}

.pa-empty strong {
    color: var(--text);
}

.pa-empty.is-small {
    padding: 20px 14px;
}

/* --- Fleet Bot (jakość odpowiedzi) --- */

.pa-results,
.pa-stack,
.pa-reasons,
.pa-feedback-list {
    display: grid;
    gap: 12px;
}

.pa-issue-card {
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface-soft);
    overflow: hidden;
}

.pa-issue-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
}

.pa-issue-card summary::-webkit-details-marker {
    display: none;
}

.pa-issue-main {
    min-width: 0;
}

.pa-issue-main strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.pa-issue-main small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.pa-issue-count {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 900;
}

.pa-issue-body {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px;
}

.pa-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pa-copy-block {
    display: grid;
    gap: 6px;
}

.pa-copy-block span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pa-copy-block textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    resize: vertical;
}

.pa-reason-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 750;
}

.pa-reason-row strong {
    color: var(--text);
    font-size: 15px;
}

.pa-feedback-item {
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.pa-feedback-item.is-positive {
    border-left-color: var(--green);
}

.pa-feedback-item.is-negative {
    border-left-color: var(--red);
}

.pa-feedback-item header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.pa-feedback-item strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.pa-feedback-item small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.pa-feedback-item p {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.pa-feedback-item blockquote {
    margin: 8px 0 0;
    padding: 8px 12px;
    border-left: 3px solid var(--line);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
    border-radius: 0 10px 10px 0;
}

/* --- Szczegóły organizacji --- */

.pa-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 16px;
    align-items: start;
}

.pa-detail-col {
    display: grid;
    gap: 16px;
    min-width: 0;
}

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

.pa-info-item {
    min-height: 74px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface-soft);
}

.pa-info-item > span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pa-info-item > strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.pa-limit-meter {
    display: grid;
    gap: 6px;
}

.pa-limit-meter progress {
    width: 100%;
    height: 8px;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-radius: 999px;
    overflow: hidden;
    background: #e8eef7;
}

.pa-limit-meter progress::-webkit-progress-bar {
    background: #e8eef7;
    border-radius: 999px;
}

.pa-limit-meter progress::-webkit-progress-value {
    background: var(--blue);
    border-radius: 999px;
}

.pa-limit-meter progress::-moz-progress-bar {
    background: var(--blue);
    border-radius: 999px;
}

.pa-action-form {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface-soft);
}

.pa-action-form h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.pa-action-form .pa-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 650;
}

.pa-action-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pa-action-form select,
.pa-action-form input[type="number"],
.pa-action-form input[type="date"],
.pa-action-form input[type="text"] {
    flex: 1 1 150px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.pa-action-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.pa-action-form .btn-primary,
.pa-action-form .btn-secondary,
.pa-action-form .btn-danger {
    min-height: 42px;
    flex-shrink: 0;
}

.pa-timeline {
    display: grid;
    gap: 0;
}

.pa-timeline-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-top: 1px solid var(--line-soft);
}

.pa-timeline-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.pa-timeline-row strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.pa-timeline-row p {
    margin: 3px 0 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.pa-timeline-row time {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.pa-note {
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--surface-soft);
}

.pa-note p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.pa-note footer {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

/* --- Link resetu hasła --- */

.reset-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reset-link-input {
    flex: 1 1 320px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.reset-link-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #a06f00;
    font-size: 13px;
    font-weight: 750;
}

/* --- Baner impersonacji --- */

body.impersonation-active {
    padding-bottom: 80px;
}

body.impersonation-active .cookie-notice {
    bottom: 102px;
}

.impersonation-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 11px 16px;
    background: #22314d;
    border-top: 3px solid var(--yellow);
    color: #ffffff;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.32);
}

.impersonation-banner i {
    color: var(--yellow);
    font-size: 20px;
}

.impersonation-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.impersonation-banner-title {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.impersonation-banner-meta {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
}

.impersonation-banner strong {
    font-weight: 900;
    color: #ffffff;
}

.impersonation-banner form {
    margin: 0;
}

.impersonation-banner button {
    min-height: 36px;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: var(--yellow);
    color: #22314d;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.impersonation-banner button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(242, 181, 50, 0.35);
}

.impersonation-banner button i {
    color: inherit;
    font-size: 13px;
}

.pa-impersonate-reason {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    margin-bottom: 6px;
    border: 1px solid var(--border, #d7dce5);
    border-radius: 8px;
    font-size: 12.5px;
}

/* --- Responsywność --- */

@media (max-width: 1160px) {
    .pa-grid,
    .pa-grid-even,
    .pa-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .pa-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .pa-hero-actions {
        width: 100%;
    }

    .pa-hero-actions .btn-ghost,
    .pa-hero-actions .btn-primary {
        flex: 1 1 auto;
        justify-content: center;
    }

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

    .pa-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Poniżej 760px tabele przechodzą w układ kart: nagłówki znikają,
   każda komórka pokazuje etykietę z data-label (wzorzec jak w innych
   modułach z kartami na mobile). */
@media (max-width: 760px) {
    .pa-table thead {
        display: none;
    }

    .pa-table,
    .pa-table tbody,
    .pa-table tr,
    .pa-table td {
        display: block;
        width: 100%;
    }

    .pa-table tr {
        margin-bottom: 12px;
        padding: 6px 0;
        border: 1px solid var(--line-soft);
        border-radius: 14px;
        background: var(--surface);
    }

    .pa-table tbody tr:hover {
        background: var(--surface);
    }

    .pa-table td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 14px;
        border-bottom: 0;
        text-align: right;
    }

    .pa-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        color: #74839a;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        text-align: left;
    }

    .pa-table td[data-label=""]::before,
    .pa-table td:not([data-label])::before {
        content: none;
    }

    .pa-table td.pa-td-main {
        display: block;
        text-align: left;
        padding-bottom: 2px;
    }

    .pa-table td.pa-td-actions {
        display: block;
        text-align: left;
    }

    .pa-table td.pa-td-actions .pa-row-actions {
        justify-content: flex-start;
    }

    .pa-table td.pa-td-actions .pa-row-actions .btn-ghost {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .pa-table td small {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 640px) {
    .pa-hero,
    .pa-card {
        border-radius: var(--radius-md);
    }

    .pa-hero {
        padding: 18px;
    }

    .pa-hero h1 {
        font-size: 23px;
    }

    .pa-tabs .btn-ghost {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .pa-action-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    /* W układzie kolumnowym flex-basis działa na osi pionowej —
       bez resetu selecty/inputy rozciągnęłyby się do 150px wysokości. */
    .pa-action-form-row select,
    .pa-action-form-row input {
        flex: 0 0 auto;
        width: 100%;
    }

    .pa-action-form .btn-primary,
    .pa-action-form .btn-secondary,
    .pa-action-form .btn-danger {
        width: 100%;
        justify-content: center;
    }

    .pa-beta-settings-card,
    .pa-beta-settings-form {
        align-items: stretch;
    }

    .pa-beta-settings-card {
        flex-direction: column;
    }

    .pa-beta-settings-form {
        justify-content: space-between;
    }

    .impersonation-banner {
        gap: 8px;
        padding: 10px 12px;
    }

    .impersonation-banner-title {
        font-size: 13px;
    }

    .impersonation-banner-meta {
        font-size: 12px;
    }

    body.impersonation-active {
        padding-bottom: 128px;
    }

    body.impersonation-active .cookie-notice {
        bottom: 148px;
    }
}

/* Platform admin parity with the shared module workspace. */
.page-wrap-module:has(.pa-page) .pa-page {
    gap: 24px;
}

.page-wrap-module:has(.pa-page) .pa-tabs {
    display: none;
}

.page-wrap-module:has(.pa-page) .pa-hero,
.page-wrap-module:has(.pa-page) .pa-card,
.page-wrap-module:has(.pa-page) .pa-stat-card,
.page-wrap-module:has(.pa-page) .pa-panel {
    border-radius: 24px;
    border-color: #e4ebf5;
    box-shadow: 0 10px 28px rgba(39, 63, 96, 0.07);
}

.page-wrap-module:has(.pa-page) .pa-hero {
    min-height: 124px;
    padding: 24px;
}

.page-wrap-module:has(.pa-page) .pa-hero-icon {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
    font-size: 27px;
}

.page-wrap-module:has(.pa-page) .pa-kicker {
    margin-bottom: 9px;
    padding: 7px 11px;
    font-size: 12px;
}

.page-wrap-module:has(.pa-page) .pa-hero h1 {
    font-size: 30px;
}

.page-wrap-module:has(.pa-page) .pa-hero p {
    margin-top: 8px;
    font-size: 15px;
}

.page-wrap-module:has(.pa-page) .pa-tabs + .pa-filters,
.page-wrap-module:has(.pa-page) .pa-filters {
    padding: 24px;
    gap: 16px;
}

.page-wrap-module:has(.pa-page) .pa-filter-select > span {
    font-size: 12px;
}

.page-wrap-module:has(.pa-page) .pa-filter-select select,
.page-wrap-module:has(.pa-page) .pa-filter-select input {
    min-height: 52px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 14px;
}

.page-wrap-module:has(.pa-page) .pa-stats-grid {
    gap: 16px;
}

.page-wrap-module:has(.pa-page) .pa-stat-card {
    min-height: 104px;
    padding: 18px;
    gap: 14px;
}

.page-wrap-module:has(.pa-page) .pa-stat-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
}

.page-wrap-module:has(.pa-page) .pa-stat-card small {
    font-size: 13px;
}

.page-wrap-module:has(.pa-page) .pa-stat-card strong {
    font-size: 28px;
}

.page-wrap-module:has(.pa-page) .pa-grid {
    gap: 24px;
}

.page-wrap-module:has(.pa-page) .pa-card {
    padding: 28px;
}

.page-wrap-module:has(.pa-page) .pa-card-head {
    margin-bottom: 16px;
}

.page-wrap-module:has(.pa-page) .pa-card-head h2 {
    font-size: 22px;
}

.page-wrap-module:has(.pa-page) .pa-card-head p {
    font-size: 14px;
}

@media (max-width: 1080px) {
    .page-wrap.page-wrap-module:has(.pa-page) {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 22px;
        padding-right: 22px;
    }

    .page-wrap-module:has(.pa-page) .pa-grid,
    .page-wrap-module:has(.pa-page) .pa-grid-even {
        grid-template-columns: 1fr;
    }
}

/* --- Zgłoszenia do bety --- */

.pa-nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 2px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 11.5px;
    font-weight: 900;
    line-height: 1;
}

.pa-beta-contact small {
    display: block;
    color: var(--dark-soft);
}

.pa-beta-message {
    margin-top: 6px;
    font-size: 12.5px;
}

.pa-beta-message summary {
    cursor: pointer;
    color: var(--blue-dark);
    font-weight: 700;
}

.pa-beta-message p {
    margin: 6px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    color: var(--dark-soft);
    white-space: pre-line;
    max-width: 420px;
}

.pa-beta-eta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--dark-soft);
}

.pa-beta-note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--dark-soft);
    max-width: 260px;
    white-space: normal;
}

.pa-beta-settings-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fbfdff 0%, #f4f8ff 100%);
}

.pa-beta-settings-copy {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pa-beta-settings-copy .pa-stat-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    background: var(--blue-soft);
    color: var(--blue);
}

.pa-beta-settings-copy h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

.pa-beta-settings-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 650;
}

.pa-beta-settings-form {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-shrink: 0;
    margin: 0;
}

.pa-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    user-select: none;
}

.pa-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.pa-toggle-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 48px;
    height: 28px;
    padding: 3px;
    border-radius: 999px;
    background: #cbd5e4;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.pa-toggle-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(22, 43, 77, 0.2);
    transition: transform 0.18s ease;
}

.pa-toggle input:checked + .pa-toggle-track {
    background: var(--blue);
}

.pa-toggle input:checked + .pa-toggle-track .pa-toggle-thumb {
    transform: translateX(20px);
}

.pa-toggle input:focus-visible + .pa-toggle-track {
    box-shadow: 0 0 0 4px rgba(40, 116, 234, 0.16);
}

.page-wrap-module:has(.pa-page) .pa-filter-select .flatpickr-input {
    background: var(--surface);
    cursor: pointer;
}

.page-wrap-module:has(.pa-page) .flatpickr-calendar {
    border-color: #dce6f3;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(39, 63, 96, 0.18);
}

.page-wrap-module:has(.pa-page) .flatpickr-current-month,
.page-wrap-module:has(.pa-page) .flatpickr-current-month .flatpickr-monthDropdown-months,
.page-wrap-module:has(.pa-page) .flatpickr-current-month input.cur-year {
    color: var(--text);
    font-weight: 850;
}

.page-wrap-module:has(.pa-page) .flatpickr-day.selected,
.page-wrap-module:has(.pa-page) .flatpickr-day.startRange,
.page-wrap-module:has(.pa-page) .flatpickr-day.endRange {
    border-color: var(--blue);
    background: var(--blue);
}

.page-wrap-module:has(.pa-page) .flatpickr-day:hover {
    border-color: var(--blue-soft);
    background: var(--blue-soft);
}

.pa-beta-eta.is-disabled {
    color: var(--text-muted);
}

.pa-reject-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pa-reject-form input[type="text"] {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    width: 170px;
}

/* --- Zgłoszenia pomocy: treść wiadomości --- */
.pa-support-message {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid #e4ecf7;
    border-radius: 14px;
    background: #f8fbff;
    color: #2c3a55;
    font-size: 14.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* --- Historia odpowiedzi na zgłoszenie --- */
.pa-reply-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pa-reply {
    padding: 14px 16px;
    border: 1px solid #e4ecf7;
    border-radius: 14px;
    background: #ffffff;
}

.pa-reply.is-failed {
    border-color: #f6cfcb;
    background: #fff8f7;
}

.pa-reply .pa-support-message {
    margin-top: 10px;
}

.pa-reply-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.pa-reply-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid #d8e6f7;
    background: #eef5ff;
    color: #285694;
}

.pa-reply-status.is-sent {
    border-color: #bfe6d2;
    background: #edfaf3;
    color: #17693f;
}

.pa-reply-status.is-failed {
    border-color: #f6cfcb;
    background: #fff2f1;
    color: #8f2018;
}

.pa-reply-meta {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.pa-reply .pa-hint.is-danger {
    margin: 10px 0 0;
    color: #8f2018;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.pa-reply .pa-action-form {
    margin-top: 12px;
}

/* --- Ostrzeżenie: organizacja z kontem administratora systemu --- */
.pa-guard-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #f4d59a;
    border-radius: 12px;
    background: #fff8ec;
    color: #7a5314;
}

.pa-guard-note i {
    font-size: 18px;
    line-height: 1.4;
    flex: 0 0 auto;
}

.pa-guard-note p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.pa-guard-note strong {
    color: #6a4710;
}



/* Source: css/pages/imports.css */
/* Wspólny, pełnoszeroki interfejs importów XLSX. */
.import-workflow {
    width: 100%;
    max-width: 100%;
    gap: 14px;
}

.import-workflow .app-page-header {
    margin-bottom: 10px;
}

.import-workflow__steps,
.import-workflow__panel,
.import-workflow__columns-card,
.import-workflow__next-card,
.import-workflow__notice {
    border: 1px solid #dfe8f4;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(28, 57, 97, 0.055);
}

.import-workflow__steps {
    min-height: 74px;
    padding: 12px 20px;
    border-radius: 14px;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(36px, 0.72fr) minmax(240px, 1fr) minmax(36px, 0.72fr) minmax(220px, 1fr);
    align-items: center;
    gap: 14px;
}

.import-workflow__step {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #75849b;
}

.import-workflow__step-number,
.import-workflow__section-index {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid #dce6f3;
    border-radius: 50%;
    background: #f8fbff;
    color: #2a4267;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.import-workflow__step strong,
.import-workflow__step small {
    display: block;
}

.import-workflow__step strong {
    color: #1c2e50;
    font-size: 13px;
    font-weight: 900;
}

.import-workflow__step small {
    margin-top: 3px;
    overflow: hidden;
    color: #72819a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-workflow__step.is-current .import-workflow__step-number {
    border-color: #2369eb;
    background: #2369eb;
    color: #ffffff;
    box-shadow: 0 7px 16px rgba(35, 105, 235, 0.27);
}

.import-workflow__step.is-complete .import-workflow__step-number {
    border-color: #bdeed4;
    background: #e9f9ef;
    color: #15945b;
}

.import-workflow__step.is-current strong { color: #1b54be; }

.import-workflow__step-line {
    height: 1px;
    border-top: 1px dashed #cbd9ec;
}

.import-workflow__panel {
    border-radius: 16px;
    overflow: hidden;
}

.import-workflow__panel-heading {
    padding: 18px 20px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.import-workflow__section-index {
    margin-top: 1px;
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    background: #edf4ff;
    color: #2369eb;
    font-size: 12px;
}

.import-workflow__panel-heading h2,
.import-workflow__columns-card h2,
.import-workflow__next-card h2 {
    margin: 0;
    color: #1a2a49;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 900;
}

.import-workflow__panel-heading p {
    margin: 5px 0 0;
    color: #667792;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.import-workflow__upload-form {
    padding: 0 20px 16px;
}

.import-workflow__dropzone {
    min-height: 112px;
    padding: 17px 22px;
    border: 1.5px dashed #9bbcff;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbfdff, #f4f8ff);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.import-workflow__dropzone:hover,
.import-workflow__upload-form.has-selected-file .import-workflow__dropzone {
    border-color: #2369eb;
    background: #f3f7ff;
    box-shadow: inset 0 0 0 1px rgba(35, 105, 235, 0.08);
}

.import-workflow__file-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #e9f8ef;
    color: #168d55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.import-workflow__dropzone-copy {
    min-width: 0;
    flex: 1;
}

.import-workflow__dropzone-copy strong,
.import-workflow__dropzone-copy small,
.import-workflow__dropzone-copy em {
    display: block;
}

.import-workflow__dropzone-copy strong { color: #19315a; font-size: 14px; font-weight: 900; }
.import-workflow__dropzone-copy small { margin-top: 4px; color: #667792; font-size: 12px; font-weight: 700; }
.import-workflow__dropzone-copy em { margin-top: 9px; color: #2369eb; font-size: 12px; font-style: normal; font-weight: 850; }
.import-workflow__dropzone-action { color: #2b69df; font-size: 25px; }

.import-workflow__dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.import-workflow__upload-actions,
.import-workflow__footer-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.import-workflow__upload-actions > span {
    color: #70809a;
    font-size: 11px;
    font-weight: 750;
}

.import-workflow__upload-actions > span i { margin-right: 5px; color: #158e58; }
.import-workflow__next { min-height: 42px; padding-inline: 18px; }
.import-workflow__next i { margin-left: 7px; }

.import-workflow__upload-form .import-workflow__next[data-import-upload-submit] {
    display: none;
}

.import-workflow__upload-form.has-selected-file .import-workflow__next[data-import-upload-submit] {
    display: inline-flex;
}

.import-workflow__next:disabled {
    border-color: #dbe5f4;
    background: #eaf0fa;
    color: #8b9ab0;
    box-shadow: none;
    cursor: not-allowed;
}

.import-workflow__file-ready {
    min-height: 78px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.import-workflow__file-ready > div { min-width: 0; flex: 1; }
.import-workflow__file-ready strong,
.import-workflow__file-ready small { display: block; }
.import-workflow__file-ready strong { overflow: hidden; color: #1d3155; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.import-workflow__file-ready small { margin-top: 4px; color: #697a94; font-size: 11px; font-weight: 700; }

.import-workflow__sample-panel .import-workflow__panel-heading {
    align-items: center;
}

.import-workflow__sample-panel .import-workflow__panel-heading > div {
    min-width: 0;
    flex: 1;
}

.import-workflow__sample-file {
    min-width: 310px;
    padding: 8px 11px;
    border: 1px solid #e1e9f3;
    border-radius: 10px;
    background: #fbfdff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-workflow__sample-file > i {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: #e9f8ef;
    color: #168d55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.import-workflow__sample-file b,
.import-workflow__sample-file small {
    display: block;
}

.import-workflow__sample-file > span {
    min-width: 0;
    flex: 1;
}

.import-workflow__sample-file b {
    overflow: hidden;
    color: #263a5d;
    font-size: 10px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-workflow__sample-file small {
    margin-top: 2px;
    color: #75859e;
    font-size: 9px;
    font-weight: 750;
}

.import-workflow__sample-download {
    min-height: 29px;
    padding: 0 9px;
    border: 1px solid #cbdcf5;
    border-radius: 7px;
    background: #ffffff;
    color: #1d5fcd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.import-workflow__sample-download:hover {
    border-color: #5d91f4;
    background: #edf4ff;
    color: #174da5;
}

.import-workflow__sample-download i { font-size: 11px; }

.import-workflow__sample-sheet {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border-top: 1px solid #e1e9f3;
    border-bottom: 1px solid #e1e9f3;
    scrollbar-color: #bfd0ec #f5f8fd;
    scrollbar-width: thin;
}

.import-workflow__sample-sheet:focus-visible {
    outline: 3px solid rgba(35, 105, 235, 0.2);
    outline-offset: -3px;
}

.import-workflow__sample-sheet table {
    width: 100%;
    min-width: 1510px;
    border-collapse: separate;
    border-spacing: 0;
    color: #526681;
    font-size: 10px;
    font-weight: 750;
}

.import-workflow__sample-sheet th,
.import-workflow__sample-sheet td {
    min-width: 90px;
    padding: 8px 10px;
    border-right: 1px solid #e3ebf5;
    border-bottom: 1px solid #e3ebf5;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.import-workflow__sample-sheet thead th {
    padding-top: 6px;
    padding-bottom: 7px;
    background: #f5f9ff;
    color: #32506f;
    font-size: 10px;
    font-weight: 900;
}

.import-workflow__sample-sheet thead th.is-required {
    background: #eef9f1;
    color: #1c6845;
}

.import-workflow__sample-sheet thead small,
.import-workflow__sample-sheet thead span {
    display: block;
}

.import-workflow__sample-sheet thead small {
    margin-bottom: 3px;
    color: #7d8fa9;
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
}

.import-workflow__sample-sheet thead span {
    text-align: center;
}

.import-workflow__sample-sheet thead em {
    margin-left: 2px;
    color: #168c55;
    font-size: 10px;
    font-style: normal;
}

.import-workflow__sample-sheet tbody tr:last-child th,
.import-workflow__sample-sheet tbody tr:last-child td {
    border-bottom: 0;
}

.import-workflow__sample-sheet tbody tr:hover td,
.import-workflow__sample-sheet tbody tr:hover th {
    background: #f8fbff;
}

.import-workflow__sample-sheet td:nth-child(7) { min-width: 230px; }
.import-workflow__sample-sheet td:nth-child(8) { min-width: 110px; text-align: right; }
.import-workflow__sample-sheet th:nth-child(7) { min-width: 230px; }

.import-workflow__sample-row-number {
    width: 36px;
    min-width: 36px !important;
    padding-inline: 7px !important;
    background: #f7faff !important;
    color: #7890ae !important;
    text-align: center !important;
}

.import-workflow__sample-foot {
    padding: 9px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    color: #6c7e99;
    font-size: 10px;
    font-weight: 750;
}

.import-workflow__sample-foot i { margin-right: 5px; color: #2369eb; }
.import-workflow__sample-foot span:first-child i { color: #168c55; }

.import-workflow__ready-badge {
    padding: 7px 12px;
    border-radius: 999px;
    background: #eaf9f0;
    color: #168c55;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.import-workflow__ready-badge i { margin-right: 4px; }

.import-workflow__mapping-form { padding: 0 20px 18px; }

.import-workflow__mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.import-workflow__mapping-field {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e1e9f3;
    border-radius: 11px;
    background: #fbfdff;
    display: grid;
    gap: 8px;
}

.import-workflow__mapping-field.is-required { border-color: #d4e9dc; background: #fcfffd; }

.import-workflow__mapping-field-head {
    min-width: 0;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.import-workflow__mapping-field-head i {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #edf3fc;
    color: #56708f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.import-workflow__mapping-field.is-required .import-workflow__mapping-field-head i { background: #e4f7ea; color: #168c55; }
.import-workflow__mapping-field-head b { overflow: hidden; color: #263a5d; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.import-workflow__mapping-field-head em { color: #7990aa; font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.import-workflow__mapping-field.is-required .import-workflow__mapping-field-head em { color: #168c55; }

.import-workflow__mapping-field select {
    width: 100%;
    min-height: 38px;
    padding: 0 32px 0 10px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background-color: #ffffff;
    color: #2b3b59;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
}

.import-workflow__mapping-field select:focus {
    border-color: #6f9bfa;
    outline: 3px solid rgba(35, 105, 235, 0.12);
}

.import-workflow__guide-grid {
    display: grid;
    grid-template-columns: minmax(420px, .95fr) minmax(520px, 1.25fr);
    gap: 14px;
}

.import-workflow__columns-card {
    padding: 18px 20px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 18px;
}

.import-workflow__columns-group h2,
.import-workflow__next-card h2 { font-size: 13px; }
.import-workflow__columns-group h2 i { margin-right: 6px; }
.import-workflow__columns-group.is-required h2 i { color: #15945b; }
.import-workflow__columns-group.is-optional h2 i { color: #5c83e9; }

.import-workflow__columns-group ul {
    margin: 10px 0 0;
    padding: 0;
    columns: 2;
    list-style: none;
}

.import-workflow__columns-group li {
    position: relative;
    margin: 0 0 6px;
    padding-left: 15px;
    break-inside: avoid;
    color: #61738f;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.import-workflow__columns-group li::before {
    content: "";
    position: absolute;
    top: .5em;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #88a9f2;
}

.import-workflow__columns-group.is-required li::before { background: #37b876; }

.import-workflow__next-card { padding: 18px 20px; border-radius: 15px; }

.import-workflow__next-points {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.import-workflow__next-points > span {
    min-height: 76px;
    padding: 11px 10px 10px 47px;
    border: 1px solid #e5ebf4;
    border-radius: 10px;
    position: relative;
}

.import-workflow__next-points i {
    position: absolute;
    top: 11px;
    left: 10px;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: #e9f1ff;
    color: #2a6ee8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.import-workflow__next-points span:nth-child(2) i { background: #f4eaff; color: #8d42d8; }
.import-workflow__next-points span:nth-child(3) i { background: #fff2d8; color: #e28b08; }
.import-workflow__next-points b,
.import-workflow__next-points small { display: block; }
.import-workflow__next-points b { color: #344662; font-size: 10px; font-weight: 900; line-height: 1.25; }
.import-workflow__next-points small { margin-top: 5px; color: #73849e; font-size: 10px; font-weight: 650; line-height: 1.35; }

.import-workflow__notice {
    margin: 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fbff;
    color: #60738f;
    font-size: 11px;
    font-weight: 750;
}

.import-workflow__notice i { margin-right: 8px; color: #2369eb; }

/* Podgląd i decyzje używają tego samego języka wizualnego, niezależnie od modułu. */
.import-workflow .mileage-import-stats { gap: 12px; }
.import-workflow .mileage-stat-card { min-height: 106px; border-radius: 14px; box-shadow: 0 8px 24px rgba(28, 57, 97, 0.05); }
.import-workflow .mileage-panel { border: 1px solid #dfe8f4; border-radius: 16px; box-shadow: 0 10px 30px rgba(28, 57, 97, 0.055); }
.import-workflow .mileage-panel-head { padding: 18px 20px 13px; }
.import-workflow .mileage-import-preview-table { border-color: #e0e8f3; border-radius: 11px; }
.import-workflow .mileage-import-preview-head { background: #f4f8fd; }
.import-workflow .mileage-import-decision { border-radius: 12px; }
.import-workflow .mileage-form-actions { padding: 12px 16px; }
.import-workflow .mileage-import-optimization-card { border-radius: 12px; }

.import-workflow__secondary-import { border: 1px solid #dfe8f4; border-radius: 16px; background: #fbfdff; }
.import-workflow__secondary-import .mileage-panel-head { padding: 17px 20px 0; }
.import-workflow__secondary-import .mileage-import-upload { padding: 14px 20px 18px; }

.import-workflow__provider-picker {
    overflow: hidden;
    border: 1px solid #dfe8f4;
    border-radius: 16px;
    background: #fbfdff;
}

.import-workflow__provider-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 20px 20px;
}

.import-workflow__provider-option {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid #d9e4f1;
    border-radius: 14px;
    background: #fff;
    color: #243a5c;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.import-workflow__provider-option:hover,
.import-workflow__provider-option:focus-visible {
    border-color: #8cb3ef;
    box-shadow: 0 8px 24px rgba(38, 91, 170, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.import-workflow__provider-option[aria-expanded="true"] {
    border-color: #2f73df;
    box-shadow: 0 0 0 3px rgba(47, 115, 223, 0.12);
}

.import-workflow__provider-option span {
    font-size: 17px;
    font-weight: 950;
    letter-spacing: 0.03em;
}

.import-workflow__provider-option small {
    color: #6b7c96;
    font-size: 11px;
    font-weight: 750;
}

.import-workflow__provider-option.is-orlen span { color: #d71920; }
.import-workflow__provider-option.is-mol span { color: #16844f; }

.import-workflow__provider-panel {
    display: grid;
    gap: 16px;
}

.import-workflow__provider-panel[hidden] { display: none; }

@media (max-width: 1100px) {
    .import-workflow__steps { grid-template-columns: minmax(190px, 1fr) 38px minmax(210px, 1fr) 38px minmax(190px, 1fr); padding-inline: 14px; gap: 10px; }
    .import-workflow__guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .import-workflow__steps { grid-template-columns: 1fr; gap: 9px; }
    .import-workflow__step-line { display: none; }
    .import-workflow__step small { white-space: normal; }
    .import-workflow__dropzone { min-height: 136px; align-items: flex-start; padding: 16px; }
    .import-workflow__dropzone-action { display: none; }
    .import-workflow__file-ready { align-items: flex-start; flex-wrap: wrap; }
    .import-workflow__ready-badge { margin-left: 55px; }
    .import-workflow__sample-panel .import-workflow__panel-heading { align-items: flex-start; }
    .import-workflow__sample-file { width: calc(100% - 40px); margin-left: 40px; }
    .import-workflow__sample-foot { align-items: flex-start; flex-direction: column; }
    .import-workflow__mapping-grid { grid-template-columns: 1fr; }
    .import-workflow__columns-card { grid-template-columns: 1fr; }
    .import-workflow__columns-group ul { columns: 1; }
    .import-workflow__next-points { grid-template-columns: 1fr; }
    .import-workflow__provider-options { grid-template-columns: 1fr; }
}



/* Source: css/pages/background-jobs.css */
.background-job-page {
    display: grid;
    min-height: min(70vh, 680px);
    place-items: center;
    padding: 2rem 1rem;
}

.background-job-card {
    max-width: 680px;
    text-align: center;
    width: 100%;
}

.background-job-icon {
    align-items: center;
    background: var(--color-primary-soft, #e8f0ff);
    border-radius: 999px;
    color: var(--color-primary, #2457d6);
    display: inline-flex;
    font-size: 1.5rem;
    height: 3.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 3.5rem;
}

.background-job-card progress {
    accent-color: var(--color-primary, #2457d6);
    height: 0.8rem;
    margin-top: 1.25rem;
    width: 100%;
}

.background-job-meta {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0 1.5rem;
}

.background-job-card .account-actions {
    justify-content: center;
}

.is-hidden {
    display: none !important;
}



/* Source: css/pages/quick-actions.css */
.vehicle-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.vehicle-quick-actions a { min-height: 46px; }
.quick-action-page { max-width: 760px; margin-inline: auto; }
.quick-action-form {
    padding: 24px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    background: var(--surface, #fff);
    display: grid;
    gap: 20px;
    min-width: 0;
}
.quick-action-form > p { margin: 0; color: #475569; }
.quick-action-form .form-group { display: grid; gap: 8px; margin: 0; min-width: 0; }
.quick-action-form .form-group > label { color: #334155; font-weight: 600; }
.quick-action-form :is(input:not([type=hidden]), select, textarea) {
    width: 100%; min-width: 0; min-height: 48px; font-size: 16px;
}
.quick-action-form textarea { resize: vertical; }
.quick-action-form small { color: #475569; line-height: 1.5; }
.quick-action-actions { display: flex; gap: 12px; justify-content: flex-end; }
.quick-action-actions :is(a, button) { min-height: 48px; }
.quick-action-form [role=alert] { color: #991b1b; }
.quick-action-form .quick-issue-file-drop {
    display: grid;
    min-height: 108px;
    padding: 18px;
    border-radius: 12px;
}
.quick-issue-file-drop:focus-within {
    outline: 2px solid var(--blue, #2874ea);
    outline-offset: 3px;
}
.quick-issue-file-drop .service-file-copy { min-width: 0; }
.quick-issue-file-drop .service-file-copy strong { font-size: 14px; font-weight: 650; }
.quick-issue-file-drop .service-file-copy small { margin-top: 5px; font-size: 12px; font-weight: 400; }
.quick-issue-file-drop .service-file-button { min-height: 44px; font-size: 13px; font-weight: 600; }
.quick-issue-file-names { display: block; margin-top: 8px; color: #1f5fc3; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.quick-issue-file-names:empty { display: none; }
.camera-capture { display: grid; gap: 10px; margin-top: 12px; }
.camera-capture[hidden], .camera-capture [hidden] { display: none; }
.camera-capture > button { min-height: 48px; justify-self: start; }
.camera-capture p { margin: 0; color: #475569; font-size: 14px; overflow-wrap: anywhere; }
.camera-capture img { width: 100%; max-width: 320px; max-height: 240px; object-fit: contain; border-radius: 12px; }
.document-optional-fields { grid-column: 1 / -1; }
.document-optional-fields summary { cursor: pointer; padding-block: 12px; font-weight: 600; color: #334155; }
.document-optional-fields .document-editor-grid { padding-top: 12px; }
.vehicle-cost-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-block: 20px; }
.vehicle-cost-insights article { padding: 18px; border: 1px solid #dbe4f0; border-radius: 16px; background: #f8fafc; min-width: 0; }
.vehicle-cost-insights article.is-elevated { border-color: #b45309; background: #fffbeb; }
.vehicle-cost-insights span { display: block; color: #475569; font-size: 14px; }
.vehicle-cost-insights strong { display: block; margin-block: 10px; color: #0f172a; font-size: 22px; overflow-wrap: anywhere; }
.vehicle-cost-insights p, .vehicle-cost-insights small { color: #475569; line-height: 1.5; }
.vehicle-cost-insights p { margin-block: 8px; }
.vehicle-cost-insights .vehicle-cost-data-warning { color: #92400e; font-weight: 600; }
.vehicle-cost-breakdown-item.tone-service > i { color: #7e22ce; }

@media (max-width: 640px) {
    .quick-mobile-flow .module-sidebar, .quick-mobile-flow .main-nav { display: none; }
    .quick-mobile-flow .topbar { position: static; }
    .quick-mobile-flow .topbar .topbar-inner {
        display: flex; flex-wrap: nowrap; justify-content: space-between;
        gap: 8px; padding: 10px 14px;
    }
    .quick-mobile-flow .topbar-account-actions { width: auto; min-width: 0; gap: 8px; }
    .quick-mobile-flow .user-menu-toggle { width: 46px; min-width: 46px; padding: 8px; justify-content: center; }
    .quick-mobile-flow .user-menu-chevron { display: none; }
    .quick-mobile-flow .user-menu-name {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip-path: inset(50%); white-space: nowrap;
    }
    .quick-mobile-flow .fleet-assistant-launcher { bottom: 100px; }
    .quick-mobile-flow .page-wrap-module { padding-top: 16px; }
    .quick-mobile-flow .page-header { margin-bottom: 16px; }
    .vehicle-quick-actions { display: grid; grid-template-columns: 1fr; }
    .vehicle-quick-actions a { justify-content: flex-start; }
    .quick-action-page { padding-inline: 12px; }
    .quick-action-form { padding: 16px; border-radius: 16px; gap: 18px; }
    .quick-action-form .quick-issue-file-drop {
        padding: 16px;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 12px;
    }
    .quick-issue-file-drop .service-file-button { grid-column: 1 / -1; }
    .quick-action-actions, .document-editor-actions {
        position: sticky; bottom: 0; z-index: 10;
        padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
        background: #fff; border-top: 1px solid #e2e8f0;
    }
    .quick-action-actions { display: grid; grid-template-columns: auto 1fr; }
    .document-editor-form :is(input:not([type=hidden]), select, textarea) { font-size: 16px; min-height: 48px; }
    .document-editor-actions :is(a, button), .document-optional-fields summary { min-height: 48px; }
    .camera-capture > button { width: 100%; justify-content: center; }
    .vehicle-cost-insights { grid-template-columns: 1fr; }
}




/* Source: css/responsive.css */
/* Celowo prawie puste.
   Breakpointy zostały przeniesione do plików komponentów i stron,
   żeby style nie nadpisywały się między modułami. */



/* Source: css/wide.css */
@media (min-width: 1900px) {
    :root {
        --container: min(1840px, calc(100vw - 96px));
    }

    .page-wrap {
        padding-top: 32px;
        padding-bottom: 44px;
    }

    .topbar-inner {
        grid-template-columns: 260px minmax(0, 1fr) 220px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .main-nav {
        gap: 42px;
    }

    .alerts-page,
    .leasing-page,
    .subscriptions-page,
    .fines-page,
    .mileage-page,
    .service-shell {
        gap: 24px;
    }

    .fines-hero,
    .service-header {
        padding: 30px;
    }

    .alerts-stats-grid,
    .leasing-stats-grid,
    .subscriptions-stats-grid,
    .fines-stats-grid,
    .mileage-stats-grid,
    .service-stats-grid,
    .stats-grid {
        gap: 18px;
    }

    .alerts-workspace {
        grid-template-columns: minmax(0, 1fr) 420px;
        gap: 20px;
    }

    .leasing-workspace,
    .subscriptions-workspace {
        grid-template-columns: minmax(0, 1fr) 420px;
        gap: 20px;
    }

    .alerts-panel,
    .alerts-side-card,
    .leasing-panel,
    .subscriptions-panel,
    .fines-panel,
    .mileage-panel,
    .service-panel {
        padding: 20px;
    }

    .alerts-table-head,
    .alerts-row-main {
        grid-template-columns:
            minmax(250px, 1.45fr)
            minmax(180px, 1fr)
            minmax(120px, 0.5fr)
            minmax(100px, 0.4fr)
            minmax(150px, 0.62fr)
            minmax(110px, 0.36fr);
        gap: 14px;
    }

    .service-shell {
        grid-template-columns: 238px minmax(0, 1fr);
        gap: 28px;
    }

    .service-content-grid {
        grid-template-columns: minmax(360px, 0.76fr) minmax(0, 1.24fr);
        gap: 24px;
    }

    .service-content-grid.compact {
        grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
    }

    .service-consumable-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 490px), 1fr));
        gap: 18px;
    }

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

    .leasing-filter-form,
    .subscriptions-filter-form,
    .fines-filter-form,
    .mileage-filter-form {
        gap: 12px;
    }

    .leasing-search-box,
    .subscriptions-search-box,
    .fines-search-box,
    .mileage-search-box {
        flex-basis: 520px;
    }

    .fines-table {
        min-width: 1240px;
    }

    .leasing-table-head,
    .leasing-row {
        min-width: 1280px;
    }

    .subscriptions-table {
        min-width: 980px;
    }
}

@media (min-width: 1900px) {
    .vehicles-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vehicle-card {
        grid-template-columns: minmax(220px, 0.72fr) minmax(300px, 1fr);
    }
}

@media (min-width: 2400px) {
    :root {
        --container: min(1960px, calc(100vw - 160px));
    }
}



.topbar {
    z-index: 1200;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
}

.topbar .topbar-inner {
    display: grid;
    grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) minmax(210px, 290px);
    align-items: center;
    gap: 18px;
    width: 100%;
}

.brand {
    gap: 12px;
}

.brand-mark-img {
    width: 40px;
    height: 34px;
    display: block;
    object-fit: contain;
}

.brand-logo {
    width: 150px;
    height: auto;
    display: block;
}

.brand-icon {
    font-size: 36px;
}

.fleet-mark {
    width: 38px;
    height: 30px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.fleet-mark span {
    position: absolute;
    left: 2px;
    height: 8px;
    border-radius: 999px 999px 999px 5px;
    background: linear-gradient(135deg, #6a8cff 0%, #1f5ff2 100%);
    transform: skewX(-17deg);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.fleet-mark span:nth-child(1) {
    top: 1px;
    width: 32px;
}

.fleet-mark span:nth-child(2) {
    top: 11px;
    width: 24px;
}

.fleet-mark span:nth-child(3) {
    top: 21px;
    width: 15px;
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

.main-nav {
    justify-content: center;
    gap: 16px;
}

.nav-item {
    min-height: 44px;
    padding: 9px 12px 13px;
    border-radius: 999px;
    color: #42516c;
    font-size: 15px;
    font-weight: 750;
}

.nav-item::before {
    inset: 3px -4px 8px;
    border-radius: 999px;
    background: #f5f8ff;
    box-shadow: none;
}

.nav-item.active {
    color: #0f5fe8;
}

.nav-item.active::after {
    bottom: 1px;
    max-width: 72px;
    height: 3px;
    background: #0f6bff;
    box-shadow: 0 7px 14px rgba(15, 107, 255, 0.22);
}

.nav-dropdown,
.nav-dropdown-service,
.nav-dropdown-compact {
    width: 360px;
    padding: 12px 0;
    border-radius: 18px;
    border-color: rgba(120, 139, 170, 0.25);
    box-shadow: 0 24px 54px rgba(28, 45, 75, 0.14);
}

.nav-dropdown-compact {
    width: 330px;
}

.nav-dropdown-label {
    padding: 0 18px 8px;
    font-size: 11px;
    letter-spacing: 0;
}

.nav-dropdown-link {
    margin: 0 10px;
    padding: 10px 10px;
    border-radius: 14px;
    gap: 12px;
}

.nav-dropdown-link:hover {
    background: #f4f8ff;
}

.nav-dropdown-link.active {
    background: #eef5ff;
}

.nav-dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.nav-dropdown-divider {
    margin: 10px 18px;
}

.user-menu {
    position: relative;
    justify-self: end;
    z-index: 1300;
}

.user-menu-toggle {
    min-height: 48px;
    padding: 6px 14px 6px 8px;
    border: 1px solid rgba(134, 152, 184, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #20304d;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(42, 63, 95, 0.08);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.user-menu-toggle:hover,
.user-menu.open .user-menu-toggle {
    transform: translateY(-1px);
    border-color: rgba(40, 116, 234, 0.38);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(42, 80, 140, 0.14);
}

.user-menu-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f2f7ff 0%, #dceaff 100%);
    color: #1f6fea;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.user-menu-name {
    max-width: 150px;
    color: #1d2c48;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-chevron {
    color: #63728a;
    font-size: 12px;
    transition: transform 0.22s ease;
}

.user-menu.open .user-menu-chevron {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 318px;
    padding: 14px 0;
    border: 1px solid rgba(134, 152, 184, 0.25);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(31, 45, 72, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    transform-origin: top right;
    transition:
        opacity 0.16s ease,
        transform 0.22s cubic-bezier(0.2, 0.85, 0.2, 1.1),
        visibility 0s linear 0.18s;
    z-index: 1400;
}

.user-menu.open > .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
    animation: user-menu-pop 0.24s ease both;
}

.user-menu-dropdown.is-closing {
    visibility: visible;
    pointer-events: none;
    transition: none;
    animation: user-menu-pop-out 0.18s ease both;
}

@keyframes user-menu-pop {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    68% {
        opacity: 1;
        transform: translateY(-2px) scale(1.012);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes user-menu-pop-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
}

.user-menu-section-label {
    padding: 0 20px 10px;
    color: #7b88a3;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.user-menu-link {
    margin: 0 10px;
    width: calc(100% - 20px);
    min-height: 42px;
    padding: 0 12px;
    border-radius: 13px;
    color: #52627b;
    font-size: 14px;
    font-weight: 750;
}

.user-menu-link:hover,
.user-menu-link.active {
    background: #f2f7ff;
    color: #145ed7;
}

.user-menu-link i {
    width: 22px;
    color: #6f80a0;
    font-size: 18px;
}

.user-menu-link:hover i,
.user-menu-link.active i {
    color: #145ed7;
}

.user-menu-divider {
    margin: 10px 18px;
}

@media (max-width: 1220px) {
    .topbar .topbar-inner {
        grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(180px, 240px);
        gap: 12px;
    }

    .main-nav {
        gap: 10px;
    }

    .nav-item {
        min-height: 42px;
        padding: 8px 9px 12px;
        font-size: 14px;
    }

    .brand-icon {
        font-size: 32px;
    }

    .brand-text {
        font-size: 20px;
    }

    .user-menu-name {
        max-width: 90px;
    }
}

@media (max-width: 980px) {
    .topbar .topbar-inner {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .main-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .user-menu {
        justify-self: start;
    }

    .topbar-account-actions {
        justify-self: start;
    }

    .nav-dropdown {
        left: 0;
        transform: translateY(14px) scale(0.985);
    }

    /* Anchor trailing menus inward; early menus still need their left edge. */
    .main-nav > .nav-group:nth-child(n + 4):last-child .nav-dropdown {
        left: auto;
        right: 0;
    }

    .nav-group:hover .nav-dropdown,
    .nav-group:focus-within .nav-dropdown {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .nav-dropdown,
    .nav-dropdown-service,
    .nav-dropdown-compact {
        display: none;
    }
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Skip-link: pierwszy element w tab-order aplikacji zalogowanej. Ukryty poza
   ekranem do fokusu klawiaturą, wtedy widoczny nad treścią; cel: #main-content.
   (Strony marketingowe mają własny skip-link w landing.css.) */
.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 1000;
    padding: 10px 18px;
    background: var(--blue-dark, #123a63);
    color: #fff;
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
    outline: 3px solid var(--blue, #2563eb);
    outline-offset: 2px;
}

/* Kontener treści przyjmuje fokus ze skip-linku, ale nie rysujemy ramki wokół
   całej strony — użytkownik przechodzi dalej Tabem do właściwych kontrolek. */
#main-content:focus {
    outline: none;
}
