/* ============================================
   AUTH - Login Page Styles
   Dual Panel Layout | Responsive | Modern
   ============================================ */

:root {
    --color-primary: #0D6EFD;
    --color-accent: #9db04d;
    --color-dark: #1F2937;
    --color-muted: #6B7280;
    --color-light: #F9FAFB;
    --color-border: #E5E7EB;
    --color-danger: #DC2626;
    --color-info: #3B82F6;
    --transition-default: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background-color: var(--color-light);
}

/* ============================================
   PAINEL ESQUERDO - HERO
   ============================================ */

.auth-hero-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

    .hero-background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.7) 0%, rgba(157, 176, 77, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px 30px;
    text-align: center;
    animation: slideInLeft 0.8s ease-out;
}

/* UNE Solutions Logo */
.une-logo-container {
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out 0.2s backwards;
}

.une-logo {
    height: 60px;
    width: auto;
    filter: brightness(1.1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: var(--transition-default);
}

    .une-logo:hover {
        filter: brightness(1.2) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
        transform: translateY(-2px);
    }

/* Mensagem Subliminar */
.hero-message {
    animation: slideUp 0.8s ease-out 0.4s backwards;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PAINEL DIREITO - FORMULÁRIO
   ============================================ */

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background-color: var(--color-light);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 380px;
    animation: slideInRight 0.8s ease-out;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

/* ============================================
   LOGO QUBEX - RETANGULAR (280x96)
   ============================================ */

.qubex-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 100px;
}

.qubex-logo {
    height: auto;
    max-width: 220px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: zoomIn 0.6s ease-out;
}

/* ============================================
   FORM TITLE & SUBTITLE
   ============================================ */

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 4px 0;
}

.form-subtitle {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 0 0 8px 0;
}

.form-tagline {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ============================================
   ALERT - DICA MICROSOFT
   ============================================ */

.alert-microsoft {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(157, 176, 77, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 14px 16px;
    animation: slideDown 0.6s ease-out 0.4s backwards;
}

    .alert-microsoft .alert-content {
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }

    .alert-microsoft i {
        color: var(--color-info);
        font-size: 1.2rem;
        margin-top: 2px;
        flex-shrink: 0;
    }

.alert-text {
    color: var(--color-dark);
    font-size: 0.85rem;
    line-height: 1.5;
}

    .alert-text strong {
        color: var(--color-info);
        display: block;
        margin-bottom: 4px;
    }

    .alert-text em {
        color: var(--color-muted);
        display: block;
        margin-top: 4px;
        font-size: 0.8rem;
    }

/* ============================================
   FORM ELEMENTS
   ============================================ */

.auth-form {
    animation: fadeIn 0.6s ease-out 0.5s backwards;
}

.form-group {
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
    transition: var(--transition-default);
}

    .form-label i {
        font-size: 1rem;
        color: var(--color-primary);
    }

.form-control {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--color-dark);
    background-color: #ffffff;
    transition: var(--transition-default);
}

    .form-control:focus {
        border-color: var(--color-primary);
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
        outline: none;
    }

    .form-control::placeholder {
        color: var(--color-muted);
        opacity: 0.8;
    }

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-input-group .form-control {
        width: 100%;
        padding-right: 40px;
    }

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.1rem;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-toggle-password:hover {
        color: var(--color-primary);
    }

/* Form Check (Checkbox) */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    border: 1.5px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-default);
    background-color: #ffffff;
}

    .form-check-input:checked {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
        outline: none;
    }

.form-check-label {
    margin-bottom: 0;
    color: var(--color-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-default);
}

    .form-check-label:hover {
        color: var(--color-primary);
    }

/* Links */
.link-forgot-password {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-default);
}

    .link-forgot-password:hover {
        color: var(--color-primary);
        text-decoration: underline;
    }

.link-accent {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-default);
}

    .link-accent:hover {
        color: var(--color-accent);
        text-decoration: underline;
    }

