/* Ticket Queue / Booking Summary ? TBO-style layout */
.tq-page {
    background: #f0f2f5;
    min-height: calc(100vh - 80px);
    padding: 16px 20px 40px;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
}

.tq-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    max-width: 1280px;
    margin: 0 auto;
}

.tq-main {
    flex: 1 1 auto;
    min-width: 0;
}

.tq-sidebar {
    width: 260px;
    flex-shrink: 0;
}

/* Pagination */
.tq-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 14px;
}

.tq-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid #c5c5c5;
    color: #1a5fb4;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.tq-page-btn:hover {
    background: #f5f8fc;
}

.tq-page-btn.active {
    border-color: #e67e22;
    border-width: 2px;
    color: #1a5fb4;
}

.tq-page-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Booking card */
.tq-card {
    background: #fff;
    border: 1px solid #c8c8c8;
    margin-bottom: 14px;
    overflow: hidden;
}

.tq-card-title {
    padding: 12px 14px 6px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.tq-card-body {
    display: flex;
    gap: 16px;
    padding: 4px 14px 14px;
    align-items: flex-start;
}

.tq-tickets {
    flex: 1 1 55%;
    min-width: 0;
}

.tq-tickets-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.tq-pax-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.tq-pax-list li {
    margin: 2px 0;
    font-size: 13px;
}

.tq-pax-list a {
    color: #1a5fb4;
    text-decoration: none;
}

.tq-pax-list a:hover {
    text-decoration: underline;
}

.tq-flight-line {
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
}

.tq-pax-type {
    font-size: 12px;
    color: #555;
}

.tq-meta-box {
    flex: 0 0 240px;
    border: 1px solid #d0d0d0;
    background: #fafafa;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
}

.tq-meta-row {
    display: flex;
    gap: 6px;
}

.tq-meta-label {
    color: #444;
    white-space: nowrap;
}

.tq-meta-value {
    color: #222;
    word-break: break-all;
}

.tq-meta-value.status {
    font-weight: 700;
}

.tq-meta-value.status.ticketed {
    color: #111;
}

.tq-meta-value.status.cancelled {
    color: #c0392b;
}

.tq-meta-value.status.pending,
.tq-meta-value.status.failed,
.tq-meta-value.status.hold {
    color: #d35400;
}

/* Card footer */
.tq-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #e8f1fa;
    border-top: 1px solid #d0e0ef;
    padding: 8px 14px;
    flex-wrap: wrap;
}

.tq-footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.tq-footer-links a {
    color: #1a5fb4;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.tq-footer-links a:hover {
    text-decoration: underline;
}

.tq-footer-note {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    flex: 1 1 auto;
    text-align: center;
}

.tq-footer-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.tq-btn-orange {
    background: #f5a623;
    border: 1px solid #e09110;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.tq-btn-orange:hover {
    background: #e8910f;
}

.tq-btn-orange:disabled {
    opacity: 0.6;
    cursor: default;
}

a.tq-btn-orange {
    text-decoration: none;
    display: inline-block;
    line-height: normal;
}

/* Search sidebar */
.tq-search {
    background: #fff;
    border: 1px solid #c8c8c8;
}

.tq-search-header {
    background: #d6e8f7;
    color: #1a5fb4;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid #b8d4ea;
}

.tq-search-body {
    padding: 14px;
}

.tq-field {
    margin-bottom: 14px;
}

.tq-field label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
}

.tq-field .hint {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.tq-field input {
    width: 100%;
    box-sizing: border-box;
    height: 30px;
    border: 1px solid #bbb;
    padding: 4px 8px;
    font-size: 13px;
    background: #fff;
}

.tq-field input:focus {
    outline: none;
    border-color: #1a5fb4;
}

.tq-search-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.tq-btn-search {
    background: #1a5fb4;
    color: #fff;
    border: none;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
}

.tq-btn-search:hover {
    background: #154a8f;
}

.tq-btn-clear {
    background: #fff;
    color: #555;
    border: 1px solid #bbb;
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
}

.tq-empty {
    background: #fff;
    border: 1px solid #c8c8c8;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.tq-error {
    background: #fff3f3;
    border: 1px solid #f5c2c2;
    color: #c0392b;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 14px;
}

.tq-card[data-hidden="true"] {
    display: none !important;
}

/* Page title (Transaction Summary) */
.tq-page-title {
    max-width: 1280px;
    margin: 0 auto 14px;
}

.tq-page-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.tq-page-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #666;
}

/* Status tabs */
.tq-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tq-status-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #c5c5c5;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
}

.tq-status-tab:hover {
    background: #f5f8fc;
}

.tq-status-tab.active {
    border-color: #1a5fb4;
    border-width: 2px;
    color: #1a5fb4;
    background: #eef5fc;
}

.tq-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #e8e8e8;
    color: #333;
    font-size: 11px;
    font-weight: 700;
}

.tq-status-tab.active .tq-tab-count {
    background: #1a5fb4;
    color: #fff;
}

/* Transaction card extras */
.txn-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    margin-right: 8px;
    border-radius: 2px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.txn-badge--success {
    background: #e8f8ef;
    color: #1e7e34;
    border: 1px solid #b7e0c5;
}

.txn-badge--refund {
    background: #fff6e8;
    color: #b36b00;
    border: 1px solid #f0d2a0;
}

.txn-badge--failed {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c2c2;
}

.txn-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin-top: 6px;
}

.txn-detail-label {
    display: block;
    font-size: 11px;
    color: #777;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.txn-detail-value {
    font-size: 13px;
    color: #222;
    font-weight: 600;
    word-break: break-all;
}

.txn-amount {
    color: #1a5fb4;
    font-size: 15px;
}

.txn-remark {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.txn-refund-note {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff8ee;
    border: 1px solid #f0d9b0;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.txn-refund-date {
    display: block;
    margin-top: 4px;
    font-weight: 600;
    color: #b36b00;
}

.tq-meta-value.status.success {
    color: #1e7e34;
}

.tq-meta-value.status.success a {
    color: #1a5fb4;
    text-decoration: none;
    font-weight: 700;
}

.tq-meta-value.status.success a:hover {
    text-decoration: underline;
}

.tq-meta-value.status.failed {
    color: #c0392b;
}

.tq-footer-muted {
    font-size: 12px;
    color: #777;
}

@media (max-width: 900px) {
    .tq-layout {
        flex-direction: column;
    }

    .tq-sidebar {
        width: 100%;
        order: -1;
    }

    .tq-card-body {
        flex-direction: column;
    }

    .tq-meta-box {
        flex: 1 1 auto;
        width: 100%;
    }

    .tq-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .tq-footer-note {
        text-align: left;
    }

    .txn-detail-grid {
        grid-template-columns: 1fr;
    }
}
