/* ============================================
   SISTEMAVET - AUTH.CSS
   Estilos para páginas de autenticação
   ============================================ */

:root {
    --primary-color: #3b7ddd;
    --primary-hover: #2c5fbd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gold-color: #e5ac28;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    overflow-x: hidden;
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ============================================
   IMAGEM LATERAL ESQUERDA
   ============================================ */

.login-image {
    position: relative;
    background: url('https://images.unsplash.com/photo-1576201836106-db1758fd1c97?q=80&w=2070') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    overflow: hidden;
}

.login-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 125, 221, 0.95) 0%, rgba(103, 126, 234, 0.9) 100%);
    z-index: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 60%);
    z-index: 2;
}

.login-image-content {
    position: relative;
    z-index: 3;
    color: white;
    max-width: 600px;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.login-image-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: -1px;
}

.login-image-text {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 0.95;
    font-weight: 300;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    animation: fadeInUp 1s ease;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
}

/* ============================================
   CONTEÚDO DO LOGIN (DIREITA)
   ============================================ */

.login-content {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    animation: fadeIn 0.8s ease;
}

.login-logo {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
    display: flex;
    align-items: flex-end; /* alinha pela base */
    gap: 8px;           /* espaço entre logo e texto */
}


.logo-section {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    justify-content: center;
}

.logo-section img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.logo-text {
    font-size: 1.8rem;
    color: var(--gold-color);
    /*font-weight: 600;*/
    line-height: 1;
    /*text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);*/
}

/* ============================================
   FORMULÁRIO
   ============================================ */

.login-form {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 400;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 48px;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 125, 221, 0.15);
    transform: translateY(-1px);
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a8de8 100%);
    color: white;
    border: none;
    font-size: 1.1rem;
    height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    transition: var(--transition);
}

.input-group:focus-within .input-group-text {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

.input-group .form-control {
    border: 1px solid #e0e6ed;
    border-left: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    height: 48px !important;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none !important;
    outline: none;
}

.input-group .form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* Form Check (Remember me) */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    cursor: pointer;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 125, 221, 0.15);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    cursor: pointer;
    user-select: none;
}

/* Forgot Password Link */
.forgot-password {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline !important;
}

/* Submit Button */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a8de8 100%);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(59, 125, 221, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 125, 221, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    border: none;
    animation: slideDown 0.5s ease;
}

.alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    color: #c92a2a;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-left: 4px solid var(--success-color);
}

.alert i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.footer p {
    margin-bottom: 0.25rem;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 991px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-image {
        display: none;
    }
    
    .login-content {
        min-height: 100vh;
    }
}

@media (max-width: 576px) {
    .login-content {
        padding: 2rem 1.5rem;
    }
    
    .login-form {
        max-width: 100%;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .login-image-title {
        font-size: 2rem;
    }
    
    .login-image-text {
        font-size: 1rem;
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}