/* ═══ DASHBOARD ═══════════════════════════════════════════ */
:root {
    --tps-blue:    #1a3c5e;
    --tps-red:     #e74c3c;
    --tps-green:   #10b981;
    --tps-orange:  #f59e0b;
    --tps-purple:  #8b5cf6;
    --tps-gray:    #6b7280;
    --tps-border:  #e5e7eb;
    --tps-bg:      #f8fafc;
    --tps-white:   #ffffff;
    --tps-shadow:  0 2px 12px rgba(0,0,0,.08);
    --tps-radius:  10px;
}

* { box-sizing: border-box; }

.tps-dash {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #111;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.tps-dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0f2544, #1a3c5e);
    border-radius: 14px;
    padding: 20px 24px;
    color: #fff;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.tps-user-greet {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tps-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.tps-user-greet h2 { margin: 0 0 3px; font-size: 19px; }
.tps-user-greet span { font-size: 13px; opacity: .75; }

.tps-btn-logout {
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition: background .2s;
    white-space: nowrap;
}
.tps-btn-logout:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Stats ───────────────────────────────────────────────── */
.tps-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.tps-stat {
    background: var(--tps-white);
    border-radius: var(--tps-radius);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--tps-shadow);
    border-top: 4px solid var(--c, var(--tps-blue));
    transition: transform .2s;
}
.tps-stat:hover { transform: translateY(-2px); }

.tps-stat-num {
    display: block;
    font-size: 30px;
    font-weight: 700;
    color: var(--c, var(--tps-blue));
    line-height: 1.1;
}
.tps-stat-lbl {
    font-size: 12px;
    color: var(--tps-gray);
    margin-top: 4px;
}

/* ── Tabs ────────────────────────────────────────────────── */
.tps-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--tps-border);
    margin-bottom: 20px;
}

.tps-tab {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tps-gray);
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}
.tps-tab:hover { color: var(--tps-blue); background: #f0f4f8; }
.tps-tab.active { color: var(--tps-blue); border-bottom-color: var(--tps-blue); background: var(--tps-white); }

/* ── Action Banner ───────────────────────────────────────── */
.tps-action-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: var(--tps-radius);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: #78350f;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Filter Bar ──────────────────────────────────────────── */
.tps-filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tps-filter {
    padding: 6px 14px;
    border: 1.5px solid var(--tps-border);
    border-radius: 20px;
    background: var(--tps-white);
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.tps-filter.active,
.tps-filter:hover {
    background: var(--tps-blue);
    color: #fff;
    border-color: var(--tps-blue);
}

/* ── Booking Cards ───────────────────────────────────────── */
.tps-booking-list { display: flex; flex-direction: column; gap: 14px; }

.tps-bcard {
    background: var(--tps-white);
    border-radius: 12px;
    border: 1.5px solid var(--tps-border);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.tps-bcard:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 20px rgba(26,60,94,.1);
}

.tps-bcard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--tps-border);
    flex-wrap: wrap;
    gap: 8px;
}

.tps-ref-badge {
    font-size: 13px;
    font-weight: 700;
    color: var(--tps-blue);
    background: #dbeafe;
    padding: 3px 10px;
    border-radius: 20px;
    margin-right: 8px;
}

