:root {
    --orange: #f4511e;
    --orange2: #ff6a22;
    --dark: #14213d;
    --muted: #727d8d;
    --line: #e3e7ec;
    --bg: #f8f9fb;
    --green: #168653;
    --red: #d83b3b;
    --greenbg: #e8f7ef;
    --redbg: #fdeaea;
    --shadow: 0 12px 32px rgba(20, 35, 55, .10);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #e7ebef;
    font-family: Inter, Segoe UI, Arial, sans-serif !important;
    color: var(--dark)
}

.app {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: auto;
    background: var(--bg);
    position: relative;
    overflow: visible
}

/* ---------- Page shell ---------- */
.page {
    min-height: 100vh
}

.page-content.has-shell {
    padding-bottom: 86px
}

/* ---------- Login ---------- */
.login {
    min-height: 100vh;
    padding: 0 24px 18px;
    display: flex;
    flex-direction: column
}

.top {
    padding: 28px 0 8px;
    display: flex;
    justify-content: flex-end
}

.help-link {
    font-size: 12px;
    color: var(--muted);
    cursor: pointer
}

.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 220px;
    height: 220px;
    object-fit: contain;
    margin: 8px auto 5px;
    display: block
}

.title {
    font-size: 25px;
    font-weight: 800;
    margin: 10px 0 7px;
    text-align: center
}

.subtitle {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
    max-width: 310px;
    margin: 0 0 25px
}

.form-card {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow)
}

.label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block
}

.phone-wrap {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 13px;
    height: 50px;
    overflow: hidden
}

.country {
    width: 62px;
    border: 0;
    border-right: 1px solid var(--line);
    background: #fafbfc;
    color: var(--dark);
    font-size: 13px;
    font-weight: 700;
    text-align: center
}

.phone {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 13px;
    font-size: 14px
}

.primary {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--orange), var(--orange2));
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    margin-top: 15px;
    box-shadow: 0 7px 16px rgba(244, 81, 30, .22);
    cursor: pointer
}

.terms {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
    margin: 15px 8px 0
}

.otp-card {
    display: none
}

.otp-card.show {
    display: block
}

.phone-card.hide {
    display: none
}

.login-otp-mode #phoneCard {
    display: none !important
}

.login-otp-mode #otpCard {
    display: block !important
}

.otp-row {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin: 12px 0 7px
}

.otp-input {
    width: 43px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 11px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    outline: 0
}

.otp-hint {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    margin: 8px 0 12px
}

.link {
    border: 0;
    background: none;
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer
}

.resend {
    color: var(--muted);
    margin-left: 12px
}

.message {
    display: none;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 12px
}

.message.show {
    display: block
}

.success {
    background: var(--greenbg);
    color: var(--green)
}

.fail {
    background: var(--redbg);
    color: var(--red)
}

.footer {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
    color: #a0a8b3;
    /* font-size: 10px */
}

/* ---------- App header (shell pages) ---------- */
.app-header {
    height: 62px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.header-logo {
    width: 38px;
    height: 38px;
    object-fit: contain
}

.header-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--dark);
    white-space: nowrap
}

.header-subtitle {
    font-size: 9px;
    color: var(--muted);
    margin-top: 2px
}

.header-icon {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 11px;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative
}

.header-badge {
    position: absolute;
    right: 5px;
    top: 4px;
    width: 7px;
    height: 7px;
    background: var(--orange);
    border-radius: 50%;
    border: 2px solid #fff
}

.back-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px
}

.back-header button {
    border: 0;
    background: none;
    color: var(--orange);
    font-size: 12px;
    font-weight: 900;
    padding: 0;
    cursor: pointer
}

.inner {
    padding: 22px 18px
}

.back {
    border: 0;
    background: none;
    color: var(--orange);
    font-weight: 800;
    padding: 0;
    margin-bottom: 20px;
    cursor: pointer
}

.muted {
    color: var(--muted);
    font-size: 12px
}

