﻿.registration-wizard-surface {
    width: 99% !important;
    background: #f5f5f5;
    padding: 0 8px;
    margin-left: 10px;
}

.registration-wizard-body {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.registration-readonly,
.registration-readonly-field .select2-selection {
    color: #777 !important;
    background: #eee !important;
    cursor: default !important;
}

.registration-readonly-summary {
    padding: 12px;
    background: #f5f5f5;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    /*padding: 20px;*/
    background-color: #fff;
}
.hidden-force {
    display: none !important;
}

.InsuranceCodeDigi{
    text-align:center;
}
/* ---- Mã thẻ BHYT: tô nền 3 phần của mã --------------------------------
   2 ký tự mã đối tượng | 3 số mức hưởng + mã tỉnh | 10 số mã BHXH.
   Trước đây phần 3 số là ghostwhite (#F8F8FF) còn phần 10 số là #fff9e6 —
   hai sắc trắng ngà gần như trùng nhau, nhìn không ra ranh giới, và phần
   2 ký tự đầu thì không được tô. Ba tông dưới đây lấy đúng từ bộ màu đã
   dùng trong trang: xanh #0288d1 của hộp thông tin, vàng #d4a017 của khối
   cảnh báo, xanh lá của các tiêu đề .green — khác hẳn nhau về sắc độ mà
   không lệch khỏi giao diện chung.
   Dùng class (không phải danh sách id như trước) để .registration-readonly
   còn đè lại được khi ô bị khoá, và để chú thích "Cách ghi" dùng chung
   đúng một nguồn màu với ô nhập. */
.insurance-part-subject,
.insurance-part-subject + .select2-container .select2-selection--single {
    background-color: #e1f5fe !important;
    border: 1px solid #0288d1 !important;
}

.insurance-part-benefit {
    background-color: #fff3cd !important;
    border: 1px solid #d4a017 !important;
}

.insurance-part-bhxh {
    background-color: #e8f5e9 !important;
    border: 1px solid #43a047 !important;
}

/* Ô khoá phải xám lại: các rule màu ở trên nằm sau .registration-readonly trong file này. */
.insurance-part-subject.registration-readonly,
.insurance-part-benefit.registration-readonly,
.insurance-part-bhxh.registration-readonly,
.registration-readonly-field .insurance-part-subject + .select2-container .select2-selection--single {
    background-color: #eee !important;
    border-color: #ccc !important;
}

/* Chú thích "Cách ghi" căn trái, phần xuống dòng thụt vào cho thẳng với chữ ở dòng trên. */
.insurance-legend {
    text-align: left;
    margin-top: 6px;
}

    .insurance-legend p {
        padding-left: 1.4em;
        text-indent: -1.4em;
    }

/* Ô màu nhỏ đứng đầu mỗi dòng "Cách ghi", ăn màu từ chính class của nhóm ô nhập. */
.insurance-legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 3px -2px 0;
    border-radius: 3px;
    vertical-align: baseline;
}

/* ---- Ô nhập mã BHYT: cho dễ nhìn / dễ bấm ------------------------------
   Giữ nguyên markup (14 ô + select mã đối tượng), chỉ chỉnh CSS.
   Vấn đề gốc: .custom-input ép padding .375rem .75rem !important, tức 24px
   padding ngang, trong khi mỗi ô chỉ rộng ~20px trên điện thoại 360px
   => vùng gõ chữ gần như bằng 0. Bỏ padding ngang và cho ô tự co.        */
.InsuranceCodeDigi {
    text-align: center;
    box-sizing: border-box !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
    font-size: 16px !important; /* >=16px để iOS không tự phóng to khi focus */
    font-weight: 600;
    border-radius: 4px;
}

/* Chia đều các cột, không để ô nào bị bóp méo */
.input-container table:has(.InsuranceCodeDigi) {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 3px 0;
}

.input-container td:has(> .InsuranceCodeDigi) {
    padding: 0 !important;
}

