/**
 * Secure Admin Authentication Styles
 * Consistent styling for login forms across all admin pages
 */

/* Login Section Styles */
.login-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.login-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Form Styles */
.login-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

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

.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

/* Button Styles */
.form-actions {
    margin-top: 30px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    font-family: inherit;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Message Styles */
.login-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.login-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Logout Button Styles */
.logout-btn {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.logout-btn:hover {
    background: #c82333;
}

/* Session Warning Styles */
.session-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1001;
    max-width: 300px;
}

.session-warning .warning-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.session-warning button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.extend-btn {
    background: #28a745;
    color: white;
}

.extend-btn:hover {
    background: #218838;
}

.logout-warning-btn {
    background: #dc3545;
    color: white;
}

.logout-warning-btn:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .session-warning {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Hide/Show States */
.login-section.hidden {
    display: none !important;
}

.main-content.hidden {
    display: none !important;
}

/* Integration with existing admin themes */
.admin-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header .logout-btn {
    margin-left: auto;
}

/* Override existing login section styles for consistency */
.login-section.login-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}