/* ---------- Shell footer nav ---------- */
.shell-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100vw, 430px);
    height: 68px;
    background: #fff;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 9999;
    padding-bottom: 4px;
    box-shadow: 0 -4px 16px rgba(20, 33, 61, .06)
}

.shell-footer button {
    border: 0;
    background: none;
    color: #8a94a3;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    min-width: 72px;
    text-decoration: none
}

.shell-footer button span {
    font-size: 21px;
    line-height: 20px
}

.shell-footer button.active {
    color: var(--orange)
}

/* ---------- Modal (used by help/logout/etc.) ---------- */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: #0006;
    z-index: 50;
    align-items: center;
    justify-content: center
}

.modal-bg.show {
    display: flex
}

.modal {
    width: min(430px, 100%);
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 23px 20px 28px
}

.modal h3 {
    margin: 0 0 8px;
    font-size: 19px
}

.modal p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5
}

.modal-actions {
    display: flex;
    gap: 10px
}

.modal-actions button {
    flex: 1;
    height: 47px;
    border: 0;
    border-radius: 11px;
    font-weight: 800
}

.cancel {
    background: #f0f2f5;
    color: var(--dark)
}

.confirm {
    background: var(--orange);
    color: #fff
}

.header-logo {
    height: 38px !important;
    width: 100% !important;
}


/* ================= BANNER CAROUSEL ================= */

.banner-carousel {
    position: relative;
    border-radius: 1.35rem;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(20, 35, 55, 0.12);
}

/* Banner */
.banner-carousel .carousel-item {
    min-height: 185px;
    border-radius: 1.35rem;
    overflow: hidden;
}

/* Smooth transition */
.banner-carousel .carousel-item {
    transition: transform .8s ease-in-out;
}

/* Banner content */
.banner-content {
    min-height: 185px;
    padding: 1.35rem 1.35rem 1.15rem;
    position: relative;
    overflow: hidden;

    background:
        radial-gradient(circle at 100% 0%,
            rgba(255, 255, 255, .25) 0,
            rgba(255, 255, 255, 0) 38%),
        linear-gradient(135deg,
            #f4511e 0%,
            #ff6a22 55%,
            #ff8242 100%);

    color: #fff;
}

/* Decorative circles */
.banner-content::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    right: -55px;
    top: -65px;
}

.banner-content::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    right: 55px;
    bottom: -55px;
}

/* Top row */
.banner-top {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: .75rem;
}

/* Tag */
.banner-content .tag {
    display: inline-flex;
    align-items: center;

    padding: .35rem .65rem;
    border-radius: 50px;

    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);

    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .04em;

    backdrop-filter: blur(5px);
}

/* Top right icon */
.banner-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, .16);
    font-size: .85rem;

    backdrop-filter: blur(5px);
}

