/* Bổ sung cho trang đăng ký: lỗi từng ô, captcha, popup */
.field-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    min-height: 0;
}
.form-input.has-error {
    border-color: #ff6b6b;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.captcha-row .form-input {
    flex: 1;
    min-width: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}
.captcha-img {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    background: #121426;
    max-width: 100%;
}
.captcha-refresh {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 6px;
    font-size: 1.3rem;
    width: 42px;
    height: 42px;
    cursor: pointer;
}
.captcha-refresh:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Popup */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}
.popup-overlay.show {
    display: flex;
}
.popup-box {
    background: linear-gradient(135deg, #16213e, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: popupIn 0.25s ease;
}
@keyframes popupIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.popup-icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    font-size: 34px;
    font-weight: bold;
}
.popup-box.success .popup-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 2px solid #10b981;
}
.popup-box.error .popup-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 2px solid #ef4444;
}
.popup-title {
    color: #fff;
    margin-bottom: 8px;
}
.popup-message {
    color: #d0d4e4;
    margin-bottom: 20px;
    line-height: 1.5;
    word-break: break-word;
}
.popup-btn {
    min-width: 120px;
}

/* Liên kết dưới form (quên mật khẩu, đăng ký...) */
.form-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 0.9rem;
}
.form-links a {
    color: #7cc4ff;
    text-decoration: none;
}
.form-links a:hover {
    text-decoration: underline;
}