/* Điện thoại: xuống dòng thành 2 hàng 7 ô thay vì nhồi 13 ô trên 1 hàng */
@media (max-width: 640px) {
    @supports selector(:has(*)) {
        .input-container table:has(.InsuranceCodeDigi),
        .input-container table:has(.InsuranceCodeDigi) > tbody {
            display: block;
            width: 100%;
            border-spacing: 0;
        }

        .input-container table:has(.InsuranceCodeDigi) > tbody > tr {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            justify-content: center;
        }

        /* Ô mã đối tượng (SV/HS/...) chiếm trọn 1 hàng riêng phía trên */
        .input-container td:has(> #InsuranceCodeDigi0) {
            flex: 0 0 100%;
            width: 100% !important;
            padding: 0 !important;
            margin-bottom: 8px;
        }

        /* 13 ô số: đúng 7 ô mỗi hàng, tự giãn theo bề ngang máy */
        .input-container td:has(> .InsuranceCodeDigi) {
            flex: 0 0 calc((100% - 36px) / 7);
            padding: 0 !important;
        }

        /* .edit-view input đang ép height 35px !important -> cần specificity cao hơn */
        .edit-view .InsuranceCodeDigi {
            height: 42px !important; /* vùng chạm đủ lớn */
            width: 100% !important;
        }
    }
}

/*// select 2*/
.select2-search:after {
    content: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: unset !important;
}
.select2-container {
    width: 100% !important; /* Đảm bảo dropdown chiếm toàn bộ chiều rộng */
}

.select2-container .select2-selection--single {
    height: 34px; /* Đặt chiều cao đồng nhất với các ô khác */
    line-height: 34px;
    border-radius: 4px; /* Góc bo tròn */
    border: 1px solid #ccc; /* Viền giống với các trường input khác */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px; /* Canh chỉnh mũi tên dropdown */
}

#DormitoryRoomTypeId + .select2-container .select2-selection--single {
    height: 30px;
    line-height: 30px;
}

#DormitoryRoomTypeId + .select2-container .select2-selection__rendered {
    line-height: 28px !important;
}

#DormitoryRoomTypeId + .select2-container .select2-selection__arrow {
    height: 28px;
}

.go-back-btn {
    position: fixed;
    bottom: 2px;
    right: 40px;
    padding: 4px 8px;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    z-index: 1000;
}

    .go-back-btn:hover {
        background-color: #0056b3;
    }

@media (min-width: 768px) {
    .select2-search:after {
        display: none;
    }
}

.student-form-notice {
    margin: 10px 0;
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    line-height: 1.5;
}

.student-form-notice > :last-child,
.student-form-notice .info-content > :last-child {
    margin-bottom: 0;
}

.student-form-notice.notice {
    color: #8a6d3b;
    background: #fcf8e3;
    border-color: #faebcc;
}

#StudentInfo .student-form-notice.notice {
    margin: 10px 0 20px;
    padding: 12px 15px;
    border-radius: 4px;
}

#StudentInfo .student-form-notice.notice h3 {
    margin: 0 0 10px;
    color: inherit;
    font-size: 18px;
}

.activity-survey-gate {
    clear: both;
    margin-top: 10px;
}

.activity-survey-gate .widget-main {
    padding: 12px;
}

.activity-survey-gate #survey-status-msg {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    color: #8a6d3b;
    background: #fcf8e3;
    border: 1px solid #faebcc;
    border-radius: 4px;
}

.activity-survey-gate #survey-status-loader {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #e4c66d;
    border-top-color: #8a6d3b;
    border-radius: 50%;
    animation: activitySurveySpin .8s linear infinite;
}

.activity-survey-gate .survey-status-text {
    min-width: 0;
}

@keyframes activitySurveySpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.activity-survey-gate .survey-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-survey-gate .survey-buttons .btn {
    width: auto;
    min-width: 150px;
}

.survey-blocked {
    opacity: .7;
}

@media (max-width: 640px) {
    .activity-survey-gate .survey-buttons {
        display: block;
    }

    .activity-survey-gate .survey-buttons .btn {
        display: block;
        width: 100% !important;
        min-width: 0;
        margin: 0 0 8px;
        box-sizing: border-box;
        white-space: normal;
        text-align: center;
    }

    .activity-survey-gate .survey-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

.accident-insurance-options label {
    display: block;
    margin: 6px 0 !important;
    line-height: 20px;
}

.accident-insurance-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#StudentInfo h5{
    margin-left: 16px !important;
}
.mb-2 {
    margin-bottom: 12px !important;
}

label.control-label.required::before {
    content: "* ";
    font-size: 16px;
    font-weight: bold;
    color: red;
    margin-right: 4px;
    display: inline-block;
}