/* Heading */
.banner-content h4 {
    position: relative;
    z-index: 2;

    margin: 0 0 .35rem;

    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

/* Description */
.banner-content p {
    position: relative;
    z-index: 2;

    margin: 0;

    max-width: 285px;

    color: rgba(255, 255, 255, .88);

    font-size: .78rem;
    line-height: 1.5;
}

/* Bottom action */
.banner-bottom {
    position: absolute;
    z-index: 3;

    left: 1.35rem;
    right: 1.35rem;
    bottom: 1rem;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: .7rem;
    font-weight: 700;

    color: rgba(255, 255, 255, .92);
}

.banner-bottom i {
    font-size: .75rem;
    transition: transform .2s ease;
}

.banner-content:hover .banner-bottom i {
    transform: translateX(4px);
}

/* Indicators */
.banner-indicators {
    position: absolute;
    z-index: 10;

    left: auto;
    right: 1.2rem;
    bottom: .75rem;

    width: auto;
    margin: 0;

    display: flex;
    align-items: center;
    gap: 5px;
}

/* Indicator */
.banner-indicators [data-bs-target] {
    width: 6px;
    height: 6px;

    margin: 0;

    border: 0;
    border-radius: 50%;

    background-color: rgba(255, 255, 255, .45);

    opacity: 1;

    transition:
        width .3s ease,
        background-color .3s ease,
        transform .3s ease;
}

/* Active indicator */
.banner-indicators .active {
    width: 20px;
    border-radius: 10px;

    background-color: #fff;

    transform: scale(1.02);
}

/* Mobile */
@media (max-width: 370px) {

    .banner-carousel,
    .banner-carousel .carousel-item,
    .banner-content {
        border-radius: 1.2rem;
    }

    .banner-carousel .carousel-item,
    .banner-content {
        min-height: 180px;
    }

    .banner-content {
        padding: 1.2rem;
    }

    .banner-content h4 {
        font-size: 1.15rem;
    }

    .banner-content p {
        font-size: .75rem;
    }

    .banner-bottom {
        left: 1.2rem;
        right: 1.2rem;
        bottom: .9rem;
    }

    .banner-indicators {
        right: 1.2rem;
        bottom: .7rem;
    }
}

/* Smooth fade effect */
.banner-carousel.fade-carousel .carousel-item {
    transition: opacity .8s ease-in-out;
}

.banner-carousel.fade-carousel .carousel-item {
    opacity: 0;
}

.banner-carousel.fade-carousel .carousel-item.active {
    opacity: 1;
}

.banner-carousel.fade-carousel .carousel-item-next.carousel-item-start,
.banner-carousel.fade-carousel .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.banner-carousel.fade-carousel .active.carousel-item-start,
.banner-carousel.fade-carousel .active.carousel-item-end {
    opacity: 0;
}


/* ---------- Bottom nav ---------- */
.shell-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100vw, 430px);
    height: 68px;
    background: #fff;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(20, 33, 61, .06);
}

.shell-footer .nav-item-btn {
    border: 0;
    background: none;
    color: #8a94a3;
    font-size: .65rem;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    min-width: 70px;
}

.shell-footer .nav-item-btn i {
    font-size: 1.3rem;
}

.shell-footer .nav-item-btn.active {
    color: var(--brand);
}

.app-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 90px;
}

/* ---------- Header ---------- */
.app-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .65rem 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-header img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.app-header .title {
    font-size: .85rem;
    font-weight: 900;
}

.app-header .subtitle {
    font-size: .65rem;
    color: var(--muted);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: .7rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--ink);
    font-size: 1.1rem;
    text-decoration: none;
}

.icon-btn .badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--brand);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ---------- Greeting ---------- */
.greeting-bar {
    background: #fff;
    padding: 1.4rem 1.1rem 1rem;
    border-bottom: 1px solid var(--line);
}

.greeting-bar small {
    color: var(--muted);
    font-size: .7rem;
}

.greeting-bar h5 {
    font-weight: 800;
    margin: 0;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff1eb;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 1px solid #ffd7c8;
}

.banner-carousel .tag {
    display: inline-block;
    background: #ffffff24;
    border: 1px solid #ffffff55;
    padding: .3rem .6rem;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.banner-carousel h4 {
    margin: .7rem 0 .35rem;
    font-weight: 800;
}

.banner-carousel p {
    font-size: .75rem;
    opacity: .9;
    width: 78%;
    line-height: 1.5;
    margin: 0;
}

.banner-carousel .carousel-indicators {
    margin-bottom: .4rem;
}

.banner-carousel .carousel-indicators [data-bs-target] {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff65;
    border: 0;
}

.banner-carousel .carousel-indicators .active {
    width: 18px;
    border-radius: 5px;
    background: #fff;
}

.section-title {
    font-weight: 800;
    font-size: .95rem;
    margin: 0 0 .7rem;
}

/* ---------- Trip card ---------- */
.trip-card {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .03);
}

.trip-id {
    font-size: .65rem;
    color: var(--muted);
}

.status-pill {
    background: var(--greenbg);
    color: var(--green);
    padding: .3rem .55rem;
    border-radius: 20px;
    font-size: .6rem;
    font-weight: 800;
    height: fit-content;
}

