/* Variáveis de Cores (Design System) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
:root {
    --color-bg-dark: #080D2D;
    --color-primary: #1BD2D2; /* Ciano do botão */
    --color-primary-hover: #15b0b0;
    --color-text-light: #ffffff;
    --color-text-muted: #8b95a5;
    --color-border: rgba(255, 255, 255, 0.15);
    --color-brown: #a67c52;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    height: 100vh;
    overflow: hidden; /* Evita barra de rolagem */
}

/* Layout Principal: Grid/Flexbox */
.split-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* LADO ESQUERDO (Formulário) */
.form-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    background-color: var(--color-bg-dark);
}

.bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05; /* Transparência forte para ficar no fundo */
    z-index: -1;
}

.form-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Tipografia */
.serif-title {
    font-size: 2.2rem;
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

/* Formulários */
.input-group {
    margin-bottom: 24px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.forgot-link {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: transparent;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--color-primary);
}

.input-icon {
    width: 18px;
    height: 18px;
    margin-left: 12px;
    stroke: var(--color-text-muted);
}

input {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-eye {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.btn-eye svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Botão Principal */
.btn-primary {
    width: 100%;
    padding: 14px;
    /* Aqui está o gradiente: do cobre mais claro para o mais escuro */
    background: linear-gradient(90deg, #ca9f75 0%, #90663c 100%);
    color: var(--color-bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    opacity: 0.85; /* Dá um leve efeito de clique ao passar o mouse */
}

/* LADO DIREITO (Imagem) */
.image-section {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    display: none; /* Esconde no mobile */
}

/* Gradiente configurado no Canva: Escuro na esquerda, transparente na direita */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--color-bg-dark) 0%, transparent 100%);
}

.brand-logo {
    position: absolute;
    bottom: 40px;
    right: 40px;
    max-width: 200px;
    z-index: 2;
}

/* CONTROLE DE VIEWS (SPA) */
.view-active { display: block; }
.view-hidden { display: none; }

/* MODAIS */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 13, 45, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-backdrop.active {
    display: flex;
}

.modal-box {
    background: #ffffff;
    color: #333;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-bg-dark);
}

.modal-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-input {
    border: 1px solid #ccc;
    margin-bottom: 20px;
}

.modal-input input {
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-solid-brown {
    padding: 10px 20px;
    background: var(--color-brown);
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-outline-blue {
    padding: 10px 30px;
    background: transparent;
    border: 1px solid var(--color-bg-dark);
    color: var(--color-bg-dark);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.text-center { text-align: center; }

/* RESPONSIVIDADE (Desktop) */
@media (min-width: 768px) {
    .image-section {
        display: block; /* Mostra a imagem em telas maiores */
    }
}
/* Estilo do Mockup de Recorte (Cropper) */
#crop-area {
    border: 2px dashed #cbd5e1;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#image-to-crop {
    max-height: 250px;
    border-radius: 4px;
}
/* ========================================= */
/* ESTILO DOS CARTOES DO ORGANOGRAMA         */
/* ========================================= */

.organogram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.organogram-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.organogram-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* Borda dourada elegante no avatar idêntica ao mockup */
.organogram-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c5a059; 
    flex-shrink: 0;
    background-color: #f1f5f9;
}

.organogram-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.organogram-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.organogram-info p.cargo {
    font-size: 0.8rem;
    color: #475569;
    margin: 0 0 3px 0;
    font-weight: 500;
}

.organogram-info p.setor {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}
/* ========================================= */
/* ESTILOS DA PRÉVIA DO CROPPER (MOCKUP)     */
/* ========================================= */
.img-preview {
    overflow: hidden;
}

.img-preview img {
    display: block;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    background: transparent !important; /* Garante que fotos PNG deixem o fundo azul vazar */
}