.note-text {
    color: #333;
    font-size: 12px;
    font-style: italic;
    margin-top: 6px;
    color: #666;
}

.controls label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
    font-size: 15px;
    cursor: pointer;
    color: #333;
}

.controls input[type="radio"] {
    accent-color: #007bff;
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin-top: 0px;
}

.controls label:hover {
    color: #007bff;
}

.registration-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.6);
}

/* style.css để lớp phủ loading ở z-index 999, tức là NẰM DƯỚI modal cắt ảnh (9999):
   trong lúc chờ AI đọc CCCD sinh viên không thấy gì thay đổi, vẫn thấy nút "Đồng ý"
   và bấm tiếp - mỗi lần bấm là thêm một POST /Register/CheckCCCD và thêm một lần
   trượt bị đếm vào hạn mức 5 lần. Đẩy lớp phủ lên trên modal để nó chặn thật. */
.img-loading-wrap {
    z-index: 10050;
    cursor: progress;
}

.registration-crop-dialog {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: calc(100vh - 24px);
    padding: 16px;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
}

.registration-crop-title {
    margin: 0 32px 4px 0;
    font-size: 22px;
}

.registration-crop-help {
    margin: 0 32px 10px 0;
    color: #555;
    line-height: 1.4;
}

.registration-crop-close {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 2px 8px;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* Cropper.js lấy kích thước khung theo phần tử cha, nên khung này PHẢI có
   chiều cao cố định. Nếu không, ảnh nhỏ sẽ cho ra khung cắt nhỏ xíu. */
.registration-crop-image-wrap {
    width: 100%;
    height: 60vh;
    min-height: 260px;
    max-height: 520px;
    text-align: center;
}

.registration-crop-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

/* Chọn khung Ngang/Dọc — chỉ hiện với ô có data-aspect-ratio-portrait. */
.registration-crop-orientation {
    margin-top: 10px;
    text-align: center;
}

    .registration-crop-orientation > label {
        display: block;
        margin-bottom: 4px;
    }

.registration-crop-orient-btn {
    min-width: 90px;
    padding: 6px 16px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

    .registration-crop-orient-btn:first-child {
        border-radius: 4px 0 0 4px;
    }

    .registration-crop-orient-btn:last-child {
        margin-left: -1px;
        border-radius: 0 4px 4px 0;
    }

    .registration-crop-orient-btn.active {
        border-color: #007bff;
        background: #007bff;
        color: #fff;
    }

.registration-crop-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.registration-crop-control label {
    display: block;
    margin-bottom: 2px;
    text-align: center;
}

.registration-crop-control input[type="range"] {
    display: block;
    width: 100%;
    margin: 0;
}


.crop-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

    .crop-actions .btn {
        padding: 8px 20px;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.3s ease;
    }

    .crop-actions .btn-primary {
        background-color: #007bff;
        color: white;
    }

        .crop-actions .btn-primary:hover {
            background-color: #0056b3;
        }

    .crop-actions .btn-secondary {
        background-color: #e0e0e0;
        color: #333;
    }

        .crop-actions .btn-secondary:hover {
            background-color: #c6c6c6;
        }

@media (max-width: 479px) {
    .registration-crop-modal {
        padding: 6px;
    }

    .registration-crop-dialog {
        width: 100%;
        max-height: calc(100vh - 12px);
        padding: 12px;
    }

    .registration-crop-controls {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .registration-crop-image-wrap {
        height: 50vh;
        min-height: 220px;
    }
}

.btn-navigation-tab {
    float: right;
    margin-right: 13px;
}

.box-two-item {
    display: flex;
    gap: 16px;
    flex-direction: row;
}

.tabs-content h5 {
    color: green;
    font-size: 17px;
    font-weight: 700;
    margin: 0 auto 8px;
}

label {
    font-weight: normal;
}

#StudentInfo .edit-view .control-group:first-of-type,
#StudentInfo .edit-view .form-group:first-of-type {
    border-top: none !important;
}
#StudentInfo .notice {
    background-color: #fff9e6;
    border: 1px solid #ffd700;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

    #StudentInfo .notice h3 {
        color: #d4a017;
        margin-top: 0;
    }

    #StudentInfo .notice ul {
        margin: 0;
        padding-left: 20px;
    }

    #StudentInfo .notice li {
        margin-bottom: 10px;
    }

