/* ==========================================================================
   Đặt lịch khám online - giao diện
   Màu chủ đạo lấy theo logo bệnh viện (xanh dương + đỏ)
   ========================================================================== */
:root {
    --primary: #0b4f9c;
    --primary-dark: #083a74;
    --primary-soft: #e8f1fc;
    --accent: #e3262f;
    --ink: #172b4d;
    --muted: #5e6c84;
    --line: #d5dde8;
    --surface: #ffffff;
    --ground: #f2f6fb;
    --radius: 12px;
    --radius-lg: 22px;
    --shadow: 0 18px 50px -20px rgba(11, 79, 156, .35);
}

html, body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--ground);
    -webkit-font-smoothing: antialiased;
}

.toast {
    opacity: 1 !important;
}

/* ---------- Bố cục ---------- */
.booking-page {
    min-height: 100vh;
    padding: 32px 16px;
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(11, 79, 156, .12), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(227, 38, 47, .07), transparent 60%),
        var(--ground);
}

.booking {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 28px;
    align-items: start;
}

/* ---------- Cột trái ---------- */
.booking-aside {
    position: sticky;
    top: 32px;
    border-radius: var(--radius-lg);
    color: #fff;
    background:
        radial-gradient(400px 260px at 110% 0%, rgba(255, 255, 255, .16), transparent 70%),
        linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.booking-aside-inner {
    padding: 32px 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 68px;
    height: 68px;
    flex: none;
    padding: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

.brand-name {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.aside-lead {
    margin: 22px 0 24px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .85);
}

.steps {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 10px 0;
}

.steps li + li {
    border-top: 1px dashed rgba(255, 255, 255, .2);
}

.step-no {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .35);
}

.steps strong {
    display: block;
    font-weight: 600;
}

.steps small {
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
}

.hotline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
}

.hotline-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(227, 38, 47, .25);
}

.hotline small {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
}

.phoneNumberService {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: .02em;
    color: #fff;
}

/* ---------- Cột phải: form ---------- */
.booking-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px 36px 36px;
}

.card-head {
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid #edf1f6;
}

.register-heading {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
}

.card-head p {
    margin: 0;
    color: var(--muted);
}

.form-section {
    padding-top: 22px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 15px;
}

.form-group {
    min-height: 78px;
    margin-bottom: 10px;
}

label {
    margin-bottom: 6px !important;
    font-weight: 500;
    font-size: 14px;
    color: #344563;
}

.redLabel {
    color: var(--accent);
    margin: 0 !important;
}

.form-control {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--ink);
    background-color: #fbfcfe;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

textarea.form-control {
    height: auto;
    min-height: 110px;
    resize: vertical;
}

.form-control::placeholder {
    color: #97a3b6;
}

.form-control:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(11, 79, 156, .12);
}

/* Ô có icon (ngày, giờ) */
.input-icon {
    position: relative;
}

.input-icon .form-control {
    padding-right: 42px;
}

.input-icon > .fa {
    position: absolute;
    right: 14px;
    top: 15px;
    color: var(--muted);
    pointer-events: none;
}

/* Giới tính: dạng nút chọn */
.form-radio {
    display: flex;
    gap: 10px;
}

.radio.inline {
    position: relative;
    flex: 1;
    margin: 0 !important;
    padding: 0;
    cursor: pointer;
}

.radio.inline input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.radio.inline span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    font-weight: 500;
    color: var(--muted);
    transition: all .15s;
}

.radio.inline input:checked + span {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.radio.inline input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(11, 79, 156, .2);
}

/* Lỗi validate (errorClass: 'red') */
.red {
    color: var(--accent);
}

label.red {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
}

.form-control.red {
    border-color: var(--accent);
    color: var(--ink);
}

/* ---------- Select2 đồng bộ với input ---------- */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background-color: #fbfcfe;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding-left: 14px;
    padding-right: 36px;
    color: var(--ink);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 8px;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 79, 156, .12);
}

.select2-dropdown {
    border-color: var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 30px -10px rgba(23, 43, 77, .25);
}

.select2-search--dropdown .select2-search__field {
    border-radius: 8px;
    padding: 6px 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary);
}

/* ---------- Datepicker ---------- */
.daterangepicker {
    font-family: inherit;
    border-radius: 12px;
    border-color: var(--line);
    box-shadow: 0 12px 30px -10px rgba(23, 43, 77, .25);
}

.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ---------- Chân form ---------- */
.register-upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding-top: 22px;
    border-top: 1px solid #edf1f6;
}

.form-notes {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--muted);
}

.form-notes li + li {
    margin-top: 4px;
}

.form-notes .fa {
    width: 16px;
    color: var(--primary);
}

#btnAppointment {
    min-width: 240px;
    min-height: 52px;
    padding: 0 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #1565c0 0%, var(--primary) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(11, 79, 156, .6);
    transition: transform .15s, box-shadow .15s;
}

#btnAppointment:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -8px rgba(11, 79, 156, .7);
}

#btnAppointment:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(11, 79, 156, .3);
}

#btnAppointment:active {
    transform: translateY(0);
}

/* Giữ lại cho dropzone (đang tắt) */
.fz15 {
    font-size: 15px;
}

a.btn.btn-danger.removeBtn {
    color: white !important;
    margin-top: 5px;
    width: 100% !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .booking {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .booking-aside {
        position: static;
    }

    .steps {
        display: none;
    }

    .aside-lead {
        margin: 16px 0;
    }
}

@media (max-width: 575.98px) {
    .booking-page {
        padding: 16px 12px;
    }

    .booking-aside-inner {
        padding: 22px 18px;
    }

    .booking-card {
        padding: 22px 18px 26px;
        border-radius: 18px;
    }

    .register-heading {
        font-size: 21px;
    }

    .form-group {
        min-height: 0;
    }

    #btnAppointment {
        width: 100%;
        min-width: 0;
    }
}
