/* ===== Tema UNION (Dark Mode Consistente) ===== */
:root {
  /* Cores da Marca */
  --brand: #e02020;          
  --brand-600: #c21818;
  --brand-700: #991111;

  /* Cores de Fundo (Dark) */
  --bg: #0d0f14;             
  --surface: #12151c;
  --surface-2: #1e2430;      
  
  /* Textos e Bordas (Alto Contraste) */
  --text: #f3f5f9;           
  --muted: #aab3c5;          
  --border: #2a3142;

  /* Badges (Ajustados para leitura no escuro) */
  --badge-ack-bg: rgba(255, 243, 205, 0.15); 
  --badge-ack-tx: #ffdf70;
  --badge-rec-bg: rgba(207, 226, 255, 0.15); 
  --badge-rec-tx: #9ec5fe;
  --badge-done-bg: rgba(209, 231, 221, 0.15); 
  --badge-done-tx: #a3cfbb;
}

/* ===== Estrutura Base ===== */
/* Header + Sidebar */
[data-partial="header"] .header { 
  background: linear-gradient(135deg, #0f131b 0%, #151a24 70%); 
  border-bottom: 1px solid var(--border);
}
.sidebar .brand { letter-spacing: .5px; }

/* ========================================================= */
/* PONTO 1: LATERAL ESQUERDA (Cores arrumadas para ler o texto) */
/* ========================================================= */
.sidebar-menu a.active { 
    background-color: rgba(224, 32, 32, 0.25) !important; 
    color: #ffffff !important; 
    font-weight: 700 !important;
}
.sidebar-menu a:hover { 
    background-color: var(--surface-2) !important; 
    color: #ffffff !important; 
}

/* ========================================================= */
/* PONTO 3 (Parte B): LOGO LÁ NO TOPO (Maior e destacada)    */
/* ========================================================= */
[data-partial="header"] img, .sidebar .brand img, .header img {
    height: 48px !important; 
    width: auto !important;
}

/* ========================================================= */
/* PONTO 2: TÍTULO TOPO (Maior, para "Pedidos de Compra")    */
/* ========================================================= */
.page-header h1 { 
    font-size: 32px !important; 
    font-weight: 800 !important;
    color: #ffffff !important; 
}

/* Botões */
.btn { border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.btn-primary { --btn-bg: var(--brand); --btn-tx: #fff; border: none; }
.btn-primary:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

/* Inputs Escuros com Texto Claro */
.input, select, textarea {
  background: #0f131b; 
  border: 1px solid var(--border); 
  color: var(--text);
  border-radius: 10px; 
  padding: 10px 12px; 
  outline: none;
}
.input::placeholder, textarea::placeholder { color: #7d8798; }
.input:focus, select:focus, textarea:focus { 
  border-color: var(--brand); 
  box-shadow: 0 0 0 3px rgba(224, 32, 32, .15); 
}

/* Tabela e Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; color: var(--text); }
.table th { color: var(--muted); font-weight: 700; }
.table td { color: var(--text); }

/* ===== Modais (Onde estava o maior problema) ===== */
.modal { 
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
}
.modal-header { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.modal-footer { background: var(--surface-2); border-top: 1px solid var(--border); }
.modal h2 { color: var(--text); }
/* Correção das labels invisíveis */
.modal .grid .field label, .label, label { 
  color: var(--muted); 
  font-weight: 600; 
}

/* Modal - Botão adicionar item */
#items-wrap .item-line { align-items: flex-end; }
#items-wrap .item-line .btn { margin-left: 8px; }

/* ===== Timeline de Ações ===== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-item { display: flex; gap: 12px; position: relative; margin: 14px 0; padding-left: 6px; }
.tl-bullet { flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--muted); position: relative; top: 6px; }
.tl-item:before { content: ""; position: absolute; left: 6px; top: -12px; bottom: -12px; width: 2px; background: var(--border); }
.tl-item:first-child:before { top: 12px; } 
.tl-item:last-child:before { bottom: 12px; }
.tl-item.done .tl-bullet { background: var(--badge-done-tx); }

.tl-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; flex: 1; }
.tl-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tl-who { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); color: var(--text); }
.tl-title { font-weight: 700; color: var(--text); } 
.tl-body { color: var(--muted); }
.tl-body .input { min-width: 220px; margin-right: 8px; }
.timeline .btn.btn-small { margin-top: 6px; }

/* ===== Páginas Específicas (Login e Hero) ===== */
.login-hero {
  min-height: 100vh;
  display: grid; place-items: center;
  background: radial-gradient(1200px 500px at 85% 20%, rgba(224,32,32,.15), transparent),
              radial-gradient(1000px 400px at 15% 100%, rgba(224,32,32,.08), transparent),
              #0d0f14;
}
.login-card {
  width: min(420px, 92%); background: var(--surface); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); padding: 24px;
  border: 1px solid var(--border);
}
.login-card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.login-card .logo img { height: 28px; }
.login-card h1 { font-size: 22px; margin: 0 0 18px; color: var(--text); }
.login-card .actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.hero {
  background: radial-gradient(700px 300px at 80% 20%, rgba(224,32,32,.18), transparent),
              linear-gradient(180deg, #0d0f14 0%, #12151c 100%);
  color: #fff; padding: 48px 32px; border-radius: 16px; border: 1px solid var(--border);
}

/* ========================================================= */
/* PONTO 3 (Parte A): LOGO GIGANTE NA INDEX (Página Inicial) */
/* ========================================================= */
.logo-gigante-home {
    height: 90px !important; 
    margin-bottom: 24px !important;
    display: block;
}

.hero h1 { 
    font-size: clamp(38px, 5vw, 56px) !important; 
    font-weight: 800 !important;
    margin-bottom: 12px;
    line-height: 1.1; 
}
.hero p { font-size: clamp(14px, 2vw, 18px); color: #d4d8e1; }
.hero .cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.kpi-grid, .roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 1000px) { .kpi-grid, .roles { grid-template-columns: 1fr; } }
.kpi, .role-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }

/* =========================================================
   AJUSTE ESPECÍFICO: LOGO E TÍTULO DA TELA DE LOGIN
   ========================================================= */
.login-card .logo img {
    height: 65px !important; /* Logo bem maior na tela de login */
    width: auto !important;
}

.login-card h1 {
    font-size: 36px !important; /* Título 'Union Portal' com muito mais destaque */
    font-weight: 800 !important;
    margin-bottom: 24px !important;
}