/* Custom Secure Login Styles */

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

.csl-login-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.csl-login-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

/* Logo */
.csl-logo {
    text-align: center;
    margin-bottom: 30px;
}

.csl-logo h1 {
    font-size: 24px;
    color: #333;
}

.csl-logo img {
    max-width: 200px;
    height: auto;
}

/* Form Fields */
.csl-field {
    margin-bottom: 20px;
}

.csl-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.csl-field input[type="text"],
.csl-field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.csl-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Remember Me */
.csl-remember {
    margin-bottom: 24px;
}

.csl-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

/* Submit Button */
.csl-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.csl-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.csl-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.csl-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: csl-spin 0.8s linear infinite;
}

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

/* Messages */
.csl-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.csl-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.csl-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* Links */
.csl-links {
    margin-top: 24px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.csl-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.csl-links a:hover {
    text-decoration: underline;
}

/* 2FA Section */
.csl-2fa-header {
    text-align: center;
    margin-bottom: 24px;
}

.csl-2fa-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #333;
}

.csl-2fa-header p {
    color: #666;
    font-size: 14px;
}

#csl-2fa-code {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-family: monospace;
}

/* Back Button */
.csl-back-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: transparent;
    border: 2px solid #e1e5eb;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.csl-back-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Responsive */
@media (max-width: 480px) {
    .csl-login-box {
        padding: 30px 20px;
    }
    
    .csl-links {
        flex-direction: column;
        gap: 12px;
    }
}
