body.page-trips {
    background: #eaf1f8;
    color: #0c2757;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
}

body.page-trips #main-content {
    padding: 28px 22px;
    background: #eaf1f8;
    min-height: calc(100vh - 84px);
}

.trips-mobile-only {
    display: none !important;
}

.trips-desktop-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trips-desktop-panel {
    border: 1px solid #c8d6e7;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 38, 74, 0.08);
}

.trips-desktop-panel--top {
    padding: 22px 24px;
}

.trips-desktop-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d8e2ee;
}

.trips-title-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #2f67f6;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trips-title-icon svg,
.trips-add-button svg,
.trips-table-action svg,
.recurring-rule-badge svg,
.trips-date-icon svg,
.trips-mobile-add svg,
.trips-mobile-card svg,
.trips-editor-panel svg {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trips-desktop-title-row h1 {
    margin: 0;
    font-size: 36px;
    line-height: 1;
    color: #09214d;
}

.trips-desktop-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 16px;
}

.trips-control {
    height: 44px;
    border: 1px solid #b8c8dc;
    border-radius: 6px;
    background: #ffffff;
    color: #0c2757;
    font-size: 16px;
    box-sizing: border-box;
}

.trips-select-wrap,
.trips-date-wrap {
    position: relative;
    width: 280px;
}

body.page-trips .trips-select-wrap.wk-department-selector {
    width: 280px;
}

.trips-select,
.trips-date {
    width: 100%;
    padding: 0 42px 0 14px;
    appearance: none;
}

.trips-date-wrap {
    display: flex;
    align-items: center;
}

.trips-date-icon {
    position: absolute;
    left: 14px;
    color: #5f7aa3;
    pointer-events: none;
}

.trips-date {
    padding-left: 44px;
}

.trips-select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #5f7aa3;
    pointer-events: none;
}

.trips-select-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.trips-add-button {
    min-width: 150px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #1d56dc;
    border-radius: 6px;
    background: #1462ff;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.recurring-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recurring-filter-chip {
    height: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    box-sizing: border-box;
    border: 1px solid #bfd0e5;
    border-radius: 7px;
    background: #ffffff;
    color: #143262;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.recurring-filter-chip:hover,
.recurring-filter-chip:focus-visible {
    border-color: #9fb5d1;
    background: #f8fbff;
    outline: none;
}

.recurring-filter-chip.is-active {
    border-color: #2f67f6;
    background: #eef4ff;
    color: #0f4fc8;
    box-shadow: inset 0 0 0 1px rgba(47, 103, 246, 0.12);
}

.recurring-filter-chip--active,
.recurring-filter-chip--active:hover,
.recurring-filter-chip--active:focus-visible,
.recurring-filter-chip--active.is-active {
    border-color: #bdddc9;
    background: #eef8f1;
    color: #1b7d42;
}

.recurring-filter-chip--paused,
.recurring-filter-chip--paused:hover,
.recurring-filter-chip--paused:focus-visible,
.recurring-filter-chip--paused.is-active {
    border-color: #d6e0ec;
    background: #f3f6fa;
    color: #6b7e9d;
}

.recurring-filter-chip--archive,
.recurring-filter-chip--archive:hover,
.recurring-filter-chip--archive:focus-visible,
.recurring-filter-chip--archive.is-active {
    border-color: #edc98d;
    background: #fff7e8;
    color: #8a5515;
}

.recurring-filter-chip__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.recurring-filter-chip svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trips-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.trips-table th {
    padding: 12px 14px;
    border-right: 1px solid #d8e2ee;
    border-bottom: 1px solid #c8d6e7;
    background: #e8eef6;
    color: #000000;
    text-align: left;
    font-weight: 800;
    text-transform: uppercase;
}

.trips-table td {
    padding: 12px 14px;
    border-right: 1px solid #e1e9f3;
    border-bottom: 1px solid #e1e9f3;
    background: #ffffff;
}

.trips-empty-cell {
    padding: 28px !important;
    text-align: center;
    color: #65799c;
}

.trips-table-action {
    min-height: 34px;
    margin-right: 8px;
    padding: 0 14px;
    border: 1px solid #bfd0e5;
    border-radius: 6px;
    background: #f8fbff;
    color: #143262;
    font-weight: 700;
    cursor: pointer;
}

.trips-table-action--danger {
    border-color: #f2b3b3;
    color: #c92532;
}

.recurring-table .trips-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.recurring-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.recurring-status.is-active {
    border: 1px solid #bdddc9;
    background: #eef8f1;
    color: #1b7d42;
}

.recurring-status.is-paused {
    border: 1px solid #d6e0ec;
    background: #f3f6fa;
    color: #6b7e9d;
}

.recurring-status.is-archive {
    border: 1px solid #edc98d;
    background: #fff7e8;
    color: #8a5515;
}

.recurring-status-control {
    position: relative;
    width: 126px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
}

.recurring-status-control.is-saving {
    opacity: 0.65;
}

.recurring-status-control.is-enhanced .recurring-status-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.recurring-status-control > .sa-mobile-selector__chevron {
    display: none;
}

.recurring-status-control .sa-mobile-selector__button {
    width: 100%;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px 0 12px;
    border: 1px solid #d6e0ec;
    border-radius: 999px;
    background: #f3f6fa;
    color: #536783;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.recurring-status-control .sa-mobile-selector__button:focus-visible {
    box-shadow: 0 0 0 3px rgba(47, 103, 246, 0.14);
}

.recurring-status-control .sa-mobile-selector__button:disabled {
    cursor: default;
    opacity: 0.72;
}

.recurring-status-control .sa-mobile-selector__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recurring-status-control .sa-mobile-selector__button-chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: currentColor;
    opacity: 0.78;
}