.tps-bcard-top small { font-size: 11px; color: #999; }

.tps-status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Route display */
.tps-bcard-route {
    display: flex;
    align-items: center;
    padding: 18px 16px;
    gap: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.tps-route-city { min-width: 80px; }
.tps-route-city strong { display: block; font-size: 18px; color: var(--tps-blue); }
.tps-route-city small  { font-size: 11px; color: #888; }
.tps-route-right { text-align: right; }

.tps-route-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--tps-blue);
    font-size: 18px;
}
.tps-route-line {
    width: 100%;
    height: 1.5px;
    background: #e5e7eb;
    position: relative;
}
.tps-route-mid small { font-size: 11px; color: #888; }

/* Meta row */
.tps-bcard-meta {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    font-size: 12px;
    color: #555;
    flex-wrap: wrap;
    border-bottom: 1px solid #f3f4f6;
}

.tps-price-chip {
    background: #d1fae5;
    color: #065f46;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

/* Action buttons */
.tps-bcard-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

.tps-btn-outline-sm {
    padding: 7px 14px;
    border: 1.5px solid var(--tps-border);
    background: #fff;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    color: #444;
    transition: all .2s;
}
.tps-btn-outline-sm:hover { border-color: var(--tps-blue); color: var(--tps-blue); }

.tps-btn-pay {
    padding: 7px 18px;
    background: #1a3c5e;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.tps-btn-pay:hover { background: #0f2b47; }

.tps-btn-download {
    padding: 7px 18px;
    background: #059669;
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.tps-btn-download:hover { background: #047857; color: #fff; }

/* ── Profile Box ─────────────────────────────────────────── */
.tps-profile-box {
    background: var(--tps-white);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--tps-shadow);
    max-width: 700px;
}
.tps-profile-box h3 { margin: 0 0 20px; color: var(--tps-blue); }

.tps-field { margin-bottom: 16px; }
.tps-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}
.tps-field input[type=text],
.tps-field input[type=email],
.tps-field input[type=password],
.tps-field input[type=tel],
.tps-field input[type=date] {
    width: 100%;
    padding: 10px 13px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .2s;
}
.tps-field input:focus {
    outline: none;
    border-color: var(--tps-blue);
    box-shadow: 0 0 0 3px rgba(26,60,94,.08);
}
.tps-field input:disabled { background: #f3f4f6; color: #888; cursor: not-allowed; }

.tps-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Modals ──────────────────────────────────────────────── */
.tps-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tps-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
}

.tps-modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 70px rgba(0,0,0,.3);
    animation: tpsModalIn .25s ease;
}
.tps-modal-wide { max-width: 820px; }

@keyframes tpsModalIn {
    from { opacity:0; transform: scale(.93) translateY(-15px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}

.tps-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.tps-modal-head h3 { margin: 0; font-size: 17px; color: var(--tps-blue); }
.tps-modal-close {
    width: 30px; height: 30px;
    border: none; border-radius: 50%;
    background: #f3f4f6; cursor: pointer;
    font-size: 14px; transition: background .2s;
}
.tps-modal-close:hover { background: #fee2e2; }

.tps-modal-body { padding: 22px; }

/* ── Payment Grid ────────────────────────────────────────── */
.tps-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.tps-pay-left { text-align: center; }

.tps-amount-badge {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border-radius: 10px;
    padding: 14px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.tps-qr-box {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}
.tps-qr-box img { width: 100%; max-width: 200px; border-radius: 8px; }
.tps-qr-box p { margin: 0 0 8px; font-weight: 600; color: #444; }
.tps-qr-box small { color: #888; font-size: 12px; }

.tps-pay-instructions {
    font-size: 13px;
    color: #555;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px;
    text-align: left;
}

.tps-pay-right h4 { margin: 0 0 6px; color: var(--tps-blue); }
.tps-pay-right > p { font-size: 13px; color: #666; margin-bottom: 14px; }

.tps-upload-area {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 30px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    margin-bottom: 14px;
    overflow: hidden;
}
.tps-upload-area:hover, .tps-upload-area.drag-over {
    border-color: var(--tps-blue);
    background: #f0f5ff;
}
.tps-upload-area input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.tps-upload-icon { font-size: 32px; margin-bottom: 8px; }
.tps-upload-inner p { margin: 0 0 4px; font-weight: 600; color: #444; font-size: 14px; }
.tps-upload-inner small { color: #888; font-size: 12px; }

/* ── Empty State ─────────────────────────────────────────── */
.tps-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--tps-shadow);
}
.tps-empty-icon { font-size: 56px; display: block; margin-bottom: 16px; }
.tps-empty h3 { color: var(--tps-blue); margin-bottom: 8px; }
.tps-empty p  { color: #888; margin-bottom: 20px; font-size: 14px; }

/* ── Utility ─────────────────────────────────────────────── */
.tps-btn-full  { width: 100%; }
.tps-loading   { text-align: center; padding: 30px; color: #888; }
.tps-btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--tps-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
    text-align: center;
}
.tps-btn-primary:hover { background: #0f2b47; color: #fff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .tps-stat-row       { grid-template-columns: 1fr 1fr; }
    .tps-payment-grid   { grid-template-columns: 1fr; }
    .tps-field-row      { grid-template-columns: 1fr; }
    .tps-bcard-meta     { gap: 8px; }
}
@media (max-width: 480px) {
    .tps-stat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tps-stat-num { font-size: 22px; }
    .tps-modal-box { border-radius: 10px; }
}