﻿/* Giao diện dùng chung cho các trang tài khoản thí sinh:
   đăng ký, đăng nhập, liên kết Zalo, đổi mật khẩu.

   Bám theo ngôn ngữ thiết kế sẵn có của trang thi: thẻ trắng bo góc, thanh
   tiêu đề xanh có icon tròn, đổ bóng nhẹ. Xem .zalo-start-exam trong QuizInfo. */

.cand-card {
    max-width: 560px;
    margin: 30px auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid #cbddec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(21, 76, 125, .11);
}

.cand-card-wide { max-width: 720px; }

.cand-card-head {
    display: flex;
    padding: 19px 24px;
    align-items: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0a5fb2 0%, #0d7fe0 100%);
}

.cand-card-icon {
    display: inline-flex;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #0a5fb2;
    font-size: 21px;
}

.cand-card-title {
    margin: 0 0 3px;
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

.cand-card-sub {
    margin: 0;
    opacity: .93;
    font-size: 13.5px;
    line-height: 1.45;
}

.cand-card-body { padding: 22px 24px 26px; }

/* ------------------------------------------------------------ Lựa chọn */

/* Zalo là luồng chính nên khối này nổi bật hơn hẳn khối số điện thoại. */
.cand-choice {
    position: relative;
    padding: 18px;
    border: 2px solid #b9dcff;
    border-radius: 10px;
    background: #f4faff;
}

.cand-choice-alt {
    padding: 16px 18px;
    border: 1px solid #dde5ec;
    border-radius: 10px;
    background: #fbfcfd;
}

.cand-choice-tag {
    position: absolute;
    top: -11px;
    left: 16px;
    padding: 3px 10px;
    border-radius: 11px;
    background: #0a7d33;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .2px;
    text-transform: uppercase;
}

.cand-choice h2, .cand-choice-alt h2 {
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    color: #10508f;
    font-size: 16px;
    font-weight: 700;
}

.cand-choice-alt h2 { color: #44525f; }

.cand-choice p, .cand-choice-alt p {
    margin: 0 0 14px;
    color: #55636f;
    font-size: 13.5px;
    line-height: 1.55;
}

/* ------------------------------------------------------------- Ô nhập */

.cand-field { margin: 0 0 16px; }

/* Cau giai thich duoi o dang nhap gop ca SDT lan ma thi sinh. */
.cand-hint {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7c8c;
}

.cand-field label {
    display: block;
    margin-bottom: 6px;
    color: #34424e;
    font-size: 14px;
    font-weight: 700;
}

.cand-field input[type=text],
.cand-field input[type=tel],
.cand-field input[type=email],
.cand-field input[type=password],
.cand-field select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #c6d4e1;
    border-radius: 7px;
    background: #fff;
    color: #22303c;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cand-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    margin-top: 16px;
}

.cand-field-full { grid-column: 1 / -1; }

/* Số lượt sửa còn lại: dùng cùng khuôn với các dải thông báo phía trên để
   thí sinh đọc được ngay, vì đây là ràng buộc dễ gây khiếu nại nhất. */
.cand-edit-limit {
    display: flex;
    margin: 0 0 14px;
    padding: 12px 15px;
    align-items: flex-start;
    gap: 10px;
    border-left: 4px solid #c47f00;
    border-radius: 8px;
    background: #fff6e5;
    color: #7a5000;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.cand-edit-limit strong { font-weight: 800; }

/* ----------------------------------------------- Trường bắt buộc và lỗi từng ô */

.cand-required::after {
    content: " *";
    color: #b80101;
    font-weight: 700;
}

.cand-required-note {
    margin: 14px 0 0;
    color: #b80101;
    font-size: 13.5px;
    font-style: italic;
}

.cand-field input.error,
.cand-field select.error,
.cand-field .cand-combo-display.error {
    border-color: #ef4444;
}

.cand-field-error {
    display: none;
    margin-top: 4px;
    color: #ef4444;
    font-size: 13.5px;
    line-height: 1.45;
}

.cand-field-error.show { display: block; }

.cand-field input:focus, .cand-field select:focus {
    border-color: #0d7fe0;
    box-shadow: 0 0 0 3px rgba(13, 127, 224, .16);
    outline: none;
}

.cand-hint {
    margin: 6px 0 0;
    color: #7a8794;
    font-size: 12.5px;
}

/* Nút con mắt ẩn/hiện mật khẩu, do js/candidate-password.js gắn vào. */
.cand-pass-wrap {
    position: relative;
    display: block;
}

.cand-pass-wrap input {
    padding-right: 44px !important;
}

.cand-pass-eye {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: #8593a1;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

.cand-pass-eye:hover { color: #0a5fb2; }
.cand-pass-eye:focus { outline: none; color: #0a5fb2; }

/* --------------------------------------------------------------- Nút */

.cand-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.cand-btn {
    display: inline-flex;
    height: 46px;
    padding: 0 22px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-sizing: border-box;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.cand-btn:hover { transform: translateY(-1px); }
.cand-btn:focus { outline: 2px solid #0d7fe0; outline-offset: 2px; }

.cand-btn-block { width: 100%; }

.cand-btn-primary {
    color: #fff !important;
    background: #0a5fb2;
    box-shadow: 0 3px 9px rgba(10, 95, 178, .25);
}
.cand-btn-primary:hover { background: #08508f; }

/* Xanh thương hiệu Zalo, tách bạch với xanh của hệ thống. */
.cand-btn-zalo {
    width: 100%;
    height: 52px;
    color: #fff !important;
    background: #0068ff;
    box-shadow: 0 4px 12px rgba(0, 104, 255, .28);
    font-size: 16.5px;
}
.cand-btn-zalo:hover { background: #0057d6; }

.cand-zmark {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #0068ff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.cand-btn-plain {
    color: #10508f !important;
    background: #fff;
    border: 1.5px solid #c3d4e4;
}
.cand-btn-plain:hover { background: #f1f7fd; border-color: #9dbfdd; }

/* ---------------------------------------------------------- Ngăn cách */

.cand-divider {
    position: relative;
    margin: 22px 0;
    text-align: center;
    border-top: 1px solid #e3eaf1;
}

.cand-divider span {
    position: relative;
    top: -11px;
    padding: 0 14px;
    background: #fff;
    color: #8b98a4;
    font-size: 13px;
}

/* -------------------------------------------------------- Thông báo */

.cand-note {
    margin: 12px 0 0;
    color: #5c6770;
    font-size: 13.5px;
    line-height: 1.6;
}

.cand-note a { color: #0a63b8; font-weight: 700; }

.cand-center { text-align: center; }

.cand-error,
.cand-notice,
.cand-warning {
    display: flex;
    margin: 0 0 18px;
    padding: 12px 15px;
    align-items: flex-start;
    gap: 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.55;
}

.cand-error { border-left: 4px solid #b80101; background: #fdecec; color: #8a0000; }
.cand-notice { border-left: 4px solid #0a7d33; background: #eaf7ee; color: #0a5c27; }
.cand-warning { border-left: 4px solid #c47f00; background: #fff6e5; color: #7a5000; }

/* Font Awesome đặt line-height:1 cho thẻ icon, còn dải chữ chạy line-height:1.55.
   Hai hộp dòng cao khác nhau nên align-items:flex-start đẩy icon lên cao hơn chữ.
   Cho icon thừa hưởng đúng line-height của dải là hai bên về chung một dòng. */
.cand-error > i,
.cand-notice > i,
.cand-warning > i,
.cand-edit-limit > i {
    flex: 0 0 auto;
    line-height: inherit;
}

/* ------------------------------------------------------ Bảng thông tin */

.cand-summary {
    margin: 0 0 18px;
    padding: 4px 16px;
    background: #f6f9fc;
    border: 1px solid #e2ebf3;
    border-radius: 9px;
}

.cand-summary dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.cand-summary dt {
    flex: 0 0 42%;
    padding: 10px 0;
    border-bottom: 1px solid #e9eff5;
    color: #66727e;
    font-size: 13.5px;
    font-weight: 400;
}

.cand-summary dd {
    flex: 0 0 58%;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #e9eff5;
    color: #22303c;
    font-size: 14px;
    font-weight: 600;
}

.cand-summary dl > :nth-last-child(1),
.cand-summary dl > :nth-last-child(2) { border-bottom: 0; }

/* ------------------------------------------------------------- Mục con */

.cand-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e6ecf2;
}

.cand-section h2 {
    display: flex;
    margin: 0 0 8px;
    padding: 0;
    align-items: center;
    gap: 8px;
    border: 0;
    color: #10508f;
    font-size: 16.5px;
    font-weight: 700;
}

.cand-section h2 i { color: #6d90b3; font-size: 15px; }

/* ------------------------------------------------------------ Mobile */

@media (max-width: 700px) {
    .cand-card { margin: 16px 10px; border-radius: 10px; }
    .cand-card-head { padding: 16px 17px; gap: 11px; }
    .cand-card-icon { flex-basis: 40px; width: 40px; height: 40px; font-size: 18px; }
    .cand-card-title { font-size: 18.5px; }
    .cand-card-body { padding: 18px 17px 22px; }
    .cand-summary dt, .cand-summary dd { flex-basis: 100%; }
    .cand-summary dt { padding-bottom: 0; border-bottom: 0; }
    .cand-actions .cand-btn { width: 100%; }
    .cand-form-grid { grid-template-columns: 1fr; }
    .cand-field-full { grid-column: auto; }
}