.recurring-status-control .sa-mobile-selector__button-chevron svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.recurring-status-control .sa-mobile-selector__menu {
    position: absolute;
    z-index: 2400;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 150px;
    padding: 6px;
    border: 1px solid #c8d6e7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(17, 38, 74, 0.18);
}

.recurring-status-control .sa-mobile-selector__menu[hidden] {
    display: none;
}

.recurring-status-control .sa-mobile-selector__option {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    color: #143262;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}

.recurring-status-control .sa-mobile-selector__option:hover,
.recurring-status-control .sa-mobile-selector__option:focus-visible,
.recurring-status-control .sa-mobile-selector__option.is-selected {
    outline: none;
    background: #eef5ff;
    color: #0b46bd;
}
.recurring-status-control .sa-mobile-selector__option[data-value="active"] {
    color: #1b7d42;
}

.recurring-status-control .sa-mobile-selector__option[data-value="paused"] {
    color: #6b7e9d;
}

.recurring-status-control .sa-mobile-selector__option[data-value="archive"] {
    color: #8a5515;
}

.recurring-status-control .sa-mobile-selector__option[data-value="active"]:hover,
.recurring-status-control .sa-mobile-selector__option[data-value="active"]:focus-visible,
.recurring-status-control .sa-mobile-selector__option[data-value="active"].is-selected {
    background: #eef8f1;
    color: #1b7d42;
}

.recurring-status-control .sa-mobile-selector__option[data-value="paused"]:hover,
.recurring-status-control .sa-mobile-selector__option[data-value="paused"]:focus-visible,
.recurring-status-control .sa-mobile-selector__option[data-value="paused"].is-selected {
    background: #f3f6fa;
    color: #6b7e9d;
}

.recurring-status-control .sa-mobile-selector__option[data-value="archive"]:hover,
.recurring-status-control .sa-mobile-selector__option[data-value="archive"]:focus-visible,
.recurring-status-control .sa-mobile-selector__option[data-value="archive"].is-selected {
    background: #fff7e8;
    color: #8a5515;
}

.recurring-status-control--active {
    color: #1b7d42;
}

.recurring-status-control--active .recurring-status-select,
.recurring-status-control--active .sa-mobile-selector__button {
    border-color: #bdddc9;
    background: #eef8f1;
    color: #1b7d42;
}

.recurring-status-control--paused {
    color: #536783;
}

.recurring-status-control--paused .recurring-status-select,
.recurring-status-control--paused .sa-mobile-selector__button {
    border-color: #d6e0ec;
    background: #f3f6fa;
    color: #536783;
}

.recurring-status-control--archive {
    color: #8a5515;
}

.recurring-status-control--archive .recurring-status-select,
.recurring-status-control--archive .sa-mobile-selector__button {
    border-color: #edc98d;
    background: #fff7e8;
    color: #8a5515;
}

.trips-muted {
    color: #7285a4;
}

.trips-editor-overlay[hidden] {
    display: none !important;
}

.trips-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 31, 68, 0.34);
}

.trips-editor-panel {
    width: min(460px, calc(100vw - 40px));
    border: 1px solid #c8d6e7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 54px rgba(17, 38, 74, 0.22);
}