.route-timeline {
    position: relative;
    padding-left: 1.4rem;
}

.route-timeline::before {
    content: '';
    position: absolute;
    left: .3rem;
    top: .45rem;
    bottom: .45rem;
    width: 2px;
    background: #d7ddea;
}

.route-point {
    position: relative;
    margin-bottom: .95rem;
}

.route-point:last-child {
    margin-bottom: 0;
}

.route-point::before {
    content: '';
    position: absolute;
    left: -1.3rem;
    top: .2rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    border: 3px solid #fff2ec;
}

.route-point small {
    display: block;
    color: var(--muted);
    font-size: .65rem;
}

.route-point strong {
    font-size: .8rem;
}

.btn-outline-brand {
    background: #fff1eb;
    color: var(--brand);
    border: none;
    font-weight: 800;
    border-radius: .7rem;
    font-size: .8rem;
    padding: .65rem;
}

.btn-outline-brand:hover {
    background: #ffe4d7;
    color: var(--brand);
}

.empty-card {
    background: #fff;
    border: 1px dashed #cfd6e2;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
}

.legal-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.1rem;
    margin-bottom: .9rem
}

.status-tag {
    font-size: .6rem;
    font-weight: 800;
    padding: .25rem .55rem;
    border-radius: 20px
}

.status-progress {
    background: #e8f7ef;
    color: #168653
}

.status-completed {
    background: #eef1f6;
    color: #727d8d
}

.location-block {
    margin-top: .9rem
}

.location-label {
    font-size: .65rem;
    color: var(--muted);
    margin-bottom: .3rem
}

.location-text strong {
    display: block;
    font-size: .85rem
}

.location-text small {
    display: block;
    color: #8a94a3;
    font-size: .65rem;
    margin-top: .15rem
}

.map-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ffd0c2;
    border-radius: .7rem;
    background: #fff7f4;
    color: var(--orange);
    font-size: 1.1rem;
    flex: 0 0 auto
}

.location-divider {
    height: 1px;
    background: var(--line);
    margin: .9rem 0
}

.detail-label {
    font-size: .65rem;
    color: var(--muted);
    margin-top: .8rem
}

.detail-value {
    font-size: .85rem;
    font-weight: 700;
    margin-top: .15rem
}

.action-btn {
    width: 100%;
    height: 45px;
    border: 0;
    border-radius: .7rem;
    font-weight: 800;
    font-size: .8rem
}

.btn-support {
    background: #fff1eb;
    color: var(--orange)
}

.btn-secondary-action {
    width: 100%;
    height: 42px;
    border: 1px solid #ffd0c2;
    border-radius: .7rem;
    background: #fff7f4;
    color: var(--orange);
    font-size: .75rem;
    font-weight: 800;
    margin-top: .6rem
}

.arrived-banner,
.return-active {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .75rem;
    border-radius: .7rem;
    background: #cdf7e0;
    margin-bottom: .6rem;
    color: #168653
}

.arrived-banner span,
.return-active span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cdf7e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900
}

.completed-banner {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .9rem;
    border-radius: .9rem;
    background: #eef1f6;
    color: #4a5568;
    margin-bottom: .9rem
}

.completed-banner span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dde2ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto
}

.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: #0006;
    z-index: 2000;
    align-items: center;
    justify-content: center
}

.modal-bg.show {
    display: flex
}


.otp-box {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: .7rem;
    padding: 0 .9rem;
    font-size: 1rem;
    margin-bottom: .6rem
}

.gen-btn {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: .6rem;
    background: #fff1eb;
    color: var(--orange);
    font-weight: 800;
    margin-bottom: .7rem
}

.warning {
    display: none;
    background: #fff6e6;
    color: #9b6b00;
    border: 1px solid #f1d79b;
    padding: .6rem;
    border-radius: .6rem;
    font-size: .7rem;
    margin: .6rem 0
}

