/* ══════════════════════════════
   RESET & BASE
══════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #e2e8f0;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(-45deg, #060b18, #080e20, #07101e, #060a16);
    background-size: 400% 400%;
    animation: bgMove 14s ease infinite;
}

@keyframes bgMove {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* ══════════════════════════════
   ANIMATED ORBS
══════════════════════════════ */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 8s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, .18) 0%, transparent 70%);
    top: -200px;
    left: -150px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, .14) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: 3s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, .10) 0%, transparent 70%);
    top: 40%;
    left: 60%;
    animation-delay: 6s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -40px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    background: rgba(6, 11, 24, .8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
    color: #f0f6ff;
    text-decoration: none;
}

.nav-logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
    box-shadow: 0 0 16px rgba(99, 102, 241, .5);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* User Dropdown Menu */
.user-menu {
    position: relative;
    display: inline-block;
}

.nav-user {
    font-family: inherit;
    font-size: 13px;
    color: #64748b;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-user:hover,
.user-menu.open .nav-user {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #0d1b2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300;
}

.user-menu:hover .dropdown-content,
.user-menu.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #a0b4cc;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.dropdown-content a.border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
    padding-top: 12px;
    border-radius: 0 0 8px 8px;
}

.dropdown-content a.text-red {
    color: #f87171;
}

.dropdown-content a.text-red:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-ghost-sm {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all .2s;
}

.btn-ghost-sm:hover {
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
}

.btn-primary-sm {
    padding: 8px 18px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all .3s;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
}

.btn-primary-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, .45);
}

/* ══════════════════════════════
   MAIN LAYOUT
══════════════════════════════ */
.pnr-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 100px 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* ══════════════════════════════
   PAGE HEADER
══════════════════════════════ */
.pnr-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 680px;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .35);
    color: #a5b4fc;
    padding: 7px 20px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    overflow: hidden;
}

.badge-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .15), transparent);
    animation: shimmer 2.5s linear infinite;
}

@keyframes shimmer {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

.pnr-title {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    color: #f0f8ff;
}

.text-gradient {
    background: linear-gradient(270deg, #818cf8, #c084fc, #38bdf8, #818cf8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.pnr-subtitle {
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
    max-width: 520px;
}

/* ══════════════════════════════
   SEARCH CARD
══════════════════════════════ */
.search-card {
    width: 100%;
    max-width: 640px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    padding: 36px;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .5), transparent);
}

.search-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.search-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .2), rgba(168, 85, 247, .2));
    border: 1px solid rgba(99, 102, 241, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #a5b4fc;
    box-shadow: 0 0 32px rgba(99, 102, 241, .25);
    margin-bottom: 4px;
}

.search-card-title {
    font-size: 22px;
    font-weight: 800;
    color: #f0f6ff;
    letter-spacing: -0.5px;
}

.search-card-sub {
    font-size: 13px;
    color: #3d5470;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Input Group */
.pnr-input-group {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
    flex-wrap: wrap;
}

.pnr-input-wrap {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 0 16px;
    transition: border-color .2s, box-shadow .2s;
}

.pnr-input-wrap:focus-within {
    border-color: rgba(99, 102, 241, .6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.pnr-input-icon {
    color: #4a6080;
    font-size: 14px;
    flex-shrink: 0;
}

.pnr-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #e0ecff;
    font-family: inherit;
    padding: 16px 0;
}

.pnr-input::placeholder {
    color: #2a3d58;
    font-weight: 400;
    letter-spacing: 1px;
    font-size: 14px;
}

.pnr-char-count {
    font-size: 11px;
    font-weight: 600;
    color: #4a6080;
    white-space: nowrap;
    transition: color .2s;
}

.btn-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    text-decoration: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .45);
    transition: all .3s;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, .55);
}

.btn-search:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.pnr-error {
    font-size: 13px;
    color: #ef4444;
    min-height: 18px;
    font-weight: 500;
    width: 100%;
    text-align: left;
}

/* ══════════════════════════════
   RESULT CARD
══════════════════════════════ */
.result-card {
    width: 100%;
    max-width: 760px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}

/* Skeleton */
.skeleton-wrap {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%);
    background-size: 200% 100%;
    animation: shimmer-skel 1.5s linear infinite;
}

.skeleton-line.wide {
    width: 60%;
}

