/* ===== LOGIN PAGE MODERNA - ARMAZÉM CEARENSE ===== */

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

/* Variáveis CSS - Paleta da Landing Page */
:root {
    /* Cores principais baseadas na landing page */
    --primary-blue: #1e40af;        /* Azul principal mais vibrante */
    --secondary-blue: #3b82f6;      /* Azul secundário */
    --accent-orange: #f97316;       /* Laranja de destaque */
    --accent-green: #10b981;        /* Verde de sucesso */
    --accent-purple: #8b5cf6;       /* Roxo para elementos especiais */
    --accent-pink: #ec4899;         /* Rosa para gradientes */
    
    /* Cores neutras */
    --neutral-dark: #0f172a;        /* Cinza escuro */
    --neutral-medium: #334155;      /* Cinza médio */
    --neutral-light: #f8fafc;       /* Cinza claro */
    --white: #ffffff;
    --text-dark: #1f2937;           /* Texto escuro */
    --text-light: #6b7280;          /* Texto claro */
    --text-muted: #9ca3af;          /* Texto suave */
    
    /* Cores de interface - Gradiente azul vibrante como na landing page */
    --background: linear-gradient(135deg, #3b82f6 0%, #1e40af 50%, #1e3a8a 100%);
    --card-bg: rgba(255, 255, 255, 0.98);
    --card-bg-solid: #ffffff;
    --border: rgba(59, 130, 246, 0.2);
    --border-focus: var(--accent-orange);
    --shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.15), 0 10px 10px -5px rgba(30, 64, 175, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(30, 64, 175, 0.25);
    --shadow-xl: 0 35px 60px -12px rgba(30, 64, 175, 0.3);
    
    /* Gradientes baseados na landing page */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-orange) 0%, #ea580c 100%);
    --gradient-success: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    --gradient-background: linear-gradient(135deg, #3b82f6 0%, #1e40af 50%, #1e3a8a 100%);
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background decorativo */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(249, 115, 22, 0.15), rgba(59, 130, 246, 0.1));
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Container Principal */
.login-page {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: transform var(--transition-normal);
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-link:active {
    transform: scale(0.95);
}

.logo-container {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    transition: transform var(--transition-normal);
}

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

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.title-container {
    text-align: left;
    flex: 1;
    min-width: 200px;
}

.login-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

/* Formulário */
.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.form-group label i {
    color: var(--accent-orange);
    width: 16px;
    text-align: center;
}

/* Input Wrapper */
.input-wrapper, .select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input, .select-wrapper select {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    background: var(--white);
    color: var(--text-dark);
    transition: all var(--transition-normal);
    font-weight: 500;
}

.input-wrapper input:focus, .select-wrapper select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
    transform: translateY(-1px);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    font-size: 16px;
    transition: color var(--transition-fast);
    z-index: 2;
}

.input-wrapper:focus-within .input-icon {
    color: var(--accent-orange);
}

/* Select específico */
.select-wrapper select {
    appearance: none;
    cursor: pointer;
    padding-right: 50px;
}

.select-arrow {
    position: absolute;
    right: 18px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: transform var(--transition-fast);
}

.select-wrapper:focus-within .select-arrow {
    transform: rotate(180deg);
    color: var(--accent-orange);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    z-index: 2;
}

.password-toggle:hover {
    color: var(--accent-orange);
    background: rgba(249, 115, 22, 0.1);
}

/* Opções do Formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    position: relative;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all var(--transition-fast);
    background: var(--white);
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: var(--gradient-accent);
    border-color: var(--accent-orange);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-orange);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: 8px 12px;
    border-radius: 8px;
}

.forgot-password:hover {
    color: var(--primary-blue);
    background: rgba(249, 115, 22, 0.1);
    transform: translateY(-1px);
}

/* Botão de Login */
.login-button {
    width: 100%;
    background: var(--gradient-accent);
    color: var(--white);
    border: none;
    padding: 18px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
}

.login-button:active {
    transform: translateY(0);
}

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

.button-text {
    transition: opacity var(--transition-fast);
}

.button-loader {
    position: absolute;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.spinner {
    width: 20px;
    height: 20px;
    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); }
}

.button-icon {
    transition: transform var(--transition-fast);
}

.login-button:hover .button-icon {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
}

.divider {
    position: relative;
    margin: 24px 0;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    background: var(--card-bg-solid);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.login-footer p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.register-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-fast);
    padding: 4px 8px;
    border-radius: 6px;
    border: 2px solid var(--primary-blue);
    background: transparent;
}

.register-link:hover {
    color: var(--white);
    background: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

/* Estados de Erro */
.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

/* Loading State */
.login-button.loading .button-text {
    opacity: 0;
}

.login-button.loading .button-loader {
    opacity: 1;
}

.login-button.loading .button-icon {
    opacity: 0;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        margin: 16px;
        border-radius: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .title-container {
        text-align: center;
        min-width: auto;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .input-wrapper input, .select-wrapper select {
        padding: 14px 18px 14px 46px;
        font-size: 16px;
    }
    
    .login-button {
        padding: 16px 20px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .header-content {
        gap: 12px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .logo {
        width: 55px;
        height: 55px;
    }
}

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

/* Modo Escuro */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: rgba(15, 23, 42, 0.95);
        --card-bg-solid: #0f172a;
        --text-dark: #f1f5f9;
        --text-light: #cbd5e1;
        --text-muted: #94a3b8;
        --border: rgba(148, 163, 184, 0.2);
    }
    
    .login-container {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .input-wrapper input, .select-wrapper select {
        background: rgba(51, 65, 85, 0.5);
        color: var(--text-dark);
        border-color: var(--border);
    }
    
    .checkmark {
        background: rgba(51, 65, 85, 0.5);
    }
}

/* Animações de entrada */
.login-card {
    animation: slideInUp 0.6s ease-out;
}

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

/* Efeito de foco nos inputs */
.form-group:focus-within label {
    color: var(--accent-orange);
}

/* Hover effects */
.form-group:hover label i {
    color: var(--accent-orange);
}

/* Melhorias de acessibilidade */
.login-button:focus,
.input-wrapper input:focus,
.select-wrapper select:focus,
.password-toggle:focus,
.forgot-password:focus,
.register-link:focus,
.logo-link:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* Estados de sucesso */
.form-group input.success,
.form-group select.success {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.success-message {
    color: var(--accent-green);
    font-size: 12px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}