.warning.show {
    display: block
}


/* Navidation Page */
.nav-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .9rem
}

.nav-heading h2 {
    font-weight: 800;
    margin: 0 0 .2rem
}

.nav-live-pill {
    background: #e8f7ef;
    color: #168653;
    border-radius: 20px;
    padding: .3rem .55rem;
    font-size: .6rem;
    font-weight: 900;
    white-space: nowrap
}

.leaflet-map {
    width: 100%;
    height: 215px;
    border-radius: 1.1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 5px 18px rgba(20, 33, 61, .08);
    background: #e9edf1
}

.nav-info-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: .9rem;
    margin-top: .9rem
}

.nav-target {
    display: flex;
    gap: .7rem;
    align-items: center
}

.nav-target-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff1eb;
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex: 0 0 auto
}

.nav-target small {
    display: block;
    color: var(--muted);
    font-size: .65rem
}

.nav-target b {
    display: block;
    font-size: .85rem;
    margin-top: .15rem
}

.nav-stats {
    display: flex;
    gap: .6rem;
    margin-top: .9rem
}

.nav-stats>div {
    flex: 1;
    background: #f8f9fb;
    border-radius: .7rem;
    padding: .65rem
}

.nav-stats small {
    display: block;
    color: var(--muted);
    font-size: .6rem
}

.nav-stats b {
    display: block;
    font-size: .85rem;
    margin-top: .2rem
}

.nav-start-btn {
    margin-top: .9rem
}

.google-map-btn {
    width: 100%;
    height: 46px;
    border: 1px solid #d9dee6;
    border-radius: .7rem;
    background: #fff;
    color: var(--dark);
    font-weight: 800;
    font-size: .8rem;
    margin-top: .6rem
}

.nav-error {
    display: none;
    background: #fff6e6;
    color: #8c6500;
    border: 1px solid #eed58e;
    border-radius: .7rem;
    padding: .65rem;
    font-size: .7rem;
    line-height: 1.4;
    margin-top: .6rem
}

.nav-error.show {
    display: block
}

.action-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: .7rem;
    font-weight: 800;
    font-size: .85rem
}


/* Notification  */
.notification-card {
    display: flex;
    gap: .7rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: #fff;
    margin-bottom: .6rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark)
}

.notification-card.unread {
    background: #fff7f4;
    border-left: 3px solid var(--orange)
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: .7rem;
    background: #f1f3f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 1.05rem
}

.notification-card b {
    font-size: .8rem
}

.notification-card p {
    font-size: .7rem;
    color: #667085;
    margin: .2rem 0;
    line-height: 1.4
}

.notification-card small {
    font-size: .62rem;
    color: #9aa2ad
}

.text-btn {
    border: 0;
    background: none;
    color: var(--orange);
    font-size: .7rem;
    font-weight: 800
}

.empty-card {
    background: #fff;
    border: 1px dashed #cfd6e2;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: .85rem
}


/* Profile page CSS */
.profile-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.1rem;
    margin-bottom: .9rem
}

.profile-head {
    text-align: center
}

.profile-pic {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto;
    background: #fff1eb;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    font-size: 2rem;
    font-weight: 900;
    position: relative
}

.camera-btn {
    position: absolute;
    right: -3px;
    bottom: 1px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0
}

.profile-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin-top: .7rem
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: .85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .8rem
}

.profile-item:last-child {
    border-bottom: 0
}

.profile-item span {
    color: var(--muted)
}

.profile-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--dark);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none
}

.profile-link:last-child {
    border-bottom: 0
}

.profile-link:hover {
    color: var(--dark)
}

.logout-btn {
    width: 100%;
    height: 48px;
    margin-top: .85rem;
    border: 1px solid #f2c8bd;
    border-radius: .75rem;
    background: #fff7f4;
    color: var(--red);
    font-size: .8rem;
    font-weight: 800
}

.version-text {
    text-align: center;
    color: #a0a8b3;
    font-size: .65rem;
    margin-top: 1.2rem
}

