:root{
  --bg:#f6f8fb;
  --card:#ffffff;
  --ink:#1c1f24;
  --muted:#6b7280;
  --brand:#2563eb;
  --ok:#16a34a;
  --warn:#eab308;
  --bad:#ef4444;
  --line:#e5e7eb;
  --chip:#eef2ff;
  --shadow:0 6px 20px rgba(0,0,0,.08);
  --radius:16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0; font:14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu;
  color:var(--ink); background:var(--bg);
}

.wrap{ max-width:1200px; margin:24px auto; padding:0 16px; }

h1,h2,h3,h4{ margin:0; font-weight:700; }
h1{ font-size:20px; }
h3{ font-size:18px; }
h4{ font-size:14px; color:var(--muted); letter-spacing:.3px; text-transform:uppercase; }

.muted{ color:var(--muted); }
.spacer{ flex:1; }

.btn{
  border:1px solid var(--brand);
  background:var(--brand);
  color:#fff;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}
.btn:hover{ filter:brightness(.96); }
.btn.ghost{ background:transparent; color:var(--brand); }
.btn.ghost:hover{ background:#eff6ff; }
.btn.small{ padding:6px 10px; font-size:13px; }

.mini{ height:34px; padding:6px 8px; border:1px solid var(--line); border-radius:10px; background:#fff; }

.toolbar{
  display:flex; align-items:center; gap:10px; padding:10px 12px;
}
.toolbar.gap{ gap:12px; }

.logo{ width:28px; height:28px; }

.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden; margin-bottom:16px;
}
.status{ padding:8px 12px; border-top:1px dashed var(--line); }

.tableWrap{ overflow:auto; }
table{ border-collapse:collapse; width:100%; }
thead th{
  position:sticky; top:0; background:#f2f6ff; color:#334155;
  text-align:left; font-weight:700; padding:10px; border-bottom:1px solid var(--line);
}
tbody td{
  padding:10px; border-bottom:1px solid var(--line);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
tbody tr{ cursor:pointer; }
tbody tr:hover{ background:#f9fafb; }

.right{ text-align:right; }
.num{ font-variant-numeric: tabular-nums; }
.wraptext{ white-space:normal; }
.truncate{ max-width:520px; }

.overlay{
  position:fixed; inset:0; background:rgba(15,23,42,.38);
  display:none; align-items:center; justify-content:center; z-index:50; padding:24px;
}
.overlay[aria-hidden="false"]{ display:flex; }

.modal{
  width:min(980px, 100%);
  max-height:92vh;
  display:flex; flex-direction:column;
  overflow-y:auto;
}
.modal .toolbar{ border-bottom:1px solid var(--line); }
.titleStack h3{ line-height:1.1; }
.titleStack small{ display:block; }

.pretty{ padding:18px; }
.header{
  display:flex; align-items:center; gap:12px; margin-bottom:14px;
}
.badge{
  background:var(--chip); color:var(--brand); border:1px solid #dbeafe;
  padding:6px 10px; border-radius:999px; font-weight:600; letter-spacing:.3px;
}
.badge.ok{ color:#065f46; background:#ecfdf5; border-color:#d1fae5; }
.badge.warn{ color:#92400e; background:#fffbeb; border-color:#fde68a; }
.badge.bad{ color:#991b1b; background:#fef2f2; border-color:#fecaca; }

.noTrabajo{ font-weight:800; font-size:18px; letter-spacing:.2px; }

.grid{ display:grid; gap:14px; }
.grid.two{ grid-template-columns:1fr 1fr; }
@media (max-width:900px){
  .grid.two{ grid-template-columns:1fr; }
}

.block{
  border:1px solid var(--line); border-radius:12px; padding:12px; background:#fff;
}

.kv{
  display:grid; grid-template-columns:180px 1fr; column-gap:12px; row-gap:6px; margin-top:8px;
}
.kv > div:first-child{ color:var(--muted); }
.kv > div:nth-child(2n){ white-space:normal; word-break:break-word; }

.fields{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
  margin-top:10px;
}
.field{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.field label{ font-size:12px; color:var(--muted); }
.valueBox{
  border:1px solid var(--line);
  background:#fff;
  padding:10px 12px;
  border-radius:10px;
  min-height:38px;
  display:flex; align-items:center;
  font-variant-numeric: tabular-nums;
}
@media (max-width:900px){
  .fields{ grid-template-columns: repeat(2, 1fr); }
}

.totales{
  margin-top:16px;
  background:linear-gradient(#ffffff,#fbfdff);
  border:1px solid var(--line); border-radius:14px; padding:14px;
}
.totales .row{
  display:flex; align-items:center; justify-content:space-between; padding:6px 4px;
}
.totales .row.total{
  border-top:1px dashed var(--line); margin-top:6px; padding-top:12px;
  font-size:18px;
}

.chk{ display:flex; align-items:center; gap:6px; }
.foot{ padding:10px 12px; border-top:1px dashed var(--line); }

.frecwd-footer{
  margin:26px 0 0 0;
  padding:16px 12px;
  border-top:1px solid rgba(0,0,0,.12);
}

.frecwd-wrap{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:center;
}

.frecwd-left-only{
  justify-content:flex-start;
}

.frecwd-brand{
  display:flex;
  align-items:center;
  gap:16px;
  text-decoration:none;
  color:inherit;
}

.frecwd-logo.big{
  width:172px;   /* doble tamaño */
  height:auto;
  border-radius:14px;
}

.frecwd-meta{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

.frecwd-title{
  font-weight:800;
  font-size:16px;
}

.frecwd-sub{
  font-size:14px;
  opacity:.75;
}

