/**
 * CSS Login - Sistema Registro de Ponto
 * Tema: Azul Profissional
 */

/* Container Principal */
.srp-login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.srp-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Card de Login */
.srp-login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do Login */
.srp-login-header {
    text-align: center;
    margin-bottom: 35px;
}

.srp-login-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.srp-login-header h1 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: bold;
}

.srp-login-header p {
    color: #64748b;
    font-size: 15px;
}

/* Mensagens */
.srp-login-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

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

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

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

/* Formulário */
.srp-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.srp-form-group {
    display: flex;
    flex-direction: column;
}

.srp-form-group label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.srp-label-icon {
    font-size: 18px;
}

.srp-form-group input[type="text"],
.srp-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.srp-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.srp-form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Campo de Senha com Toggle */
.srp-password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.srp-password-field input {
    padding-right: 50px;
}

.srp-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.srp-toggle-password:hover {
    opacity: 1;
}

.srp-toggle-password:disabled {
    cursor: not-allowed;
}

/* Checkbox Lembrar-me */
.srp-form-checkbox {
    flex-direction: row;
    align-items: center;
}

.srp-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    color: #64748b;
}

.srp-form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2563eb;
}

/* Botão de Login */
.srp-btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.srp-btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.srp-btn-login:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Loading Spinner */
.srp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.srp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Footer do Login */
.srp-login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
}

.srp-link-recovery {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.srp-link-recovery:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Informações Adicionais */
.srp-login-info {
    background: #f0f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    text-align: center;
}

.srp-login-info p {
    color: #0c4a6e;
    font-size: 14px;
    margin: 5px 0;
}

/* Powered By */
.srp-login-powered {
    margin-top: 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.srp-login-powered p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Transições Vue */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* Responsivo */
@media (max-width: 600px) {
    .srp-login-card {
        padding: 30px 25px;
    }
    
    .srp-login-header h1 {
        font-size: 24px;
    }
    
    .srp-login-icon {
        font-size: 48px;
    }
    
    .srp-btn-login {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Animação de fundo (opcional) */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.srp-login-container {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

/* Logo responsivo */
.srp-login-icon {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.srp-login-icon img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
}

/* Card de login - ajustar para logo caber */
.srp-login-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px; /* ← Ajuste este valor se precisar maior */
    margin: 0 auto;
}

/* Responsivo */
@media (max-width: 768px) {
    .srp-login-card {
        max-width: 90%;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .srp-login-card {
        max-width: 95%;
        padding: 20px 15px;
    }
    
    .srp-login-icon img {
        max-height: 60px; /* Limita altura em telas muito pequenas */
    }
}