.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: #0006;
    z-index: 2000;
    align-items: center;
    justify-content: center
}

.modal-bg.show {
    display: flex
}

.modal-box {
    width: min(400px, 100%);
    background: #fff;
    border-radius: 1.4rem 1.4rem 0 0;
    padding: 1.4rem 1.2rem 1.7rem;
    border-radius: 27px;
}





.list-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1rem 1.1rem;
    margin-bottom: .85rem;
    text-decoration: none;
    color: var(--dark);
    display: block
}

.list-card .trip-id {
    font-size: .65rem;
    color: var(--muted)
}

.list-card b {
    font-size: .9rem
}

.list-card .arrow {
    color: var(--orange);
    font-size: 1.3rem
}

.status-tag {
    font-size: .6rem;
    font-weight: 800;
    padding: .25rem .55rem;
    border-radius: 20px
}

.status-progress {
    background: #e8f7ef;
    color: #168653
}

.status-completed {
    background: #eef1f6;
    color: #727d8d
}

.status-cancelled {
    background: #fdeceb;
    color: #d1453b
}

.empty-card {
    background: #fff;
    border: 1px dashed #cfd6e2;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: .85rem
}

.trip-tabs {
    display: flex;
    background: #f0f2f6;
    border-radius: .8rem;
    padding: .3rem;
    margin-bottom: 1rem
}

.trip-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .55rem;
    border-radius: .6rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted)
}

.trip-tabs button.active {
    background: #fff;
    color: var(--dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06)
}

.trip-panel {
    display: none
}

.trip-panel.active {
    display: block
}

/* --- Trip progress stepper --- */
.trip-stepper {
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 4px;
}

.trip-stepper .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    opacity: .4;
}

.trip-stepper .step-item.active {
    opacity: 1;
}

.trip-stepper .step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef0f4;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.trip-stepper .step-item.active .step-dot {
    background: linear-gradient(135deg, var(--orange), var(--orange2));
    color: #fff;
}

.trip-stepper .step-label {
    font-size: 10px;
    margin-top: 4px;
    text-align: center;
    color: #6b7280;
    white-space: nowrap;
}

.trip-stepper .step-line {
    flex: 1;
    height: 2px;
    background: #eef0f4;
    min-width: 16px;
}

/* --- Live GPS tracker card --- */
.gps-tracker {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f8fa;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px 0;
}

.live-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.5);
    animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }

    70% {
        box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}


.resend-link {
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.resend-link:hover:not(.resend-disabled) {
    color: var(--orange2);
    text-decoration: underline;
}

.resend-link.resend-disabled {
    color: #b0b0b0;
    cursor: not-allowed;
}


/* ---------- Trip Summary ---------- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.summary-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(20, 35, 55, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}

.summary-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.summary-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.summary-label {
    font-size: .63rem;
    font-weight: 700;
    color: var(--muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* Per-stat accent colors */
.summary-box.today .summary-icon {
    background: #fff1eb;
    color: var(--orange);
}

.summary-box.upcoming .summary-icon {
    background: #eaf1ff;
    color: #2b6cf6;
}

.summary-box.completed .summary-icon {
    background: var(--greenbg);
    color: var(--green);
}


/* ---------- Trips List (with date badge) ---------- */
.trip-tabs {
    display: flex;
    background: #f0f2f6;
    border-radius: .8rem;
    padding: .3rem;
    margin-bottom: 1.1rem;
}

.trip-tabs button {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .6rem;
    border-radius: .6rem;
    font-size: .82rem;
    font-weight: 800;
    color: var(--muted);
    transition: background .15s ease, color .15s ease;
}

.trip-tabs button.active {
    background: #fff;
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(20, 35, 55, .08);
}

.list-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: .95rem;
    margin-bottom: .8rem;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: .8rem;
    box-shadow: 0 4px 14px rgba(20, 35, 55, .04);
    transition: transform .15s ease, box-shadow .15s ease;
}

