.xaf-tour-manifest {
    width: 100%;
    min-height: calc(100vh - 170px);
    overflow: hidden;
    background: #f3f4f6;
    color: #111827;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.xaf-tour-manifest-empty {
    display: grid;
    gap: 0.25rem;
    padding: 2rem 1rem;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 0.875rem;
    text-align: center;
}

.xaf-tour-manifest-empty strong {
    color: #374151;
    font-size: 0.95rem;
}

.xaf-tour-manifest-header {
    display: grid;
    gap: 0.75rem;
    padding: 1.25rem 1rem 0.9rem;
    background: #1d4ed8;
    color: #fff;
}

.xaf-tour-manifest-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.xaf-tour-manifest-title {
    min-width: 0;
    display: grid;
    gap: 0.05rem;
}

.xaf-tour-manifest-title span {
    color: #bfdbfe;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    line-height: 1rem;
    text-transform: uppercase;
}

.xaf-tour-manifest-title strong {
    overflow: hidden;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xaf-tour-manifest-date {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 2.125rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    background: #2563eb;
}

.xaf-tour-manifest-date input {
    width: 8rem;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    outline: none;
}

.xaf-tour-manifest-date input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.85;
}

.xaf-tour-manifest-session-picker {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.xaf-tour-manifest-session-picker button {
    flex: 0 0 auto;
    min-width: 8.5rem;
    display: grid;
    gap: 0.1rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(147, 197, 253, 0.55);
    border-radius: 0.5rem;
    background: rgba(30, 64, 175, 0.5);
    color: #dbeafe;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.xaf-tour-manifest-session-picker button.is-active {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(37, 99, 235, 0.95);
    color: #fff;
}

.xaf-tour-manifest-session-picker button:hover,
.xaf-tour-manifest-session-picker button:focus-visible {
    border-color: rgba(255, 255, 255, 0.75);
    outline: 2px solid rgba(191, 219, 254, 0.35);
    outline-offset: 1px;
}

.xaf-tour-manifest-session-picker strong {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
}

.xaf-tour-manifest-session-picker span {
    overflow: hidden;
    color: #dbeafe;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xaf-tour-manifest-meta {
    display: grid;
    gap: 0.375rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(30, 64, 175, 0.55);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.xaf-tour-manifest-meta-row {
    display: grid;
    grid-template-columns: 6.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.xaf-tour-manifest-meta-row > span:first-child {
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
}

.xaf-tour-manifest-meta-row strong {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xaf-tour-manifest-meta-status {
    justify-self: end;
}

.xaf-tour-manifest-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.xaf-tour-manifest-stats div {
    display: grid;
    gap: 0.1rem;
    text-align: center;
}

.xaf-tour-manifest-stats div + div {
    border-left: 1px solid #f3f4f6;
}

.xaf-tour-manifest-stats strong {
    color: #1d4ed8;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5rem;
}

.xaf-tour-manifest-stats strong.is-ok {
    color: #16a34a;
}

.xaf-tour-manifest-stats strong.is-warning {
    color: #f59e0b;
}

.xaf-tour-manifest-stats strong.is-danger {
    color: #ef4444;
}

.xaf-tour-manifest-stats span {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1rem;
}

.xaf-tour-manifest-bulk-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 1rem 0;
    background: #fff;
}

.xaf-tour-manifest-bulk-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    max-width: 100%;
    padding: 0.35rem 0.75rem;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    background: #fffbeb;
    color: #92400e;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1rem;
    overflow-wrap: anywhere;
}

.xaf-tour-manifest-bulk-action:hover,
.xaf-tour-manifest-bulk-action:focus-visible {
    border-color: #d97706;
    background: #fef3c7;
    color: #78350f;
    outline: 2px solid rgba(245, 158, 11, 0.2);
    outline-offset: 1px;
}

.xaf-tour-manifest-bulk-action:disabled {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.xaf-tour-manifest-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

.xaf-tour-manifest-filters button {
    flex: 0 0 auto;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: #fff;
    color: #4b5563;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.xaf-tour-manifest-filters button.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.xaf-tour-manifest-filters button:hover,
.xaf-tour-manifest-filters button:focus-visible {
    border-color: #2563eb;
    outline: 2px solid rgba(37, 99, 235, 0.18);
    outline-offset: 1px;
}

.xaf-tour-manifest-list {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
}

.xaf-tour-manifest-list-heading {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    line-height: 1rem;
    text-transform: uppercase;
}

.xaf-tour-manifest-no-results {
    padding: 2rem 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    text-align: center;
}

.xaf-tour-passenger-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.xaf-tour-passenger-card.is-docs-due {
    border-color: #f87171;
}

.xaf-tour-passenger-card.is-balance-due,
.xaf-tour-passenger-card.is-pending {
    border-color: #fbbf24;
}

.xaf-tour-passenger-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem 0.5rem;
}

.xaf-tour-passenger-summary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.xaf-tour-passenger-name {
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xaf-tour-passenger-flags {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.xaf-tour-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.125rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    white-space: nowrap;
    background: #ecfdf5;
    color: #047857;
}

.xaf-tour-passenger-balance {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    white-space: nowrap;
}

.xaf-tour-docs-badge {
    width: auto;
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    white-space: nowrap;
}

.xaf-tour-level {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.125rem 0.375rem;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    white-space: nowrap;
    background: #eff6ff;
    color: #2563eb;
}

.xaf-tour-docs-badge.is-ok {
    background: #bbf7d0;
    color: #15803d;
}

.xaf-tour-docs-badge.is-due {
    background: #fee2e2;
    color: #b91c1c;
}

.xaf-tour-passenger-balance {
    border: 1px solid #fbbf24;
    background: #fef3c7;
    color: #a16207;
    font-weight: 700;
}

.xaf-tour-passenger-contact {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0 0.75rem 0.5rem;
}

.xaf-tour-passenger-contact a,
.xaf-tour-passenger-contact span {
    display: inline-flex;
    align-items: center;
    min-height: 1.625rem;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.xaf-tour-passenger-contact a:hover,
.xaf-tour-passenger-contact a:focus-visible {
    color: #1d4ed8;
    outline: 2px solid rgba(37, 99, 235, 0.18);
    outline-offset: 1px;
}

.xaf-tour-passenger-document-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0 0.75rem 0.5rem;
}

.xaf-tour-document-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    max-width: 100%;
    padding: 0.25rem 0.6rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    background: #fff;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.xaf-tour-document-action:hover,
.xaf-tour-document-action:focus-visible {
    border-color: #60a5fa;
    background: #dbeafe;
    color: #1e40af;
    outline: 2px solid rgba(37, 99, 235, 0.16);
    outline-offset: 1px;
}

.xaf-tour-document-action:disabled,
.xaf-tour-document-action.is-disabled {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.xaf-tour-passenger-equipment {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem 0.65rem;
    border-top: 1px solid #f3f4f6;
}

.xaf-tour-equipment-chip {
    min-width: 6.625rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.xaf-tour-equipment-chip.is-filter-match {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.xaf-tour-equipment-icon {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1;
}

.xaf-tour-equipment-copy {
    min-width: 0;
    display: grid;
    gap: 0.05rem;
}

.xaf-tour-equipment-chip strong {
    overflow: hidden;
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xaf-tour-equipment-chip.is-filter-match strong {
    color: #1d4ed8;
}

.xaf-tour-equipment-copy span,
.xaf-tour-equipment-empty {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1rem;
}

.xaf-tour-equipment-chip.is-filter-match .xaf-tour-equipment-copy span {
    color: #1e40af;
}

.xaf-tour-equipment-empty {
    padding-block: 0.25rem;
    color: #9ca3af;
    font-style: italic;
}

@media (max-width: 720px) {
    .xaf-tour-manifest {
        max-width: 480px;
        margin: 0 auto;
        min-height: auto;
    }

    .xaf-tour-manifest-title-row {
        align-items: flex-start;
    }

    .xaf-tour-manifest-meta-row {
        grid-template-columns: 6.4rem minmax(0, 1fr);
    }

    .xaf-tour-manifest-meta-status {
        grid-column: 2;
        justify-self: start;
    }

    .xaf-tour-passenger-top {
        display: grid;
        gap: 0.5rem;
    }

    .xaf-tour-passenger-flags {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .xaf-tour-manifest-title-row {
        display: grid;
    }

    .xaf-tour-manifest-date {
        justify-self: start;
    }

    .xaf-tour-manifest-stats {
        padding-inline: 0.75rem;
    }

    .xaf-tour-manifest-stats strong {
        font-size: 1rem;
        line-height: 1.25rem;
    }

    .xaf-tour-manifest-stats span {
        font-size: 0.7rem;
    }

    .xaf-tour-equipment-chip {
        min-width: min(100%, 6.625rem);
    }
}
