* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}
.oculto { display: none; }
.tela { padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1 { font-size: 20px; margin: 0 0 16px; }
header h1 { margin: 0; }
.caixa {
    max-width: 360px;
    margin: 10vh auto 0;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
label { font-size: 13px; margin-top: 8px; }
input {
    padding: 10px;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
    font-size: 15px;
}
button {
    margin-top: 16px;
    padding: 10px 16px;
    border: 0;
    border-radius: 4px;
    background: #f0a500;
    color: #1f2933;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
button:disabled { opacity: .6; cursor: default; }
header button { margin-top: 0; }
.aviso { min-height: 18px; font-size: 13px; color: #b23c17; margin: 8px 0 0; }
#tabelaKits { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; background: #fff; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e4e7eb; text-align: left; white-space: nowrap; }
th { background: #e4e7eb; font-weight: 600; }

/* ===========================================================================
   Fatia 2 — base compartilhada replicada de frontend/css/app.css.
   Replicada, não importada: os dois apps são independentes de propósito.
   Só ~15 das 1.132 linhas do CSS elétrico são exclusivas do solar (o kanban do
   funil) -- copiar só elas entregaria as três telas quebradas.
   =========================================================================== */

:root {
    --app-primary: #FFD700;
    --app-secondary: #111;
    --app-bg: #f4f6f8;
    --card-bg: #ffffff;
    --app-text: #333333;
    --input-bg: #ffffff;
    --input-border: #dddddd;
    --success: #00C853;
    --danger: #ff4757;
    --info: #00d2d3;
    --warning: #ff9f43;
}

/* --- Abas --- */
.tab-pane { display: none; animation: fadeIn 0.3s forwards; width: 100%; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }

/* --- Cartões e formulários --- */
.card { background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); color: var(--app-text); }
.form-group { margin-bottom: 15px; }
.form-label { font-size: 12px; font-weight: bold; color: var(--app-text); opacity: 0.8; display: block; margin-bottom: 5px; }
.form-control { width: 100%; padding: 10px; border: 1px solid var(--input-border); border-radius: 5px; background: var(--input-bg); color: var(--app-text); }

/* --- Botões --- */
.btn { width: 100%; padding: 12px; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; text-transform: uppercase; margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--app-primary); color: #000; }
.btn-dark { background: var(--app-secondary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 10px; width: auto; display: inline-flex; }

/* --- Cabeçalhos de seção --- */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calc-section-title { display: flex; align-items: center; gap: 10px; margin: 25px 0 15px; padding-bottom: 8px; border-bottom: 2px solid var(--input-border); }
.calc-section-title:first-of-type { margin-top: 0; }
.calc-section-title .calc-section-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; flex-shrink: 0; }
.calc-section-title h4 { font-size: 13px; font-weight: 700; font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; margin: 0; }
.calc-section-title span { font-size: 10px; opacity: 0.5; }

/* --- Loader --- */
.loader { border: 4px solid #f3f3f3; border-top: 4px solid var(--app-primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; display: none; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Kanban do funil (as ~15 linhas exclusivas do solar) --- */
.kanban-board { display:flex; gap:12px; overflow-x:auto; padding-bottom:12px; min-height:400px; }
.kanban-column { min-width:260px; max-width:300px; flex-shrink:0; background:var(--card-bg); border:1px solid var(--input-border); border-radius:10px; display:flex; flex-direction:column; }
.kanban-column-header { padding:12px 14px 8px; font-family:'Montserrat',sans-serif; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; display:flex; justify-content:space-between; align-items:center; opacity:0.7; }
.kanban-column-header .badge { font-size:9px; padding:2px 7px; border-radius:10px; background:rgba(255,255,255,0.08); min-width:18px; text-align:center; }
.kanban-column-body { flex:1; padding:6px 8px 8px; overflow-y:auto; max-height:calc(100vh - 300px); min-height:100px; }
.kanban-card { background:var(--input-bg); border:1px solid var(--input-border); border-radius:8px; padding:10px 12px; margin-bottom:8px; border-left:3px solid var(--input-border); transition:box-shadow 0.15s, transform 0.1s; }
.kanban-card:hover { box-shadow:0 2px 8px rgba(0,0,0,0.3); transform:translateY(-1px); }
.kanban-card .card-title { font-size:12px; font-weight:600; margin-bottom:6px; line-height:1.3; }
.kanban-card .card-meta { display:flex; gap:5px; flex-wrap:wrap; align-items:center; }
.kanban-card .card-meta .badge { font-size:9px; padding:1px 6px; border-radius:6px; background:rgba(0,0,0,0.06); }
.kanban-card .card-deadline { font-size:9px; opacity:0.5; margin-top:4px; }
.kanban-card .card-deadline.overdue { color:var(--danger); opacity:1; }

/* --- Navegação própria do app solar (não existe equivalente no elétrico:
       lá as abas moram na barra inferior do app inteiro). --- */
.nav-solar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.nav-solar button { margin-top: 0; padding: 9px 14px; background: var(--card-bg); color: var(--app-text); border: 1px solid var(--input-border); font-weight: 600; font-size: 13px; }
.nav-solar button.ativo { background: var(--app-primary); border-color: var(--app-primary); }
