:root {
    --bg: #f4f4f1;
    --surface: #ffffff;
    --surface-soft: #f8f8f6;
    --surface-dark: #171717;
    --text: #17191d;
    --muted: #7d838c;
    --line: #e6e6e2;
    --line-strong: #d7d8d4;
    --primary: #246bfd;
    --primary-dark: #1555dc;
    --accent: #ff6b4a;
    --success: #1f9d65;
    --danger: #c94b4b;
    --sidebar: #f7f7f4;
    --shadow: 0 14px 34px rgba(23, 25, 29, 0.07);
    --radius: 18px;
    --radius-small: 10px;
    --touch: 46px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.app {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 224px;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    transition: transform 0.2s ease;
}

.brand {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
}

.brand-mark,
.auth-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-copy {
    display: grid;
    line-height: 1.05;
}

.brand-copy strong {
    font-size: 15px;
}

.brand-copy span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: grid;
    gap: 4px;
    padding: 14px 12px;
}

.nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    color: #5e636b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-link:hover {
    background: #ecece8;
    color: var(--text);
}

.nav-link:active {
    transform: scale(0.985);
}

.nav-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #ebebe7;
    color: #454a51;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.nav-letter {
    font-size: 12px;
    font-weight: 800;
}

.sidebar-user {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid var(--line);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-badge strong,
.user-badge small {
    display: block;
}

.user-badge strong {
    font-size: 13px;
}

.user-badge small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.user-avatar,
.topbar-user-symbol {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-dark);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.user-avatar {
    width: 38px;
    height: 38px;
    font-size: 11px;
}

.content {
    min-height: 100vh;
    margin-left: 224px;
    width: calc(100% - 224px);
    transition: margin-left 0.2s ease, width 0.2s ease;
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar.closed ~ .content {
    margin-left: 0;
    width: 100%;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    background: rgba(244, 244, 241, 0.93);
    border-bottom: 1px solid rgba(215, 216, 212, 0.8);
    backdrop-filter: blur(16px);
}

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

.menu-toggle {
    width: 44px;
    height: 44px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}

.topbar-title {
    display: grid;
    gap: 2px;
}

.topbar-title span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-title strong {
    font-size: 15px;
}

.topbar-user-symbol {
    width: 38px;
    height: 38px;
    font-size: 11px;
}

.content-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 26px;
}

.page-shell {
    width: 100%;
}

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

.page-head h1,
.form-head h1,
.form-head h2 {
    margin: 3px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.eyebrow {
    color: #858a91;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

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

.btn {
    min-height: var(--touch);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.btn:hover {
    border-color: #c6c7c2;
    background: #fafafa;
}

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

.btn-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.btn-secondary {
    background: #f0f0ec;
}

.btn-dark {
    border-color: var(--surface-dark);
    background: var(--surface-dark);
    color: #fff;
}

.btn-dark:hover {
    border-color: #0f1115;
    background: #0f1115;
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    font-size: 17px;
    line-height: 1;
}

.back-btn {
    margin-bottom: 14px;
}

.tile,
.form-card,
.filter-card,
.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tile {
    overflow: hidden;
}

.filter-card {
    margin-bottom: 14px;
    padding: 14px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 0.7fr)) auto;
    gap: 10px;
    align-items: end;
}

.filter-grid.compact {
    grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(150px, 0.8fr)) auto;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.field-label,
.form-field {
    display: grid;
    gap: 7px;
    color: #555b63;
    font-size: 12px;
    font-weight: 700;
}

.input {
    width: 100%;
    min-height: var(--touch);
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.11);
}

.data-table-wrap {
    width: 100%;
}

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

.data-table th,
.data-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table th {
    background: #fbfbf9;
    color: #717780;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.data-table tbody tr {
    transition: background 0.13s ease;
}

.data-table tbody tr:hover {
    background: #fafaf8;
}

.table-sort {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.sort-mark {
    color: var(--primary);
    font-size: 12px;
}

.text-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #1c4f9f;
    font-weight: 800;
    cursor: pointer;
}

.table-footer {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: #fbfbf9;
}

.table-meta {
    color: var(--muted);
    font-size: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 10px;
}

.page-btn.active {
    border-color: var(--surface-dark);
    background: var(--surface-dark);
    color: #fff;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
}

.status-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a8acb2;
}

.status-dot.active::before {
    background: var(--success);
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #efefeb;
    color: #63676e;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.form-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.form-card {
    padding: 20px;
}

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

.form-grid.single {
    grid-template-columns: 1fr;
}

.checkline {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
}

.checkline input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-section-title {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
}

.roles-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
}

.permission-groups {
    display: grid;
    gap: 12px;
}

.permission-group {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.permission-group h3 {
    margin: 0 0 10px;
    font-size: 13px;
}

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

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

.dashboard-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.dashboard-card-dark {
    background: var(--surface-dark);
    color: #fff;
}

.dashboard-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #efefeb;
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
}

.dashboard-card-dark .dashboard-card-icon {
    background: var(--accent);
    color: #fff;
}

.dashboard-kicker {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-card-dark .dashboard-kicker {
    color: #a9acb1;
}

.dashboard-card h2 {
    margin: 6px 0;
    font-size: 24px;
}

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

.dashboard-card-dark p {
    color: #c7c9cc;
}

.auth-page,
.install-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(36, 107, 253, 0.10), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(255, 107, 74, 0.08), transparent 28%),
        var(--bg);
}

.auth-card {
    width: min(560px, 100%);
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.install-card {
    width: min(460px, 100%);
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 28px);
    min-width: 0;
}