.list-card:hover {
    box-shadow: 0 8px 20px rgba(20, 35, 55, .09);
    transform: translateY(-1px);
    color: var(--dark);
}

/* Mini calendar date badge */
.date-badge {
    flex: 0 0 auto;
    width: 48px;
    border-radius: .8rem;
    overflow: hidden;
    border: 1px solid var(--line);
    text-align: center;
    box-shadow: 0 3px 8px rgba(244, 81, 30, .10);
}

.date-badge .db-month {
    background: linear-gradient(135deg, var(--orange), var(--orange2));
    color: #fff;
    font-size: .58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 0;
}

.date-badge .db-day {
    background: #fff;
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 5px 0 6px;
    line-height: 1;
}

.date-badge.is-muted .db-month {
    background: #ee3823;
    color: #f7f9fc;
}

.list-card-body {
    flex: 1;
    min-width: 0;
}

.list-card .trip-id {
    font-size: .63rem;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: .02em;
}

.list-card b {
    display: block;
    font-size: .9rem;
    font-weight: 800;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card .list-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: .4rem;
    font-size: .7rem;
    color: var(--muted);
}

.list-card .list-meta i {
    font-size: .75rem;
    color: var(--orange);
}

.list-card .arrow {
    color: var(--orange);
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.status-tag {
    font-size: .6rem;
    font-weight: 800;
    padding: .25rem .55rem;
    border-radius: 20px;
    white-space: nowrap;
}

.status-progress {
    background: #e8f7ef;
    color: #168653;
}

.status-completed {
    background: #eef1f6;
    color: #727d8d;
}

.status-cancelled {
    background: #fdeceb;
    color: #d1453b;
}

.empty-card {
    background: #fff;
    border: 1px dashed #cfd6e2;
    border-radius: 1rem;
    padding: 1.6rem 1.2rem;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
}


/* ================================
   Trip Timeline
================================ */

.timeline {
    position: relative;
    padding: 6px 4px 4px 6px;
    margin-top: 18px;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 0 10px 12px 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* connecting line */
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 17px;
    width: 2px;
    height: calc(100% - 8px);
    background: repeating-linear-gradient(180deg, #e5e7eb 0 6px, transparent 6px 10px);
    border-radius: 2px;
}

.timeline-item.done:not(:last-child)::before {
    background: linear-gradient(180deg, var(--orange), var(--orange2));
}

/* marker */
.timeline-marker {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #9aa1ab;
    border: 2.5px solid #e5e7eb;
    z-index: 1;
    transition: transform .25s ease, box-shadow .25s ease;
}

.timeline-item.done .timeline-marker {
    background: linear-gradient(135deg, var(--orange), var(--orange2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 106, 34, .38), 0 0 0 5px rgba(255, 122, 30, .12);
    transform: scale(1.04);
}

.timeline-item.pending .timeline-marker {
    background: rgba(255, 255, 255, .55);
    color: var(--orange);
    border-color: rgba(255, 122, 30, .45);
    border-style: dashed;
}

/* content card — turns each step into a soft glass chip */
.timeline-content {
    flex-grow: 1;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .5);
    border: 1px solid rgba(255, 255, 255, .6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgb(20 35 55 / 24%);
}

.timeline-item.done .timeline-content {
    background: rgba(255, 247, 244, .7);
    border-color: rgba(255, 122, 30, .25);
}

.timeline-label {
    font-weight: 800;
    font-size: 14px;
    color: #1f2430;
}

.timeline-item.pending .timeline-label {
    color: #6b7280;
}

.timeline-time {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-item.done .timeline-time::before {
    content: '●';
    color: var(--orange);
    font-size: 8px;
}

.timeline-item.pending .timeline-time {
    color: #a0a6b1;
    font-style: italic;
}


/* ---------- Greeting ---------- */
.greeting-bar {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #fff7f3 100%);
    padding: 1.5rem 1.1rem 1.35rem;
    border-bottom: 1px solid var(--line);
}

.greeting-glow {
    position: absolute;
    top: -60px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 81, 30, .14) 0%, rgba(244, 81, 30, 0) 70%);
    pointer-events: none;
}

.greeting-text {
    position: relative;
    z-index: 1;
}

.greeting-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .3rem .65rem;
    border-radius: 20px;
    background: #fff1eb;
    color: var(--orange);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .02em;
    margin-bottom: .5rem;
}

.greeting-tag i {
    font-size: .75rem;
}

.greeting-text h5 {
    font-weight: 800;
    font-size: 1.15rem;
    margin: 0 0 .2rem;
    color: var(--dark);
}

.greeting-date {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
}

.avatar-ring {
    position: relative;
    z-index: 1;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange2));
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(244, 81, 30, .28);
}

