@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Paleta Premium Stealth Tech */
    --bg-main: #090b11;
    --panel-bg: #111420;
    --panel-card: #161b2c;
    --input-bg: #0d0f17;
    
    /* Linhas de Grade e Bordas Cirúrgicas */
    --border-main: #22293f;
    --border-light: #2c3550;
    
    /* Tipografia de Contraste */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Indicadores de Status Limpos */
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --success: #10b981;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --info-cyan: #06b6d4;
    
    --radius-lg: 12px;
    --radius-md: 8px;
    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* =====================================================
   PORTAL DE LOGIN MINIMALISTA (VERÇÃO FINAL)
   ===================================================== */
.page-shell {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
}

.login-wrapper {
    max-width: 420px; /* Ajustado levemente para uma proporção mais imponente */
    width: 100%;
    background: var(--panel-bg);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.login-wrapper h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 32px; /* Mais espaço de respiro abaixo do título principal */
    text-align: center;
}

/* 🌟 CORREÇÃO DE ESPAÇAMENTO COMPACTO (image_c22676.png) */
.login-wrapper .form-group {
    margin-bottom: 24px; /* Separa o bloco do E-mail do bloco da Senha */
}

.login-wrapper label {
    margin-bottom: 4px; /* ✨ Ajustado de 8px para 4px: Colado ao campo correspondente */
    display: block;
}

/* 🌟 CORREÇÃO DO BOTÃO ENCOLHIDO */
.login-wrapper .btn-submit {
    width: 100% !important; /* Força o botão a expandir preenchendo o card elegantemente */
    display: block !important;
    padding: 14px !important;
    margin-top: 32px; /* Cria um recuo limpo entre o campo de senha e a ação de entrada */
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.login-wrapper .btn-submit:hover {
    background: var(--accent-hover);
}

/* =====================================================
   ESTRUTURA COMPACTA DO PAINEL (DASHBOARD)
   ===================================================== */
.dashboard-wrapper {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-main);
    padding-bottom: 28px;
    margin-bottom: 32px;
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.btn-logout {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-main);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 14px;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: rgba(244, 63, 94, 0.08);
    border-color: var(--danger);
    color: var(--danger);
}

/* HUD Superior Metrificado */
.status-chips {
    display: flex;
    gap: 12px;
}

.chip {
    background: var(--panel-bg);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chip-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.chip.ativos {
    border-left: 3px solid var(--info-cyan);
}

.chip.concluidos {
    border-left: 3px solid var(--text-muted);
}

/* Botão Backup Geral */
button[onclick="exportarTudoEmZip()"] {
    background: var(--accent) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: var(--radius-md) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: var(--transition-smooth) !important;
}

button[onclick="exportarTudoEmZip()"]:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
}

/* =====================================================
   BARRA DE FILTROS TÉCNICOS
   ===================================================== */
.filtros-admin {
    background: var(--panel-bg);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 1fr 200px 200px auto;
    gap: 16px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

input, select, textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-main);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: var(--transition-smooth);
}

input::placeholder {
    color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

select option {
    background: var(--panel-bg);
}

.btn-submit {
    background: var(--accent);
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.btn-submit:hover {
    background: var(--accent-hover);
}

.btn-limpar-filtros {
    height: 43px;
    padding: 0 16px;
    background: transparent;
    border: 1px solid var(--border-main);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-limpar-filtros:hover {
    background: var(--border-main);
    color: var(--text-primary);
}

/* =====================================================
   MATRIZ DE CARDS EXECUTIVOS
   ===================================================== */
h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
}

.request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

.request-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition-smooth);
}

.request-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.employee-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--panel-card);
    border: 1px solid var(--border-main);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.employee-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.request-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* Badges Sóbrias */
.badge-tipo {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    width: fit-content;
}

.badge-pessoal {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-empresa {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info-cyan);
}

/* Tabela Consolar de Dados */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: var(--panel-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.specs-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-main);
    color: var(--text-secondary);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table td strong {
    color: var(--text-primary);
    font-weight: 500;
}

.pessoal-info-box {
    background: var(--panel-card);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary);
    border-left: 2px solid var(--warning);
}

/* Botões Funcionais Operacionais */
.btn-download-file {
    background: var(--panel-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-main) !important;
    margin-top: 4px;
    width: 100%;
    padding: 10px !important;
    font-size: 11px !important;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-download-file:hover {
    background: var(--border-main) !important;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border-main);
}

.btn-action {
    flex: 1;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: transparent;
    transition: var(--transition-smooth);
}

.btn-edit {
    border: 1px solid var(--border-main);
    color: var(--text-secondary);
}

.btn-edit:hover {
    background: var(--panel-card);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-archive {
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #fca5a5;
}

.btn-archive:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Seção do Histórico */
.archived-card {
    background: rgba(17, 20, 32, 0.5);
    opacity: 0.65;
}

.archived-time {
    font-size: 11px;
    color: var(--warning);
    margin-top: 4px;
}

/* =====================================================
   MODAL TÉCNICO CLEAN
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 7, 12, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

textarea#editRelatorioRaw {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background-color: var(--input-bg);
    color: #38bdf8;
    line-height: 1.5;
}

/* =====================================================
   LANDING PAGE DO COLABORADOR (INDEX.html)
   ===================================================== */
.page {
    width: 100%;
    max-width: 1000px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.hero-card, .info-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 4px;
    background: var(--panel-card);
    border: 1px solid var(--border-main);
    color: var(--info-cyan);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.download-box {
    background: var(--panel-card);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 24px;
}

.download-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.download-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.btn-download {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    background: var(--accent);
    color: white;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-download:hover {
    background: var(--accent-hover);
}

.info-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--panel-card);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-md);
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--border-main);
    color: var(--text-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.step strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.step p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notice {
    margin-top: 16px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 12px;
    border-radius: var(--radius-md);
}

/* Scannability Grid */
.specs-table { table-layout: fixed; }
.specs-table td:first-child { width: 85px; }

@media (max-width: 850px) {
    body { padding: 20px 16px; }
    .page, .filtros-admin { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; gap: 16px; }
}