/* ServiceProxy.net - Register Form CSS OPTIMIZED */
/* CSS tối ưu và sạch cho form đăng ký - Không trùng lặp */

/* CSS Variables */
:root {
    --reg-primary: #0066cc;
    --reg-primary-dark: #004499;
    --reg-success: #28a745;
    --reg-danger: #dc3545;
    --reg-warning: #ffc107;
    --reg-text: #2d3748;
    --reg-text-light: #ffffff;
    --reg-text-muted: #718096;
    --reg-bg: #ffffff;
    --reg-bg-secondary: #f8fafc;
    --reg-bg-tertiary: #edf2f7;
    --reg-border: #e2e8f0;
    --reg-shadow: 0 10px 25px rgba(0,0,0,0.15);
    --reg-shadow-primary: 0 8px 25px rgba(0, 102, 204, 0.3);
    --reg-radius: 12px;
    --reg-transition: all 0.3s ease;
}

/* Registration Disabled Notice */
.register-disabled-notice {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: var(--reg-radius);
    color: var(--reg-text-light);
    box-shadow: var(--reg-shadow);
}

.register-disabled-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.register-disabled-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--reg-text-light);
}

.register-disabled-message {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.register-disabled-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.register-btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--reg-text-light);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--reg-transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.register-btn-contact:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--reg-text-light);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Container */
.register-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

.register-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Card */
.register-card {
    width: 100%;
    background: var(--reg-bg);
    border-radius: calc(var(--reg-radius) * 2);
    box-shadow: var(--reg-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

/* Header */
.register-header {
    background: linear-gradient(135deg, var(--reg-primary) 0%, var(--reg-primary-dark) 100%);
    padding: 25px 20px;
    text-align: center;
    color: var(--reg-text-light);
    position: relative;
    overflow: hidden;
}

.register-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 70% 70%, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.register-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 18px;
    position: relative;
    z-index: 2;
    animation: pulse 2s infinite;
}

.register-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.register-subtitle {
    font-size: 13px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Body & Grid */
.register-body {
    padding: 25px 20px;
    background: var(--reg-bg);
}

.register-body .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    width: 100%;
}

.register-body .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
    box-sizing: border-box;
    width: 100%;
}

/* Form Elements */
.register-form-group {
    margin-bottom: 16px;
}

.register-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--reg-text);
    font-size: 13px;
}

.register-form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--reg-border);
    border-radius: var(--reg-radius);
    font-size: 14px;
    line-height: 1.4;
    min-height: 44px;
    transition: var(--reg-transition);
    background: var(--reg-bg-secondary);
    outline: none;
    color: var(--reg-text);
    font-family: inherit;
    box-sizing: border-box;
    display: block;
}

.register-form-control:focus {
    border-color: var(--reg-primary);
    background: var(--reg-bg);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.register-form-control::placeholder {
    color: var(--reg-text-muted);
    opacity: 0.7;
}

/* Input Groups */
.register-input-group {
    position: relative;
    display: flex;
    width: 100%;
    align-items: stretch;
}

.register-input-group .register-form-control {
    border-radius: var(--reg-radius) 0 0 var(--reg-radius);
    border-right: none;
    flex: 1;
    margin: 0;
}

.register-input-group-append {
    display: flex;
    align-items: stretch;
}

.register-input-group-text {
    padding: 12px 14px;
    background: var(--reg-bg-tertiary);
    border: 2px solid var(--reg-border);
    border-left: none;
    border-radius: 0 var(--reg-radius) var(--reg-radius) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--reg-text-muted);
    transition: var(--reg-transition);
    min-width: 48px;
    min-height: 44px;
    box-sizing: border-box;
    font-size: 14px;
}

.register-form-control:focus + .register-input-group-append .register-input-group-text {
    border-color: var(--reg-primary);
    background: var(--reg-bg);
    color: var(--reg-primary);
}

/* Validation States */
.register-form-group.register-has-error .register-form-control {
    border-color: var(--reg-danger);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.register-form-group.register-has-success .register-form-control {
    border-color: var(--reg-success);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.register-error-message {
    color: var(--reg-danger);
    font-size: 11px;
    margin-top: 4px;
    display: none;
}

.register-form-group.register-has-error .register-error-message {
    display: block;
}

/* Buttons */
.register-btn-submit {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--reg-primary) 0%, var(--reg-primary-dark) 100%);
    border: none;
    border-radius: var(--reg-radius);
    color: var(--reg-text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--reg-transition);
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--reg-shadow-primary);
}

.register-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 102, 204, 0.4);
}

