@charset "UTF-8";

/* 
    Autor: Rafael V. Gogge
    Copyright © 2025 Rafael V. Gogge
    Projeto: UniLab - Sistema de Gerenciamento de Laboratórios
*/

:root {
    --primary-color: #030a8c;
    --secondary-color: #0511f2;
    --text-color: #f9fbfa;
    --accent-color: #0d6efd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --card-bg: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;

    /* Novas variáveis para animações */
    --animation-duration: 0.5s;
    --animation-timing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --animation-stagger: 0.1s;
    --animation-scale: 0.98;
    --animation-rotate: 2deg;
    --animation-translate: 10px;
    --animation-opacity: 0;
}

/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip Link para Acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Estilos Globais */
body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
    animation: fadeInDown 0.8s var(--animation-timing);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.logo-image {
    animation: logoSpin 1s var(--animation-timing);
}

@keyframes logoSpin {
    0% {
        transform: rotate(-10deg) scale(0.9);
        opacity: 0;
    }

    100% {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

.nav-link {
    color: var(--text-color) !important;
    position: relative;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    overflow: hidden;
}

.nav-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: translateX(0);
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link.active {
    color: white !important;
    font-weight: 500;
}

.nav-link i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: translateX(-3px);
}

/* Container de Login */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    perspective: 1000px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    z-index: -1;
}

.login-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.animate-in {
    animation: cardAppear 0.8s var(--animation-timing) forwards;
    transform-origin: center;
    opacity: 0;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.logo-container {
    position: relative;
    margin: 0 auto 1.5rem;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container::before {
    content: "";
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.logo {
    max-width: 100px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.5s ease;
    animation: logoAppear 1s var(--animation-timing) forwards;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.animate-title {
    animation: fadeInUp 0.6s var(--animation-timing) forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.animate-subtitle {
    animation: fadeInUp 0.6s var(--animation-timing) forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Formulário */
.animate-form {
    animation: formAppear 0.8s var(--animation-timing) forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes formAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group-animate {
    position: relative;
    transition: transform 0.3s ease;
}

.input-group-animate:focus-within {
    transform: translateY(-3px);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    z-index: 10;
    transition: all 0.3s ease;
}

.form-floating>.form-control {
    padding-left: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-floating>.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    color: var(--text-color);
}

.form-control:focus+label+.input-icon,
.form-control:not(:placeholder-shown)+label+.input-icon {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-floating>label {
    color: rgba(255, 255, 255, 0.8);
    padding-left: 40px;
    transition: all 0.3s ease;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--accent-color);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Botão de Mostrar Senha */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:focus {
    outline: none;
    color: var(--accent-color);
}

/* Checkbox */
.animate-checkbox {
    animation: fadeInUp 0.6s var(--animation-timing) forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    animation: checkboxPop 0.3s var(--animation-timing);
}

@keyframes checkboxPop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.form-check-label {
    color: var(--text-color);
    transition: all 0.3s ease;
    padding-left: 0.5rem;
}

.form-check-input:checked~.form-check-label {
    color: var(--accent-color);
}

/* Botões */
.animate-button {
    animation: fadeInUp 0.6s var(--animation-timing) forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.btn-primary {
    background: var(--accent-color);
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
    background: #0b5ed7;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-login {
    position: relative;
    transition: all 0.3s ease;
}

.btn-text,
.btn-loader {
    transition: all 0.3s ease;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* Link de Recuperação */
.animate-link {
    animation: fadeInUp 0.6s var(--animation-timing) forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.recovery-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 20px;
}

.recovery-link:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.recovery-link i {
    transition: transform 0.3s ease;
}

.recovery-link:hover i {
    transform: rotate(15deg);
}

/* Modal */
.modal-content {
    background: #2c2c2c;
    color: var(--text-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalAppear 0.5s var(--animation-timing);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1.5rem 1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem 1.5rem;
}

.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.fade .modal-dialog {
    transform: scale(0.9);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    animation: fadeInUp 0.8s var(--animation-timing);
    animation-delay: 0.9s;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-link-animate {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.footer-link-animate::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.footer-link-animate:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-link-animate:hover {
    color: var(--accent-color);
}

.footer-link-animate i {
    margin-right: 0.3rem;
    transition: transform 0.3s ease;
}

.footer-link-animate:hover i {
    transform: translateY(-2px);
}

.separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Feedback Messages */
.alert {
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    animation: alertAppear 0.5s var(--animation-timing);
    border: none;
}

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

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

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    border-left: 4px solid #28a745;
    color: #d4edda;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border-left: 4px solid #dc3545;
    color: #f8d7da;
}

/* Validação de formulário */
.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: none;
    padding-right: 0.75rem;
}

.form-control.is-valid {
    border-color: var(--success-color);
    background-image: none;
    padding-right: 0.75rem;
}

.invalid-feedback {
    color: #f8d7da;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsividade */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .separator {
        display: none;
    }

    .login-container {
        padding: 1rem;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Alto Contraste */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000066;
        --secondary-color: #0000cc;
        --accent-color: #0000ff;
    }

    .form-control,
    .btn-primary {
        border: 2px solid white;
    }
}