:root {
  --bg: #f4f6f8; --card: #fff; --ink: #1d2733; --muted: #5d6b7a; --line: #dfe5ea; --accent: #0f6e8c;
  --accent-ink: #fff; --warn: #fff4cc; --bad: #fde3e3; --ok: #e3f6ea; --ext: #efe4ff;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: #12303d; color: #fff; }
.brand { font-weight: 700; font-size: 17px; }
.brand span { font-weight: 400; opacity: .75; margin-left: 6px; font-size: 14px; }
#who button { margin-left: 10px; }
main { padding: 16px 20px; max-width: 1700px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; }
.card.narrow { max-width: 380px; margin: 60px auto; }
h2 { margin: 0 0 12px; font-size: 18px; }
h3 { margin: 18px 0 6px; font-size: 15px; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
input, select, textarea { font: inherit; color: var(--ink); padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
button { font: inherit; padding: 7px 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row label { margin: 0; min-width: 220px; }
.form2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 16px; }
.actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.help { color: var(--muted); margin: 0 0 12px; }
.err { color: #b42318; min-height: 1em; }
.hidden { display: none !important; }
.caso-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.caso-head h2 { margin: 0; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #e7eef2; color: var(--muted); }
.tabs { display: flex; gap: 2px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border-radius: 6px 6px 0 0; border-bottom: 2px solid transparent; background: transparent; }
.tabs button.on { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; background: #fff; }
.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.grid th, .grid td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.grid th { background: #f0f4f7; font-weight: 600; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.grid tr.clickable:hover { background: #f5fafc; cursor: pointer; }
.edit input, .edit select { padding: 3px 4px; font-size: 12px; width: 100%; min-width: 60px; }
.edit td { padding: 2px 3px; }
.edit td.n input { min-width: 46px; width: 64px; }
.edit select { min-width: 150px; }
.edit td.w input { min-width: 150px; }
.edit tr.first td { border-top: 2px solid #c9d4dc; }
.edit tr.ext { background: var(--ext); }
.edit tr.excl { opacity: .45; }
.edit input.warn { background: var(--warn); }
.scroll { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 6px; }
.slot { display: grid; grid-template-columns: 330px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; }
.slot .files a { margin-right: 10px; }
.slot .files .x { color: #b42318; border: 0; background: none; padding: 0 4px; }
.job { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; background: #e8f3f8; }
.job.error { background: var(--bad); }
.job.listo { background: var(--ok); }
.avisos { background: var(--warn); border-radius: 6px; padding: 8px 14px; margin-bottom: 12px; max-height: 180px; overflow: auto; font-size: 13px; }
.avisos li { margin: 2px 0; }
.lect { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.lect table input { width: 64px; }
.res-supera { background: var(--bad); }
.dl a { display: inline-block; margin: 6px 12px 6px 0; }
