﻿ /* === POPUP OVERLAY === */
        #popup-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #popup-overlay.visible {
            display: flex;
            opacity: 1;
        }
        
        /* === POPUP CONTENT === */
        #popup-content {
            background-color: #ffffff;
            padding: 40px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            width: 90%;
            max-width: 480px;
            position: relative;
            transform: scale(0.95);
            transition: transform 0.3s ease;
            text-align: center;
        }

        #popup-overlay.visible #popup-content {
            transform: scale(1);
        }

        #popup-content .popup_document_ttl {
            margin-top: 0; margin-bottom: 10px;
            color: #2c3e50; font-size: 24px;line-height: 1.4;
        }

        .popup_document_txt p {
            color: #7f8c8d; margin-bottom: 30px;
            font-size: 16px;
        }

        /* === CLOSE BUTTON === */
        .close-btn {
            position: absolute;
            top: 15px; right: 15px;
            font-size: 28px; font-weight: bold;
            color: #bdc3c7; cursor: pointer;
            transition: color 0.2s, transform 0.2s;
        }

        .close-btn:hover {
            color: #34495e;
            transform: rotate(90deg);
        }

        /* === MODERN FORM STYLES === */
        .form-group {
            position: relative;
            margin-bottom: 28px; /* Tăng khoảng cách để chứa thông báo lỗi */
            text-align: left;
        }

        .form-input {
            width: 100%; border: none;
            border-bottom: 2px solid #dde2e7;
            padding: 10px 0; background-color: transparent;
            font-size: 16px; font-family: 'Be Vietnam Pro', sans-serif;
            transition: border-color 0.3s;
        }

        .form-input:focus {
            outline: none;
            border-bottom-color: #3498db;
        }

        .form-label {
            position: absolute; top: 10px; left: 0;
            color: #95a5a6; pointer-events: none;
            transition: all 0.3s ease;
        }

        .form-input:focus + .form-label,
        .form-input:not(:placeholder-shown) + .form-label {
            top: -15px; left: 0;
            font-size: 12px; color: #3498db;
        }
        
        /* For autofill browsers */
        .form-input:-webkit-autofill,
        .form-input:-webkit-autofill:hover, 
        .form-input:-webkit-autofill:focus, 
        .form-input:-webkit-autofill:active  {
            -webkit-box-shadow: 0 0 0 30px white inset !important;
             box-shadow: 0 0 0 30px white inset !important;
        }

        /* === NEW: ERROR STYLES === */
        /* Style cho ô input khi có lỗi */
        .form-input.invalid {
            border-bottom-color: #e74c3c;
        }
        
        /* Style cho label của ô input khi có lỗi */
        .form-input.invalid + .form-label {
            color: #e74c3c;
        }

        /* Style cho thông báo lỗi bên dưới */
        .error-message {
            color: #e74c3c;
            font-size: 13px;
            padding-top: 5px;
            display: none; /* Mặc định ẩn */
        }

        /* === SUBMIT BUTTON STYLES === */
        #submit-btn {
            width: 100%; padding: 15px;
            background-image: linear-gradient(45deg, #3b56bd, var(--mcolor));
            color: white; border: none; border-radius: 8px;
            cursor: pointer; font-size: 16px; font-weight: bold;
            font-family: 'Be Vietnam Pro', sans-serif;
            transition: all 0.3s; position: relative;
            overflow: hidden; box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
        }

        #submit-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
        }
        
        #submit-btn:disabled {
            background-image: linear-gradient(45deg, #bdc3c7, #95a5a6);
            cursor: not-allowed; box-shadow: none;
        }

        #submit-btn .button-text { transition: opacity 0.2s; }
        #submit-btn.processing .button-text { opacity: 0; }

        #submit-btn .button-loader {
            display: none; border: 3px solid rgba(255, 255, 255, 0.3);
            border-top: 3px solid #ffffff; border-radius: 50%;
            width: 20px; height: 20px;
            animation: spin 1s linear infinite;
            position: absolute; top: 50%; left: 50%;
            margin-top: -10px; margin-left: -10px;
        }
        
        #submit-btn.processing .button-loader { display: block; }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }