﻿* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #74ebd5 0%, #ACB6E5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.grecaptcha-badge {
    visibility: hidden;
}

.main-container {
    width: 100%;
    max-width: 480px; /* Tăng chiều rộng tối đa một chút */
    margin: 0 auto;
}

/* --- START: CSS cho thanh tiến trình --- */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

/* Đường kẻ nối giữa các bước */
.stepper-item:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: #e0e0e0;
    z-index: 0;
}

.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    right: 0;
    width: 50%;
    height: 3px;
    background-color: #e0e0e0;
    z-index: 0;
}

/* Đường kẻ màu khi bước đã hoàn thành */
.stepper-item.completed:not(:last-child)::after {
    background-color: #6c757d; /* hoặc màu bạn muốn */
}

.stepper-item.completed:not(:first-child)::before {
    background-color: #6c757d; /* hoặc màu bạn muốn */
}

.step-counter {
    height: 36px;
    width: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #e0e0e0;
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.4s ease;
    z-index: 2;
    border: 3px solid #e0e0e0;
}

.step-name {
    font-size: 12px; /* Giảm kích thước chữ một chút */
    font-weight: 600; /* Tăng độ đậm */
    color: #495057;
    text-transform: uppercase; /* Chữ in hoa */
    letter-spacing: 0.5px; /* Tăng khoảng cách ký tự */
}

/* Trạng thái active và completed */
.stepper-item.active .step-counter {
    background-color: #fff;
    border-color: #0d6efd; /* Thay đổi màu viền nổi bật */
    color: #0d6efd; /* Thay đổi màu chữ nổi bật */
}

.stepper-item.completed .step-counter {
    background: #6c757d; /* Thay đổi thành màu xám đậm */
    border-color: #6c757d; /* Đồng bộ màu viền */
    color: #fff;
}

.stepper-item.active .step-name {
    font-weight: 700;
    color: #0d6efd; /* Đồng bộ màu chữ với bước active */
}
/* --- END: CSS cho thanh tiến trình --- */

/* Card đăng nhập */
.card {
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 2rem;
}

.card h2 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-control {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

/* === FIX: Thay đổi màu chữ khi focus === */
.form-control:focus {
    border-color: #74ebd5;
    box-shadow: 0 0 0 0.25rem rgba(116, 235, 213, 0.25);
    transform: translateY(-2px);
    background: white;
    color: #212529; /* Đặt màu chữ thành màu đen khi focus trên nền sáng */
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.btn-custom, .btn-next, .btn-prev, .btn-back-login {
    color: #fff;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.1rem;
    /*text-transform: uppercase;*/
    letter-spacing: 0.5px;
}

.btn-custom {
    background: linear-gradient(to right, #00d2ff, #3a7bd5);
}

.btn-next {
    background: linear-gradient(to right, #2193b0, #6dd5ed);
}

.btn-prev {
    background: linear-gradient(to right, #000000, #434343);
}

.btn-back-login {
    background: linear-gradient(to right, #485563, #29323c);
}

.btn-custom:hover,
.btn-next:hover,
.btn-prev:hover,
.btn-back-login:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(116, 235, 213, 0.4);
}

.btn-custom:hover {
    background: linear-gradient(to right, #3a7bd5, #00d2ff);
}

.btn-next:hover {
    background: linear-gradient(to right, #6dd5ed, #2193b0);
}

.btn-prev:hover {
    background: linear-gradient(to right, #434343, #000000);
}

.btn-back-login:hover {
    background: linear-gradient(to right, #29323c, #485563);
}


.btn-custom:active,
.btn-next:active,
.btn-prev:active,
.btn-back-login:active{
    transform: translateY(-1px);
}


/* Responsive */
/* Mobile First - Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    body {
        padding: 10px;
    }

    .main-container {
        max-width: 100%;
    }

    .card {
        padding: 1.5rem;
    }

    .card h2 {
        font-size: 1.5rem;
        /*margin-bottom: 25px;*/
    }

    .form-control {
        padding: 12px 16px;
        border-radius: 12px;
        font-size: 0.95rem;
    }

    .btn-custom, .btn-next, .btn-prev, .btn-back-login {
        padding: 10px;
        font-size: 0.75rem;
        border-radius: 12px;
    }

    .step-counter {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        border-width: 2px;
        top: 15px;
    }

    .stepper-item::before, .stepper-item.completed::after {
        top: 15px;
    }

    .step-name {
        font-size: 9px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .main-container {
        max-width: 540px;
    }

    .card h2 {
        font-size: 1.85rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-container {
        max-width: 500px;
    }

    .card {
        padding: 2.5rem;
    }

    .card h2 {
        font-size: 2.1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .main-container {
        max-width: 450px;
    }

    .card {
        padding: 3rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .main-container {
        max-width: 480px;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 5px;
    }

    .card {
        padding: 1rem;
    }

    .card h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .form-control {
        padding: 10px 15px;
    }

    .btn-custom, .btn-next, .btn-prev, .btn-back-login {
        padding: 10px;
    }
}


/* Animation cho load trang */
.card {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background: rgba(40, 44, 52, 0.95);
        color: #e9ecef;
    }

    .card h2 {
        color: #f8f9fa;
    }

    .form-label {
        color: #ced4da;
    }

    .form-control {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #f8f9fa;
    }

    .form-control::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .form-control:focus {
        background: rgba(255, 255, 255, 0.15);
        color: #f8f9fa; /* bổ sung màu chữ khi focus trên nền tối */
    }

    .checkbox label {
        color: #ced4da;
    }
}

/* Print styles */
@media print {
    body {
        background: white !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
