/* ── Base: text-size-adjust & smooth scroll ──────── */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Bù chiều cao navbar sticky khi dùng anchor link */
#trang-chu,
#dat-xe,
#dich-vu,
#bang-gia,
#lien-he {
    scroll-margin-top: 72px;
}

/* ── Admin Mobile Booking Cards ─────────────────── */
.booking-mobile-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid #e4ecf3;
}

.bmc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #f4f7fb;
    border-bottom: 1px solid #dbe5ef;
}

.bmc-id {
    font-weight: 700;
    font-size: 0.9rem;
    color: #27415d;
}

.bmc-body {
    padding: 0.85rem 1rem 0.6rem;
}

.bmc-route {
    margin-bottom: 0.75rem;
}

.bmc-route-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.4;
}

.bmc-route-item i {
    flex-shrink: 0;
    margin-top: 2px;
}

.bmc-route-divider {
    color: #aab8c6;
    font-size: 0.78rem;
    padding: 0.1rem 0 0.1rem 0.15rem;
}

.bmc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.82rem;
    color: var(--text-sub);
    margin-bottom: 0.5rem;
}

.bmc-meta i {
    color: var(--brand-green);
}

.bmc-time {
    font-size: 0.78rem;
    color: #8aa0b4;
}

.bmc-time i {
    color: #aab8c6;
}

.bmc-actions {
    padding: 0.65rem 1rem;
    border-top: 1px solid #edf2f7;
    background: #fafcfe;
}

/* ── Admin Mobile Booking Cards ─────────────────── */

