* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f2d5a 0%, #1b478f 50%, #2c5aa0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}



.logo-section {
    text-align: center;
    margin-bottom: 16px;
}

.logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.company-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 0;
}

.auth-form {
    margin-bottom: 20px;
}

.password-form {
    margin-bottom: 32px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    letter-spacing: 0.025em;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-group.error input {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.input-group.error input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Terms Agreement Checkbox Styles */
.terms-agreement {
    margin-bottom: 16px;
}

.checkbox-container {
    position: relative;
    cursor: pointer;
    font-size: 14px;
    color: #34495e;
    margin-bottom: 0;
    padding-left: 32px;
    line-height: 1.5;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.terms-agreement.error .checkbox-checkmark {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.terms-agreement.error .checkbox-text {
    color: #e74c3c;
}

.checkbox-container:hover .checkbox-checkmark {
    border-color: #3498db;
}

.checkbox-container input:checked ~ .checkbox-checkmark {
    background-color: #3498db;
    border-color: #3498db;
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
    display: block;
}

.checkbox-text {
    display: block;
    font-weight: 400;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.terms-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-modal {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.terms-content {
    padding: 32px;
    line-height: 1.6;
    color: #2c3e50;
}

.terms-content h3 {
    color: #2980b9;
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

.terms-content h4 {
    color: #34495e;
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.terms-content p {
    margin: 12px 0;
    font-size: 14px;
}

.terms-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.terms-content li {
    margin: 8px 0;
    font-size: 14px;
}

.terms-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 24px 0;
}

.terms-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .terms-content {
        padding: 24px 20px;
    }
    
    .close-modal {
        font-size: 28px;
    }
}

.password-input-container input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.password-input-container input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-group.error .password-input-container input {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.input-group.error .password-input-container input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.password-input-container input:focus {
    border-color: #1b478f;
    box-shadow: 0 0 0 3px rgba(27, 71, 143, 0.1);
    transform: translateY(-1px);
}

.password-input-container input::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #1b478f;
    background: rgba(27, 71, 143, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
    display: none;
}

.success-message {
    color: #27ae60;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.2);
    border-radius: 8px;
    display: none;
}

.auth-links {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.auth-links a {
    color: #1b478f;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #0f2d5a;
    text-decoration: underline;
}

.auth-links .separator {
    margin: 0 12px;
    color: #95a5a6;
}

.auth-links span {
    color: #7f8c8d;
    font-size: 14px;
}

.password-requirements {
    margin-top: 8px;
}

.password-requirements small {
    color: #95a5a6;
    font-size: 12px;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6a983e, #7baa4e);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(106, 152, 62, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn svg {
    transition: transform 0.2s ease;
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

.footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.footer p {
    color: #95a5a6;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 0;
}

/* Success state */
.auth-card.success {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsive design */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
        margin: 0 16px;
    }
}

/* Loading state */
.submit-btn.loading {
    pointer-events: none;
}

.submit-btn.loading span {
    opacity: 0;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Role Indicator Styles */
.role-indicator {
    margin: 16px 0 24px 0;
    text-align: center;
}

.role-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.channel-partner {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.role-badge.referral-partner {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.role-badge.client {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.role-description {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    max-width: 280px;
    margin: 0 auto;
}

/* Simple Registration Notice */
.registration-notice {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
} 