:root {
  --bg: #0a0e14; --panel: #121a25; --panel-2: #172230;
  --line: #1f2d3d; --line-2: #2b3d52; --txt: #e2ebf5; --dim: #7d92a8; --dim-2: #56697e;
  --brand: #3d9bff; --pos: #35d6a4; --neu: #6d829a; --neg: #ff5d5d; --warn: #ffa13d;
  --mono: 'JetBrains Mono', ui-monospace, monospace; --sans: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--txt); font-family: var(--sans); font-size: 14px; line-height: 1.5; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: .7rem; }
.ico { font-size: 1.6rem; }
h1 { font-size: 1.05rem; margin: 0; font-weight: 800; }
.topbar p { margin: 0; font-size: .72rem; color: var(--dim); }
.back { color: var(--dim); text-decoration: none; font-size: .82rem; }
.back:hover { color: var(--brand); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }

.launchers { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; margin-bottom: 1.6rem; }
.launch { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--txt);
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2);
  border-radius: 12px; padding: .7rem .85rem; transition: .12s; }
.launch:hover { border-color: var(--brand); transform: translateY(-2px); }
.launch span { font-size: 1.4rem; }
.launch b { font-size: .84rem; display: block; }
.launch small { font-size: .68rem; color: var(--dim); }

.dir-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.dir-head h2 { font-size: 1.15rem; margin: 0; font-weight: 800; }
.count { font-size: .8rem; color: var(--dim); font-family: var(--mono); }

.controls { display: flex; gap: .7rem; margin-bottom: .9rem; flex-wrap: wrap; }
.controls input { flex: 1; min-width: 220px; background: var(--panel); border: 1px solid var(--line-2);
  color: var(--txt); font-family: var(--sans); font-size: .9rem; padding: .65rem .9rem; border-radius: 9px; outline: none; }
.controls input:focus { border-color: var(--brand); }
.controls select { background: var(--panel); border: 1px solid var(--line-2); color: var(--txt);
  font-family: var(--sans); font-size: .85rem; padding: .65rem .7rem; border-radius: 9px; cursor: pointer; max-width: 320px; }

.have { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.have-lbl { font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-family: var(--sans); font-size: .76rem; cursor: pointer; color: var(--dim);
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: .3rem .7rem; transition: .12s; }
.chip:hover { color: var(--txt); border-color: var(--line-2); }
.chip.on { color: #041423; background: var(--brand); border-color: var(--brand); font-weight: 700; }
.chip em { font-style: normal; opacity: .6; margin-left: .3rem; font-size: .68rem; }

.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.src { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--txt);
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: .85rem .95rem; transition: .12s; }
.src:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 10px 24px -14px #000; }
.src-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.src-cat { font-size: .64rem; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esf { font-size: .58rem; font-weight: 700; padding: .1rem .4rem; border-radius: 5px; text-transform: uppercase; white-space: nowrap;
  color: var(--dim); background: var(--panel-2); border: 1px solid var(--line-2); }
.esf.federal { color: var(--pos); } .esf.estadual { color: var(--warn); } .esf.municipal { color: #6ee7ff; }
.src-name { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.src-desc { font-size: .78rem; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src-io { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .1rem; }
.io-grp { font-size: .66rem; color: var(--dim-2); display: inline-flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.io { font-size: .62rem; padding: .08rem .4rem; border-radius: 5px; }
.io.in { color: var(--warn); background: rgba(255, 161, 61, .12); }
.io.out { color: var(--pos); background: rgba(53, 214, 164, .12); }
.src-url { font-family: var(--mono); font-size: .68rem; color: var(--dim-2); margin-top: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--dim); padding: 2rem; text-align: center; grid-column: 1 / -1; }

.creditos { font-size: .74rem; color: var(--dim-2); margin-top: 1.6rem; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 1rem; }
.creditos a { color: var(--brand); text-decoration: none; }
.creditos b { color: var(--dim); }

@media (max-width: 560px) { .list { grid-template-columns: 1fr; } }
