/* Dracos Cleaner — estilos da página /cleaner. Usa os tokens de /assets/styles.css. */
:root { --ok: #4ADE80; --danger: #F87171; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand-sub { font-size: 14px; font-weight: 400; color: var(--muted-2); letter-spacing: 0; margin-left: -6px; }
code { font-family: var(--font-mono); font-size: .85em; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text); }

/* Hero */
.cl-hero { display: flex; flex-direction: column; gap: 24px; padding-block: clamp(48px, 8vw, 88px) 36px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
.cl-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5.6vw, 68px); line-height: 1.05; letter-spacing: -.03em; max-width: 900px; }
.cl-hero .dim { color: var(--muted-2); }
.cl-hero .lead strong { color: var(--text); font-weight: 600; }

/* Dropzone */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: clamp(32px, 6vw, 56px) 20px; border: 1.5px dashed var(--line-3); border-radius: var(--radius); background: var(--bg-alt); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--surface); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.drop-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); color: var(--accent); margin-bottom: 6px; }
.drop-title { font-weight: 600; font-size: 18px; }
.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.formats span { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 11px; color: var(--muted-2); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; list-style: none; margin: 18px 0 0; padding: 0; }
.badges li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: middle; }

/* Resultados */
.bulk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.results { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.file-card { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.file-card.is-done { border-color: rgba(74, 222, 128, .35); }
.file-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.file-thumb { flex: none; width: 52px; height: 52px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.file-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; }
.file-body:empty { display: none; }

.risk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.chip-risk { background: rgba(251, 191, 36, .12); color: var(--warn); }
.chip-hot { background: rgba(248, 113, 113, .14); color: var(--danger); }

.blocks { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.block + .block { border-top: 1px solid var(--line); }
.block summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; }
.block summary::-webkit-details-marker { display: none; }
.block summary::after { content: '+'; font-family: var(--font-mono); color: var(--muted-2); margin-left: 4px; }
.block details[open] summary::after { content: '−'; }
.block-check { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; flex: 1; min-width: 0; }
.block-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.fields { margin: 0; padding: 4px 14px 14px 42px; display: flex; flex-direction: column; gap: 6px; }
.field { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 14px; }
.field dt { color: var(--muted-2); min-width: 170px; }
.field dd { margin: 0; color: var(--text-2); word-break: break-word; min-width: 0; flex: 1 1 200px; }
.field dd.is-risk { color: var(--warn); }
.kept { margin-top: -4px; }

.note { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.note.bad { background: rgba(248, 113, 113, .1); color: var(--danger); }

.proof { border: 1px solid rgba(74, 222, 128, .25); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.proof[hidden] { display: none; }
.proof-row { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; }
.proof-k { color: var(--muted-2); min-width: 220px; }
.proof-v { font-family: var(--font-mono); color: var(--text-2); word-break: break-all; flex: 1 1 200px; }
.proof-v.ok { color: var(--ok); }
.proof-v.bad { color: var(--danger); }

/* Tabela completa */
.all-meta { border: 1px solid var(--line); border-radius: 10px; }
.all-meta > summary { cursor: pointer; padding: 10px 14px; font-weight: 500; color: var(--accent); }
.all-meta[open] > summary { border-bottom: 1px solid var(--line); }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; }
.table-search { flex: 1 1 220px; min-width: 0; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-3); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.table-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.table-wrap { max-height: 520px; overflow: auto; border-top: 1px solid var(--line); }
.meta-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.meta-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); text-align: left; font-weight: 500; padding: 8px 12px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.meta-table td { padding: 7px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.meta-table td:first-child { color: var(--muted-2); white-space: nowrap; font-size: 12px; }
.meta-table .val { word-break: break-word; max-width: 520px; }
.meta-table .val.is-risk { color: var(--warn); }
.meta-table .tag-key { font-size: 11px; }
.meta-table .row-info td, .meta-table .row-kept td { background: rgba(255, 255, 255, .015); }
.st { white-space: nowrap; font-size: 12px; }
.st-remove { color: var(--danger); }
.st-done { color: var(--ok); }
.st-keep, .st-info { color: var(--muted-2); }

/* Painéis */
.panel { margin-top: 40px; }
.panel > * { border: 1px solid var(--line-2); background: var(--bg-alt); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 16px 20px; border-radius: var(--radius) var(--radius) 0 0; }
.panel-head h2 { font-size: 18px; letter-spacing: 0; }
.panel-head .btn-sm { margin-left: auto; }
.panel-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; border-top: 0 !important; border-radius: 0 0 var(--radius) var(--radius); color: var(--text-2); font-size: 15px; }
.panel .kicker { font-size: 11px; }
.panel-body details { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.panel-body details:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-body summary { cursor: pointer; font-weight: 500; color: var(--text); padding: 4px 0; }
.panel-body details p { margin-top: 8px; color: var(--muted); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; background: transparent; cursor: pointer; font-family: inherit; }
.btn { cursor: pointer; font-family: inherit; font-size: 15px; border: 0; }
.btn-ghost { border: 1px solid var(--line-3); background: transparent; }
.btn:disabled { opacity: .6; cursor: progress; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin: 0; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.stats div { background: var(--surface); padding: 12px 14px; }
.stats dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.stats dd { margin: 4px 0 0; color: var(--ok); font-weight: 500; }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.hist-name { flex: 1 1 200px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }

.site-footer { margin-top: 64px; }

@media (max-width: 560px) {
  .fields { padding-left: 14px; }
  .block-check { flex-basis: 100%; }
  .table-wrap { max-height: 70vh; }
  .meta-table thead { display: none; }
  .meta-table tr { display: block; padding: 8px 12px; border-top: 1px solid var(--line); }
  .meta-table td { display: flex; gap: 10px; padding: 2px 0; border: 0; white-space: normal !important; max-width: none; }
  .meta-table td::before { content: attr(data-label); flex: none; width: 70px; color: var(--muted-2); font-family: var(--font-mono); font-size: 11px; padding-top: 1px; }
  .field dt, .proof-k { min-width: 0; flex-basis: 100%; }
  .nav-links a { padding: 0 10px; }
}