.avatar-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    border: 2px solid #fff;
}

.btn-cancel-action {
    width: 100%;
    height: 42px;
    border: 1px solid #f2c8bd;
    border-radius: .7rem;
    background: #fff7f4;
    color: var(--red);
    font-size: .75rem;
    font-weight: 800;
    margin-top: .6rem;
}


.tl-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff7ed;border:1px solid #fed7aa;border-radius:14px;padding:12px 14px;margin-bottom:14px}
.tl-bar-info{display:flex;flex-direction:column;min-width:0}
.tl-bar-title{font-weight:700;display:flex;align-items:center;gap:6px}
.tl-bar-title i{color:var(--orange,#ff7a1a)}
.tl-bar-info small{color:#6b7280;margin-top:2px}
.tl-add-btn{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:10px;padding:10px 14px;background:var(--orange,#ff7a1a);color:#fff;font-weight:700;white-space:nowrap}

.tl-chips{display:flex;flex-direction:column;gap:8px;margin:-4px 0 14px}
.tl-chips:empty{display:none}
.tl-chip{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #eee;border-radius:10px;padding:8px}
.tl-chip-thumb{width:40px;height:40px;border-radius:8px;overflow:hidden;background:#f0f2f5;flex-shrink:0}
.tl-chip-thumb img{width:100%;height:100%;object-fit:cover}
.tl-chip-text{flex:1;display:flex;flex-direction:column;min-width:0}
.tl-chip-text small{color:#8a8f98}
.tl-chip-x{border:0;background:#fee2e2;color:#dc2626;width:30px;height:30px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center}

/* popup modal fields */
.tl-lbl{font-size:.75rem;color:#6b7280;margin-bottom:4px}
.tl-gap{margin-top:12px}
.tl-money{display:flex;align-items:center;height:46px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;overflow:hidden}
.tl-money:focus-within{border-color:var(--orange,#ff7a1a);box-shadow:0 0 0 3px rgba(255,122,26,.15)}
.tl-money span{display:flex;align-items:center;height:100%;padding:0 12px;color:#6b7280;font-weight:600;background:#f9fafb;border-right:1px solid #e5e7eb}
.tl-money input{flex:1;min-width:0;height:100%;border:0;outline:0;padding:0 12px;font-weight:600;background:transparent}
.tl-upload{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:46px;margin:0;padding:6px 10px;border:1.5px dashed #fdba74;border-radius:10px;background:#fffaf5;color:#c2410c;font-weight:600;font-size:.88rem;cursor:pointer}
.tl-upload.has-file{border-style:solid;border-color:#bbf7d0;background:#f0fdf4}
.tl-upload-empty{display:inline-flex;align-items:center;gap:8px}
.tl-upload-done{display:flex;align-items:center;gap:8px;width:100%}
.tl-upload-done img{width:34px;height:34px;object-fit:cover;border-radius:6px;border:1px solid #eee}
.tl-fname{flex:1;min-width:0;color:#374151;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-upload-done em{font-style:normal;color:var(--orange,#ff7a1a);font-size:.78rem}
.tl-err{color:#dc2626;font-size:.76rem;margin-top:6px}
.tl-err:empty{display:none}