.auth-heading {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.auth-title {
    min-width: 0;
}

.auth-logo {
    flex: 0 0 clamp(110px, 24vw, 170px);
    width: clamp(110px, 24vw, 170px);
    max-width: 170px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.auth-card h1,
.install-card h1 {
    margin: 4px 0 0;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.auth-card form,
.install-card form {
    display: grid;
    gap: 13px;
}

.auth-link {
    color: #515760;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.notice.error {
    padding: 11px 12px;
    border: 1px solid #edcaca;
    border-radius: 9px;
    background: #fff3f3;
    color: #9f3030;
    font-size: 13px;
}

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 3px;
    display: none;
}

.global-loader.show {
    display: block;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.alert-system {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 220;
    width: min(360px, calc(100% - 36px));
}

.alert-system-info {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    padding: 13px 15px;
    border-radius: 10px;
    background: var(--surface-dark);
    color: #fff;
    box-shadow: var(--shadow);
    font-size: 13px;
}

.alert-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary);
    transform-origin: left center;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(22, 23, 24, 0.48);
}

.confirm-modal.show {
    display: grid;
}

.confirm-card {
    width: min(420px, 100%);
    padding: 20px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.sidebar-backdrop {
    display: none;
}

.empty-state {
    padding: 28px 16px;
    color: var(--muted);
    text-align: center;
}

.input-error {
    border-color: var(--danger) !important;
}

.field-error-text {
    margin-top: 4px;
    color: var(--danger);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .filter-grid,
    .filter-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-actions {
        grid-column: 1 / -1;
    }

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

    .dashboard-card:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    :root {
        --touch: 48px;
        --radius: 15px;
    }

    .sidebar {
        width: min(82vw, 320px);
        transform: translateX(-100%);
        box-shadow: 18px 0 44px rgba(20, 22, 25, 0.16);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.closed {
        transform: translateX(-100%);
    }

    .content,
    .sidebar.closed ~ .content {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-backdrop.show {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        background: rgba(17, 18, 20, 0.42);
    }

    .topbar {
        min-height: 64px;
        padding: 8px 12px;
    }

    .topbar-title span {
        display: none;
    }

    .content-inner {
        padding: 14px 12px 24px;
    }

    .page-head,
    .form-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-head h1,
    .form-head h1,
    .form-head h2 {
        font-size: 28px;
    }

    .toolbar {
        width: 100%;
    }

    .toolbar .btn {
        flex: 1 1 auto;
    }

    .filter-grid,
    .filter-grid.compact,
    .form-grid,
    .roles-box,
    .permission-list,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        grid-column: auto;
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
    }

    .dashboard-card:first-child {
        grid-column: auto;
    }

    .dashboard-card {
        min-height: 160px;
    }

    .form-card {
        padding: 15px;
    }

    .data-table-wrap {
        overflow: visible;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table {
        padding: 0;
    }

    .data-table tbody {
        display: grid;
        gap: 10px;
        padding: 10px;
    }

    .data-table tr {
        overflow: hidden;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: var(--surface);
    }

    .data-table tbody tr:hover {
        background: var(--surface);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(105px, 36%) 1fr;
        gap: 10px;
        padding: 8px 0;
        border: 0;
        border-bottom: 1px solid #efefec;
        font-size: 13px;
    }

    .data-table td:last-child {
        border-bottom: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: #858a91;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .data-table td.table-actions-cell {
        display: flex;
        justify-content: flex-end;
        padding-top: 12px;
    }

    .data-table td.table-actions-cell::before {
        display: none;
    }

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

    .pagination {
        width: 100%;
    }

    .page-btn {
        flex: 1;
        min-width: 42px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .back-btn {
        width: 100%;
    }

    .auth-card,
    .install-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .auth-header {
        align-items: center;
        gap: 16px;
    }

    .auth-heading {
        gap: 14px;
    }

    .auth-logo {
        flex-basis: 112px;
        width: 112px;
        max-width: 112px;
    }

    .auth-card h1 {
        font-size: 26px;
    }

    .alert-system {
        top: 10px;
        right: 10px;
        width: calc(100% - 20px);
    }
}

.notice-inline {
    padding: 12px 14px;
    border: 1px solid #dce5fa;
    border-radius: 10px;
    background: #f2f6ff;
    color: #36527d;
    font-size: 12px;
    font-weight: 700;
}

.filter-grid-spaced {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .data-table td.empty-state {
        display: block;
        padding: 20px 8px;
        text-align: center;
    }

    .data-table td.empty-state::before {
        display: none;
    }
}


/* V1 UI - wspolny standard list, filtrow i akcji */
.users-filter-grid {
    grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(150px, 1fr));
}

.filter-actions-bottom {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.filter-actions-bottom .btn {
    min-width: 132px;
}

.input-date {
    min-height: var(--touch);
    width: 100%;
    color: var(--text);
    background: var(--surface);
    color-scheme: light;
}

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

.check-card {
    min-height: 72px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.check-card span {
    display: grid;
    gap: 3px;
}

.check-card strong {
    font-size: 13px;
}

.check-card small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
}

.table-actions-head {
    width: 1%;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.btn-small {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 12px;
}

.btn-danger {
    border-color: #efcece;
    background: #fff7f7;
    color: var(--danger);
}

.btn-danger:hover {
    background: #fdeeee;
}

@media (max-width: 1100px) {
    .users-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .topbar {
        position: relative;
        min-height: 58px;
        padding: 7px 10px;
    }

    .content-inner {
        padding-top: 12px;
    }

    .users-filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions-bottom {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        margin-top: 12px;
    }

    .filter-actions-bottom .btn {
        width: 100%;
        min-width: 0;
    }

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

    .table-actions-cell {
        display: block !important;
    }

    .table-actions-cell::before {
        display: block !important;
        margin-bottom: 8px;
        content: attr(data-label) !important;
    }

    .table-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .table-actions .btn {
        width: 100%;
    }
}

/* MODUL ZLECENIA */
.orders-filter-grid {
    grid-template-columns: minmax(260px, 1.7fr) repeat(5, minmax(140px, 0.8fr));
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
}

.order-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-color);
}

.order-form-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.order-form-card {
    padding: 0;
    overflow: hidden;
}

.form-tabs {
    display: flex;
    gap: 4px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: #fbfbf9;
}

.form-tab-btn {
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #666c74;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.form-tab-btn.active {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(20, 22, 25, 0.05);
}

.form-tab-panel {
    display: none;
    padding: 0 20px 20px;
}

.form-tab-panel.active {
    display: block;
}

.order-section-first {
    margin-top: 0;
    padding-top: 22px;
    border-top: 0;
}

.order-main-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-customer-grid {
    grid-template-columns: 1.4fr 0.8fr 1fr;
}

.full-width {
    grid-column: 1 / -1;
}

.order-notes {
    min-height: 120px;
    resize: vertical;
}

.form-section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.form-section-title-row .form-section-title {
    margin-bottom: 4px;
}

.section-note,
.field-hint {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.field-hint.warning {
    color: #b42318;
    font-weight: 800;
}

.vehicle-registration-field {
    position: relative;
}

.vehicle-suggestions {
    position: absolute;
    z-index: 40;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    display: none;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 16px 32px rgba(20, 22, 25, 0.13);
}

.vehicle-suggestions.show {
    display: block;
}

.vehicle-suggestion {
    width: 100%;
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    text-align: left;
    cursor: pointer;
}

.vehicle-suggestion:last-child {
    border-bottom: 0;
}

.vehicle-suggestion:hover {
    background: #f7f8fa;
}

.vehicle-suggestion strong {
    font-size: 13px;
}

.vehicle-suggestion span {
    color: var(--muted);
    font-size: 11px;
}

.aztec-scan-box {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px dashed #9fb7ec;
    border-radius: 14px;
    background: #f4f7fe;
}

.aztec-scan-box[hidden],
.aztec-result[hidden] {
    display: none;
}

.aztec-scan-box > div:nth-child(2) {
    flex: 1;
    display: grid;
    gap: 5px;
}

.aztec-scan-box span {
    color: var(--muted);
    font-size: 12px;
}

.aztec-scan-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 26px;
}

.aztec-capture-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.aztec-result {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfbf9;
}

.aztec-warning {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid #f1c3ba;
    border-radius: 10px;
    background: #fff5f2;
    color: #8a2d1f;
    font-size: 12px;
}

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

.aztec-preview-grid > div {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.aztec-preview-grid span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.aztec-preview-grid strong {
    font-size: 13px;
}

.aztec-result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.order-items {
    display: grid;
    gap: 10px;
}

.order-item-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfbf9;
}

.order-item-remove {
    min-height: var(--touch);
}

.order-totals {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 14px;
}

.order-totals > div {
    min-width: 180px;
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--surface-dark);
    color: #fff;
}

.order-totals span {
    color: #bfc3c9;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.order-totals strong {
    font-size: 20px;
}

.order-form-actions {
    margin: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--line);
    background: #fbfbf9;
}

@media (max-width: 1100px) {
    .orders-filter-grid,
    .order-main-grid,
    .order-customer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-item-row {
        grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(120px, 0.5fr));
    }

    .order-item-remove {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media (max-width: 768px) {
    .orders-filter-grid,
    .order-main-grid,
    .order-customer-grid,
    .aztec-preview-grid {
        grid-template-columns: 1fr;
    }

    .order-form-meta {
        flex-direction: column;
        gap: 3px;
    }

    .form-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-tab-btn {
        flex: 0 0 auto;
        min-width: 128px;
    }

    .form-tab-panel {
        padding: 0 14px 14px;
    }

    .form-section-title-row {
        flex-direction: column;
    }

    .form-section-title-row .btn {
        width: 100%;
    }

    .aztec-scan-box {
        align-items: stretch;
        flex-direction: column;
    }

    .aztec-scan-box .btn {
        width: 100%;
    }

    .aztec-result-actions {
        flex-direction: column-reverse;
    }

    .aztec-result-actions .btn {
        width: 100%;
    }

    .order-item-row {
        grid-template-columns: 1fr;
    }

    .order-item-remove {
        grid-column: auto;
        width: 100%;
    }

    .order-totals {
        flex-direction: column;
    }

    .order-totals > div {
        min-width: 0;
        width: 100%;
    }

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

/* Orders module styles */
.vehicle-registration-field,
.contractor-search-field,
.order-item-name {
    position: relative;
}

.vehicle-suggestions,
.contractor-suggestions,
.service-suggestions {
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    display: none;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--line, #dfe3e8);
    background: #fff;
    box-shadow: 0 14px 34px rgba(20, 28, 38, .14);
}

.vehicle-suggestions.show,
.contractor-suggestions.show,
.service-suggestions.show {
    display: block;
}

.vehicle-suggestion,
.contractor-suggestion,
.service-suggestion {
    width: 100%;
    min-height: 48px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.vehicle-suggestion:hover,
.contractor-suggestion:hover,
.service-suggestion:hover {
    background: #f5f7fa;
}

.vehicle-suggestion span,
.contractor-suggestion span {
    font-size: 11px;
    color: #6b7280;
}

.vehicle-new-check,
.inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #4b5563;
}

.contractor-source-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.contractor-source-actions > span {
    font-size: 12px;
    color: #6b7280;
}

.mileage-hint.warning {
    color: #b42318;
    font-weight: 700;
}

.order-signature-section {
    margin: 18px 20px;
    border-top: 1px solid var(--line, #e3e6ea);
    padding-top: 18px;
}

.signature-pad-wrap {
    position: relative;
    height: 220px;
    margin-top: 12px;
    border: 1px solid #cfd5dc;
    background:
        linear-gradient(#fff, #fff) padding-box,
        repeating-linear-gradient(0deg, transparent, transparent 39px, #edf0f3 40px) border-box;
    touch-action: none;
    overflow: hidden;
}

.signature-pad {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.signature-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: #9ca3af;
    font-size: 13px;
}

.orders-pdf-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(10, 15, 22, .72);
}

.orders-pdf-window {
    width: min(1180px, 96vw);
    height: min(900px, 94vh);
    display: grid;
    grid-template-rows: auto 1fr;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.orders-pdf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.orders-pdf-actions {
    display: flex;
    gap: 8px;
}

.orders-pdf-window iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #60656c;
}

.orders-settings-card {
    margin-bottom: 16px;
    padding: 18px;
}

.orders-settings-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.orders-settings-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line, #e3e6ea);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.orders-settings-main {
    display: grid;
    gap: 3px;
}

.orders-settings-main span {
    font-size: 11px;
    color: #6b7280;
}

@media (max-width: 768px) {
    .contractor-source-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .contractor-source-actions > span {
        grid-column: 1 / -1;
    }

    .order-signature-section {
        margin: 14px;
    }

    .signature-pad-wrap {
        height: 180px;
    }

    .orders-pdf-modal {
        padding: 0;
    }

    .orders-pdf-window {
        width: 100vw;
        height: 100vh;
    }

    .orders-pdf-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .orders-pdf-actions {
        width: 100%;
    }

    .orders-pdf-actions .btn {
        flex: 1;
    }

    .orders-settings-row {
        grid-template-columns: 12px 1fr;
    }

    .orders-settings-row .table-actions {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Wspólny podgląd dokumentów PDF */
.app-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    background: rgba(15, 23, 42, .72);
}
.app-pdf-window {
    width: min(95vw, 1600px);
    height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 70px rgba(0,0,0,.28);
}
.app-pdf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15,23,42,.1);
}
.app-pdf-actions { display: flex; gap: 8px; }
.app-pdf-window iframe { width: 100%; flex: 1; border: 0; background: #f3f4f6; }
@media (max-width: 768px) {
    .app-pdf-modal { padding: 0; }
    .app-pdf-window { width: 100vw; height: 100vh; border-radius: 0; }
    .app-pdf-head { align-items: flex-start; flex-direction: column; }
    .app-pdf-actions { width: 100%; }
    .app-pdf-actions .btn { flex: 1; }
}

/* Ustawienia */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-card {
    min-height: 116px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.settings-card:hover {
    border-color: var(--line-strong);
    background: #fafafa;
}

.settings-card:active {
    transform: translateY(1px);
}

.settings-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-dark);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.settings-card-body {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.settings-card-body strong {
    font-size: 17px;
    line-height: 1.2;
}

.settings-card-body small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-card-arrow {
    color: #8b9096;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    text-align: right;
}

.settings-form-card {
    max-width: 900px;
}

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

    .settings-card {
        min-height: 100px;
        grid-template-columns: 44px minmax(0, 1fr) 24px;
        padding: 16px;
    }

    .settings-card-icon {
        width: 44px;
        height: 44px;
    }
}

/* Ustawienia - kolory statusów */
.color-picker-control {
    min-height: var(--touch);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--surface);
    cursor: pointer;
}

.status-color-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.color-picker-preview {
    width: 34px;
    height: 28px;
    flex: 0 0 34px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.color-picker-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.color-picker-control:focus-within,
.color-picker-control:hover {
    border-color: var(--primary);
}

.status-color-chip {
    width: 54px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.status-color-chip > span {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 5px;
}

/* Zlecenia - stawka VAT */
.order-items-tools {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.order-vat-field {
    min-width: 180px;
}

@media (max-width: 768px) {
    .order-items-head {
        align-items: stretch;
    }

    .order-items-tools {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .order-vat-field,
    .order-items-tools .btn {
        width: 100%;
    }
}
.color-picker-control {
    position: relative;
}

.status-color-picker {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    pointer-events: auto;
}

/* Kartoteki */
.catalog-history-card {
    margin-top: 18px;
}

.catalog-history-card .section-head {
    padding: 16px 18px 6px;
}

.catalog-history-card .section-head h2 {
    margin: 0;
    font-size: 17px;
}

/* Zlecenia - listy podpowiedzi */
.vehicle-suggestions,
.service-suggestions {
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Zlecenia - kontrahent jako pełna kartoteka wyboru */
.contractor-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.contractor-selected[hidden] {
    display: none;
}

.contractor-picker-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
}

.contractor-picker-table {
    max-height: 360px;
    overflow-y: auto;
}

.contractor-quick-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.contractor-quick-form[hidden] {
    display: none;
}

.order-complaint-check {
    align-self: end;
    min-height: var(--touch);
}

@media (max-width: 768px) {
    .vehicle-suggestions,
    .service-suggestions {
        max-height: 200px;
    }

    .contractor-picker-search {
        grid-template-columns: 1fr;
    }

    .contractor-picker-search .btn {
        width: 100%;
    }

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

.order-type-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff3cd;
    border: 1px solid #f1d58a;
    color: #7a5400;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

/* read-only kartoteki */
.record-view-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:22px 0 4px}.record-field{min-height:70px;padding:13px 15px;border:1px solid var(--line);border-radius:8px;background:#fff}.record-field span{display:block;margin-bottom:6px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.record-field strong{display:block;color:var(--text);font-size:14px;line-height:1.45;white-space:pre-wrap}.record-span-2{grid-column:span 2}@media(max-width:720px){.record-view-grid{grid-template-columns:1fr}.record-span-2{grid-column:span 1}}

/* Podsumowanie zlecenia */
.order-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    max-width: 720px;
    margin: 18px 18px 18px auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.order-summary-cell {
    min-height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 14px 18px;
    border-right: 1px solid var(--line);
}
.order-summary-cell:last-child { border-right: 0; }
.order-summary-cell span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.order-summary-cell strong {
    color: var(--text);
    font-size: 19px;
    line-height: 1.1;
    white-space: nowrap;
}
.order-summary-total { background: var(--surface-soft); }
.order-summary-total strong { font-size: 22px; }

/* Uniwersalna historia zmian */
.audit-list {
    display: grid;
    gap: 12px;
    padding: 18px;
}
.audit-entry {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
}
.audit-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}
.audit-entry-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.audit-entry-head strong { font-size: 13px; }
.audit-entry-head time {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.audit-action {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.audit-action-create { border-color: #b9ddc7; background: #eef9f2; color: #267044; }
.audit-action-update { border-color: #cbd5e1; background: #f7f9fb; color: #475569; }
.audit-action-delete { border-color: #efc4c4; background: #fff3f3; color: #a23131; }
.audit-changes { display: grid; }
.audit-change {
    display: grid;
    grid-template-columns: minmax(140px, 210px) minmax(0, 1fr);
    gap: 18px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
}
.audit-change:last-child { border-bottom: 0; }
.audit-change > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.audit-change > div {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: start;
    gap: 10px;
    font-size: 13px;
}
.audit-change del,
.audit-change ins {
    display: block;
    min-width: 0;
    padding: 7px 9px;
    border-radius: 7px;
    white-space: pre-wrap;
    word-break: break-word;
    text-decoration: none;
}
.audit-change del { background: #fff5f5; color: #7d3636; }
.audit-change ins { background: #f1f8f4; color: #275f3d; }
.audit-change b { padding-top: 7px; color: var(--muted); }
.audit-simple { padding: 14px; color: var(--muted); font-size: 13px; }
.audit-empty { margin: 18px; }

@media (max-width: 768px) {
    .order-summary {
        grid-template-columns: 1fr;
        max-width: none;
        margin: 14px 0 0;
        border-radius: 8px;
    }
    .order-summary-cell {
        min-height: 62px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .order-summary-cell:last-child { border-bottom: 0; }
    .audit-list { padding: 12px; }
    .audit-entry-head { align-items: flex-start; flex-direction: column; }
    .audit-change { grid-template-columns: 1fr; gap: 7px; }
    .audit-change > div { grid-template-columns: 1fr; }
    .audit-change b { display: none; }
}

/* Stanowiska / dzienny planer warsztatu */
.station-page-head { align-items: center; }
.station-calendar-nav {
    display: grid;
    grid-template-columns: auto auto minmax(140px,auto) minmax(260px,1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}
.station-date-label { text-align:center; font-size:18px; font-weight:800; }
.station-date-jump { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.station-board {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 14px;
    align-items: start;
}
.station-column {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.station-column-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    min-height:68px;
    padding:13px 14px;
    border-bottom:1px solid var(--line);
    background:var(--surface-soft);
}
.station-column-head strong { display:block; font-size:15px; }
.station-column-head span { display:block; margin-top:3px; color:var(--muted); font-size:12px; }
.station-column-head small { color:var(--muted); font-size:11px; white-space:nowrap; }
.station-track { position:relative; height:var(--station-height); min-height:180px; }
.station-slot {
    position:absolute;
    left:0; right:0;
    display:flex;
    align-items:flex-start;
    padding:7px 8px 0 9px;
    border-bottom:1px solid var(--line);
    background:linear-gradient(to right,var(--surface-soft) 0,var(--surface-soft) 53px,transparent 53px);
}
.station-slot > span { width:44px; flex:0 0 44px; color:var(--muted); font-size:10px; font-weight:800; }
.station-slot-add {
    margin-left:auto;
    width:26px;height:26px;
    border:1px dashed var(--line-strong,var(--line));
    border-radius:6px;
    background:#fff;
    color:var(--muted);
    cursor:pointer;
    opacity:.55;
}
.station-slot:hover .station-slot-add { opacity:1; }
.station-entry {
    position:absolute;
    left:58px; right:7px;
    z-index:3;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
    padding:7px 9px;
    overflow:hidden;
    border:1px solid #cbd5e1;
    border-left:4px solid #64748b;
    border-radius:8px;
    background:#fff;
    color:var(--text);
    text-align:left;
    cursor:pointer;
    box-shadow:0 2px 8px rgba(15,23,42,.05);
}
.station-entry:hover { box-shadow:0 5px 14px rgba(15,23,42,.1); }
.station-entry-order { border-left-color:#345bd6; background:#f8faff; }
.station-entry-quick { border-left-color:#7a8798; }
.station-entry.station-state-in_progress { border-left-color:#d8951b; background:#fffaf0; }
.station-entry.station-state-completed { border-left-color:#3b9363; background:#f6fbf8; opacity:.82; }
.station-entry.station-overdue { border-color:#d8951b; border-left-color:#c56b1b; }
.station-entry.station-due { border-color:#6d87dc; }
.station-entry-time { font-size:10px; font-weight:900; letter-spacing:.03em; }
.station-entry strong { max-width:100%; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.station-entry > span:not(.station-entry-time), .station-entry small { max-width:100%; font-size:10px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.station-entry em { font-size:9px; font-style:normal; font-weight:900; color:#9b5a12; text-transform:uppercase; letter-spacing:.03em; }
.station-empty { display:flex; align-items:center; gap:12px; justify-content:center; min-height:160px; }
.station-suggestions { margin-top:16px; padding:14px; border:1px solid var(--line); border-radius:9px; background:var(--surface-soft); }
.station-suggestions > strong { display:block; margin-bottom:10px; font-size:12px; }
.station-suggestions > div { display:flex; flex-wrap:wrap; gap:8px; }
.table-subline { display:block; margin-top:3px; color:var(--muted); font-size:11px; }

@media (max-width: 900px) {
    .station-calendar-nav { grid-template-columns:auto 1fr auto; }
    .station-calendar-nav > .btn:nth-child(2) { display:none; }
    .station-date-label { grid-column:2; grid-row:1; }
    .station-date-jump { grid-column:1 / -1; grid-row:2; }
    .station-board { grid-template-columns:1fr; }
}

/* Stanowiska v3 - planer interaktywny */
.station-calendar-nav {
    grid-template-columns: auto auto minmax(260px,auto) minmax(260px,1fr) auto;
}
.station-date-label {
    font-size: 17px;
    line-height: 1.25;
}
.station-track { overflow: hidden; }
.station-slot {
    appearance: none;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background .15s ease;
    background: linear-gradient(to right,var(--surface-soft) 0,var(--surface-soft) 58px,transparent 58px);
}
button.station-slot:hover { background: linear-gradient(to right,var(--surface-soft) 0,var(--surface-soft) 58px,rgba(52,91,214,.045) 58px); }
.station-slot-start {
    position: absolute;
    left: 9px;
    top: 7px;
    width: 42px;
    color: var(--text);
    font-size: 10px;
    font-weight: 900;
}
.station-slot-end {
    position: absolute;
    left: 9px;
    bottom: 6px;
    width: 42px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    opacity: .72;
}
.station-now-line {
    position: absolute;
    left: 54px;
    right: 0;
    z-index: 6;
    height: 1px;
    background: currentColor;
    color: #b45309;
    pointer-events: none;
}
.station-now-line::before {
    content: "";
    position: absolute;
    left: -4px;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.station-now-line span {
    position: absolute;
    right: 5px;
    top: -15px;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--surface);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .06em;
}
.station-entry { left: 63px; }
.station-overlay-shell { padding: 22px; }
.station-entry-mode { display:flex; gap:8px; margin-bottom:14px; }
.station-selected-order {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
    padding:13px 14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface-soft);
}
.station-selected-order > div { min-width:0; display:grid; gap:2px; }
.station-selected-order span { font-size:9px; font-weight:900; letter-spacing:.08em; color:var(--muted); }
.station-selected-order strong { font-size:15px; }
.station-selected-order small { color:var(--muted); }
.station-autocomplete { position:relative; }
.station-autocomplete-list {
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    z-index:30;
    max-height:240px;
    overflow-y:auto;
    border:1px solid var(--line);
    border-top:0;
    border-radius:0 0 9px 9px;
    background:var(--surface);
    box-shadow:0 12px 28px rgba(15,23,42,.12);
}
.station-autocomplete-list button {
    display:grid;
    width:100%;
    gap:2px;
    padding:10px 12px;
    border:0;
    border-bottom:1px solid var(--line);
    background:transparent;
    color:var(--text);
    text-align:left;
    cursor:pointer;
}
.station-autocomplete-list button:last-child { border-bottom:0; }
.station-autocomplete-list button:hover { background:var(--surface-soft); }
.station-autocomplete-list button strong { font-size:12px; }
.station-autocomplete-list button span,
.station-autocomplete-list button small { color:var(--muted); font-size:10px; }
.station-vehicle-card {
    display:grid;
    gap:3px;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--surface-soft);
}
.station-vehicle-card strong { font-size:16px; }
.station-vehicle-card span { font-weight:700; }
.station-vehicle-card small { color:var(--muted); line-height:1.45; }
.station-print-list { display:grid; gap:9px; margin-top:7px; }

.content-overlay {
    position:fixed;
    inset:0;
    z-index:1200;
    display:none;
    align-items:center;
    justify-content:center;
    padding:24px;
}
.content-overlay.show { display:flex; }
.content-overlay-backdrop {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    border:0;
    background:rgba(15,23,42,.42);
    cursor:default;
}
.content-overlay-panel {
    position:relative;
    z-index:1;
    width:min(1240px,94vw);
    max-height:92vh;
    overflow:auto;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--page-bg,#f7f7f5);
    box-shadow:0 28px 70px rgba(15,23,42,.22);
}
.content-overlay-inner { min-height:120px; }
.content.overlay-lock { overflow:hidden; }

@media (max-width: 900px) {
    .station-calendar-nav { grid-template-columns:auto 1fr auto; }
    .station-date-label { font-size:14px; }
    .station-overlay-shell { padding:14px; }
    .content-overlay { padding:0; align-items:stretch; }
    .content-overlay-panel { width:100%; max-height:none; height:100%; border:0; border-radius:0; }
    .content-overlay-inner { min-height:100%; }
    .station-autocomplete-list { max-height:200px; }
}


/* Stanowiska v4 - inteligentne terminy i przenoszenie */
.station-move-banner {
    display:flex;
    align-items:center;
    gap:8px;
    margin:0 0 14px;
    padding:10px 12px;
    border:1px solid var(--line);
    border-left:4px solid #345bd6;
    border-radius:9px;
    background:var(--surface-soft);
    font-size:12px;
}
.station-move-banner span { color:var(--muted); }
.station-move-banner .btn { margin-left:auto; }
.station-entry {
    display:grid;
    grid-template-columns:auto minmax(70px,1.15fr) minmax(66px,.8fr) minmax(90px,1fr);
    align-items:center;
    gap:7px;
    padding:5px 9px;
}
.station-entry-time { white-space:nowrap; }
.station-entry-title,.station-entry-vehicle,.station-entry-client {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.station-entry-title { font-size:11px!important; }
.station-entry-vehicle,.station-entry-client { font-size:10px!important; color:var(--muted); }
.station-entry em { grid-column:2 / -1; }
.station-datetime-field { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.station-datetime-field .btn { min-width:72px; }
@media (max-width: 620px) {
    .station-entry { grid-template-columns:auto minmax(0,1fr) minmax(72px,.8fr); }
    .station-entry-client { grid-column:2 / -1; }
    .station-entry em { grid-column:2 / -1; }
    .station-move-banner { align-items:flex-start; flex-wrap:wrap; }
    .station-move-banner .btn { margin-left:0; }
}


/* Stanowiska v5 - komunikaty zawsze ponad formularzem */
.alert-system {
    z-index: 20000 !important;
}
@media (max-width: 900px) {
    .alert-system {
        top: 10px;
        right: 10px;
        width: min(360px, calc(100% - 20px));
    }
}
\n\n/* Stanowiska v6 - czytelniejsze wpisy planera */\n.station-entry {\n    display:block;\n    padding:7px 10px 6px;\n}\n.station-entry-mainline {\n    display:grid;\n    grid-template-columns:auto minmax(120px,1fr) minmax(180px,1.35fr) minmax(170px,1.1fr);\n    gap:10px;\n    align-items:center;\n    min-width:0;\n}\n.station-entry-mainline > * { min-width:0; }\n.station-entry-time { font-size:10px; font-weight:900; white-space:nowrap; color:var(--text); }\n.station-entry-title { font-size:11px!important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }\n.station-entry-vehicle { font-size:10px!important; color:var(--text)!important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }\n.station-entry-vehicle b { font-weight:900; }\n.station-entry-client { font-size:10px!important; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }\n.station-entry-subline {\n    display:flex;\n    align-items:center;\n    flex-wrap:wrap;\n    gap:6px 10px;\n    margin-top:5px;\n    padding-left:0;\n}\n.station-entry-status {\n    display:inline-flex;\n    align-items:center;\n    gap:5px;\n    font-size:9px;\n    font-weight:800;\n    color:var(--muted);\n}\n.station-entry-status::before {\n    content:"";\n    width:7px; height:7px;\n    border-radius:50%;\n    background:var(--status-color,#94a3b8);\n    box-shadow:0 0 0 1px rgba(15,23,42,.12);\n}\n.station-entry-mechanic { font-size:9px; color:var(--muted); }\n.station-entry-attention { font-size:9px; font-weight:900; color:#9b5a12; text-transform:uppercase; letter-spacing:.03em; }\n.station-entry-notes {\n    margin-top:4px;\n    font-size:10px;\n    line-height:1.25;\n    color:var(--text);\n    white-space:nowrap;\n    overflow:hidden;\n    text-overflow:ellipsis;\n}\n.station-entry.station-past {\n    background:#f2f3f4;\n    border-color:#d8dade;\n    border-left-color:#a7adb6;\n    color:#727780;\n    box-shadow:none;\n}\n.station-entry.station-past .station-entry-title,\n.station-entry.station-past .station-entry-vehicle,\n.station-entry.station-past .station-entry-time,\n.station-entry.station-past .station-entry-notes { color:#727780!important; }\n.station-entry.station-past .station-entry-client,\n.station-entry.station-past .station-entry-mechanic,\n.station-entry.station-past .station-entry-status { color:#9398a0!important; }\n.station-entry.station-state-completed { opacity:.72; }\n@media (max-width:900px){\n    .station-entry-mainline { grid-template-columns:auto minmax(0,1fr) minmax(110px,.9fr); gap:6px 8px; }\n    .station-entry-client { grid-column:2 / -1; }\n    .station-entry-notes { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }\n}\n@media (max-width:620px){\n    .station-entry-mainline { grid-template-columns:auto minmax(0,1fr); }\n    .station-entry-vehicle,.station-entry-client { grid-column:2; }\n}\n
/* Stanowiska v7 - dane wpisu w osobnych wierszach */
.station-entry-stack {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    width:100%;
    min-width:0;
    gap:1px;
}
.station-entry-stack > * {
    display:block;
    width:100%;
    min-width:0;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere;
    word-break:normal;
}
.station-entry-stack .station-entry-time {
    font-size:10px;
    line-height:1.15;
    font-weight:900;
    color:var(--text);
}
.station-entry-stack .station-entry-title,
.station-entry-stack .station-entry-vehicle {
    font-size:11px!important;
    line-height:1.18;
    font-weight:800;
    color:var(--text)!important;
}
.station-entry-stack .station-entry-vehicle strong {
    font-size:inherit;
    line-height:inherit;
    font-weight:900;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
}
.station-entry-stack .station-entry-client {
    font-size:10.5px!important;
    line-height:1.18;
    color:var(--text)!important;
    font-weight:600;
}
.station-entry-stack .station-entry-notes {
    margin-top:1px;
    font-size:10px;
    line-height:1.18;
    color:var(--text);
    font-weight:400;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    overflow-wrap:anywhere;
}
.station-entry-subline {
    width:100%;
    margin-top:3px;
}
.station-entry.station-past .station-entry-stack .station-entry-title,
.station-entry.station-past .station-entry-stack .station-entry-vehicle,
.station-entry.station-past .station-entry-stack .station-entry-client,
.station-entry.station-past .station-entry-stack .station-entry-notes,
.station-entry.station-past .station-entry-stack .station-entry-time {
    color:#727780!important;
}
@media (max-width:620px){
    .station-entry-stack .station-entry-title,
    .station-entry-stack .station-entry-vehicle { font-size:10.5px!important; }
    .station-entry-stack .station-entry-client,
    .station-entry-stack .station-entry-notes { font-size:10px!important; }
}
\n\n/* Stanowiska v8 - zwarty wpis: 4 linie */\n.station-entry-compact{display:flex;flex-direction:column;gap:1px;width:100%;min-width:0;overflow:hidden;}\n.station-entry-line{display:block;width:100%;min-width:0;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.16;}\n.station-entry-line-main{display:flex;align-items:baseline;gap:7px;min-width:0;}\n.station-entry-line-main .station-entry-time{flex:0 0 auto;font-size:10px;font-weight:900;color:var(--text);white-space:nowrap;}\n.station-entry-line-main .station-entry-title{flex:0 1 auto;min-width:28px;max-width:32%;font-size:10.5px!important;font-weight:800;color:var(--text)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}\n.station-entry-line-main .station-entry-vehicle{flex:1 1 0;min-width:0;font-size:10.5px!important;font-weight:800;color:var(--text)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}\n.station-entry-compact .station-entry-client{font-size:10px!important;font-weight:600;color:var(--text)!important;}\n.station-entry-compact .station-entry-notes{margin:0!important;font-size:10px!important;font-weight:400;color:var(--text)!important;}\n.station-entry-status-line{display:flex;align-items:center;gap:8px;min-width:0;}\n.station-entry-status-line .station-entry-status{min-width:0;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}\n.station-entry-status-line .station-entry-attention{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}\n.station-entry.station-past .station-entry-compact .station-entry-time,\n.station-entry.station-past .station-entry-compact .station-entry-title,\n.station-entry.station-past .station-entry-compact .station-entry-vehicle,\n.station-entry.station-past .station-entry-compact .station-entry-client,\n.station-entry.station-past .station-entry-compact .station-entry-notes{color:#727780!important;}\n@media(max-width:620px){\n  .station-entry-line-main{gap:5px;}\n  .station-entry-line-main .station-entry-title{max-width:30%;font-size:10px!important;}\n  .station-entry-line-main .station-entry-vehicle{font-size:10px!important;}\n  .station-entry-compact .station-entry-client,.station-entry-compact .station-entry-notes{font-size:9.5px!important;}\n}\n
/* Stanowiska v9 - zwarta typografia wpisu, 4 linie mieszczace sie w slocie */
.station-entry{
    padding:4px 8px 3px;
    gap:0;
}
.station-entry-compact{
    gap:0;
    line-height:1;
}
.station-entry-line{
    line-height:1.08!important;
    min-height:0;
}
.station-entry-line-main .station-entry-time{
    font-size:9px!important;
    line-height:1.08!important;
}
.station-entry-line-main .station-entry-title,
.station-entry-line-main .station-entry-vehicle{
    font-size:9.5px!important;
    line-height:1.08!important;
}
.station-entry-compact .station-entry-client,
.station-entry-compact .station-entry-notes{
    font-size:8.8px!important;
    line-height:1.08!important;
    font-weight:400;
}
.station-entry-status-line{
    line-height:1.05!important;
    gap:6px;
}
.station-entry-status-line .station-entry-status,
.station-entry-status-line .station-entry-attention,
.station-entry-status-line .station-entry-mechanic{
    font-size:8px!important;
    line-height:1.05!important;
}
.station-entry-status::before{
    width:5px;
    height:5px;
}
@media(max-width:620px){
    .station-entry{padding:4px 6px 3px;}
    .station-entry-line-main{gap:4px;}
    .station-entry-line-main .station-entry-time{font-size:8.7px!important;}
    .station-entry-line-main .station-entry-title,
    .station-entry-line-main .station-entry-vehicle{font-size:9px!important;}
    .station-entry-compact .station-entry-client,
    .station-entry-compact .station-entry-notes{font-size:8.5px!important;}
    .station-entry-status-line .station-entry-status,
    .station-entry-status-line .station-entry-attention,
    .station-entry-status-line .station-entry-mechanic{font-size:7.8px!important;}
}

/* Stanowiska v10 - hierarchia warstw: formularz < potwierdzenia < komunikaty */
.confirm-modal {
    z-index: 30000 !important;
}
.alert-system {
    z-index: 40000 !important;
}


/* Wspolny interfejs list i akcji */
.record-list-table .record-list-row {
    cursor: pointer;
    transition: background-color .14s ease;
}
.record-list-table .record-list-row:hover td {
    background: rgba(15, 23, 42, .025);
}
.record-list-table .table-actions-head,
.record-list-table .table-actions-cell {
    width: 1%;
    white-space: nowrap;
}
.record-list-table .table-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    width: auto;
}
.record-list-table .table-actions .btn {
    width: auto;
    min-width: 0;
    min-height: 32px;
    padding: 5px 8px;
    white-space: nowrap;
}
.record-detail-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    border:1px solid var(--line);
    border-radius:12px;
    overflow:hidden;
    background:var(--surface);
}
.record-detail-field {
    min-width:0;
    padding:14px 16px;
    border-right:1px solid var(--line);
    border-bottom:1px solid var(--line);
}
.record-detail-field:nth-child(2n){border-right:0;}
.record-detail-field span{display:block;margin-bottom:4px;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);}
.record-detail-field strong,.record-detail-field div{font-size:14px;line-height:1.4;overflow-wrap:anywhere;}
.record-detail-wide{grid-column:1/-1;border-right:0;}
@media(max-width:760px){
    .record-list-table .table-actions-cell{white-space:normal;}
    .record-list-table .table-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:6px;width:100%;}
    .record-list-table .table-actions .btn{width:100%;min-height:34px;padding:6px 7px;}
    .record-detail-grid{grid-template-columns:1fr;}
    .record-detail-field,.record-detail-field:nth-child(2n){border-right:0;}
}

/* Wspolne akcje mobilne - zwarty rzad bez wychodzenia poza karte */
@media (max-width: 760px) {
    .record-list-table td.table-actions-cell,
    .record-list-table .table-actions-cell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    .record-list-table td.table-actions-cell::before,
    .record-list-table .table-actions-cell::before {
        display: block !important;
        margin-bottom: 6px;
    }

    .record-list-table .table-actions {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .record-list-table .table-actions .btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 32px !important;
        padding: 5px 4px !important;
        font-size: 10.5px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        box-sizing: border-box;
    }
}

/* Orders - customer/contractor handling */
.contractor-picker-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.contractor-picker-pagination[hidden] {
    display: none;
}

.order-customer-suggestions {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    overflow: hidden;
}

.order-customer-suggestions[hidden] {
    display: none;
}

.order-customer-suggestions-title {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.order-customer-suggestion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.order-customer-suggestion:last-child {
    border-bottom: 0;
}

.order-customer-suggestion-text {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.order-customer-suggestion-text strong,
.order-customer-suggestion-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-customer-suggestion-text strong {
    font-size: 13px;
}

.order-customer-suggestion-text span {
    color: var(--muted);
    font-size: 11px;
}

.order-customer-suggestion-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
}

@media (max-width: 768px) {
    .contractor-picker-pagination {
        justify-content: space-between;
    }

    .order-customer-suggestion {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .order-customer-suggestion-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-customer-suggestion-actions .btn {
        width: 100%;
    }
}

/* Pulpit roboczy */
.dashboard-page{display:grid;gap:18px;}
.dashboard-head{margin-bottom:0;}
.dashboard-section{display:grid;gap:10px;}
.dashboard-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.dashboard-section-head h2,.dashboard-panel-head h2{margin:0;font-size:16px;line-height:1.2;}
.dashboard-shortcuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;}
.dashboard-shortcut{min-height:78px;display:flex;align-items:center;gap:11px;padding:13px 14px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--text);text-align:left;cursor:pointer;box-shadow:0 5px 18px rgba(23,25,29,.035);transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease;}
.dashboard-shortcut:hover{border-color:var(--line-strong);transform:translateY(-1px);box-shadow:0 9px 22px rgba(23,25,29,.065);}
.dashboard-shortcut-mark{width:34px;height:34px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;background:#efefeb;color:#34383e;font-size:12px;font-weight:900;}
.dashboard-shortcut strong{font-size:13px;line-height:1.2;}
.dashboard-shortcut-primary{background:var(--primary);border-color:var(--primary);color:#fff;}
.dashboard-shortcut-primary .dashboard-shortcut-mark{background:rgba(255,255,255,.17);color:#fff;font-size:20px;font-weight:600;}
.dashboard-shortcut-primary:hover{border-color:var(--primary-dark);background:var(--primary-dark);}
.dashboard-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.dashboard-summary-card{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:68px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);}
.dashboard-summary-card span{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.035em;}
.dashboard-summary-card strong{font-size:24px;line-height:1;}
.dashboard-work-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start;}
.dashboard-panel{min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden;box-shadow:0 7px 22px rgba(23,25,29,.04);}
.dashboard-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 15px;border-bottom:1px solid var(--line);}
.dashboard-panel-kicker{display:block;margin-bottom:4px;font-size:9px;font-weight:800;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;}
.dashboard-records{display:grid;}
.dashboard-empty{padding:24px 16px;color:var(--muted);font-size:12px;text-align:center;}
.dashboard-record{width:100%;min-width:0;display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:11px;padding:11px 14px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);text-align:left;}
.dashboard-record:last-child{border-bottom:0;}
.dashboard-record-button{cursor:pointer;transition:background .14s ease;}
.dashboard-record-button:hover{background:var(--surface-soft);}
.dashboard-record-time,.dashboard-record-date{display:grid;align-content:center;justify-items:start;line-height:1.05;}
.dashboard-record-time strong,.dashboard-record-date strong{font-size:13px;}
.dashboard-record-time span,.dashboard-record-date span{margin-top:4px;font-size:10px;color:var(--muted);}
.dashboard-record-body{min-width:0;display:grid;gap:4px;}
.dashboard-record-title{min-width:0;display:flex;align-items:center;gap:7px;overflow:hidden;}
.dashboard-record-title strong,.dashboard-record-title>span:not(.dashboard-order-status){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dashboard-record-title strong{font-size:12px;}
.dashboard-record-title>span{font-size:11px;color:var(--muted);}
.dashboard-record-meta{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:var(--muted);}
.dashboard-record-side{min-width:62px;max-width:105px;text-align:right;}
.dashboard-record-side span,.dashboard-record-side strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dashboard-record-side span{margin-bottom:3px;font-size:8.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;}
.dashboard-record-side strong{font-size:10.5px;}
.dashboard-order-status{position:relative;display:inline-flex!important;align-items:center;gap:5px;flex:0 0 auto;padding:2px 6px;border-radius:999px;background:#f2f2ef!important;color:#555b62!important;font-size:9px!important;font-weight:700;white-space:nowrap;}
.dashboard-order-status:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--dashboard-status,#8b929b);}
@media(max-width:1100px){.dashboard-work-grid{grid-template-columns:1fr;}}
@media(max-width:760px){
    .dashboard-page{gap:14px;}
    .dashboard-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
    .dashboard-shortcut{min-height:62px;padding:10px;gap:9px;border-radius:11px;}
    .dashboard-shortcut-mark{width:30px;height:30px;}
    .dashboard-summary{grid-template-columns:1fr;gap:7px;}
    .dashboard-summary-card{min-height:54px;padding:9px 12px;}
    .dashboard-summary-card strong{font-size:20px;}
    .dashboard-panel-head{padding:12px;}
    .dashboard-record{grid-template-columns:44px minmax(0,1fr) 65px;gap:8px;padding:10px 11px;}
    .dashboard-record-title{display:grid;gap:2px;}
    .dashboard-record-title .dashboard-order-status{justify-self:start;}
    .dashboard-record-side{min-width:0;max-width:65px;}
}

/* Wiadomosci pojazdu */
.message-preview-frame{
    width:100%;
    min-height:360px;
    border:1px solid var(--line,#d9dde3);
    border-radius:10px;
    background:#fff;
}
.attachment-list{display:flex;flex-direction:column;gap:8px;}
.attachment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line,#d9dde3);border-radius:10px;background:#fff;}
.attachment-row>div{min-width:0;display:flex;flex-direction:column;gap:2px;}
.attachment-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.attachment-row small,.muted-text{color:#7b818a;font-size:.82em;}
.recipient-choice-grid{display:flex;flex-wrap:wrap;gap:14px 24px;}
.checkline.is-disabled{opacity:.55;}
@media(max-width:760px){
    .attachment-row{align-items:flex-start;}
    .message-preview-frame{min-height:300px;}
    .recipient-choice-grid{display:grid;grid-template-columns:1fr;gap:10px;}
}

/* Pojazdy - harmonogram i wiadomosci */
.vehicle-tab-toolbar{
    align-items:center;
    min-height:56px;
    margin:6px 0 14px;
    padding:8px 0 12px;
    border-bottom:1px solid var(--line);
}
.vehicle-tab-toolbar .toolbar{
    margin-left:auto;
}
.vehicle-tab-toolbar .btn{
    min-width:118px;
    justify-content:center;
}
.vehicle-message-filters{
    margin-bottom:14px;
    padding:12px 14px;
}
.vehicle-message-filters .filter-grid.compact{
    display:grid;
    grid-template-columns:140px 140px minmax(180px,1fr) minmax(180px,1fr) 150px auto;
    gap:10px;
    align-items:end;
}
.vehicle-message-filters .field-label{
    min-width:0;
}
.vehicle-message-filters .field-label>span{
    margin-bottom:5px;
    font-size:10px;
}
.vehicle-message-filters .input{
    min-height:38px;
    height:38px;
    padding-top:7px;
    padding-bottom:7px;
}
.vehicle-message-filters .filter-actions{
    display:flex;
    gap:7px;
    align-items:center;
    margin:0;
}

.vehicle-message-compose .vehicle-message-vehicle{
    margin-bottom:18px;
}
.vehicle-message-compose .vehicle-message-recipients{
    margin-top:0;
}
.vehicle-message-compose-grid{
    align-items:start;
}
.vehicle-message-body-field{
    width:100%;
}
.vehicle-message-body-field textarea{
    width:100%;
    min-height:360px;
    resize:vertical;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    line-height:1.45;
}

.vehicle-message-detail-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
}
.vehicle-message-meta{
    padding:14px;
}
.vehicle-message-meta-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}
.vehicle-message-meta-item{
    min-width:0;
    padding:9px 10px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--surface-soft);
}
.vehicle-message-meta-item span{
    display:block;
    margin-bottom:3px;
    color:var(--muted);
    font-size:9px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.vehicle-message-meta-item strong{
    display:block;
    min-width:0;
    overflow-wrap:anywhere;
    font-size:11.5px;
    line-height:1.3;
}
.vehicle-message-meta-wide{
    grid-column:span 2;
}
.vehicle-message-error{
    grid-column:1/-1;
    border-color:#e1b2b2;
    background:#fff4f4;
}
.vehicle-message-content,
.vehicle-message-attachments{
    margin-top:12px;
}
.message-preview-frame{
    display:block;
    width:100%;
    height:420px;
    min-height:260px;
    max-height:58vh;
    border:1px solid var(--line,#d9dde3);
    border-radius:10px;
    background:#fff;
}
.attachment-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
}
.attachment-row{
    display:grid;
    grid-template-columns:46px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    padding:9px 10px;
    border:1px solid var(--line,#d9dde3);
    border-radius:10px;
    background:#fff;
}
.attachment-icon{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:8px;
    background:#eceeea;
    color:#41464d;
    font-size:9px;
    font-weight:900;
    letter-spacing:.03em;
}
.attachment-icon-pdf{background:#f6e8e8;color:#9a3e3e;}
.attachment-icon-image{background:#e8f0ea;color:#3f6f4a;}
.attachment-icon-doc{background:#e8edf5;color:#3f5f8f;}
.attachment-icon-sheet{background:#e7f1ea;color:#39724a;}
.attachment-info{
    min-width:0;
    display:grid;
    gap:2px;
}
.attachment-info strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
}
.attachment-info small{
    color:var(--muted);
    font-size:10px;
}

@media(max-width:1180px){
    .vehicle-message-filters .filter-grid.compact{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
    .vehicle-message-filters .filter-actions{
        grid-column:span 3;
        justify-content:flex-end;
    }
}
@media(max-width:760px){
    .vehicle-tab-toolbar{
        min-height:52px;
        padding-top:6px;
    }
    .vehicle-tab-toolbar .btn{
        min-width:104px;
    }
    .vehicle-message-filters .filter-grid.compact{
        grid-template-columns:1fr 1fr;
    }
    .vehicle-message-filters .filter-actions{
        grid-column:1/-1;
        display:grid;
        grid-template-columns:1fr 1fr;
    }
    .vehicle-message-meta-grid{
        grid-template-columns:1fr 1fr;
    }
    .vehicle-message-meta-wide{
        grid-column:1/-1;
    }
    .attachment-grid{
        grid-template-columns:1fr;
    }
    .attachment-row{
        grid-template-columns:40px minmax(0,1fr) auto;
    }
    .attachment-icon{
        width:36px;
        height:36px;
    }
    .message-preview-frame{
        height:360px;
        max-height:55vh;
    }
}


/* Pojazdy - harmonogram / wiadomosci v4 */
.form-span-2{
    grid-column:1 / -1;
}
.vehicle-tab-toolbar{
    display:flex;
    width:100%;
    box-sizing:border-box;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:12px 4px 14px;
}
.vehicle-tab-toolbar .toolbar{
    display:flex;
    margin-left:auto;
    justify-content:flex-end;
    flex:0 0 auto;
}
.vehicle-message-compose,
.vehicle-message-content,
.vehicle-message-attachments,
.vehicle-message-meta{
    box-sizing:border-box;
}
.vehicle-message-content,
.vehicle-message-attachments{
    padding:16px 18px;
}
.vehicle-message-compose .form-grid,
.vehicle-message-compose .form-section,
.vehicle-message-compose .station-vehicle-card{
    width:100%;
    box-sizing:border-box;
}
.vehicle-message-compose-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
}
.vehicle-message-body-field{
    grid-column:1 / -1 !important;
    width:100%;
    min-width:0;
}
.vehicle-message-body-hidden{
    display:none !important;
}
.vehicle-message-editor{
    width:100%;
    min-height:330px;
    max-height:58vh;
    overflow:auto;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    color:var(--text);
    font:inherit;
    line-height:1.5;
    outline:none;
    white-space:normal;
    overflow-wrap:anywhere;
}
.vehicle-message-editor:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(47,107,255,.10);
}
.vehicle-message-editor:empty:before{
    content:'Wpisz treść wiadomości…';
    color:var(--muted);
    pointer-events:none;
}
.vehicle-message-editor p:first-child{margin-top:0;}
.vehicle-message-editor p:last-child{margin-bottom:0;}
@media(max-width:760px){
    .vehicle-tab-toolbar{
        padding:10px 0 12px;
    }
    .vehicle-tab-toolbar .toolbar{
        margin-left:auto;
        width:auto;
    }
    .vehicle-tab-toolbar .btn{
        width:auto;
        min-width:112px;
    }
    .vehicle-message-compose-grid{
        grid-template-columns:1fr;
    }
    .vehicle-message-compose-grid .form-span-2,
    .vehicle-message-body-field{
        grid-column:1;
    }
    .vehicle-message-editor{
        min-height:280px;
        max-height:52vh;
    }
}

/* Powiązania i przechowalnia - pełny box model paneli zakładek */
.form-tab-panel.relations-tab-panel,
.form-tab-panel.tire-tab-panel{
    box-sizing:border-box;
    width:100%;
    padding:22px 20px 20px;
}
.tire-storage-page,
.tire-document-form,
.tire-storage-section,
.tire-summary-grid,
.tire-summary{
    box-sizing:border-box;
}
.tire-summary-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-bottom:16px;
}
.tire-summary{
    padding:18px 20px;
}
.tire-summary-value{
    margin-top:6px;
    font-size:2rem;
    font-weight:800;
    line-height:1;
}
.tire-storage-section{
    margin-bottom:16px;
    padding:20px;
}
.tire-document-form .form-section{
    box-sizing:border-box;
    width:100%;
    margin-top:18px;
}
.tire-new-items-table .input{
    min-width:110px;
}
.tire-new-items-table .tire-sub-input{
    margin-top:6px;
}
@media(max-width:760px){
    .form-tab-panel.relations-tab-panel,
.form-tab-panel.tire-tab-panel{
        padding:18px 14px 16px;
    }
    .tire-summary-grid{
        grid-template-columns:1fr;
    }
    .tire-storage-section{
        padding:14px;
    }
}

/* Przechowalnia opon - formularze z pełnym box modelem i równym paddingiem */
.tire-document-start-card,
.tire-document-form {
    box-sizing: border-box;
    width: 100%;
    padding: 20px;
}
.tire-document-start-card .form-grid,
.tire-document-form .form-grid,
.tire-document-form .form-section,
.tire-document-form .data-table-wrap,
.tire-document-form .input {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}
.tire-document-start-card .vehicle-registration-field {
    position: relative;
    min-width: 0;
}
@media (max-width: 760px) {
    .tire-document-start-card,
    .tire-document-form {
        padding: 15px;
    }
}

/* Przechowalnia opon - czytelny formularz pozycji */
.tire-new-items-section,
.tire-new-items-list,
.tire-new-item-card,
.tire-new-item-grid,
.tire-new-item-head {
    box-sizing: border-box;
}
.tire-new-items-list {
    display: grid;
    gap: 14px;
    width: 100%;
}
.tire-new-item-card {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border, #dfe3e8);
    border-radius: 12px;
    background: var(--surface, #fff);
}
.tire-new-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.tire-new-item-head strong {
    font-size: 1rem;
}
.tire-new-item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}
.tire-new-item-grid .form-field,
.tire-new-item-grid .input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
}
.tire-new-item-grid .tire-field-wide {
    grid-column: span 2;
}

/* Kontrahenci w przechowalni - ten sam czytelny układ co w zleceniu */
.tire-document-form .contractor-picker,
.tire-document-form .contractor-picker-table,
.tire-document-form .contractor-picker-pagination {
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 980px) {
    .tire-new-item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tire-document-form {
        padding: 12px;
    }
    .tire-document-form .form-section {
        margin-top: 14px;
    }
    .tire-new-items-section .section-head {
        align-items: stretch;
        gap: 10px;
    }
    .tire-new-items-section .section-head .btn {
        width: 100%;
    }
    .tire-new-items-list {
        gap: 12px;
    }
    .tire-new-item-card {
        padding: 14px;
        border-radius: 10px;
    }
    .tire-new-item-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .tire-new-item-grid .tire-field-wide {
        grid-column: auto;
    }
    .tire-new-item-head .btn {
        flex: 0 0 auto;
    }
    .tire-document-form .contractor-picker-search {
        grid-template-columns: 1fr;
    }
    .tire-document-form .contractor-picker-search .btn {
        width: 100%;
    }
    .tire-document-form .contractor-picker-pagination {
        gap: 8px;
    }
}

/* Kartoteka pojazdu -> Powiazania: finalny odstep i box model */
.form-tab-panel.relations-tab-panel {
    box-sizing: border-box;
    width: 100%;
    padding: 22px 20px 20px;
}
.form-tab-panel.relations-tab-panel > .vehicle-relation-card {
    box-sizing: border-box;
    width: 100%;
    padding: 20px;
    margin: 0 0 14px 0 !important;
}
.form-tab-panel.relations-tab-panel > .vehicle-relation-card:last-child {
    margin-bottom: 0 !important;
}
.form-tab-panel.relations-tab-panel .vehicle-relation-card .section-head {
    box-sizing: border-box;
    margin-bottom: 16px;
}
.form-tab-panel.relations-tab-panel .vehicle-relation-card .record-view-grid {
    box-sizing: border-box;
    width: 100%;
    margin-top: 0;
}
@media (max-width: 760px) {
    .form-tab-panel.relations-tab-panel {
        padding: 16px 14px;
    }
    .form-tab-panel.relations-tab-panel > .vehicle-relation-card {
        padding: 16px 14px;
    }
    .form-tab-panel.relations-tab-panel .vehicle-relation-card .section-head {
        margin-bottom: 14px;
    }
}

@media (max-width: 420px) {
    .auth-card {
        padding: 20px 16px;
    }

    .auth-header {
        align-items: flex-start;
        gap: 12px;
    }

    .auth-logo {
        flex-basis: 92px;
        width: 92px;
        max-width: 92px;
    }

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

/* Uniwersalne pole wyboru pliku */
.input[type="file"] {
    min-height: var(--touch);
    padding: 5px 6px;
    cursor: pointer;
    overflow: hidden;
    color: var(--muted);
    background: var(--surface);
}
.input[type="file"]::file-selector-button {
    min-height: 34px;
    margin: 0 10px 0 0;
    padding: 7px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.input[type="file"]::file-selector-button:hover {
    border-color: var(--primary);
    background: #f4f7ff;
}

/* Zlecenia -> Zalaczniki */
.order-attachment-filters {
    margin: 0 0 14px;
    padding: 14px;
}
.order-attachment-filter-grid {
    grid-template-columns: minmax(260px, 1fr) auto !important;
    column-gap: 16px;
    row-gap: 10px;
}
.order-attachment-filter-grid .filter-actions {
    align-self: end;
    gap: 10px;
}

@media (max-width: 760px) {
    .order-attachment-filter-grid {
        grid-template-columns: 1fr !important;
    }
    .order-attachment-filter-grid .filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .order-attachment-filter-grid .filter-actions .btn {
        width: 100%;
    }
}


/* Wspolny interfejs: dlugie wartosci w tabelach i kompaktowa paginacja */
.data-table-wrap {
    max-width: 100%;
}

.record-list-table td:not(.table-actions-cell),
.record-list-table td:not(.table-actions-cell) strong,
.record-list-table td:not(.table-actions-cell) a,
.record-list-table td:not(.table-actions-cell) span {
    overflow-wrap: break-word;
    word-break: normal;
}

.pagination {
    max-width: 100%;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 38px;
    padding: 0 3px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    user-select: none;
}

@media (min-width: 761px) {
    .record-list-table td:not(.table-actions-cell),
    .record-list-table th:not(.table-actions-head) {
        min-width: 0;
        max-width: 260px;
        white-space: normal;
    }

    .record-list-table .table-actions-head,
    .record-list-table .table-actions-cell {
        max-width: 220px;
    }
}

@media (max-width: 760px) {
    .table-footer {
        gap: 8px;
    }

    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 5px;
    }

    .pagination .page-btn {
        flex: 0 0 auto;
        min-width: 38px;
        width: auto;
        min-height: 38px;
        padding: 7px 10px;
    }

    .pagination-ellipsis {
        min-width: 20px;
        min-height: 38px;
        padding: 0 1px;
    }

    .data-table td,
    .data-table td strong,
    .data-table td a,
    .data-table td span {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }
}


/* Korekta zawijania w tabelach: nie rozbijaj krotkich statusow litera po literze */
.record-list-table .status-dot,
.record-list-table .order-status,
.data-table .status-dot,
.data-table .order-status {
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .data-table td {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .data-table td > *,
    .data-table td strong,
    .data-table td a,
    .data-table td span {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .data-table .status-dot,
    .data-table .order-status {
        white-space: nowrap;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }
}


/* Stanowiska - spokojne oznaczenie wolnych i zajetych stref */
.station-slot {
    background: linear-gradient(
        to right,
        var(--surface-soft) 0,
        var(--surface-soft) 58px,
        rgba(34, 197, 94, .065) 58px,
        rgba(34, 197, 94, .065) 100%
    ) !important;
    border-bottom-color: rgba(34, 197, 94, .14) !important;
}

button.station-slot:hover {
    background: linear-gradient(
        to right,
        var(--surface-soft) 0,
        var(--surface-soft) 58px,
        rgba(34, 197, 94, .105) 58px,
        rgba(34, 197, 94, .105) 100%
    ) !important;
}

.station-entry,
.station-entry-order,
.station-entry-quick,
.station-entry.station-state-in_progress,
.station-entry.station-state-completed,
.station-entry.station-overdue,
.station-entry.station-due,
.station-entry.station-past {
    background: rgba(239, 68, 68, .075) !important;
    border-color: var(--entry-status-color, rgba(185, 28, 28, .30)) !important;
    border-left-color: var(--entry-status-color, rgba(185, 28, 28, .52)) !important;
}

.station-entry {
    border-left-width: 4px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .045);
}

.station-entry:hover {
    background: rgba(239, 68, 68, .105) !important;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .08);
}

/* Zakonczone wpisy nadal sa delikatnie wyciszone, ale pozostaja oznaczone jako zajete. */
.station-entry.station-state-completed {
    opacity: .82;
}

/* Wpis historyczny nie wraca do szarego tla - zajety termin nadal pozostaje czytelny. */
.station-entry.station-past {
    background: rgba(239, 68, 68, .055) !important;
}

@media (max-width: 620px) {
    .station-slot {
        background: linear-gradient(
            to right,
            var(--surface-soft) 0,
            var(--surface-soft) 52px,
            rgba(34, 197, 94, .065) 52px,
            rgba(34, 197, 94, .065) 100%
        ) !important;
    }

    button.station-slot:hover {
        background: linear-gradient(
            to right,
            var(--surface-soft) 0,
            var(--surface-soft) 52px,
            rgba(34, 197, 94, .105) 52px,
            rgba(34, 197, 94, .105) 100%
        ) !important;
    }
}

/* Stanowiska - korekta widocznosci zajetego wpisu.
   Zielone tlo slotu nie powinno mieszac sie optycznie z czerwienia wpisu. */
.station-entry,
.station-entry-order,
.station-entry-quick,
.station-entry.station-state-planned,
.station-entry.station-state-in_progress,
.station-entry.station-state-completed,
.station-entry.station-overdue,
.station-entry.station-due,
.station-entry.station-past {
    background: rgba(254, 226, 226, .96) !important;
}

.station-entry:hover,
.station-entry-order:hover,
.station-entry-quick:hover {
    background: rgba(254, 202, 202, .92) !important;
}

.station-entry.station-state-completed,
.station-entry.station-past {
    background: rgba(254, 226, 226, .90) !important;
}


/* Stanowiska - tekst wpisu zawsze czytelny, niezaleznie od koloru statusu. */
.station-entry,
.station-entry .station-entry-time,
.station-entry strong,
.station-entry > span,
.station-entry small,
.station-entry em,
.station-entry .station-entry-title,
.station-entry .station-entry-vehicle,
.station-entry .station-entry-client {
    color: #111827 !important;
}

/* Cel oczekujacy na potwierdzenie/przeniesienie. */
.station-slot.station-move-target-pending {
    outline: 2px solid rgba(185, 28, 28, .35);
    outline-offset: -2px;
}

/* Stanowiska - przedluzanie wpisu */
.station-entry-mode .btn[disabled],
.btn.btn-disabled,
.btn[disabled].btn-disabled {
    opacity:.42;
    cursor:not-allowed;
    filter:saturate(.45);
    pointer-events:none;
}
.station-slot.station-extend-target {
    background:rgba(59,130,246,.09) !important;
    box-shadow:inset 0 0 0 2px rgba(59,130,246,.22);
    cursor:pointer;
}
.station-slot.station-extend-target:hover {
    background:rgba(59,130,246,.14) !important;
}
.station-extend-banner {
    border-left-color:#6b7280;
}
@media (max-width:620px) {
    .station-entry-mode {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
    }
    .station-entry-mode .btn {
        min-height:44px;
    }
    .station-slot.station-extend-target {
        box-shadow:inset 0 0 0 2px rgba(59,130,246,.28);
    }
}


/* Stanowiska - graficzne skracanie wpisu */
.station-slot.station-shorten-target {
    z-index: 6;
    background: rgba(148, 163, 184, .20) !important;
    box-shadow: inset 0 0 0 2px rgba(71, 85, 105, .30);
    cursor: pointer;
}
.station-slot.station-shorten-target:hover {
    background: rgba(148, 163, 184, .28) !important;
}
.station-shorten-banner {
    border-left-color: #64748b;
}
@media (max-width:620px) {
    .station-slot.station-shorten-target {
        box-shadow: inset 0 0 0 2px rgba(71, 85, 105, .38);
    }
}


/* Stanowiska - czasowe wyłączenia stanowiska */
.station-block-panel {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    padding:10px 12px;
    margin:0 0 12px;
    border:1px solid rgba(71,85,105,.20);
    background:rgba(248,250,252,.96);
}
.station-block-panel .input { width:auto; min-width:128px; }
.station-slot.station-block-target { cursor:pointer; }
.station-slot.station-block-selected {
    background:linear-gradient(to right,var(--surface-soft) 0,var(--surface-soft) 58px,rgba(71,85,105,.13) 58px,rgba(71,85,105,.13) 100%) !important;
    box-shadow:inset 0 0 0 2px rgba(71,85,105,.24);
}
.station-block {
    position:absolute;
    left:62px;
    right:6px;
    z-index:7;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:6px 10px;
    border:1px solid rgba(71,85,105,.38);
    border-left:4px solid rgba(55,65,81,.60);
    background:repeating-linear-gradient(135deg,rgba(226,232,240,.96) 0,rgba(226,232,240,.96) 8px,rgba(203,213,225,.96) 8px,rgba(203,213,225,.96) 16px);
    color:#111827;
    text-align:left;
    overflow:hidden;
    cursor:pointer;
}
.station-block span { font-weight:700; letter-spacing:.02em; color:#111827; }
.station-block small { color:#111827; white-space:nowrap; }
.station-block:hover { filter:brightness(.98); }
@media (max-width:620px) {
    .station-block-panel { align-items:stretch; }
    .station-block-panel .input,.station-block-panel .btn { min-height:44px; flex:1 1 120px; }
    .station-slot.station-block-selected { background:linear-gradient(to right,var(--surface-soft) 0,var(--surface-soft) 52px,rgba(71,85,105,.13) 52px,rgba(71,85,105,.13) 100%) !important; }
    .station-block { left:56px; padding:6px 8px; }
}


/* Stanowiska - menu dostepnosci i wylaczenia */
.station-column-title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.station-column-title>div:first-child{min-width:0}
.station-more{position:relative;flex:0 0 auto}
.station-more-btn{width:42px;height:42px;border:0;background:transparent;border-radius:8px;font-size:26px;line-height:1;cursor:pointer;color:#111;display:flex;align-items:center;justify-content:center}
.station-more-btn:hover,.station-more.open .station-more-btn{background:rgba(15,23,42,.07)}
.station-more-menu{display:none;position:absolute;right:0;top:44px;z-index:80;min-width:190px;padding:6px;background:#fff;border:1px solid rgba(15,23,42,.14);border-radius:8px;box-shadow:0 10px 28px rgba(15,23,42,.16)}
.station-more.open .station-more-menu{display:block}
.station-more-menu button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:11px 12px;border-radius:6px;font:inherit;color:#111;cursor:pointer}
.station-more-menu button:hover{background:rgba(15,23,42,.06)}
.station-availability-type{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.station-availability-hourly{margin-top:14px}
.station-availability-scale{border:1px solid var(--border,#d9dee7);border-radius:8px;overflow:hidden;background:#fff}
.station-availability-slot{display:block;width:100%;min-height:48px;border:0;border-bottom:1px solid rgba(15,23,42,.10);background:rgba(34,197,94,.055);text-align:left;padding:0 14px;cursor:pointer;color:#111;font:inherit}
.station-availability-slot:last-child{border-bottom:0}
.station-availability-slot.selected{background:rgba(100,116,139,.22);box-shadow:inset 4px 0 0 rgba(71,85,105,.72)}
.station-availability-slot span{font-weight:700}
.station-availability-time-inputs{margin-top:14px}
.station-availability-conflicts{margin-top:16px;border:1px solid rgba(185,28,28,.24);background:rgba(254,226,226,.62);border-radius:8px;padding:10px}
.station-conflict-title{font-weight:800;margin-bottom:6px}
.station-conflict-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid rgba(185,28,28,.14)}
.station-conflict-row:first-of-type{border-top:0}
.station-conflict-row div{min-width:0;display:flex;flex-direction:column;gap:2px}
.station-conflict-row span{font-size:13px}
@media(max-width:760px){
  .station-more-btn{width:46px;height:46px}
  .station-more-menu{position:fixed;left:12px;right:12px;top:auto;bottom:16px;min-width:0}
  .station-more.open .station-more-menu{display:block}
  .station-more-menu button{min-height:48px;font-size:16px}
  .station-availability-type .btn{flex:1 1 0;min-height:46px}
  .station-availability-slot{min-height:54px;font-size:16px}
  .station-conflict-row{align-items:flex-start}
}

/* Stanowiska - menu zawsze nad planerem oraz wielokrotne wyłączenia godzinowe */
.station-column{
    overflow:visible;
    position:relative;
    z-index:1;
}
.station-column.station-menu-open{
    z-index:300;
}
.station-column-head{
    position:relative;
    z-index:40;
    border-radius:10px 10px 0 0;
}
.station-track{
    overflow:hidden;
    border-radius:0 0 10px 10px;
}
.station-more-menu{
    z-index:5000;
}
.station-availability-slot{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.station-availability-slot.anchor{
    background:rgba(59,130,246,.12);
    box-shadow:inset 4px 0 0 rgba(37,99,235,.55);
}
.station-availability-slot.existing,
.station-availability-slot:disabled.existing{
    cursor:not-allowed;
    opacity:1;
    background:repeating-linear-gradient(135deg,rgba(226,232,240,.96) 0,rgba(226,232,240,.96) 8px,rgba(203,213,225,.96) 8px,rgba(203,213,225,.96) 16px);
    color:#111827;
}
.station-availability-existing-label{
    font-size:10px;
    font-weight:800;
    letter-spacing:.03em;
    color:#475569;
}
.station-availability-ranges{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:12px;
}
.station-availability-range-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
    gap:8px;
    align-items:center;
}
.station-availability-range-row .input{
    min-width:0;
    width:100%;
}
.station-range-remove{
    white-space:nowrap;
}
.station-availability-manual{
    margin-top:12px;
}
.station-availability-add-field .btn{
    width:100%;
}
@media(max-width:760px){
    .station-more-menu{
        z-index:10000;
    }
    .station-availability-range-row{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    }
    .station-availability-range-row .station-range-remove{
        grid-column:1 / -1;
        min-height:44px;
    }
    .station-availability-existing-label{
        font-size:9px;
    }
}

/* Stanowiska - kalendarz daty planera */
.station-date-jump { position: relative; display:block; min-width:0; }
.station-mobile-date { display:none; }
.station-desktop-calendar { position:relative; width:100%; }
.station-calendar-trigger {
    width:100%; min-height:46px; display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:0 14px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--text);
    font:inherit; font-weight:600; text-align:left; cursor:pointer;
}
.station-calendar-trigger:hover { border-color:var(--line-strong,var(--line)); }
.station-calendar-trigger-icon { width:16px; height:16px; flex:0 0 16px; position:relative; border:2px solid var(--muted); border-radius:2px; opacity:.8; }
.station-calendar-trigger-icon:before { content:""; position:absolute; left:-2px; right:-2px; top:3px; border-top:2px solid var(--muted); }
.station-calendar-trigger-icon:after { content:""; position:absolute; width:2px; height:4px; left:3px; top:-5px; background:var(--muted); box-shadow:6px 0 0 var(--muted); }
.station-calendar-popover {
    display:none; position:absolute; z-index:1200; top:calc(100% + 7px); right:0; width:286px; padding:14px;
    border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:0 14px 34px rgba(15,23,42,.18);
}
.station-desktop-calendar.open .station-calendar-popover { display:block; }
.station-calendar-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.station-calendar-head strong { font-size:14px; }
.station-calendar-head > div { display:flex; gap:4px; }
.station-calendar-head button { width:34px; height:34px; border:0; border-radius:50%; background:transparent; color:var(--text); font-size:24px; line-height:1; cursor:pointer; }
.station-calendar-head button:hover { background:var(--surface-soft); }
.station-calendar-weekdays,.station-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.station-calendar-weekdays { margin-bottom:4px; }
.station-calendar-weekdays span { display:flex; align-items:center; justify-content:center; height:26px; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; }
.station-calendar-day { aspect-ratio:1; min-width:0; border:0; border-radius:50%; background:transparent; color:var(--text); font:inherit; font-size:12px; cursor:pointer; }
.station-calendar-day:hover { background:var(--surface-soft); }
.station-calendar-day.is-muted { color:var(--muted); opacity:.55; }
.station-calendar-day.is-today { box-shadow:inset 0 0 0 1px var(--line-strong,var(--line)); font-weight:800; }
.station-calendar-day.is-selected { background:var(--accent,#2563eb); color:#fff; font-weight:900; box-shadow:none; }

@media (max-width:900px){
    .station-desktop-calendar { display:none; }
    .station-mobile-date { display:block; width:100%; }
    .station-date-jump { grid-column:1 / -1; grid-row:2; }
}


/* Stanowiska - kalendarz stale wkomponowany w planer na wiekszych ekranach */
.station-planner-top {
    display:grid;
    grid-template-columns:minmax(420px,auto) minmax(120px,1fr) 286px;
    align-items:start;
    gap:18px;
    margin-bottom:18px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface);
}
.station-planner-top .station-calendar-nav {
    display:grid;
    grid-template-columns:auto auto minmax(250px,auto) auto;
    align-items:center;
    gap:10px;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
}
.station-planner-top .station-date-label { text-align:left; white-space:nowrap; }
.station-planner-top-space { min-height:1px; }
.station-calendar-panel {
    width:286px;
    min-height:292px;
    padding:14px;
    border-left:1px solid var(--line);
    background:var(--surface);
    box-sizing:border-box;
}
.station-calendar-panel .station-calendar-head { margin-bottom:12px; }
.station-calendar-panel .station-calendar-day { min-height:34px; }
.station-planner-top .station-date-jump { display:none; }

@media (max-width:1100px){
    .station-planner-top { grid-template-columns:minmax(0,1fr) 270px; }
    .station-planner-top-space { display:none; }
    .station-calendar-panel { width:270px; }
    .station-planner-top .station-calendar-nav { grid-template-columns:auto auto minmax(0,1fr) auto; }
    .station-planner-top .station-date-label { white-space:normal; }
}

@media (max-width:900px){
    .station-planner-top {
        display:block;
        margin-bottom:16px;
        padding:12px;
    }
    .station-calendar-panel { display:none; }
    .station-planner-top .station-calendar-nav {
        display:grid;
        grid-template-columns:auto 1fr auto;
        gap:10px;
    }
    .station-planner-top .station-calendar-nav > .btn:nth-child(2) { display:none; }
    .station-planner-top .station-date-label { grid-column:2; grid-row:1; text-align:center; }
    .station-planner-top .station-calendar-nav > .btn:last-of-type { grid-column:3; grid-row:1; }
    .station-planner-top .station-date-jump { display:block; grid-column:1 / -1; grid-row:2; }
    .station-mobile-date { display:block; width:100%; }
}

/* Stanowiska - przelacznik widoku dzien / tydzien */
.station-view-switch{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px;
    border:1px solid var(--line);
    border-radius:9px;
    background:var(--surface-soft);
}
.station-view-switch .btn{min-height:38px;}
.station-planner-top-space{
    display:flex;
    align-items:flex-start;
    justify-content:flex-start;
}

/* Stanowiska - widok tygodniowy */
.station-week-board{
    display:flex;
    flex-direction:column;
    gap:18px;
    min-width:0;
}
.station-week-station{
    position:relative;
    overflow:visible;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface);
}
.station-week-station-head{
    min-height:62px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:10px 14px;
    border-bottom:1px solid var(--line);
    background:var(--surface);
    border-radius:10px 10px 0 0;
}
.station-week-station-head > small{
    color:var(--muted);
    white-space:nowrap;
    font-size:11px;
}
.station-week-scroll{
    width:100%;
    min-width:0;
    overflow-x:auto;
    overflow-y:visible;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
}
.station-week-grid{
    display:grid;
    grid-template-columns:repeat(7,minmax(150px,1fr));
    min-width:1050px;
    align-items:start;
}
.station-week-day{
    min-width:0;
    border-right:1px solid var(--line);
    background:var(--surface);
}
.station-week-day:last-child{border-right:0;}
.station-week-day.is-today .station-week-day-head{
    background:var(--surface-soft);
}
.station-week-day.is-selected .station-week-day-head{
    box-shadow:inset 0 -2px 0 var(--accent,#2563eb);
}
.station-week-day-head{
    position:sticky;
    top:0;
    z-index:12;
    width:100%;
    min-height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:7px 8px;
    border:0;
    border-bottom:1px solid var(--line);
    background:var(--surface);
    color:var(--text);
    font:inherit;
    cursor:pointer;
}
.station-week-day-head span{
    color:var(--muted);
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.station-week-day-head strong{
    font-size:14px;
    line-height:1;
}
.station-week-day.is-today .station-week-day-head strong{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:32px;
    height:32px;
    padding:0 7px;
    border-radius:18px;
    background:var(--accent,#2563eb);
    color:#fff;
}
.station-week-day .station-track{
    border-radius:0;
    border:0;
    min-width:0;
}
.station-week-day .station-slot-start{
    font-size:9px;
}
.station-week-day .station-entry{
    left:52px;
    right:4px;
    width:auto;
    min-width:0;
    padding:5px 6px;
}
.station-week-day .station-entry-line{
    font-size:9px;
    line-height:1.15;
}
.station-week-day .station-entry-time,
.station-week-day .station-entry-title{
    font-size:9px;
}
.station-week-day .station-block{
    left:52px;
    right:4px;
    width:auto;
    min-width:0;
}
.station-week-day .station-now-line{left:48px;}

@media (max-width:1100px){
    .station-planner-top-space{justify-content:flex-start;}
    .station-week-grid{grid-template-columns:repeat(7,minmax(170px,1fr));min-width:1190px;}
}

@media (max-width:900px){
    .station-planner-top-space{
        display:flex;
        margin-top:10px;
    }
    .station-view-switch{
        width:100%;
    }
    .station-view-switch .btn{
        flex:1 1 50%;
        min-height:44px;
    }
    .station-week-board{gap:14px;}
    .station-week-station-head{
        min-height:56px;
        padding:8px 10px;
    }
    .station-week-station-head > small{font-size:10px;}
    .station-week-scroll{
        scroll-snap-type:x proximity;
    }
    .station-week-grid{
        grid-template-columns:repeat(7,minmax(82vw,280px));
        min-width:max-content;
    }
    .station-week-day{
        scroll-snap-align:start;
    }
    .station-week-day-head{
        min-height:50px;
        position:sticky;
        top:0;
    }
    .station-week-day .station-entry{
        left:60px;
    }
    .station-week-day .station-block{
        left:60px;
    }
}

@media (min-width:901px) and (max-width:1100px){
    .station-planner-top-space{
        display:flex;
        grid-column:1;
        grid-row:2;
    }
    .station-calendar-panel{
        grid-column:2;
        grid-row:1 / span 2;
    }
}

/* Stanowiska - widok tygodniowy: informacje wpisu w osobnych wierszach */
.station-week-day .station-entry-line-main{
    display:flex !important;
    flex-direction:column;
    align-items:flex-start;
    gap:0 !important;
    width:100%;
    min-width:0;
}
.station-week-day .station-entry-line-main .station-entry-time,
.station-week-day .station-entry-line-main .station-entry-title,
.station-week-day .station-entry-line-main .station-entry-vehicle{
    display:block;
    width:100%;
    min-width:0;
    max-width:none !important;
    flex:0 0 auto;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
}
.station-week-day .station-entry-line-main .station-entry-time{
    line-height:1.05 !important;
}
.station-week-day .station-entry-line-main .station-entry-title,
.station-week-day .station-entry-line-main .station-entry-vehicle{
    line-height:1.08 !important;
}

/* Stanowiska - wyszukiwanie wpisow */
.station-search-shell{max-width:1180px;margin:0 auto;}
.station-search-card{margin-bottom:14px;}
.station-search-filters{display:grid;grid-template-columns:minmax(220px,2fr) repeat(4,minmax(140px,1fr)) auto;gap:12px;align-items:end;}
.station-search-submit .btn{min-height:42px;white-space:nowrap;}
.station-search-results{margin-top:14px;}
.station-search-results .table-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;}
.station-search-table td{vertical-align:top;}
.station-search-table td span{color:var(--muted);font-size:12px;}
.station-search-table td:last-child{white-space:nowrap;text-align:right;}
.station-entry-search-focus{outline:3px solid rgba(37,99,235,.65)!important;outline-offset:2px;z-index:30!important;}
.station-entry-search-pulse{animation:stationSearchPulse .8s ease-in-out 3;}
@keyframes stationSearchPulse{0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}50%{box-shadow:0 0 0 7px rgba(37,99,235,.18)}}
@media (max-width:1100px){.station-search-filters{grid-template-columns:repeat(2,minmax(0,1fr));}.station-search-phrase{grid-column:1/-1;}.station-search-submit{align-self:end;}}
@media (max-width:700px){.station-search-filters{grid-template-columns:1fr;}.station-search-phrase{grid-column:auto;}.station-search-submit span{display:none}.station-search-submit .btn{width:100%;min-height:46px;}}

/* Stanowiska - wyszukiwarka w wolnej przestrzeni naglowka planera */
.station-search-mobile-button{display:none;}
.station-planner-top-space{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:12px;
    min-width:0;
}
.station-planner-top-space .station-view-switch{align-self:flex-start;}
.station-search-inline-form{
    display:grid;
    grid-template-columns:minmax(180px,1.7fr) minmax(120px,.85fr) minmax(120px,.85fr);
    gap:9px 10px;
    align-items:end;
    width:100%;
    min-width:0;
}
.station-search-inline-form label{
    display:flex;
    flex-direction:column;
    gap:5px;
    min-width:0;
}
.station-search-inline-form label > span{
    color:var(--muted);
    font-size:10px;
    font-weight:800;
    line-height:1;
}
.station-search-inline-form .input{
    width:100%;
    min-width:0;
    height:38px;
    padding-top:7px;
    padding-bottom:7px;
}
.station-search-inline-phrase{grid-column:1 / -1;}
.station-search-inline-submit{display:flex;align-items:flex-end;}
.station-search-inline-submit .btn{width:100%;min-height:38px;}
.station-search-inline-results{
    display:none;
    margin:-4px 0 18px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--surface);
    overflow:hidden;
}
.station-search-inline-results:not(:empty){display:block;}
.station-search-inline-response{padding:12px;}
.station-search-inline-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}
.station-search-inline-head > span{color:var(--muted);font-size:12px;}

@media (min-width:1101px) and (max-width:1350px){
    .station-planner-top{grid-template-columns:minmax(390px,auto) minmax(320px,1fr) 270px;gap:14px;}
    .station-calendar-panel{width:270px;}
    .station-search-inline-form{grid-template-columns:1fr 1fr;}
    .station-search-inline-phrase{grid-column:1 / -1;}
}

@media (max-width:1100px){
    .station-search-mobile-button{display:inline-flex;}
    .station-planner-top-space{display:none;}
}