.recurring-editor-panel {
    width: min(760px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trips-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #dde6f1;
}

.trips-editor-head h2 {
    margin: 0;
    font-size: 22px;
}

.trips-editor-close {
    width: 34px;
    height: 34px;
    border: 1px solid #cbd8e9;
    border-radius: 8px;
    background: #f8fbff;
    color: #143262;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.trips-editor-close:hover,
.trips-editor-close:focus-visible {
    border-color: #aebed2;
    background: var(--waker-color-primary-soft);
    color: #08265a;
    outline: none;
    box-shadow: var(--waker-shadow-focus);
}

.trips-editor-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trips-editor-form {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.recurring-editor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    overflow-y: auto;
    padding: 18px 20px;
}

.recurring-editor-form > input[type="hidden"] {
    display: none;
}

.recurring-editor-field--repeat,
.recurring-editor-form > .recurring-choice-group,
.recurring-editor-form > .recurring-editor-actions {
    grid-column: 1 / -1;
}

.trips-editor-field {
    display: grid;
    gap: 6px;
    color: #667b9d;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Desktop modal controls must not override the shared mobile editor contract. */
@media (min-width: 1024px) {
    .trips-editor-field input,
    .trips-editor-field select {
        height: 44px;
        padding: 0 12px;
        border: 1px solid #b8c8dc;
        border-radius: 7px;
        color: #0c2757;
        font-size: 16px;
    }

body.page-trips .trips-editor-field input,
body.page-trips .trips-editor-field select,
body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button {
    width: 100%;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid #b8c8dc;
    border-radius: 8px;
    background-color: #ffffff;
    color: #0c2757;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

body.page-trips .trips-editor-field input:hover,
body.page-trips .trips-editor-field select:hover,
body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button:hover {
    border-color: #8fa8c8;
    background-color: #fbfdff;
}

body.page-trips .trips-editor-field input:focus,
body.page-trips .trips-editor-field select:focus,
body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button:focus,
body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button:focus-visible {
    outline: none;
    border-color: #2f6df6;
    box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.16);
}

body.page-trips .trips-editor-field select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 44px 0 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235f7aa3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
    cursor: pointer;
}

body.page-trips .trips-editor-field > .sa-mobile-selector {
    position: relative;
    width: 100%;
    min-width: 0;
}

body.page-trips .trips-editor-field > .sa-mobile-selector.is-enhanced .sa-mobile-selector__control {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

body.page-trips .trips-editor-field > .sa-mobile-selector > .sa-mobile-selector__chevron {
    display: none;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px 0 14px;
    cursor: pointer;
    text-align: left;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button-chevron {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #5f7aa3;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button-chevron svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu {
    position: absolute;
    z-index: 2605;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 220px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #c8d6e7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(17, 38, 74, 0.18);
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu[hidden] {
    display: none;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__option {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: #ffffff;
    color: #143262;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__option:hover,
body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__option:focus-visible,
body.page-trips .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__option.is-active {
    outline: none;
    background: #eef5ff;
    color: #0b46bd;
}
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__button,
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__value,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__button,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__value,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__button,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__value {
    font-weight: 700;
}

body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option,
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:hover,
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:focus-visible,
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-active,
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-selected,
body.page-trips .trips-editor-field > .trips-editor-department-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option[aria-selected="true"],
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:hover,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:focus-visible,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-active,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-selected,
body.page-trips .trips-editor-field > .trips-editor-crew-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option[aria-selected="true"],
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:hover,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:focus-visible,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-active,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-selected,
body.page-trips .trips-editor-field > .trips-editor-manager-selector.sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option[aria-selected="true"] {
    font-weight: 400;
}


/* recurringmodalfont1: Recurring modal fields follow the shared modal input typography. */
    body.page-trips .recurring-editor-form .trips-editor-field input,
    body.page-trips .recurring-editor-form .trips-editor-field select,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__button,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__value {
        font-family: var(--waker-current-font, var(--sa-font, "Aptos", "Segoe UI", sans-serif));
        font-size: var(--waker-modal-control-font-size);
        font-weight: var(--waker-modal-control-font-weight);
        line-height: 1.2;
        letter-spacing: 0;
        text-transform: none;
    }

    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:hover,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option:focus-visible,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-active,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option.is-selected,
    body.page-trips .recurring-editor-form .trips-editor-field > .sa-mobile-selector .sa-mobile-selector__menu .sa-mobile-selector__option[aria-selected="true"] {
        font-weight: var(--waker-modal-option-font-weight);
    }
}
.trips-editor-help {
    margin: 8px 0 0;
    color: #667b9f;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}

.trips-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    padding-top: 4px;
}
.recurring-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px -20px -20px;
    padding: 16px 20px 20px;
    border-top: 1px solid #e1e9f3;
    background: #ffffff;
}

.recurring-editor-actions__spacer {
    flex: 1 1 auto;
}

.recurring-editor-actions button {
    min-width: 86px;
    padding: 0 18px;
}

.recurring-editor-actions .trips-editor-delete {
    min-width: 126px;
}

.recurring-editor-actions .trips-editor-save {
    min-width: 132px;
}

.recurring-choice-group {
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid #d8e2ee;
    border-radius: 10px;
}

.recurring-choice-group legend {
    padding: 0 6px;
    color: #667b9d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.recurring-choice-grid {
    display: grid;
    gap: 8px;
}

.recurring-choice-grid--weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.recurring-choice-grid--dates {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.recurring-choice-grid label {
    position: relative;
    min-height: 34px;
    cursor: pointer;
}

.recurring-choice-grid input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.recurring-choice-grid span {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8d6e7;
    border-radius: 8px;
    background: #f8fbff;
    color: #143262;
    font-size: 14px;
    font-weight: 800;
}

.recurring-choice-grid input:checked + span {
    border-color: #1d56dc;
    background: #1462ff;
    color: #ffffff;
}

.recurring-active-row {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #143262;
    font-weight: 800;
}

.trips-editor-actions button {
    min-height: var(--waker-modal-button-height);
    border: 1px solid var(--waker-modal-button-secondary-border);
    border-radius: var(--waker-modal-button-radius);
    background: var(--waker-modal-button-secondary-bg);
    color: var(--waker-modal-button-secondary-text);
    font-size: var(--waker-modal-button-font-size);
    font-weight: var(--waker-modal-button-font-weight);
    line-height: var(--waker-modal-button-line-height);
    cursor: pointer;
}

.trips-editor-save {
    border-color: var(--waker-modal-button-primary-border) !important;
    background: var(--waker-modal-button-primary-bg) !important;
    color: var(--waker-modal-button-primary-text) !important;
    box-shadow: 0 8px 18px rgba(23, 101, 255, 0.18);
}

.trips-editor-delete {
    border-color: #efb1b1 !important;
    color: #c92532 !important;
}

@media (max-width: 1023px) {
    body.page-trips {
        background: var(--waker-color-header-mobile) !important;
    }

    body.page-trips > form {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
    }

    body.page-trips .trips-desktop-only {
        display: none !important;
    }

    body.page-trips .trips-mobile-only {
        display: block !important;
    }

    body.page-trips #main-content {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 100vh;
        background: var(--waker-color-header-mobile) !important;
        overflow-x: hidden;
    }

    body.page-trips .trips-mobile-shell {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        background: transparent !important;
        position: relative;
        z-index: 1002;
    }

    .trips-mobile-content {
        padding: 18px 16px 32px;
        min-height: calc(100vh - var(--waker-mobile-header-height));
        box-sizing: border-box;
        background: var(--waker-color-page-mobile) !important;
    }

    .trips-mobile-content .wk-result-report {
        margin: var(--waker-space-7) 0;
    }

    .trips-mobile-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 150px;
        gap: 14px;
        align-items: center;
    }

    .trips-mobile-toolbar--recurring {
        grid-template-columns: minmax(0, 1fr);
    }

    .recurring-filter-group--mobile {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .recurring-filter-group--mobile .recurring-filter-chip {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: 13px;
    }

    .trips-mobile-add {
        height: var(--waker-mobile-action-height);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .trips-mobile-cards {
        display: grid;
        gap: var(--waker-space-8);
    }

    .trips-mobile-card {
        display: grid;
        gap: var(--waker-space-10);
        padding: var(--waker-space-10);
        border: 1px solid var(--waker-border-soft);
        border-radius: var(--waker-radius-mobile-card);
        background: var(--waker-color-surface);
        box-shadow: var(--waker-shadow-card);
    }

    .trips-mobile-card.is-editable {
        cursor: pointer;
        transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease, background-color 140ms ease;
    }

    @media (hover: hover) {
        .trips-mobile-card.is-editable:hover {
            border-color: var(--waker-border-mobile-strong);
            box-shadow: 0 12px 26px rgba(25, 50, 93, 0.09);
        }
    }

    .trips-mobile-card.is-editable:active {
        transform: translateY(1px);
        background: #fbfdff;
    }

    .trips-mobile-card.is-editable:focus-visible {
        outline: none;
        box-shadow: var(--waker-shadow-focus), var(--waker-shadow-card);
    }

    .trips-mobile-card__top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: var(--waker-space-8);
        align-items: start;
    }

    .trips-mobile-card__top .recurring-status-control {
        width: 124px;
        justify-self: end;
    }

    .trips-mobile-card__timeblock {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        gap: var(--waker-space-9);
    }

    .trips-mobile-card__shiftblock {
        display: grid;
        gap: var(--waker-space-4);
        min-width: 0;
    }

    .trips-mobile-card__number {
        width: fit-content;
        max-width: 100%;
        display: inline-flex;
        align-items: center;
        min-height: 30px;
        padding: 0 var(--waker-space-5);
        border-radius: var(--waker-radius-lg);
        background: #0B3F8F !important;
        color: #ffffff;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .trips-mobile-card__clock {
        width: 58px;
        height: 58px;
        flex: 0 0 58px;
        border-radius: 50%;
        background: var(--waker-color-primary-soft);
        color: var(--waker-color-primary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .trips-mobile-card__clock svg {
        width: 32px;
        height: 32px;
    }

    .trips-mobile-card__time {
        font-size: 38px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0;
        color: var(--waker-color-ink);
    }

    .trips-mobile-card__view {
        justify-self: end;
        align-self: start;
        min-height: 0;
        width: fit-content;
        max-width: 100%;
        padding: 7px 10px;
        border: 1px solid #d7dfeb;
        border-radius: var(--waker-radius-lg);
        background: var(--waker-color-primary-soft);
        color: #17315f;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        cursor: pointer;
        min-width: 0;
    }

    .trips-mobile-card__view--readonly {
        cursor: default;
    }

    .trips-mobile-card__view span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .trips-mobile-card__open-chevron {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        justify-self: end;
        align-self: start;
        color: #36598a;
    }

    .trips-mobile-card__open-chevron svg {
        width: 22px;
        height: 22px;
    }

    .trips-mobile-card__personrow {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--waker-space-8);
    }

    .recurring-mobile-time {
        color: var(--waker-color-ink-muted);
        font-size: 18px;
        font-weight: 400;
    }

    .recurring-mobile-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .recurring-mobile-meta span {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--waker-border-subtle);
        border-radius: var(--waker-radius-lg);
        background: #f8fbff;
        color: var(--waker-color-ink);
        font-weight: 800;
    }

    .recurring-mobile-upcoming {
        min-height: 44px;
        border: 1px solid var(--waker-border-subtle);
        border-radius: var(--waker-radius-lg);
        padding: 0 12px;
    }

    .recurring-mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .recurring-mobile-actions .trips-table-action {
        width: 100%;
        min-height: 42px;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .recurring-mobile-actions .trips-table-action svg {
        width: 18px;
        height: 18px;
    }

    .recurring-choice-grid--weekdays {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .recurring-choice-grid--dates {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .trips-mobile-card__personcell {
        min-height: 74px;
        display: inline-flex;
        align-items: center;
        gap: var(--waker-space-8);
        min-width: 0;
        padding: 10px var(--waker-space-8);
        border: 1px solid var(--waker-border-subtle);
        border-radius: var(--waker-radius-3xl);
        background: var(--waker-color-surface);
        color: var(--waker-color-ink);
        text-decoration: none;
        font-size: 17px;
        line-height: 1.2;
    }

    .trips-mobile-card__crewcall {
        width: 100%;
        box-sizing: border-box;
        border-color: #d7e4f5;
        background: var(--waker-color-primary-soft);
        color: var(--waker-color-ink);
        cursor: pointer;
        transition: border-color 140ms ease, background-color 140ms ease, transform 120ms ease;
    }

    @media (hover: hover) {
        .trips-mobile-card__crewcall:hover {
            border-color: #b8cbed;
            background: #eef5ff;
        }
    }

    .trips-mobile-card__crewcall:active {
        transform: translateY(1px);
    }

    .trips-mobile-card__crewcall--empty {
        color: var(--waker-color-ink-muted);
        cursor: default;
    }

    .trips-mobile-card__crew,
    .trips-mobile-card__phone span:last-child {
        font-size: inherit;
        line-height: inherit;
        font-weight: inherit;
    }

    .trips-mobile-card__personcell > span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .trips-mobile-card__contactbody {
        display: grid;
        gap: 2px;
        min-width: 0;
        line-height: 1.18;
    }

    .trips-mobile-card__contactnick,
    .trips-mobile-card__contactcomment,
    .trips-mobile-card__contactphone {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .trips-mobile-card__contactnick {
        color: var(--waker-color-ink);
        font-size: 16px;
        font-weight: 600;
    }

    .trips-mobile-card__contactcomment {
        color: #526b93;
        font-size: 14px;
        font-weight: 500;
    }

    .trips-mobile-card__contactphone {
        color: var(--waker-color-primary);
        font-size: 14px;
        font-weight: 500;
    }

    .trips-mobile-card__personicon {
        flex: 0 0 auto;
        color: var(--waker-color-danger-strong);
    }

    .trips-mobile-card__phone {
        color: var(--waker-color-primary);
    }

    .trips-mobile-card__phone.is-empty {
        color: var(--waker-color-ink-muted);
    }

    .trips-mobile-card__personicon svg,
    .trips-mobile-card__open-chevron svg,
    .trips-mobile-card__chevron svg,
    .trips-mobile-card__delete svg {
        width: 24px;
        height: 24px;
    }

    .trips-mobile-card__chevron svg {
        width: 16px;
        height: 16px;
    }

    .trips-mobile-card__chevron {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        color: #36598a;
    }

    .trips-mobile-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--waker-space-8);
        min-height: 44px;
        color: var(--waker-color-ink);
        font-size: 18px;
        line-height: 1.2;
    }

    .trips-mobile-card__id {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: 0 var(--waker-space-4);
        border-radius: var(--waker-radius-lg);
        background: var(--waker-color-surface-soft);
        color: var(--waker-color-ink-muted);
    }

    .trips-mobile-card__id strong {
        color: inherit;
        font-weight: inherit;
    }

    .trips-mobile-card__delete {
        margin-left: auto;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border: 0;
        background: transparent;
        color: var(--waker-color-danger-strong);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .trips-mobile-empty {
        padding: 34px 20px;
        border: 1px solid #d3deec;
        border-radius: 18px;
        background: #ffffff;
        color: #526b93;
        text-align: center;
        font-size: 18px;
    }

    .trips-mobile-empty--error {
        color: #c92532;
    }

    body.trips-editor-open {
        overflow: hidden;
    }

    .trips-editor-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .trips-editor-panel {
        width: 100%;
        max-width: none;
        border-radius: 24px 24px 0 0;
        border-width: 1px 0 0;
    }

    .trips-editor-head {
        padding: 22px 24px;
    }

    .trips-editor-head h2 {
        font-size: 26px;
    }

    .trips-editor-form {
        padding: 22px 24px 28px;
        gap: 18px;
    }

    .recurring-editor-panel {
        max-height: 100dvh;
    }

    .recurring-editor-form {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .trips-editor-field input,
    .trips-editor-field select {
        height: 56px;
        border-radius: 14px;
        font-size: 20px;
        padding: 0 16px;
    }

    .trips-editor-actions {
        grid-template-columns: 1fr;
    }

    .recurring-editor-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin: 0;
        padding: 0;
        border-top: 0;
    }

    .recurring-editor-actions__spacer {
        display: none;
    }

    .recurring-editor-actions button,
    .recurring-editor-actions .trips-editor-delete,
    .recurring-editor-actions .trips-editor-save {
        min-width: 0;
        width: 100%;
    }
    .trips-editor-actions button {
        min-height: var(--waker-mobile-action-height);
        border-radius: var(--waker-mobile-action-radius);
        font-size: var(--waker-mobile-action-font-size);
        font-weight: var(--waker-mobile-action-font-weight);
    }
}

@media (max-width: 560px) {
    .trips-mobile-content {
        padding: 16px 14px 28px;
        gap: 14px;
    }

    .trips-mobile-toolbar {
        grid-template-columns: 1fr;
    }

    .trips-mobile-add {
        width: 100%;
    }

    .trips-mobile-card {
        padding: 18px;
        gap: 18px;
    }

    .trips-mobile-card__top {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .trips-mobile-card__timeblock {
        gap: 12px;
    }

    .trips-mobile-card__number {
        min-height: 28px;
        padding: 0 12px;
        font-size: 16px;
    }

    .trips-mobile-card__clock {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .trips-mobile-card__time {
        font-size: 34px;
    }

    .trips-mobile-card__view {
        min-height: 0;
        padding: 6px 9px;
        font-size: 13px;
    }

    .trips-mobile-card__chevron svg {
        width: 16px;
        height: 16px;
    }

    .trips-mobile-card__personrow {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .trips-mobile-card__personcell {
        min-height: 72px;
        padding: 0 14px;
        font-size: 16px;
    }

    .trips-mobile-card__footer {
        font-size: 17px;
    }
}
/* Desktop operational grid refinements */
body.page-trips .trips-desktop-panel--table {
    overflow: hidden;
}

body.page-trips .recurring-page .trips-desktop-panel--table {
    overflow: visible;
}

body.page-trips .recurring-table td:nth-child(8) {
    position: relative;
    overflow: visible;
}

body.page-trips .recurring-table td.recurring-upcoming-cell {
    padding-inline: 0 !important;
}

body.page-trips .recurring-table .recurring-status-control.is-open {
    z-index: 3000;
}

body.page-trips .recurring-table .recurring-status-control .sa-mobile-selector__menu {
    top: calc(100% + 6px);
    bottom: auto;
    z-index: 3001;
}

body.page-trips .trips-table {
    border-collapse: separate;
    border-spacing: 0;
}

body.page-trips .trips-table th {
    height: 46px;
    padding: 10px 14px;
    font-size: 12px;
    letter-spacing: 0.03em;
    background: #e9eef5;
    border-right: 1px solid #d7e0ea;
    border-bottom: 1px solid #cdd7e3;
    white-space: nowrap;
}

body.page-trips .trips-table td {
    height: 54px;
    padding: 8px 14px;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #dce4ee;
    vertical-align: middle;
}

body.page-trips .trips-table th:nth-child(1),
body.page-trips .trips-table td:nth-child(1) {
    width: 90px;
}

body.page-trips .trips-table th:nth-child(2),
body.page-trips .trips-table td:nth-child(2) {
    width: 150px;
}

body.page-trips .trips-table th:nth-child(3),
body.page-trips .trips-table td:nth-child(3) {
    width: 210px;
}

body.page-trips .trips-table th:nth-child(5),
body.page-trips .trips-table td:nth-child(5) {
    width: 130px;
    text-align: center;
}

body.page-trips .trips-inline-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 30px;
    border: 1px solid #cbd8e8;
    border-radius: 6px;
    background: #ffffff;
    color: #2b63e4;
    font-weight: 800;
}

body.page-trips .trips-inline-control {
    width: 100%;
    height: 38px;
    border: 1px solid #b8c8dc;
    border-radius: 6px;
    background: #ffffff;
    color: #0c2757;
    font-size: 15px;
    font-weight: 600;
    box-sizing: border-box;
    padding: 0 10px;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

body.page-trips .trips-inline-control:hover {
    border-color: #a8bbd2;
    background: #fbfdff;
}

body.page-trips .trips-inline-control:focus {
    outline: none;
    border-color: #7ea0cd;
    box-shadow: inset 0 0 0 1px rgba(76, 112, 174, 0.12), 0 0 0 2px rgba(47, 103, 246, 0.08);
}

body.page-trips .trips-inline-control.is-saving {
    opacity: 0.65;
    background: #f6f9fd;
}

body.page-trips .trips-inline-control.is-saved {
    border-color: #5ab986;
    box-shadow: 0 0 0 2px rgba(45, 151, 86, 0.12);
}

body.page-trips .trips-inline-time {
    max-width: 122px;
}

body.page-trips .trips-inline-num {
    max-width: 180px;
}

body.page-trips .trips-inline-driver {
    max-width: 380px;
}

body.page-trips .trips-table-action--delete,
body.page-trips .trips-table-action--danger {
    min-width: 92px;
    margin-right: 0;
    border-color: #e7b8b8;
    background: #ffffff;
    color: #c94b4b;
}

body.page-trips .trips-table-action--delete:hover,
body.page-trips .trips-table-action--danger:hover {
    background: #fff7f7;
    border-color: #dca1a1;
}

body.page-trips .recurring-table {
    table-layout: fixed;
    --recurring-rule-width: 10%;
    --recurring-days-width: 23%;
    --recurring-time-width: 7%;
    --recurring-num-width: 7%;
    --recurring-crew-width: 14%;
    --recurring-manager-width: 13%;
    --recurring-generated-width: 6%;
    --recurring-status-width: 10%;
    --recurring-edit-width: 10%;
}

body.page-trips .recurring-col-rule { width: var(--recurring-rule-width); }
body.page-trips .recurring-col-days { width: var(--recurring-days-width); }
body.page-trips .recurring-col-time { width: var(--recurring-time-width); }
body.page-trips .recurring-col-num { width: var(--recurring-num-width); }
body.page-trips .recurring-col-crew { width: var(--recurring-crew-width); }
body.page-trips .recurring-col-manager { width: var(--recurring-manager-width); }
body.page-trips .recurring-col-generated { width: var(--recurring-generated-width); }
body.page-trips .recurring-col-status { width: var(--recurring-status-width); }
body.page-trips .recurring-col-edit { width: var(--recurring-edit-width); }

body.page-trips .recurring-table th:nth-child(1),
body.page-trips .recurring-table td:nth-child(1) {
    width: var(--recurring-rule-width);
}

body.page-trips .recurring-table th:nth-child(2),
body.page-trips .recurring-table td:nth-child(2) {
    width: var(--recurring-days-width);
}

body.page-trips .recurring-table th:nth-child(3),
body.page-trips .recurring-table td:nth-child(3) {
    width: var(--recurring-time-width);
}

body.page-trips .recurring-table th:nth-child(4),
body.page-trips .recurring-table td:nth-child(4) {
    width: var(--recurring-num-width);
}

body.page-trips .recurring-table th:nth-child(5),
body.page-trips .recurring-table td:nth-child(5) {
    width: var(--recurring-crew-width);
    text-align: left;
}

body.page-trips .recurring-table th:nth-child(6),
body.page-trips .recurring-table td:nth-child(6) {
    width: var(--recurring-manager-width);
    text-align: center;
}

body.page-trips .recurring-table th:nth-child(7),
body.page-trips .recurring-table td:nth-child(7) {
    width: var(--recurring-generated-width);
}

body.page-trips .recurring-table th:nth-child(8),
body.page-trips .recurring-table td:nth-child(8) {
    width: var(--recurring-status-width);
}

body.page-trips .recurring-table th:nth-child(9),
body.page-trips .recurring-table td:nth-child(9) {
    width: var(--recurring-edit-width);
}

body.page-trips .recurring-days {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--waker-space-1);
    list-style: none;
    margin: 0;
    padding: 0;
}

body.page-trips .recurring-table .recurring-crew-copy,
body.page-trips .recurring-table .recurring-manager-copy {
    flex: 1 1 0;
}

body.page-trips .recurring-table .recurring-manager-copy {
    text-align: left;
}

body.page-trips .recurring-table .recurring-crew-name,
body.page-trips .recurring-table .recurring-crew-comment {
    max-width: 100%;
}

@media (min-width: 1024px) and (max-width: 1279px) {
    body.page-trips .recurring-table {
        --recurring-rule-width: 11%;
        --recurring-days-width: 19%;
        --recurring-time-width: 8%;
        --recurring-num-width: 8%;
        --recurring-crew-width: 14%;
        --recurring-manager-width: 12%;
        --recurring-generated-width: 6%;
        --recurring-status-width: 11%;
        --recurring-edit-width: 11%;
    }

    body.page-trips .recurring-table :is(th, td) {
        padding-inline: var(--waker-space-2) !important;
    }
}

body.page-trips .recurring-upcoming summary {
    cursor: pointer;
    color: var(--waker-color-primary);
    font-weight: 700;
}

body.page-trips .recurring-upcoming summary:hover,
body.page-trips .recurring-upcoming a:hover {
    color: var(--waker-color-primary-hover);
}

body.page-trips .recurring-upcoming-zero {
    color: var(--waker-color-ink-muted);
}

body.page-trips .recurring-mobile-upcoming summary {
    display: flex;
    align-items: center;
    min-height: 44px;
}

body.page-trips .recurring-upcoming summary:focus-visible,
body.page-trips .recurring-upcoming a:focus-visible {
    outline: 2px solid var(--waker-color-primary);
    outline-offset: 2px;
}

body.page-trips .recurring-upcoming ul {
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    margin: 8px 0;
    padding: 0;
    text-align: left;
}

body.page-trips .recurring-upcoming li + li { margin-top: 6px; }

body.page-trips .recurring-upcoming a {
    color: var(--waker-color-primary);
    text-decoration: underline;
}

body.page-trips .recurring-rule-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    max-width: 100%;
    padding: 0 var(--waker-space-4) 0 var(--waker-space-1);
    border: 1px solid #bfd0e5;
    border-radius: 999px;
    background: #f8fbff;
    color: #143262;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.page-trips .recurring-rule-badge__icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #245bd9;
}

body.page-trips .recurring-rule-badge__icon svg {
    width: 14px;
    height: 14px;
}

body.page-trips .recurring-rule-badge--daily {
    border-color: #b9d9fb;
    background: #f0f7ff;
    color: #15549f;
}

body.page-trips .recurring-rule-badge--daily .recurring-rule-badge__icon {
    background: #d9ebff;
    color: #1d6ecb;
}

body.page-trips .recurring-rule-badge--weekly {
    border-color: #c8d5f7;
    background: #f5f7ff;
    color: #304a9a;
}

body.page-trips .recurring-rule-badge--weekly .recurring-rule-badge__icon {
    background: #e4e9ff;
    color: #405dcc;
}

body.page-trips .recurring-rule-badge--weekly-days {
    border-color: #bdddc9;
    background: #eef8f1;
    color: #1b7040;
}

body.page-trips .recurring-rule-badge--weekly-days .recurring-rule-badge__icon {
    background: #d9f0e2;
    color: #22834d;
}

body.page-trips .recurring-rule-badge--monthly {
    border-color: var(--waker-label-purple-border);
    background: var(--waker-label-purple-bg);
    color: var(--waker-label-purple-text);
}

body.page-trips .recurring-rule-badge--monthly .recurring-rule-badge__icon {
    background: var(--waker-label-purple-icon-bg);
    color: var(--waker-label-purple-icon-color);
}

body.page-trips .recurring-table .trips-table-action[data-action="edit-recurring"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 38px;
    height: auto;
    margin: 0;
    padding: 5px 10px;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.page-trips .recurring-table td:nth-child(3),
body.page-trips .recurring-table td:nth-child(7),
body.page-trips .recurring-table td:nth-child(8),
body.page-trips .recurring-table td:nth-child(9) {
    white-space: nowrap;
}

body.page-trips .recurring-table td:nth-child(3) {
    font-weight: 700;
}

body.page-trips .recurring-table td:nth-child(4),
body.page-trips .recurring-table td:nth-child(5),
body.page-trips .recurring-table td:nth-child(6) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trips-lock-badge,
.trips-mobile-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: var(--waker-space-3);
    padding: 0 var(--waker-space-4);
    border: 1px solid var(--waker-status-warning-border);
    border-radius: var(--waker-radius-pill);
    background: var(--waker-status-warning-bg);
    color: var(--waker-status-warning-text);
    font-size: var(--waker-font-size-xs);
    font-weight: var(--waker-weight-bold);
    white-space: nowrap;
}
body.page-trips .recurring-table td.recurring-crew-cell {
    overflow: visible;
    white-space: normal;
}

body.page-trips .recurring-crew-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.page-trips .recurring-crew-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    border: 1px solid #d7e4f4;
    border-radius: 999px;
    background: #eff6ff;
    color: #0d2d61;
    line-height: 1;
}

body.page-trips .recurring-crew-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-trips .recurring-crew-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

body.page-trips .recurring-crew-name,
body.page-trips .recurring-crew-comment {
    display: block;
    max-width: 165px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-trips .recurring-crew-name {
    color: #102a55;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

body.page-trips .recurring-crew-comment {
    color: #61728a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

body.page-trips .recurring-crew-comment--muted {
    color: #91a0b5;
}

body.page-trips .recurring-manager-cell {
    overflow: hidden;
}

body.page-trips .recurring-manager-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.page-trips .recurring-manager-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #bfe0ff;
    background: #eef6ff;
    color: #0d63ce;
}

body.page-trips .recurring-manager-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-trips .recurring-manager-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

body.page-trips .recurring-manager-name,
body.page-trips .recurring-manager-phone {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-trips .recurring-manager-name {
    color: #1258e6;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

body.page-trips .recurring-manager-phone {
    color: #5d6f91;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

body.page-trips .recurring-manager-phone--muted {
    color: #7a8ba9;
}
body.page-trips .recurring-mobile-crew-cell {
    justify-content: flex-start;
}

body.page-trips .recurring-mobile-crew-cell .recurring-crew-main {
    width: 100%;
}

/* V1.3.26: Recurring owns layout; shared components own visual treatment. */
@media (max-width: 1023px) {
    body.page-trips .recurring-mobile-card { display: grid; gap: var(--waker-space-7); min-width: 0; }
    body.page-trips .recurring-mobile-card__top { flex-wrap: wrap; }
    body.page-trips .recurring-mobile-card__top .wk-record-banner__identity { flex: 1 1 0; min-width: var(--waker-touch-target); }
    body.page-trips .recurring-mobile-card__top .wk-status-selector--card { margin-inline-start: auto; }
    body.page-trips .recurring-mobile-schedule { display: grid; gap: var(--waker-space-3); min-width: 0; }
    body.page-trips .recurring-mobile-footer { display: grid; gap: var(--waker-space-5); min-width: 0; }
    body.page-trips .recurring-mobile-upcoming { padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; }
    body.page-trips .recurring-mobile-actions.sa-mobile-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--waker-space-3); padding-top: 0; }
    body.page-trips .recurring-mobile-actions .sa-mobile-button { min-width: 0; }
    body.page-trips .recurring-mobile-actions .ti { font-size: var(--waker-icon-size-button); line-height: 1; }
}

/* V1.3.22 desktop-only Upcoming alignment and Crew history link. */
@media (min-width: 1024px) {
    body.page-trips .recurring-table .recurring-upcoming-zero { color: var(--waker-color-ink-muted) !important; cursor: default; }
    body.page-trips .recurring-table a.recurring-crew-name { color: var(--waker-color-primary) !important; text-decoration: none; }
    body.page-trips .recurring-table a.recurring-crew-name:is(:hover,:focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
    body.page-trips .recurring-table a.recurring-crew-name:focus-visible { outline: 2px solid var(--waker-color-primary); outline-offset: 2px; }
}
