/* ===== ADMIN LOGIN - SISTEMA UNIVERSO PUC-CAMPINAS ===== */

:root {
    --primary: #ffffff;
    --secondary: #f8f9fa;
    --accent: #4a90e2;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #95a5a6;
    --border: #e9ecef;
    --border-light: #f1f3f4;
    --shadow: rgba(0, 0, 0, 0.04);
    --shadow-medium: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f6f7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Subtle Background Pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.03) 0%, transparent 50%);
    z-index: -1;
}

/* Login Container */
.login-container {
    perspective: 1000px;
    z-index: 1;
}

.login-card {
    background: var(--primary);
    border-radius: 16px;
    box-shadow: 
        0 4px 24px var(--shadow),
        0 1px 3px var(--shadow-medium);
    border: 1px solid var(--border);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    margin: 20px;
    transition: all 0.2s ease;
    animation: cardEntrance 0.6s ease-out;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 32px var(--shadow-medium),
        0 2px 8px var(--shadow);
}

/* Header Section */
.login-header {
    background: var(--primary);
    color: var(--text-primary);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.institution-logo {
    width: 140px;
    height: auto;
    margin-bottom: 1.2rem;
    transition: all 0.2s ease;
    opacity: 0.9;
}

.institution-logo:hover {
    transform: scale(1.02);
    opacity: 1;
}

.system-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.system-title i {
    color: var(--accent);
    margin-right: 0.5rem;
}

.system-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Body Section */
.login-body {
    padding: 2rem;
    background: var(--primary);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: alertSlide 0.4s ease-out;
}

@keyframes alertSlide {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.form-label i {
    margin-right: 6px;
    color: var(--text-secondary);
    width: 14px;
    text-align: center;
    font-size: 0.75rem;
}

.form-control {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--primary);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.form-control.is-invalid {
    border-color: #dc3545;
    animation: inputError 0.5s ease;
}

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

.invalid-feedback {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    animation: feedbackShow 0.3s ease-out;
}

@keyframes feedbackShow {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox */
.form-check {
    margin: 1.25rem 0;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-check-label {
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.form-check-label:hover {
    color: var(--text-primary);
}

/* Login Button */
.btn-login {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: white;
    width: 100%;
    transition: all 0.2s ease;
    position: relative;
}

.btn-login:hover {
    background: #3a7bc8;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
}

.btn-login:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(74, 144, 226, 0.25);
}

.btn-login i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.login-footer small {
    color: var(--text-light);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.login-footer i {
    margin-right: 0.375rem;
    color: var(--text-light);
    font-size: 0.7rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        margin: 10px;
        border-radius: 15px;
    }
    
    .login-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .institution-logo {
        width: 150px;
        margin-bottom: 1rem;
    }
    
    .system-title {
        font-size: 1.5rem;
    }
    
    .system-subtitle {
        font-size: 0.9rem;
    }
    
    .login-body {
        padding: 2rem 1.5rem;
    }
    
    .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-login {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        margin: 5px;
        border-radius: 12px;
    }
    
    .login-header {
        padding: 1.5rem 1rem;
    }
    
    .institution-logo {
        width: 120px;
    }
    
    .system-title {
        font-size: 1.3rem;
    }
    
    .login-body {
        padding: 1.5rem 1rem;
    }
}

/* Loading Animation */
.btn-login.loading {
    pointer-events: none;
}

.btn-login.loading i {
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid var(--puc-dark);
    }
    
    .form-control {
        border-width: 3px;
    }
    
    .btn-login {
        border: 2px solid white;
    }
}