.register-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--reg-transition);
}

.register-btn-loading {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--reg-transition);
}

.register-btn-submit.register-loading .register-btn-content { opacity: 0; }
.register-btn-submit.register-loading .register-btn-loading { opacity: 1; }

.register-btn-secondary {
    width: 100%;
    padding: 12px 16px;
    background: var(--reg-bg);
    border: 2px solid var(--reg-primary);
    border-radius: var(--reg-radius);
    color: var(--reg-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--reg-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    margin-bottom: 10px;
}

.register-btn-secondary:hover {
    background: var(--reg-primary);
    color: var(--reg-text-light);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Divider */
.register-auth-divider {
    text-align: center;
    margin: 18px 0;
    position: relative;
    color: var(--reg-text-muted);
}

.register-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--reg-border);
}

.register-auth-divider span {
    background: var(--reg-bg);
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* Checkbox */
.register-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 2px 0;
}

.register-form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--reg-primary);
    margin-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
}

.register-form-check-label {
    font-size: 13px;
    color: var(--reg-text);
    line-height: 1.5;
    cursor: pointer;
    flex: 1;
}

.register-form-check-label a {
    color: var(--reg-primary);
    text-decoration: none;
}

.register-form-check-label a:hover {
    text-decoration: underline;
}

/* Password Strength */
.register-password-strength {
    margin-top: 4px;
    height: 3px;
    background: var(--reg-bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.register-password-strength.register-active { display: block; }

.register-password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.register-password-strength-bar.register-weak { background: var(--reg-danger); }
.register-password-strength-bar.register-medium { background: var(--reg-warning); }
.register-password-strength-bar.register-strong { background: var(--reg-success); }

.register-password-strength-text {
    font-size: 10px;
    margin-top: 2px;
    color: var(--reg-text-muted);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 768px) {
    .register-container { 
        padding: 15px; 
        min-height: 100vh;
    }
    .register-wrapper { 
        max-width: 100%; 
        width: 100%;
    }
    .register-header, .register-body { padding: 20px 15px; }
    .register-title { font-size: 16px; }
    .register-subtitle { font-size: 12px; }
    .register-body .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 5px;
    }
    .register-form-check {
        gap: 12px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .register-container { 
        padding: 10px; 
        min-height: 100vh;
    }
    .register-header, .register-body { padding: 15px 10px; }
    .register-title { font-size: 15px; }
    .register-subtitle { font-size: 11px; }
    .register-form-control, .register-input-group-text,
    .register-btn-submit, .register-btn-secondary {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 42px;
    }
    .register-body .row { margin: 0 -5px; }
    .register-body .col-md-6 { 
        padding: 0 5px; 
        margin-bottom: 8px;
    }
    .register-form-check {
        gap: 8px;
        margin-bottom: 18px;
    }
    .register-form-check-input {
        width: 16px;
        height: 16px;
    }
}

/* Print */
@media print {
    .register-container { background: white; }
    .register-header { background: #f8f9fa; color: #333; }
    .register-btn-submit, .register-btn-secondary { display: none; }
}

/* Additional styles for error pages and other forms */
.register-form-hint {
    font-size: 11px;
    color: var(--reg-text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

.register-error-content {
    text-align: center;
    padding: 20px 0;
}

.register-error-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--reg-danger);
    font-size: 24px;
}

.register-error-message {
    margin-bottom: 25px;
}

.register-error-message h3 {
    color: var(--reg-text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.register-error-message p {
    color: var(--reg-text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.register-security-alert {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: var(--reg-radius);
    padding: 12px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.register-alert-icon {
    color: var(--reg-success);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.register-alert-text {
    font-size: 12px;
    color: var(--reg-text);
    line-height: 1.4;
    flex: 1;
}

/* Email Check States */
.register-email-checking {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--reg-text-muted);
}

.register-email-checking i {
    color: var(--reg-primary);
}

.register-error-link {
    color: var(--reg-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--reg-transition);
}

.register-error-link:hover {
    color: var(--reg-primary-dark);
    text-decoration: underline;
}

.register-success-text {
    color: var(--reg-success);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.register-success-text i {
    font-size: 12px;
}

/* Responsive Styles for Disabled Notice */
@media (max-width: 576px) {
    .register-disabled-notice {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .register-disabled-icon {
        font-size: 3rem;
    }
    
    .register-disabled-title {
        font-size: 1.25rem;
    }
    
    .register-disabled-message {
        font-size: 0.9rem;
    }
    
    .register-disabled-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .register-btn-contact,
    .register-disabled-actions .register-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}
