.comec-auth-container {
    max-width: 460px;
    margin: 50px auto;
    padding: 0 20px;
}

.comec-auth-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    padding: 40px;
    margin-bottom: 20px;
}

.comec-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.comec-auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.comec-auth-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.comec-form-group {
    margin-bottom: 18px;
}

.comec-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.comec-form-label .required {
    color: #ed1b30;
    margin-left: 2px;
}

.comec-form-input {
    width: 100%;
    padding: 14px 16px !important;
    font-size: 15px;
    border: 1px solid #ddd !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background-color: #fafafa;
}

.comec-form-input:hover {
    background-color: #fff;
    border-color: #ccc;
}

.comec-form-input:focus {
    outline: none;
    background-color: #fff;
    border-color: #ed1b30;
    border-width: 2px;
    padding: 13px 15px;
}

.comec-form-input:disabled {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.comec-form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.comec-form-select:hover {
    background-color: #fff;
    border-color: #ccc;
}

.comec-form-select:focus {
    outline: none;
    background-color: #fff;
    border-color: #ed1b30;
    border-width: 2px;
    padding: 13px 15px;
}

.comec-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.comec-form-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ed1b30;
}

.comec-form-checkbox label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
    line-height: 1.6;
}

.comec-form-checkbox label a {
    color: #ed1b30;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.15s ease;
}

.comec-form-checkbox label a:hover {
    color: #c01525;
    text-decoration: underline;
}

.comec-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    text-decoration: none;
}

.comec-btn,
.comec-btn:focus,
.comec-btn:active,
.comec-btn:hover {
    box-shadow: none !important;
    outline: none !important;
}

/* Also target Bootstrap-specific states */
.comec-btn:focus-visible {
    box-shadow: none !important;
    outline: none !important;
}

/* If Bootstrap's .btn class is also applied */
button.comec-btn,
a.comec-btn {
    box-shadow: none !important;
}

.comec-btn-primary {
    background: #ed1b30;
    color: #ffffff !important;
}

.comec-btn-primary:hover {
    background: #ed1b30;
    text-decoration: none;
}

.comec-btn-primary:active {
    background: #ed1b30;
}

.comec-btn-secondary {
    background: #ffffff;
    color: #ed1b30 !important;
    border: 2px solid #ed1b30;
}

.comec-btn-secondary:hover {
    background: #ed1b30;
    color: #ffffff !important;
    text-decoration: none;
}

.comec-btn-secondary:active {
    background: #c01525;
    border-color: #c01525;
}

.comec-btn-link {
    background: transparent;
    color: #ed1b30;
    text-decoration: none;
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
}

.comec-btn-link:hover {
    text-decoration: underline;
    background: transparent;
}

.comec-alert {
    padding: 16px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid;
}

.comec-alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.comec-alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.comec-alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.comec-alert ul {
    margin: 0;
    padding-left: 20px;
}

.comec-alert li {
    margin: 4px 0;
}

.comec-form-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #e8e8e8;
}

.comec-form-footer-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 14px;
}

.comec-form-footer-link {
    color: #ed1b30 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.15s ease;
}

.comec-form-footer-link:hover {
    color: #c01525;
}

.comec-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comec-divider::before,
.comec-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e8e8e8;
}

.comec-divider span {
    padding: 0 16px;
}

.comec-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.comec-form-row .comec-form-group {
    flex: 1;
    margin-bottom: 0;
}

.comec-captcha-wrapper {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.comec-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.15s ease;
}

.comec-back-link:hover {
    color: #ed1b30 !important;
    text-decoration: none;
}

.comec-back-link::before {
    content: '←';
    font-size: 18px;
    font-weight: 400;
}

.comec-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.comec-form-help {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .comec-auth-container {
        margin: 30px auto;
    }

    .comec-auth-card {
        padding: 32px 24px;
        border-radius: 8px;
    }

    .comec-auth-title {
        font-size: 22px;
    }

    .comec-auth-subtitle {
        font-size: 13px;
    }

    .comec-form-row {
        flex-direction: column;
        gap: 0;
    }

    .comec-form-row .comec-form-group {
        margin-bottom: 18px;
    }

    .comec-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

.comec-password-strength {
    height: 4px;
    background: #e1e4e8;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.comec-password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.comec-password-strength-weak {
    width: 33%;
    background: #dc3545;
}

.comec-password-strength-medium {
    width: 66%;
    background: #ffc107;
}

.comec-password-strength-strong {
    width: 100%;
    background: #28a745;
}

.comec-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Field Validation States */
.comec-form-input.error,
.comec-form-select.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
    border-width: 2px !important;
    padding: 13px 15px !important;
}

.comec-form-input.success,
.comec-form-select.success {
    border-color: #28a745 !important;
    background-color: #f0fff4 !important;
    border-width: 2px !important;
    padding: 13px 15px !important;
}

.field-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

.field-success {
    display: block;
    color: #28a745;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

/* Loading spinner for button */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button disabled state */
.comec-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth transitions */
.comec-form-input,
.comec-form-select {
    transition: border-color 0.2s ease, background-color 0.2s ease, padding 0.2s ease;
}

/* Alert animations */
.comec-alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}