:root {
    --brand-green: #19a84a;
    --brand-green-dark: #12853a;
    --brand-navy: #1f3550;
    --brand-navy-deep: #13263a;
    --surface: #ffffff;
    --soft-bg: #f1f5f9;
    --text-main: #12243a;
    --text-sub: #4f6378;
    --shadow-lg: 0 24px 50px rgba(18, 36, 58, 0.16);
    --shadow-md: 0 12px 28px rgba(18, 36, 58, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, #f6f9fc 0%, #eef4fa 100%);
}

.site-nav {
    background: #f3f5f7;
    border-bottom: 1px solid rgba(18, 36, 58, 0.08);
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.7rem;
    color: #0d243d;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: radial-gradient(circle at 30% 20%, #2dd163 0%, #169143 60%, #13763a 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.brand-accent {
    color: var(--brand-green);
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: #1f3045;
}

.navbar-nav .nav-link:hover {
    color: var(--brand-green);
}

.btn-brand {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #1eb24f 0%, #159543 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    box-shadow: 0 8px 20px rgba(25, 168, 74, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(25, 168, 74, 0.34);
    color: #fff;
}

.btn-call-nav {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #e83232 0%, #c01f1f 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 1.1rem;
    box-shadow: 0 8px 20px rgba(200, 30, 30, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-call-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(200, 30, 30, 0.38);
    color: #fff;
}

/* Nút điện thoại ngoài collapse (mobile): chỉ hiện trên mobile, ẩn desktop */
.btn-call-mobile {
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
}

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #dcedfb 0%, #f4f8fd 60%, #f9fbff 100%);
    padding: 1.5rem 0 2rem;
}

.hero::before {
    content: "";
    position: absolute;
    inset: auto -15% -220px -10%;
    height: 360px;
    background: radial-gradient(ellipse at top, rgba(23, 69, 107, 0.18), rgba(23, 69, 107, 0));
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    color: #102743;
    margin-bottom: 0.3rem;
}

.hero-copy p {
    font-size: clamp(1rem, 2.3vw, 2rem);
    color: #293a4f;
    margin-bottom: 0.8rem;
}

.hero-visual {
    position: relative;
    min-height: 280px;
}

.taxi-preview {
    width: 100%;
    max-width: 650px;
    height: 633px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transform: translateY(8px);
}

.booking-card {
    margin-top: -80px;
    background: linear-gradient(180deg, #223b5b 0%, #1a2e48 100%);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 1.2rem;
    color: #fff;
}

.booking-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.input-icon .input-group-text {
    border: 0;
    background: #f4f6f8;
    color: #5a6c7e;
}

.input-icon .form-control {
    border: 0;
    background: #f4f6f8;
    color: #1f3045;
    padding: 0.75rem 0.9rem;
}

.input-icon .form-control:focus {
    box-shadow: 0 0 0 2px rgba(25, 168, 74, 0.22);
}

.map-frame {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-md);
    height: 220px;
    background: #dce6ef;
}

.estimate-box {
    margin-top: 0.85rem;
    background: rgba(13, 36, 61, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.estimate-box strong {
    color: #8de6b0;
}

.btn-book {
    width: 100%;
    margin-top: 1rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #1fb24f 0%, #12923e 100%);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.8rem 1rem;
    box-shadow: 0 10px 22px rgba(25, 168, 74, 0.32);
}

.btn-book:hover {
    filter: brightness(1.05);
}

.booking-note {
    margin-top: 2rem;
    text-align: center;
    color: #169345;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.3rem);
}

.section-card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
    height: 100%;
}

.section-title {
    color: #133150;
    font-weight: 800;
    margin-bottom: 1rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed #d6dee7;
}

.price-item:last-child {
    border-bottom: 0;
}

.contact-box {
    background: linear-gradient(135deg, #12314f 0%, #1a436d 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
}

.site-footer {
    margin-top: 2rem;
    padding: 1.2rem 0;
    color: #44596d;
    border-top: 1px solid #d9e2ea;
    text-align: center;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-card {
    width: min(460px, 100%);
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-head {
    background: linear-gradient(135deg, #1c3451 0%, #11263d 100%);
    color: #fff;
    padding: 1rem 1.2rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.admin-head {
    background: #f4f7fb;
    border-bottom: 1px solid #dbe5ef;
}

.table-wrap {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table thead th {
    background: #f4f7fb;
    color: #27415d;
    font-size: 0.92rem;
    border-bottom: 1px solid #dbe5ef;
}

.badge-status {
    border-radius: 20px;
    padding: 0.36rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-waiting {
    background: #ffd95f;
    color: #7a5600;
}

.status-picking {
    background: #6ec5ff;
    color: #0f4268;
}

.status-complete {
    background: #58d68d;
    color: #0e4f2a;
}

.status-cancel {
    background: #f7a7a7;
    color: #7a2323;
}

#mapPlaceholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: #3b536b;
    background: repeating-linear-gradient(
        -45deg,
        #d7e3ee,
        #d7e3ee 10px,
        #d1deea 10px,
        #d1deea 20px
    );
    text-align: center;
    padding: 1rem;
    font-size: 0.92rem;
}

@media (max-width: 991.98px) {
    .hero {
        padding-top: 1rem;
    }

    .hero-copy {
        text-align: center;
    }

    .booking-card {
        margin-top: 1rem;
    }

    .booking-title {
        font-size: 1.8rem;
    }

    .btn-book {
        font-size: 1.45rem;
    }
}

/* ── Map Picker ─────────────────────────────── */
.map-picker-btn {
    border: 0;
    background: #f4f6f8;
    color: #4f7091;
    border-radius: 0 6px 6px 0 !important;
    padding: 0 0.7rem;
    transition: background 0.18s, color 0.18s;
    font-size: 1rem;
}

.map-picker-btn:hover,
.map-picker-btn:focus {
    background: var(--brand-green);
    color: #fff;
    outline: none;
    box-shadow: none;
}

#mapPickerMap {
    height: 400px;
    width: 100%;
    cursor: crosshair;
}

#mapPickerGeoBtn {
    white-space: nowrap;
    flex-shrink: 0;
}

#mapPickerGeoBtn .bi-arrow-repeat {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#mapPickerSuggestions .list-group-item-action {
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-left: 0;
    border-right: 0;
}

#mapPickerSuggestions .list-group-item-action:hover {
    background: #f0faf5;
    color: var(--brand-green-dark);
}

#selectedAddress {
    font-size: 0.88rem;
    min-height: 1.4em;
    word-break: break-word;
    color: var(--brand-green);
}

@media (max-width: 575.98px) {
    #mapPickerMap {
        height: 260px;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    /* Thu nhỏ brand để 3 phần tử navbar vừa 1 hàng */
    .brand-wrap {
        font-size: 1.1rem;
        gap: 7px;
        flex-shrink: 1;      /* override Bootstrap flex-shrink:0 */
        min-width: 0;
        overflow: hidden;
    }

    .brand-wrap > span {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    /* Nút gọi chỉ hiện icon (không số) để nhường chỗ hamburger */
    .btn-call-mobile {
        font-size: 0;
        padding: 0.45rem 0.65rem;
        flex-shrink: 0;
    }

    .btn-call-mobile i {
        font-size: 1rem;
        margin-right: 0 !important;
    }
}

@media (max-width: 399.98px) {
    /* Màn rất nhỏ (<400px): padding nhỏ hơn nữa */
    .btn-call-mobile {
        padding: 0.4rem 0.55rem;
    }
}

/* ── Footer cải tiến ─────────────────────────── */
.site-footer {
    margin-top: 2rem;
    padding: 1.4rem 0 1rem;
    border-top: 1px solid #d9e2ea;
    background: #f4f7fb;
    text-align: center;
}

.footer-link {
    color: var(--brand-green-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.18s;
}

.footer-link:hover {
    color: var(--brand-green);
    text-decoration: underline;
}

/* ── Nút quay lại đầu trang ────────────────────── */
.back-to-top {
    position: fixed;
    bottom: calc(1rem + 58px + 0.85rem);
    right: 1.25rem;
    z-index: 1049;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(19, 38, 58, 0.85);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.18s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--brand-navy-deep);
}

@media (max-width: 575.98px) {
    .back-to-top {
        bottom: calc(0.75rem + 52px + 0.75rem);
        right: 0.75rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ── Nút nổi liên hệ ─────────────────────────── */
.float-contact {
    position: fixed;
    bottom: 1rem;
    right: 1.25rem;
    z-index: 1050;
}

/* Panel chứa các nút action — absolute để không chiếm chiều cao container */
.float-actions {
    position: absolute;
    bottom: calc(58px + 0.75rem); /* chiều cao toggle + khoảng cách */
    right: 0;
    display: flex;
    flex-direction: column; /* call(trên) → zalo → facebook(dưới, gần toggle) */
    align-items: flex-end;
    gap: 0.6rem;
    pointer-events: none;
}

.float-contact--open .float-actions {
    pointer-events: auto;
}

.float-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(180deg, #1eb24f 0%, #159543 100%);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(25, 168, 74, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.float-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 26px rgba(25, 168, 74, 0.52);
}

.float-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 50px;
    padding: 0.5rem 1rem 0.5rem 0.7rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.float-btn i {
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

.float-contact--open .float-btn {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Bụng từ dưới lên: facebook (gần toggle nhất) → zalo → call (xa nhất) */
.float-contact--open .float-facebook { transition-delay: 0.04s; }
.float-contact--open .float-zalo     { transition-delay: 0.10s; }
.float-contact--open .float-call     { transition-delay: 0.16s; }

.float-call {
    background: linear-gradient(135deg, #19a84a 0%, #12853a 100%);
}

.float-zalo {
    background: linear-gradient(135deg, #0e6fff 0%, #0050cc 100%);
    padding-left: 0.55rem;
}

.float-zalo-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    padding: 3px;
}

.float-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0c5ec9 100%);
}

.float-label {
    display: inline-block;
}

@media (max-width: 575.98px) {
    .float-contact {
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .float-actions {
        bottom: calc(52px + 0.65rem); /* <-- kiích thước toggle nhỏ hơn trên mobile */
    }

    .float-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
    }

    .float-label {
        display: none;
    }

    .float-btn {
        border-radius: 50%;
        padding: 0.5rem;
        width: 46px;
        height: 46px;
        justify-content: center;
    }

    .float-btn i,
    .float-zalo-icon {
        width: 22px;
        height: 22px;
        font-size: 1rem;
        background: none;
    }
}

/* ── Mobile: hero & booking card ─────────────────── */
@media (max-width: 767.98px) {
    .hero-visual {
        min-height: 0;
        text-align: center;
    }

    .taxi-preview {
        max-width: 88%;
        height: auto;
        transform: none;
        border-radius: 12px;
    }

    .map-frame {
        height: 180px;
    }

    /* Ngăn iOS zoom vào input (font-size < 16px) */
    .form-control,
    .form-select {
        font-size: 16px;
    }
}

/* ── Extra-small (< 480 px) ──────────────────────── */
@media (max-width: 479.98px) {
    .booking-card {
        padding: 1rem 0.85rem;
        border-radius: 12px;
    }

    .booking-title {
        font-size: 1.45rem;
    }

    .section-card,
    .contact-box {
        padding: 1rem 0.85rem;
    }

    /* Giá: xếp dọc trên màn nhỏ */
    .price-item {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.6rem 0;
    }

    .price-item strong {
        font-size: 1rem;
    }

    /* Ước tính giá xếp dọc */
    .estimate-box {
        flex-direction: column;
        gap: 0.3rem;
    }

    /* Section service title nhỏ hơn */
    .section-title {
        font-size: 1.1rem;
    }
}

/* ── Print: ẩn các widget không cần thiết ────────── */
@media print {
    .site-nav,
    .float-contact,
    #mapPickerModal,
    #bookingToast,
    #map,
    .btn-book,
    .map-picker-btn {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}