.skeleton-line.medium {
    width: 40%;
}

.skeleton-line.short {
    width: 25%;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.skeleton-block {
    height: 64px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 75%);
    background-size: 200% 100%;
    animation: shimmer-skel 1.5s linear infinite;
}

@keyframes shimmer-skel {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* ── Result Content ── */
.result-inner {
    padding: 0;
}

/* Status Banner */
.result-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(168, 85, 247, .08));
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .5);
}

.banner-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #4a6080;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.banner-pnr {
    font-size: 24px;
    font-weight: 900;
    color: #f0f6ff;
    letter-spacing: 3px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-pill.confirmed {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .3);
    color: #4ade80;
}

.status-pill.confirmed i {
    font-size: 8px;
}

/* Detail Section */
.detail-section {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #4a6080;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section-title i {
    color: #6366f1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.detail-item {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 14px 16px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #3a5070;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #c0d4eb;
}

.class-badge {
    display: inline-block;
    background: rgba(99, 102, 241, .15);
    border: 1px solid rgba(99, 102, 241, .3);
    color: #a5b4fc;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

/* Route Section */
.route-section {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 28px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.route-station {
    flex: 1;
}

.from-station {
    text-align: left;
}

.to-station {
    text-align: right;
}

.route-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #4a6080;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.route-name {
    font-size: 16px;
    font-weight: 800;
    color: #f0f6ff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.route-time {
    font-size: 12px;
    color: #4a6080;
    display: flex;
    align-items: center;
    gap: 6px;
}

.to-station .route-time {
    justify-content: flex-end;
}

.route-middle {
    flex: 0 0 auto;
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
}

.route-line {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .4), transparent);
}

.route-train-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, .5);
    margin: 6px 0;
}

.route-distance {
    font-size: 11px;
    color: #4a6080;
    font-weight: 600;
    text-align: center;
}

/* Fare Row */
.fare-row {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    flex-wrap: wrap;
}

.fare-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding: 16px 20px;
}

.fare-item i {
    font-size: 18px;
    color: #6366f1;
}

.fare-label {
    font-size: 12px;
    color: #4a6080;
    font-weight: 500;
}

.fare-value {
    font-size: 16px;
    font-weight: 800;
    color: #f0f6ff;
    margin-left: auto;
}

/* Passenger Table */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .07);
}

.pax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.pax-table th {
    background: rgba(255, 255, 255, .04);
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #4a6080;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.pax-table td {
    padding: 14px 16px;
    color: #c0d4eb;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.pax-table tr:last-child td {
    border-bottom: none;
}

.pax-table tbody tr:hover {
    background: rgba(255, 255, 255, .02);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-badge.cnf {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .25);
    color: #4ade80;
}

/* Actions */
.result-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 28px;
    background: rgba(255, 255, 255, .02);
    border-top: 1px solid rgba(255, 255, 255, .05);
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border-radius: 10px;
    color: white;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 4px 16px rgba(34, 197, 94, .35);
}

.btn-download:hover {
    transform: translateY(-2px);
    opacity: .92;
}

.btn-new-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}

.btn-new-search:hover {
    background: rgba(255, 255, 255, .1);
    color: #e2e8f0;
}

.btn-chat-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: rgba(99, 102, 241, .08);
    border: 1px solid rgba(99, 102, 241, .2);
    border-radius: 10px;
    color: #a5b4fc;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}

.btn-chat-link:hover {
    background: rgba(99, 102, 241, .16);
    color: #c4b5fd;
}

/* Error State */
.result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 28px;
    text-align: center;
}

.result-error-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #f87171;
}

.result-error p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    max-width: 380px;
}

.btn-cta {
    padding: 10px 22px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .4);
}

.btn-cta:hover {
    transform: translateY(-2px);
}

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 640px) {
    .navbar {
        padding: 0 18px;
    }

    .pnr-main {
        padding: 90px 16px 48px;
    }

    .search-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .pnr-input-group {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
        height: 50px;
    }

    .route-section {
        flex-direction: column;
        gap: 16px;
    }

    .route-middle {
        width: 100%;
        flex-direction: row;
    }

    .route-line {
        height: 1px;
        flex: 1;
    }

    .to-station {
        text-align: left;
    }

    .to-station .route-time {
        justify-content: flex-start;
    }

    .result-banner {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}