/* Tab navigation */

#StudentInfo .tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
}

    #StudentInfo .tabs-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    #StudentInfo .tabs-wrapper::-webkit-scrollbar-thumb {
        background: #007bff;
        border-radius: 3px;
    }


#StudentInfo .tabs {
    display: flex;
    align-items: center;
    min-width: 768px;
    position: relative;
    padding: 40px 0 0px;
}

#StudentInfo .tab {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    display: flex;
    justify-content: center;
    min-width: 120px;
}

    #StudentInfo .tab span {
        display: block;
        font-size: 14px;
        color: #333;
        max-width: 150px;
        min-height: 60px;
        word-break: break-word;
    }

    #StudentInfo .tab::before {
        content: '';
        position: absolute;
        top: -28px;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 20px;
        border: 6px solid #ffffff;
        border-radius: 50%;
        background-color: #ada8a8;
        z-index: 1;
    }

    #StudentInfo .tab:not(:last-child)::after {
        content: '';
        position: absolute;
        top: -20px;
        left: 100%;
        transform: translateX(-50%);
        width: 100%;
        height: 3px;
        background-color: #ccc;
    }

    #StudentInfo .tab::before,
    #StudentInfo .tab:not(:last-child)::after {
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    #StudentInfo .tab.completed::before {
        background-color: #007bff;
    }

    #StudentInfo .tab.completed:not(:last-child)::after {
        background-color: #007bff;
    }

    #StudentInfo .tab.active::before {
        background-color: #007bff;
        box-shadow: 0 0 0 2px #007bff;
    }

/* Tab content */
#StudentInfo .tabs-content {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    background-color: #f5f5f5;
}

#StudentInfo .tab-content {
    flex: 1;
    max-width: 873px;
    width: 100%;
    display: none;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

    #StudentInfo .tab-content.active {
        display: block;
    }


/* Tab 1 */

.custom-upload {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 16px;
    width: 450px;
    text-align: center;
    cursor: pointer;
    position: relative;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 280px !important;
}

    .custom-upload:hover {
        border-color: #999;
    }

.custom-upload-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: 150px;
}

.custom-upload-icon {
    width: 100px;
    height: 100px;
    background-color: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #888;
}

#StudentInfo .image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: none;
}

.custom-upload-lines {
    flex: 1;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 12px;
}

.custom-upload-line {
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 4px;
    width: 100%;
}

.custom-upload label {
    flex: 1;
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #007bff;
    cursor: pointer;
}

.custom-upload input[type="file"] {
    display: none;
}

/* end Tab 1 */

/* Tab 2 */
.images-example {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

    .images-example img {
        flex: 1 1 calc(30% - 32px);
        max-width: calc(30% - 32px);
        height: auto;
        aspect-ratio: 4/6;
        object-fit: cover;
        border-radius: 8px;
    }


/* end tab 2 */


/* Tab 3 */

/* End Tab 3 */

/* Tab 4 */
.health-insurance-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.char-input {
    width: 36px;
    height: 42px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

    .char-input:focus {
        border-color: #007bff;
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, .25);
    }

.health-update-box {
    border: 1px solid #b3e5fc;
    background-color: #e1f5fe;
    border-radius: 8px;
    padding: 12px 16px;
    color: #333;
    font-size: 14px;
    max-width: 600px;
    line-height: 1.6;
}

.health-update-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #0288d1;
    font-weight: 500;
    margin-bottom: 4px;
}

    .health-update-content i {
        font-size: 18px;
    }

.health-update-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

    .health-update-dates b {
        color: #000;
    }


/* End Tab 4 */


/* tab 6*/
.dormitory-register {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    background: #fff;
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
}

.section-title {
    background: #f5f5f5;
    padding: 10px;
    font-weight: bold;
    color: green;
    border-radius: 4px 4px 0 0;
    border: 1px solid #ddd;
}

.section-content {
    padding: 16px;
}

@keyframes borderFlash {
    0% {
        border: 2px solid #0fef00;
    }

    100% {
        border: 1px solid transparent;
    }
}

.input-flash,
.input-flash ~ .select2.select2-container {
    animation: borderFlash 5s ease-out;
    border: 2px solid #0fef00 !important;
}

/* end tab 6 */



