:root {
    --bg: #F7F6F3;
    --surface: #FFFFFF;
    --surface2: #F2F1EE;
    --border: #E4E2DC;
    --border2: #D5D3CC;
    --text: #1A1916;
    --text2: #6B6860;
    --text3: #9E9C97;
    --accent: #1C5FA3;
    --accent2: #E8F0FB;
    --accent-light: #EEF4FD;
    --green: #1A7F5A;
    --green-bg: #E8F5EF;
    --amber: #B45309;
    --amber-bg: #FEF3C7;
    --red: #B91C1C;
    --red-bg: #FEE2E2;
    --purple: #6D28D9;
    --purple-bg: #EDE9FE;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
    --radius: 12px;
    --radius-sm: 8px;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
  }

  /* ── TOP BAR ── */
  .topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
  }

  .topbar-left { display: flex; align-items: center; gap: 16px; }

  .back-btn {
    display: flex; align-items: center; gap: 6px;
    color: var(--text2); font-size: 13px; font-weight: 500;
    text-decoration: none; padding: 6px 12px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); transition: all 0.15s;
    cursor: pointer;
  }
  .back-btn:hover { background: var(--surface2); color: var(--text); }
  .back-btn svg { width:14px; height:14px; }

  .brand { display: flex; align-items: center; gap: 8px; }
  .brand-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
  .brand-name {
    font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif;
    font-size: 16px; font-weight: 700; color: var(--text);
    letter-spacing: -0.3px;
  }
  .brand-sub { font-size: 12px; color: var(--text3); font-weight: 400; }

  .topbar-right { display: flex; align-items: center; gap: 12px; }

  .date-badge {
    font-family: 'Source Code Pro', Consolas, 'Courier New', monospace;
    font-size: 12px; color: var(--text2);
    background: var(--surface2); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 20px;
  }

  /* ── IMPORT ZONE ── */
  .import-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap;
  }

  .import-label { font-size: 13px; font-weight: 500; color: var(--text2); white-space: nowrap; }

  .import-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--accent); color: white;
    border: none; border-radius: 8px; padding: 9px 18px;
    font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(28,95,163,0.25);
  }
  .import-btn:hover { background: #174d8a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(28,95,163,0.30); }
  .import-btn svg { width: 15px; height: 15px; }

  .btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
  .btn-outline:hover { background: var(--surface2); color: var(--text); box-shadow: none; }

  #fileInput { display: none; }

  .import-status {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--green); font-weight: 500;
    background: var(--green-bg); border: 1px solid #BBE8D4;
    padding: 6px 12px; border-radius: 20px; display: none;
  }
  .import-status.show { display: flex; }
  .import-status-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .last-update { font-size: 12px; color: var(--text3); font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; }

  /* ── FILTERS ── */
  .filters-bar {
    padding: 14px 28px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
  }

  .filter-label { font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-right: 4px; }

  .filter-select {
    font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif;
    font-size: 13px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border2);
    border-radius: 8px; padding: 7px 30px 7px 10px;
    cursor: pointer; outline: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239E9C97' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: border-color 0.15s;
  }
  .filter-select:focus { border-color: var(--accent); }

  /* ── MAIN LAYOUT ── */
  .main { padding: 24px 28px; max-width: 1600px; margin: 0 auto; }

  /* Melhorias do Empty State */
  .empty-state {
    text-align: center; padding: 100px 20px;
    background: var(--surface); 
    border: 2px dashed var(--border2);
    border-radius: var(--radius); 
    margin-bottom: 24px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .empty-state:hover {
    border-color: var(--accent);
    background: var(--accent-light);
  }

  .empty-state-icon {
    width: 64px; height: 64px; 
    background: var(--accent2);
    color: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
  }

  .empty-state-icon svg { width: 32px; height: 32px; margin-bottom: 0; }
  
  .empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
  .empty-state p { font-size: 14px; color: var(--text2); max-width: 500px; margin-bottom: 24px; }
  
  .center-btn { margin: 0 auto 16px auto; padding: 12px 24px; font-size: 14px; }
  
  .empty-formats { font-size: 12px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

  /* ── KPI CARDS (Responsividade Inteligente) ── */
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px; margin-bottom: 24px;
  }

  .kpi-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px;
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
  }
  .kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
  .kpi-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--accent);
  }
  .kpi-card.green::before  { background: var(--green); }
  .kpi-card.amber::before  { background: #F59E0B; }
  .kpi-card.red::before    { background: var(--red); }
  .kpi-card.purple::before { background: var(--purple); }

  .kpi-label { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpi-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 3px; font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif; white-space: nowrap; }
  .kpi-sub   { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpi-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 2px 8px;
    border-radius: 20px; margin-top: 6px;
  }
  .badge-green { background: var(--green-bg); color: var(--green); }
  .badge-amber { background: var(--amber-bg); color: var(--amber); }
  .badge-red { background: var(--red-bg); color: var(--red); }
  .badge-blue { background: var(--accent2); color: var(--accent); }

  /* ── SECTION TITLE ── */
  .section-title {
    font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif;
    font-size: 17px; font-weight: 700; color: var(--text);
    margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
  }
  .section-title::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }

  /* ── TWO COL LAYOUT ── */
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
  .three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 24px; }

  @media (max-width: 1100px) { .three-col { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 900px) { .two-col, .three-col { grid-template-columns: 1fr; } }

  /* ── CARD ── */
  .card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  .card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .card-title { font-size: 13px; font-weight: 700; color: var(--text); }
  .card-count { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-size: 12px; color: var(--text3); }
  .card-body { padding: 20px; }

  /* ── STATUS BARS ── */
  .status-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .status-row:last-child { margin-bottom: 0; }
  .status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .status-name { font-size: 13px; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .status-bar-wrap { flex: 2; background: var(--surface2); border-radius: 4px; height: 8px; overflow: hidden; }
  .status-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
  .status-num { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-size: 12px; font-weight: 600; color: var(--text2); min-width: 28px; text-align: right; }
  .status-pct { font-size: 11px; color: var(--text3); min-width: 36px; text-align: right; }

  /* Status colors */
  .s-concluida    { background: #3B82F6; }   
  .s-iniciada     { background: #22C55E; }   
  .s-rota         { background: #8B5CF6; }   
  .s-naoiniciada  { background: #EAB308; }   
  .s-naoconcluida { background: #06B6D4; }   
  .s-cancelada    { background: #D1D5DB; }   
  .dot-concluida    { background: #3B82F6; }
  .dot-iniciada     { background: #22C55E; }
  .dot-rota         { background: #8B5CF6; }
  .dot-naoiniciada  { background: #EAB308; }
  .dot-naoconcluida { background: #06B6D4; }
  .dot-cancelada    { background: #D1D5DB; }

  /* ── TECNICO TABLE ── */
  .tec-table { width: 100%; border-collapse: collapse; }
  .tec-table th {
    text-align: left; font-size: 11px; font-weight: 600;
    color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px;
    padding: 10px 12px; border-bottom: 1px solid var(--border);
    background: var(--surface2); 
    position: sticky; 
    top: 0;
    z-index: 10; /* ✨ A MÁGICA ACONTECE AQUI ✨ */
  }
  .tec-table td {
    padding: 9px 12px; border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--text);
  }
  .tec-table tr:last-child td { border-bottom: none; }
  .tec-table tr:hover td { background: var(--accent-light); }
  .tec-table td.mono { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-size: 12px; }
  .tec-table td.center { text-align: center; }

  .tec-name { font-weight: 500; }

  .bar-mini { display: flex; gap: 2px; min-width: 80px; align-items: center; }
  .bar-seg  { height: 14px; border-radius: 3px; min-width: 4px; flex-shrink: 0; position: relative; }

  .table-wrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
  .table-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
  .table-wrap::-webkit-scrollbar-track { background: transparent; }
  .table-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

  /* ── TIMESLOT (Card Interativo) ── */
  .ts-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
  @media (max-width: 900px) { .ts-grid { grid-template-columns: repeat(2, 1fr); } }

  .ts-card {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 10px; padding: 14px; position: relative; overflow: hidden;
    cursor: pointer; transition: transform 0.15s, border-color 0.15s;
  }
  .ts-card:hover { transform: translateY(-3px); border-color: var(--accent); }
  .ts-time { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-size: 11px; font-weight: 500; color: var(--accent); margin-bottom: 8px; }
  .ts-big { font-size: 26px; font-weight: 700; font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif; color: var(--text); line-height: 1; }
  .ts-label { font-size: 11px; color: var(--text3); margin-top: 3px; }
  .ts-row { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; }
  .ts-ok { color: var(--green); font-weight: 600; }
  .ts-loss { color: var(--red); font-weight: 600; }

  /* ── ATIVIDADE TYPE ── */
  .ativ-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .ativ-row:last-child { border-bottom: none; }
  .ativ-class {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 7px; border-radius: 4px; flex-shrink: 0;
  }
  .class-INST { background: #DBEAFE; color: #1D4ED8; }
  .class-REP { background: #FCE7F3; color: #BE185D; }
  .class-SERV { background: #D1FAE5; color: #065F46; }
  .class-ME { background: #FEF3C7; color: #92400E; }

  .ativ-name { font-size: 12px; color: var(--text); flex: 1; }
  .ativ-count { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-size: 12px; font-weight: 600; color: var(--text2); }
  .ativ-pts { font-size: 11px; color: var(--text3); }


  /* ── ZONE TABLE ── */
  .zona-table { width:100%; border-collapse:collapse; }
  .zona-table th {
    text-align:left; font-size:11px; font-weight:700; color:var(--text3);
    text-transform:uppercase; letter-spacing:0.4px;
    padding:9px 14px; border-bottom:1px solid var(--border);
    background:var(--surface2); white-space:nowrap;
  }
  .zona-table th.right { text-align:center; }
  .zona-table td { padding:9px 14px; border-bottom:1px solid var(--border); font-size:13px; }
  .zona-table tr:last-child td { border-bottom:none; }
  .zona-table tr:hover td { background:var(--accent-light); }
  .zona-table td.right { text-align:center; font-family:'Source Code Pro',Consolas,'Courier New',monospace; font-size:12px; }
  .zona-name-cell { font-weight:600; color:var(--text); }
  .zona-pct-bar { display:flex; align-items:center; gap:8px; }
  .zona-mini-bar { flex:1; height:6px; background:var(--surface2); border-radius:3px; overflow:hidden; min-width:60px; }
  .zona-mini-fill { height:100%; border-radius:3px; background:var(--accent); }
  .zona-pct-txt { font-family:'Source Code Pro',Consolas,'Courier New',monospace; font-size:11px; color:var(--text3); min-width:34px; text-align:right; }
  .cls-tag { display:inline-block; font-size:10px; font-weight:700; padding:1px 6px; border-radius:4px; margin:1px; }
  .cls-INST { background:#DBEAFE; color:#1D4ED8; }
  .cls-ME   { background:#FEF3C7; color:#92400E; }
  .cls-SERV { background:#D1FAE5; color:#065F46; }
  .cls-REP  { background:#FCE7F3; color:#BE185D; }

  /* ── BAREMO PROJ ── */
  .baremo-box {
    background: linear-gradient(135deg, var(--accent) 0%, #1749b1 100%);
    border-radius: 10px; padding: 20px; color: white; margin-bottom: 14px;
  }
  .baremo-main { font-size: 42px; font-family: 'Nunito Sans', Calibri, 'Trebuchet MS', Arial, sans-serif; font-weight: 700; line-height: 1; }
  .baremo-lbl { font-size: 12px; opacity: 0.75; margin-top: 4px; }
  .baremo-row { display: flex; gap: 20px; margin-top: 14px; }
  .baremo-item { text-align: center; }
  .baremo-item .n { font-size: 20px; font-weight: 700; font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; }
  .baremo-item .l { font-size: 11px; opacity: 0.7; }
  .proj-bar-wrap { background: rgba(255,255,255,0.2); border-radius: 6px; height: 10px; margin-top: 14px; overflow: hidden; }
  .proj-bar-fill { background: white; height: 100%; border-radius: 6px; transition: width 0.6s ease; }

  /* ── DEFEITO DETAIL ── */
  .def-tag { display: inline-flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; margin: 4px; font-size: 12px; color: var(--text); }
  .def-tag span { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-weight: 600; color: var(--accent); font-size: 11px; }

  /* ── ARMARIO ── */
  .arm-badge { font-family: 'Source Code Pro', Consolas, 'Courier New', monospace; font-size: 11px; background: var(--accent2); color: var(--accent); padding: 3px 8px; border-radius: 4px; margin: 3px; display: inline-block; }

  /* ── SCROLLABLE LIST ── */
  .scroll-list { max-height: 280px; overflow-y: auto; }
  .scroll-list::-webkit-scrollbar { width: 3px; }
  .scroll-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

  /* ── META BAREMO ── */
  .meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
  @media (max-width: 700px) { .meta-grid { grid-template-columns: repeat(2,1fr); } }
  .meta-card {
    border-radius: 8px; padding: 10px 14px;
    display: flex; align-items: center; gap: 10px;
    border: 1px solid transparent;
  }
  .meta-card.diamante { background: #EEF4FD; border-color: #BFDBFE; }
  .meta-card.ouro     { background: #FFFBEB; border-color: #FDE68A; }
  .meta-card.prata    { background: #F9FAFB; border-color: #D1D5DB; }
  .meta-card.abaixo   { background: #FEF2F2; border-color: #FECACA; }
  .meta-medal { font-size: 18px; flex-shrink: 0; line-height: 1; }
  .meta-info  { flex: 1; min-width: 0; }
  .meta-name  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); line-height: 1; margin-bottom: 2px; }
  .meta-val   { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.2; }
  .meta-sub   { font-size: 10px; color: var(--text3); margin-top: 1px; }
  .meta-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }
  .badge-diamante { background: #BFDBFE; color: #1D4ED8; }
  .badge-ouro     { background: #FDE68A; color: #92400E; }
  .badge-prata    { background: #E5E7EB; color: #374151; }
  .badge-abaixo   { background: #FEE2E2; color: #B91C1C; }

  /* ── LINHAS CARDS ── */
  .linhas-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
  @media (max-width: 900px) { .linhas-grid { grid-template-columns: repeat(2,1fr); } }
  .linhas-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; text-align: center; }
  .linhas-card .lc-n { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
  .linhas-card .lc-l { font-size: 11px; color: var(--text3); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
  .linhas-card.lc-conc  { border-top: 3px solid #3B82F6; }  
  .linhas-card.lc-inic  { border-top: 3px solid #22C55E; }  
  .linhas-card.lc-ninit { border-top: 3px solid #EAB308; }  
  .linhas-card.lc-nconcl{ border-top: 3px solid #06B6D4; }  
  .linhas-proj { background: linear-gradient(135deg,#1C5FA3,#1749b1); border-radius: 10px; padding: 14px 16px; color:white; text-align:center; }
  .linhas-proj .lc-n { font-size: 28px; font-weight: 800; line-height:1; }
  .linhas-proj .lc-l { font-size: 11px; opacity:0.75; margin-top:4px; font-weight:600; text-transform:uppercase; letter-spacing:0.4px; }

  /* ── SUPERVISOR ── */
  .sup-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .sup-tab { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text2); transition: all 0.15s; }
  .sup-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
  .sup-tab:hover:not(.active) { background: var(--surface2); }
  .sup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
  .sup-header { padding: 14px 20px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .sup-name-big { font-size: 14px; font-weight: 700; color: var(--text); }
  .sup-kpis { display: flex; gap: 20px; flex-wrap: wrap; }
  .sup-kpi { text-align: center; }
  .sup-kpi .n { font-size: 18px; font-weight: 800; color: var(--text); }
  .sup-kpi .l { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; }

  /* LOADING */
  .loading-overlay {
    position: fixed; inset: 0; background: rgba(247,246,243,0.85);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; backdrop-filter: blur(3px);
  }
  .loading-overlay.show { display: flex; }
  .loading-spinner {
    width: 40px; height: 40px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin 0.7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* PRAZO badges in table */
  .prazo-ok { color: var(--green); font-size: 11px; font-weight: 600; }
  .prazo-lost { color: var(--red); font-size: 11px; font-weight: 600; }
  .prazo-pending { color: var(--amber); font-size: 11px; font-weight: 600; }
  .prazo-na { color: var(--text3); font-size: 11px; }

  /* Árvore config tags */
  .config-tag { font-size: 11px; background: var(--purple-bg); color: var(--purple); border-radius: 4px; padding: 2px 7px; display: inline-block; margin: 2px; font-weight: 500; }

  /* ── TECH HEADER ── */
  .avatar {
    width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: white; flex-shrink: 0;
    margin-right: 8px;
  }

  /* Garante o cursor e transição suave */
  #emptyState {
    cursor: pointer;
    transition: all 0.2s ease, transform 0.2s ease;
  }

  /* Efeito de destaque quando o arquivo é arrastado por cima */
  #emptyState.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(28,95,163,0.15);
  }

  /* Cores Padrão Zeus e Customizadas */
  .kpi-card.zeus-blue { border-top: 4px solid #3B82F6; color: #3B82F6; }
  .kpi-card.zeus-green { border-top: 4px solid #22C55E; color: #22C55E; }
  .kpi-card.zeus-yellow { border-top: 4px solid #EAB308; color: #EAB308; }
  .kpi-card.zeus-cyan { border-top: 4px solid #06B6D4; color: #06B6D4; }
  .kpi-card.zeus-gray { border-top: 4px solid #9CA3AF; color: #9CA3AF; }
  .kpi-card.maroon { border-top: 4px solid rgb(88, 0, 0); color: rgb(88, 0, 0); }
  
  /* Ajuste para que o valor acompanhe a cor do card */
  .kpi-card.zeus-blue .kpi-value, .kpi-card.zeus-green .kpi-value, 
  .kpi-card.zeus-yellow .kpi-value, .kpi-card.zeus-cyan .kpi-value, 
  .kpi-card.zeus-gray .kpi-value, .kpi-card.maroon .kpi-value {
    color: inherit;
  }