:root{
    --gold:#F2B60B; --gold-soft:#FFD24D; --navy:#062147; --navy-deep:#03142E;
    --orange:#E15D09; --white:#FDFDFD; --ink:#0A1A2E;
  }
  *{box-sizing:border-box;}
  body{margin:0; font-family:'Work Sans', sans-serif; background:#F4F6F9; color:var(--ink);}
  h1,h2,h3{font-family:'Anton', sans-serif; font-weight:400; text-transform:uppercase; letter-spacing:.5px;}
  header{
    background:var(--navy); padding:14px 24px; display:flex; align-items:center; justify-content:space-between;
    border-bottom:3px solid var(--gold);
  }
  header .logo-badge{background:#FFFDF7; border-radius:8px; padding:5px 12px; display:inline-flex; text-decoration:none; cursor:pointer; transition:filter .15s;}
  header .logo-badge:hover{filter:brightness(0.95);}
  header img{height:32px; display:block;}
  header .title{color:var(--white); font-size:14px; font-weight:700; letter-spacing:1px; text-transform:uppercase;}
  #logout-btn{background:none; border:1px solid rgba(255,255,255,.4); color:var(--white); padding:8px 16px; border-radius:4px; cursor:pointer; font-size:13px; text-transform:uppercase; font-weight:700;}

  .wrap{width:100%; max-width:1600px; margin:0 auto; padding:32px 24px;}

  /* LOGIN */
  #login-screen{
    min-height:100vh; display:flex; align-items:center; justify-content:center;
    background:linear-gradient(160deg, var(--navy-deep), var(--navy));
  }
  .login-box{background:var(--white); border-radius:8px; padding:40px; max-width:360px; width:100%; text-align:center;}
  .login-box .logo-badge{background:#FFFDF7; border-radius:8px; padding:8px 18px; display:inline-flex; margin-bottom:20px; box-shadow:0 2px 10px rgba(0,0,0,.1);}
  .login-box img{height:44px;}
  .login-box h1{font-size:20px; color:var(--navy); margin:0 0 20px;}
  .login-box input{
    width:100%; padding:12px 14px; margin-bottom:14px; border-radius:4px; border:1.5px solid #D9DFE8; font-family:'Work Sans'; font-size:14px;
  }
  .login-box button{
    width:100%; background:var(--orange); color:var(--white); border:none; padding:13px;
    border-radius:4px; font-weight:800; text-transform:uppercase; cursor:pointer; font-size:14px;
  }
  .login-box .erro{color:#C0392B; font-size:13px; margin-top:10px; display:none;}

  /* TABS */
  .tabs{display:flex; gap:8px; margin-bottom:24px; flex-wrap:wrap;}
  .tab-btn{
    background:var(--white); border:1.5px solid #D9DFE8; padding:10px 18px; border-radius:4px;
    font-weight:700; cursor:pointer; font-size:13px; text-transform:uppercase; letter-spacing:.4px;
  }
  .tab-btn.active{background:var(--navy); color:var(--white); border-color:var(--navy);}
  .notificacao-badge{display:inline-flex; align-items:center; justify-content:center; margin-left:8px; padding:4px 8px; border:1px solid #D99E00; border-radius:12px; background:#FFF3C4; color:#765300; font-size:10px; font-weight:800; line-height:1; text-transform:uppercase; letter-spacing:.2px; vertical-align:middle;}
  .notificacao-badge[hidden]{display:none;}
  .tab-btn.active .notificacao-badge{border-color:var(--gold-soft); background:var(--gold-soft); color:var(--navy);}
  .tab-panel{display:none;}
  .tab-panel.active{display:block;}

  .card{background:var(--white); border-radius:8px; padding:24px; margin-bottom:20px; box-shadow:0 1px 4px rgba(0,0,0,.06);}
  #tab-interessados .card{padding:24px 20px;}
  .card h3{font-size:16px; color:var(--navy); margin:0 0 16px; text-transform:none; font-family:'Work Sans'; font-weight:800;}
  .card-intro{color:#5A6B85; font-size:14px; margin:-4px 0 20px;}
  .inscricao-config{display:grid; grid-template-columns:1.15fr .85fr; gap:16px;}
  .inscricao-config .full{grid-column:1 / -1;}
  .inscricao-config label{font-size:12px; font-weight:700; text-transform:uppercase; color:var(--navy); display:block; margin-bottom:5px;}
  .inscricao-config input, .inscricao-config textarea, .inscricao-config select{width:100%; padding:10px 12px; border-radius:4px; border:1.5px solid #D9DFE8; font-family:'Work Sans'; font-size:14px; background:#FBFCFE;}
  .inscricao-opcoes{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; align-content:start;}
  .inscricao-opcoes button{grid-column:1 / -1; background:var(--orange); color:var(--white); border:0; border-radius:4px; padding:12px; font-weight:800; text-transform:uppercase; cursor:pointer;}
  .inscricao-status{color:#52627A; font-size:13px; margin-top:16px; min-height:20px;}
  .inscricao-resultado{margin-top:16px;}
  .inscricao-resumo{background:#F2F6FB; border-left:4px solid var(--navy); color:var(--navy); padding:12px 14px; font-size:13px; font-weight:600; margin-bottom:12px;}
  .inscricao-tabela-scroll{overflow:auto; border:1px solid #E7EBF1; max-height:360px;}
  .inscricao-tabela{min-width:760px;}
  .seletor-integrante{width:100%; min-width:220px; padding:7px 9px; border:1px solid #D9DFE8; border-radius:4px; background:#FBFCFE; color:var(--ink); font:inherit; font-size:13px;}
  .inscricao-badge{padding:3px 8px; border-radius:12px; font-size:11px; font-weight:800; text-transform:uppercase;}
  .inscricao-badge.ok{background:#E3F5E9; color:#1E824C;}
  .inscricao-badge.pendente{background:#FBEAEA; color:#C0392B;}
  .btn-gerar-planilha{margin-top:16px; background:#1E824C; color:#fff; border:0; border-radius:4px; padding:12px 18px; font-weight:800; text-transform:uppercase; cursor:pointer;}
  .btn-gerar-planilha:disabled{background:#AAB5C4; cursor:not-allowed;}

  .resumo-pessoas{margin-bottom:26px;}
  .resumo-cabecalho{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px;}
  .resumo-kicker{color:var(--navy); font-size:12px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;}
  .resumo-atualizacao{color:#7C8AA0; font-size:12px;}
  .resumo-cards{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px;}
  .resumo-card{appearance:none; border:1px solid #D9DFE8; border-left:4px solid var(--orange); border-radius:6px; background:#FFF8F0; padding:16px 18px; text-align:left; cursor:pointer; display:flex; flex-direction:column; align-items:flex-start; transition:border-color .2s, box-shadow .2s, transform .2s;}
  .resumo-card.integrante{border-left-color:#1E824C; background:#F2FAF4;}
  .resumo-card:hover, .resumo-card:focus-visible{border-color:var(--navy); box-shadow:0 3px 10px rgba(6,33,71,.1); transform:translateY(-1px);}
  .resumo-card-label{color:#52627A; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.4px;}
  .resumo-card-valor{color:var(--navy); font-size:30px; line-height:1.1; margin:5px 0 3px;}
  .resumo-card-acao{color:#7C8AA0; font-size:12px;}

  form.upload{display:grid; gap:12px; grid-template-columns:1fr 1fr; margin-bottom:10px;}
  form.upload .full{grid-column:1 / -1;}
  form.upload label{font-size:12px; font-weight:700; text-transform:uppercase; color:var(--navy); display:block; margin-bottom:5px;}
  form.upload input, form.upload select{width:100%; padding:10px 12px; border-radius:4px; border:1.5px solid #D9DFE8; font-family:'Work Sans'; font-size:14px;}
  form.upload button{
    grid-column:1 / -1; background:var(--orange); color:var(--white); border:none; padding:12px;
    border-radius:4px; font-weight:800; text-transform:uppercase; cursor:pointer; font-size:14px;
  }
  .dropzone{
    border:2px dashed #C7D0DE; border-radius:8px; padding:30px 20px; text-align:center;
    cursor:pointer; transition:border-color .2s, background .2s; color:#5A6B85; font-size:14px;
  }
  .dropzone:hover, .dropzone.dragover{border-color:var(--orange); background:#FFF8F0;}
  .dropzone strong{color:var(--navy); display:block; margin-bottom:4px; font-size:15px;}
  .preview-grid{display:flex; flex-wrap:wrap; gap:10px; margin-top:14px;}
  .preview-item{position:relative; width:76px; height:76px;}
  .preview-item img{width:100%; height:100%; object-fit:cover; border-radius:6px; border:1px solid #D9DFE8;}
  .preview-item button{
    position:absolute; top:-7px; right:-7px; width:20px; height:20px; border-radius:50%;
    background:#C0392B; color:#fff; border:none; font-size:12px; line-height:1; cursor:pointer;
  }

  table{width:100%; border-collapse:collapse; font-size:14px;}
  .table-scroll{width:100%; overflow:auto; max-height:calc(100vh - 220px); -webkit-overflow-scrolling:touch; border:1px solid #E7EBF1; border-radius:6px;}
  .interessados-table{min-width:900px; table-layout:fixed;}
  .interessados-table th, .interessados-table td{white-space:nowrap;}
  .interessados-table td{max-width:240px; overflow:hidden; text-overflow:ellipsis;}
  .interessados-table th:nth-child(1), .interessados-table td:nth-child(1){width:240px; min-width:240px; position:sticky; left:0; z-index:2; background:var(--white);}
  .interessados-table th:nth-child(2), .interessados-table td:nth-child(2){width:180px; min-width:180px;}
  .interessados-table th:nth-child(3), .interessados-table td:nth-child(3){width:170px; min-width:170px;}
  .interessados-table th:nth-child(4), .interessados-table td:nth-child(4){width:220px; min-width:220px;}
  .interessados-table th:nth-child(5), .interessados-table td:nth-child(5){width:220px; min-width:220px;}
  .interessados-table th:nth-child(6), .interessados-table td:nth-child(6){width:190px; min-width:190px;}
  .interessados-table thead th{position:sticky; top:0; z-index:3; background:#F4F6F9; box-shadow:0 1px 0 #D9DFE8;}
  .interessados-table thead th:first-child{z-index:4;}
  .interessados-table tbody tr:nth-child(even) td{background:#FAFBFD;}
  .interessados-table tbody tr:nth-child(even) td:first-child{background:#FAFBFD;}
  th, td{text-align:left; padding:13px 10px; border-bottom:1px solid #EEF1F5; vertical-align:middle;}
  th{font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:#7C8AA0;}
  td img{width:56px; height:56px; object-fit:cover; border-radius:4px;}
  .badge{padding:3px 10px; border-radius:12px; font-size:11px; font-weight:800; text-transform:uppercase; border:none; cursor:pointer;}
  .badge.sim{background:#E3F5E9; color:#1E824C;}
  .badge.nao{background:#FBEAEA; color:#C0392B;}
  .toggle-destaque{transition:filter .15s;}
  .toggle-destaque:hover{filter:brightness(0.92);}
  .btn-mini{
    border:none; padding:6px 12px; border-radius:4px; font-size:12px; font-weight:700; cursor:pointer;
    text-transform:uppercase; margin-right:6px;
  }
  .btn-mini.aprovar{background:#1E824C; color:#fff;}
  .btn-mini.excluir{background:#C0392B; color:#fff;}
  .empty-msg{color:#7C8AA0; font-size:14px; padding:14px 0;}

  .status-filtros{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap;}
  .filtro-tab{
    background:var(--white); border:1.5px solid #D9DFE8; padding:7px 16px; border-radius:20px;
    font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.3px; cursor:pointer;
  }
  .filtro-tab.active{background:var(--navy); color:var(--white); border-color:var(--navy);}

  .status-badge{padding:3px 10px; border-radius:12px; font-size:11px; font-weight:800; text-transform:uppercase;}
  .status-badge.interessado{background:#FFF3D6; color:#93650A;}
  .status-badge.integrante{background:#E3F5E9; color:#1E824C;}

  .acoes-col{display:flex; gap:6px; flex-wrap:wrap;}
  .btn-promover-mini{
    border:none; padding:6px 12px; border-radius:4px; font-size:12px; font-weight:700; cursor:pointer;
    text-transform:uppercase; background:#1E5FA8; color:#fff;
  }
  .btn-promover{
    border:none; padding:12px 20px; border-radius:4px; font-size:13px; font-weight:800; cursor:pointer;
    text-transform:uppercase; background:#1E5FA8; color:#fff; margin-top:16px;
  }
  .modal-acoes{display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap;}
  .btn-editar, .btn-salvar, .btn-cancelar, .btn-excluir{
    border:none; padding:10px 16px; border-radius:4px; font-size:12px; font-weight:800; cursor:pointer; text-transform:uppercase;
  }
  .btn-editar, .btn-salvar{background:var(--navy); color:#fff;}
  .btn-cancelar{background:#E7EBF1; color:var(--navy);}
  .btn-excluir{background:#C0392B; color:#fff;}
  .btn-editar:hover, .btn-salvar:hover{background:#0D3B70;}
  .btn-excluir:hover{background:#A93226;}
  .form-editar-interessado{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px 24px; width:100%;}
  .form-editar-interessado > div{min-width:0;}
  .form-editar-interessado label{display:block; color:#7C8AA0; font-size:11px; font-weight:800; text-transform:uppercase; margin-bottom:4px;}
  .form-editar-interessado input, .form-editar-interessado select, .form-editar-interessado textarea{width:100%; padding:9px 10px; border:1px solid #D9DFE8; border-radius:4px; font:inherit; color:var(--ink); background:#FBFCFE;}
  .form-editar-interessado #editar-equipe[readonly]{background:#FFF8E1; border-color:var(--gold); color:var(--navy); font-weight:700; cursor:not-allowed;}
  .form-editar-interessado input:focus, .form-editar-interessado select:focus, .form-editar-interessado textarea:focus{border-color:var(--orange); outline:none; box-shadow:0 0 0 3px rgba(230,91,8,.12);}
  .form-editar-interessado input[readonly]{background:#F4F6F9; color:#52627A; cursor:not-allowed;}
  .acoes-edicao{grid-column:1 / -1; display:flex; justify-content:flex-end; gap:8px; padding-top:4px;}
  .btn-detalhes{background:var(--navy); color:var(--white); border:0; border-radius:4px; padding:8px 12px; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap;}
  .btn-detalhes:hover{background:#0D3B70;}
  .modal-overlay{display:none; position:fixed; inset:0; z-index:100; padding:24px; background:rgba(3,20,46,.64); align-items:center; justify-content:center;}
  .modal-overlay.open{display:flex;}
  .modal-box{position:relative; width:100%; background:var(--white); border:1px solid #D9DFE8; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,.28); padding:30px;}
  .modal-close{position:absolute; top:10px; right:12px; width:32px; height:32px; border:1px solid #D9DFE8; border-radius:4px; background:var(--white); color:var(--navy); font-size:22px; line-height:1; cursor:pointer;}
  .modal-close:hover{background:#F4F6F9; border-color:#AAB8CA;}
  .interessado-modal{max-width:860px; max-height:calc(100vh - 48px); overflow:auto; text-align:left;}
  .interessado-modal h2{margin:0 0 20px; color:var(--navy); font-family:'Work Sans'; font-size:22px; text-transform:none;}
  .interessado-detalhes{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 24px;}
  .interessado-detalhes.editando{display:block;}
  .detalhe-item{border-bottom:1px solid #EEF1F5; padding-bottom:10px; min-width:0;}
  .detalhe-item.full{grid-column:1 / -1;}
  .detalhe-item strong{display:block; color:#7C8AA0; font-size:11px; text-transform:uppercase; margin-bottom:4px;}
  .detalhe-item span{display:block; color:var(--ink); font-size:14px; overflow-wrap:anywhere; white-space:pre-wrap;}
  @media (max-width:700px){
    .wrap{padding:24px 14px;}
    .card{padding:18px 14px;}
    .modal-overlay{padding:12px;}
    .interessado-modal{padding:24px 18px;}
    .interessado-detalhes{grid-template-columns:1fr; gap:12px;}
    .detalhe-item.full{grid-column:auto;}
    .form-editar-interessado{grid-template-columns:1fr;}
    .acoes-edicao{grid-column:auto; flex-wrap:wrap;}
    .resumo-cards{grid-template-columns:1fr;}
    .inscricao-config, .inscricao-opcoes{grid-template-columns:1fr;}
    .inscricao-config .full{grid-column:auto;}
    .inscricao-opcoes button{grid-column:auto;}
  }
