/* =========================================================================
 * Trang ĐĂNG KÝ ĐẠI LÝ (/dang-ky/dai-ly) — bố cục chia đôi: ảnh trái, form phải.
 *
 * View nằm ở modules/Layout (dùng chung MỌI theme) nên file này TỰ CHỨA:
 *  - chỉ dùng class riêng tiền tố .bcra-* (không mượn .form-login-page, .col-md-*,
 *    .g-* ... của theme — mỗi theme style một kiểu, dùng chung là mỗi theme một
 *    giao diện lỗi khác nhau).
 *  - màu bám var(--primary-color) của theme, có màu dự phòng.
 *  - các class .form-control/.form-group/.field-icon của form được style LẠI trong
 *    phạm vi .bcra-form (đặc tả 0-2-0) nên không phụ thuộc theme, cũng không cần !important.
 * ========================================================================= */

.bcra {
    --bcra-primary: var(--primary-color, #1c7ed6);
    --bcra-ink: #101828;
    --bcra-muted: #667085;
    --bcra-line: #dfe3e8;
    --bcra-radius: 20px;

    background: #f4f6f9;
    padding: 40px 16px 60px;
}

.bcra * {
    box-sizing: border-box;
}

.bcra-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    max-width: 1120px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--bcra-radius);
    overflow: hidden;
    box-shadow: 0 24px 60px -30px rgba(16, 24, 40, .40), 0 2px 8px rgba(16, 24, 40, .06);
}

/* ------------------------------ Cột trái: ảnh ------------------------------ */

.bcra-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    min-height: 640px;
    padding: 40px;
    color: #fff;
    background-color: #12334a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Lớp phủ 1: nhuộm màu thương hiệu, CHỈ đậm dần ở nửa dưới — nửa trên giữ ảnh
   nguyên bản để không bị "một mảng tối" khi theme có màu chính sẫm. */
.bcra-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 34%, var(--bcra-primary) 100%);
    opacity: .78;
    mix-blend-mode: multiply;
}

/* Lớp phủ 2: scrim trung tính ở đỉnh (cho chip) và đáy (cho tiêu đề + danh sách),
   giữa ảnh để trong để ảnh vẫn "thở". */
.bcra-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(8, 20, 32, .46) 0%,
        rgba(8, 20, 32, 0) 26%,
        rgba(8, 20, 32, 0) 38%,
        rgba(8, 20, 32, .68) 100%);
}

.bcra-visual > * {
    position: relative;
    z-index: 1;
}

.bcra-chip {
    display: inline-flex;
    /* Cột trái là flex dọc (mặc định stretch) → không có dòng này chip bị kéo full chiều ngang */
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 99px;
    background: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}

.bcra-chip svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.bcra-visual-title {
    margin: 0 0 20px;
    color: #fff;
    font-size: 30px;
    line-height: 1.28;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.bcra-benefits {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.bcra-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .94);
}

.bcra-benefits svg {
    width: 20px;
    height: 20px;
    flex: none;
    margin-top: 1px;
}

.bcra-visual-note {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .22);
    font-size: 13px;
    color: rgba(255, 255, 255, .82);
}

/* ------------------------------ Cột phải: form ----------------------------- */

.bcra-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 48px;
    background: #fff;
}

.bcra-panel-head {
    margin-bottom: 24px;
}

.bcra-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--bcra-ink);
}

.bcra-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--bcra-muted);
}

/* --- Trường nhập --- */

.bcra-form .form-group {
    position: relative;
    margin-bottom: 16px;
}

.bcra-form .form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 42px 0 14px;
    border: 1px solid var(--bcra-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    font-size: 14.5px;
    color: var(--bcra-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bcra-form .form-control::placeholder {
    color: #98a2b3;
}

.bcra-form .form-control:hover {
    border-color: #c3cad3;
}

.bcra-form .form-control:focus {
    outline: 0;
    border-color: var(--bcra-primary);
    box-shadow: 0 0 0 3px rgba(28, 126, 214, .16);
    /* Vòng focus bám đúng màu theme ở trình duyệt hiện đại; dòng trên là dự phòng */
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bcra-primary) 18%, transparent);
}

/* Biểu tượng cuối ô: chỉ để trang trí, không chắn con trỏ */
.bcra-form .field-icon {
    position: absolute;
    top: 24px;
    right: 15px;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.bcra-form .bcbs .field-icon {
    top: 24px;
}

.bcra-form small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--bcra-muted);
}

.bcra-form .invalid-feedback {
    font-size: 12.5px;
}

/* --- Hàng 2 cột --- */

.bcra-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

/* --- Dải phân đoạn "Thông tin ngân hàng" --- */

.bcra-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--bcra-muted);
}

.bcra-legend::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bcra-line);
}

.bcra-legend svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--bcra-primary);
}

/* Dòng chú thích nhỏ ngay dưới ô nhập / dải phân đoạn */
.bcra-legend-hint,
.bcra-hint {
    margin: -8px 0 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #98a2b3;
}

/* --- Điều khoản + nút gửi --- */

.bcra-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 4px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--bcra-muted);
    cursor: pointer;
}

.bcra-terms input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    flex: none;
    accent-color: var(--bcra-primary);
    cursor: pointer;
}

.bcra-terms a {
    color: var(--bcra-primary);
    font-weight: 600;
}

.bcra-form .form-submit {
    height: 50px;
    margin-top: 4px;
    font-size: 15px;
    letter-spacing: .01em;
    box-shadow: 0 10px 22px -12px rgba(16, 24, 40, .7);
}

.bcra-form .form-submit:hover {
    filter: brightness(1.06);
}

/* --- Chân form --- */

.bcra-foot {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--bcra-line);
    font-size: 14px;
    line-height: 1.9;
    color: var(--bcra-muted);
    text-align: center;
}

.bcra-foot a {
    color: var(--bcra-primary);
    font-weight: 600;
}

/* --------------------------------- Màn hẹp -------------------------------- */

@media (max-width: 1199px) {
    .bcra-visual {
        padding: 32px;
    }

    .bcra-visual-title {
        font-size: 26px;
    }

    .bcra-panel {
        padding: 36px 32px;
    }
}

@media (max-width: 991px) {
    .bcra {
        padding: 0 0 40px;
    }

    .bcra-shell {
        grid-template-columns: 1fr;
        max-width: 640px;
        border-radius: 0 0 var(--bcra-radius) var(--bcra-radius);
    }

    .bcra-visual {
        min-height: 260px;
        padding: 24px;
        justify-content: flex-end;
    }

    .bcra-chip {
        align-self: flex-start;
        margin-bottom: auto;
    }

    .bcra-visual-title {
        font-size: 22px;
    }
}

/* Điện thoại: ưu tiên đưa form lên sớm — ảnh chỉ còn dải tiêu đề */
@media (max-width: 767px) {
    .bcra-visual-title {
        margin-bottom: 0;
    }

    .bcra-benefits,
    .bcra-visual-note {
        display: none;
    }
}

@media (max-width: 575px) {
    .bcra-panel {
        padding: 28px 20px 32px;
    }

    .bcra-row {
        grid-template-columns: 1fr;
    }

    .bcra-title {
        font-size: 22px;
    }
}