.link-muted {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-default);
}

    .link-muted:hover {
        color: var(--color-primary);
        text-decoration: underline;
    }

/* ============================================
   BUTTONS
   ============================================ */

.btn-login {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0D6EFD 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 11px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        filter: brightness(1.05);
    }

    .btn-login:active {
        transform: translateY(0);
        box-shadow: var(--shadow-sm);
    }

    .btn-login i {
        font-size: 1.1rem;
    }

.btn-microsoft {
    background-color: #ffffff;
    color: var(--color-dark);
    border: 1.5px solid var(--color-border);
    border-radius: 6px;
    padding: 11px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

    .btn-microsoft:hover {
        background-color: #F3F4F6;
        border-color: var(--color-primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        color: var(--color-primary);
    }

    .btn-microsoft:active {
        transform: translateY(0);
    }

.microsoft-icon {
    height: 20px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}

/* ============================================
   DIVIDER
   ============================================ */

.divider-or {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

    .divider-or::before,
    .divider-or::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: var(--color-border);
    }

    .divider-or span {
        padding: 0 12px;
    }

/* ============================================
   FORM FOOTER
   ============================================ */

.form-footer {
    margin-top: 24px;
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.6s backwards;
}

    .form-footer p {
        margin-bottom: 8px;
    }

    .form-footer .text-muted {
        color: var(--color-muted);
        font-size: 0.85rem;
    }

/* ============================================
   VALIDAÇÃO
   ============================================ */

.form-control.is-invalid {
    border-color: var(--color-danger);
}

    .form-control.is-invalid:focus {
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    }

.text-danger {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 6px;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   ALERT - Erro de Autenticação
   ============================================ */

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 14px 16px;
    animation: slideDown 0.4s ease-out;
}

    .alert-danger strong {
        color: var(--color-danger);
        display: block;
        margin-bottom: 8px;
    }

    .alert-danger ul {
        color: var(--color-dark);
        font-size: 0.9rem;
        line-height: 1.6;
    }

        .alert-danger ul li {
            margin-bottom: 6px;
        }

    .alert-danger i {
        color: var(--color-danger);
        flex-shrink: 0;
        margin-top: 2px;
    }

    .alert-danger .btn-close {
        opacity: 0.5;
        transition: opacity 0.2s ease;
    }

        .alert-danger .btn-close:hover {
            opacity: 1;
        }

        .alert-danger .btn-close:focus {
            box-shadow: 0 0 0 0.25rem rgba(220, 38, 38, 0.25);
            outline: none;
        }


/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-hero-panel {
        display: none;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .une-logo-container {
        margin-bottom: 40px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (768px)
   ============================================ */

@media (max-width: 768px) {
    .auth-form-panel {
        padding: 30px 20px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .auth-form-container {
        max-width: 100%;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .qubex-logo-wrapper {
        min-height: 80px;
    }

    .qubex-logo {
        max-width: 180px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .alert-microsoft {
        margin-bottom: 20px;
    }

    .btn-login,
    .btn-microsoft {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .divider-or {
        margin: 20px 0;
    }

    .form-footer {
        margin-top: 20px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE PEQUENO (480px)
   ============================================ */

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 24px 16px;
        padding-top: 32px;
    }

    .form-header {
        margin-bottom: 20px;
    }

    .qubex-logo-wrapper {
        min-height: 70px;
    }

    .qubex-logo {
        max-width: 160px;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 1.1rem;
    }

    .alert-microsoft {
        padding: 12px 14px;
        margin-bottom: 18px;
    }

    .alert-text {
        font-size: 0.8rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .form-control {
        font-size: 0.9rem;
        padding: 10px 10px;
    }

    .btn-login,
    .btn-microsoft {
        padding: 11px 12px;
        font-size: 0.85rem;
    }

    .form-check-label {
        font-size: 0.85rem;
    }
}
