:root {
    --primary-color: #662D92;
    --primary-light: #8e54c9;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

.civi-custom-auth-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sign-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #662D92; /* Theme color */
    color: #fff; /* White icon for contrast */
    font-size: 24px;
}

.login-title {
    font-size: 18px;
    font-weight: bold;
    color: #662D92; /* Theme color for title */
}

.welcome-message {
    margin: 10px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.auth-header .sign-header{
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight:bold;
    font-size:24px;
}

.auth-header p {
    color: var(--text-color);
    opacity: 0.8;
}

.civi-custom-auth-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.civi-custom-auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.civi-custom-auth-form input:not([type="checkbox"]),
.civi-custom-auth-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
}

.civi-custom-auth-form input:not([type="checkbox"]):focus,
.civi-custom-auth-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 45, 146, 0.1);
    outline: none;
}

.tel-group {
    display: flex;
    gap: 10px;
}

.tel-group select {
    flex: 0 0 120px;
}

.tel-group input {
    flex: 1;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 40px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--primary-color);
    z-index: 2;
    background: white;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.auth-button:hover {
    background-color: var(--primary-light);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.forgot-password, .btn-show-reset {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.forgot-password:hover, .btn-show-reset:hover {
    text-decoration: underline;
}

.accept-terms {
    font-size: 10px;
}

.accept-terms a {
    color: var(--primary-color);
    text-decoration: none;
}

.accept-terms a:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 14px;
    color: var(--text-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Password strength meter */
.password-strength-meter {
    margin-top: 5px;
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-meter:before {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: transparent;
    transition: width 0.3s, background 0.3s;
}

.password-strength-meter[data-strength="0"]:before {
    width: 20%;
    background: var(--error-color);
}

.password-strength-meter[data-strength="1"]:before {
    width: 40%;
    background: var(--error-color);
}

.password-strength-meter[data-strength="2"]:before {
    width: 60%;
    background: #ffb347;
}

.password-strength-meter[data-strength="3"]:before {
    width: 80%;
    background: #4CAF50;
}

.password-strength-meter[data-strength="4"]:before {
    width: 100%;
    background: var(--success-color);
}

/* Reset password form */
.civi-reset-password-wrap {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.civi-reset-password-wrap .form-field {
    margin-bottom: 15px;
}

.civi-reset-password-wrap .form-field.email-field {
    display: flex;
    gap: 10px;
}

.civi-reset-password-wrap .form-field.email-field input {
    flex: 1;
}

.civi-reset-password-wrap .verify-email {
    white-space: nowrap;
    padding: 0 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.civi-reset-password-wrap .back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    text-decoration: none;
    margin-top: 15px;
}

/* Messages */
.civi-auth-message {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-left: 4px solid var(--primary-color);
    background: #f9f9f9;
    border-radius: 3px;
}

.civi-auth-message.error {
    border-left-color: var(--error-color);
    background: #fef6f6;
}

.civi-auth-message.success {
    border-left-color: var(--success-color);
    background: #f6fef6;
}

/* Role specific styles */
.signup-container.candidate .auth-header h2 {
    color: #3498db;
}

.signup-container.employer .auth-header h2 {
    color: #e74c3c;
}

/* Role icon styling */
.auth-header .role-icon {
    text-align: center;
    margin-bottom: 15px;
}

.auth-header .role-icon i {
    font-size: 48px;
    color: var(--primary-color);
}

/* Password strength meter */
.password-strength-meter {
    height: 5px;
    background-color: #eee;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.password-strength-meter .strength-meter-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-meter .strength-meter-fill.weak {
    background-color: #e74c3c;
}

.password-strength-meter .strength-meter-fill.medium {
    background-color: #f39c12;
}

.password-strength-meter .strength-meter-fill.strong {
    background-color: #27ae60;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 5px;
    text-align: right;
}

.password-strength-text.weak {
    color: #e74c3c;
}

.password-strength-text.medium {
    color: #f39c12;
}

.password-strength-text.strong {
    color: #27ae60;
}

.password-hint {
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

.password-hint ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.password-hint li {
    position: relative;
    list-style-type: none;
}

.password-hint li:before {
    content: "•";
    position: absolute;
    left: -15px;
}

.password-hint li.valid {
    color: #27ae60;
}

.password-hint li.valid:before {
    content: "✓";
    left: -18px;
}

/* Reset password form */
.civi-reset-password-wrap {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.civi-reset-password-wrap .form-field {
    margin-bottom: 15px;
}

.civi-reset-password-wrap .form-field.email-field {
    display: flex;
    gap: 10px;
}

.civi-reset-password-wrap .form-field.email-field input {
    flex: 1;
}

.civi-reset-password-wrap .verify-email {
    white-space: nowrap;
    padding: 0 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.civi-reset-password-wrap .back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    text-decoration: none;
    margin-top: 15px;
}

/* Messages */
.civi_messages.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.civi_messages.message.error {
    background-color: #fdecea;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

.civi_messages.message.success {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

/* Form messages */
.form-group .msg {
    display: none;
    font-size: 14px;
    margin-top: 5px;
}

.form-group .msg.error {
    color: #e74c3c;
}

.form-group .msg.success {
    color: #27ae60;
}

.form-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.form-message.error {
    background-color: #fdecea;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
    display: block;
}

.form-message.success {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
    display: block;
}

/* Error states */
input.error {
    border-color: #e74c3c !important;
}

/* Password mismatch text */
.password-strength-text.error {
    color: #e74c3c;
}

/* Verify field */
.verify-field {
    display: none;
    margin-top: 15px;
}

/* Spinner */
.civi-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.row {
        display: flex;
        flex-wrap: wrap;
        gap: 12px; /* adds space between .col-group elements */
        padding:0 10px; 
    }

    .col-group {
        flex: 1; /* allows them to grow equally */
        min-width: 0;
    }
/* Responsive adjustments */
@media (max-width: 600px) {
    .auth-header .sign-header{
        font-size:19px;
        font-weight:bold;
    }
    .civi-custom-auth-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .tel-group {
        flex-direction: column;
    }
    
    .tel-group select {
        flex: 1;
        width: 100%;
    }
    
    .form-group .row {
        flex-direction: column;
    }
    
    .form-group .col-6 {
        width: 100%;
        flex: 0 0 100%;
    }
    
    .civi-reset-password-wrap .form-field.email-field {
        flex-direction: column;
    }
    
    .civi-reset-password-wrap .verify-email {
        justify-content: center;
        padding: 10px;
    }
}