/* QX Control de Conductores — Quechua Express
 * Paleta: blanco, verde jade y sus gradientes, plomo oscuro.
 * Todo queda dentro de .qxc para no chocar con el tema de WordPress.
 */
.qxc {
  --jade: #1f8f74;
  --jade-2: #146b56;
  --jade-3: #0e4d3e;
  --jade-l: #a6e2cc;
  --jade-xl: #e7f6f0;
  --rest: #dcf2c6;
  --leve: #f6b35e;
  --leve-l: #fdebd0;
  --grave: #d64541;
  --grave-l: #fbe1e0;
  --falta: #b3261e;
  --vac: #e4e8eb;
  --perm: #c8cfd4;
  --plomo: #353b40;
  --plomo-2: #262a2e;
  --txt: #23282c;
  --plata: #8b95a0;
  --line: #dde3e7;
  --bg: #f5f8f7;
  --r: 10px;
  --sh: 0 1px 2px rgba(20, 30, 35, .06), 0 4px 14px rgba(20, 30, 35, .06);
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--txt);
  background: var(--bg);
  border-radius: 14px;
  overflow: hidden;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}
.qxc *, .qxc *::before, .qxc *::after { box-sizing: border-box; }
.qxc h2, .qxc h3, .qxc h4 { font-family: "Barlow Condensed", "Barlow", sans-serif; color: var(--plomo); margin: 0 0 .35em; line-height: 1.15; letter-spacing: .01em; }
.qxc h2 { font-size: 1.7rem; font-weight: 700; }
.qxc h3 { font-size: 1.25rem; font-weight: 600; }
.qxc h4 { font-size: 1.1rem; font-weight: 600; }
.qxc p { margin: 0 0 .6em; }
.qxc small { font-size: .8em; }
.qxc img { max-width: 100%; height: auto; }
.qxc button, .qxc input, .qxc select, .qxc textarea { font: inherit; color: inherit; }
.qxc :focus-visible { outline: 3px solid rgba(31, 143, 116, .55); outline-offset: 2px; }

/* ---------- Cabecera ---------- */
.qxc-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; color: #fff; position: relative;
  background: linear-gradient(120deg, var(--plomo-2) 0%, var(--plomo) 60%, #3d4a47 100%);
}
.qxc-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--jade-3), var(--jade), var(--jade-l), var(--jade));
}
.qxc-brand { display: flex; align-items: center; gap: 12px; }
.qxc-brand img { width: 42px; height: 42px; background: #fff; border-radius: 10px; padding: 4px; }
.qxc-brand strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.35rem; letter-spacing: .02em; }
.qxc-brand span { display: block; font-size: .8rem; color: var(--jade-l); text-transform: uppercase; letter-spacing: .12em; }
.qxc-who { text-align: right; font-weight: 600; }
.qxc-who small { display: block; font-weight: 400; color: #c9d2d6; }

.qxc-tabs {
  display: flex; gap: 2px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line);
  padding: 0 12px; scrollbar-width: thin;
}
.qxc-tab {
  border: 0; background: none; padding: 13px 14px 11px; cursor: pointer; white-space: nowrap;
  font-weight: 600; color: #5b656d; border-bottom: 3px solid transparent;
}
.qxc-tab:hover { color: var(--jade-2); }
.qxc-tab.on { color: var(--jade-2); border-bottom-color: var(--jade); }

.qxc-main { padding: 20px; min-height: 320px; }
.qxc-boot, .qxc-empty { padding: 34px 16px; text-align: center; color: var(--plata); }

.qxc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.qxc-head p { color: #5b656d; margin: 0; max-width: 70ch; }
.qxc-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qxc-inline label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }

/* ---------- Formularios ---------- */
.qxc label { font-size: .88rem; }
.qxc input[type=text], .qxc input[type=number], .qxc input[type=date], .qxc input[type=time],
.qxc input[type=email], .qxc input[type=tel], .qxc input[type=password], .qxc select, .qxc textarea {
  width: 100%; min-height: 40px; padding: 7px 10px; border: 1px solid #c9d2d6; border-radius: 8px;
  background: #fff; box-shadow: none; max-width: 100%;
}
.qxc .qxc-inline input, .qxc .qxc-inline select { width: auto; }
.qxc textarea { resize: vertical; min-height: 70px; }
.qxc input:focus, .qxc select:focus, .qxc textarea:focus { border-color: var(--jade); outline: none; box-shadow: 0 0 0 3px rgba(31, 143, 116, .18); }
.qxc-grid2, .qxc-grid3, .qxc-grid4 { display: grid; gap: 12px; }
.qxc-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qxc-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qxc-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qxc-grid2 > label, .qxc-grid3 > label, .qxc-grid4 > label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; color: #4a545b; }
.qxc .span2 { grid-column: span 2; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.qxc-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.qxc-check input, .qxc-crit input { accent-color: var(--jade); width: 18px; height: 18px; }
.qxc-lbl { display: block; font-weight: 600; color: #4a545b; margin-bottom: 4px; font-size: .88rem; }
.qxc-sub { color: #5b656d; font-size: .88rem; }
.qxc-mute { color: #6c7780; font-size: .88rem; }
.qxc-alert { background: var(--leve-l); border-left: 4px solid var(--leve); padding: 10px 12px; border-radius: 6px; }

/* ---------- Botones ---------- */
.qxc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--jade-2); cursor: pointer; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--jade) 0%, var(--jade-2) 100%);
  text-decoration: none; transition: filter .15s, transform .05s;
}
.qxc-btn:hover { filter: brightness(1.08); }
.qxc-btn:active { transform: translateY(1px); }
.qxc-btn.ghost { background: #fff; color: var(--jade-2); border-color: #b9d9cd; }
.qxc-btn.ghost:hover { background: var(--jade-xl); filter: none; }
.qxc-btn.danger { background: #fff; color: var(--grave); border-color: #eab8b6; }
.qxc-btn.danger:hover { background: var(--grave-l); filter: none; }
.qxc-btn.sm { min-height: 34px; padding: 5px 11px; font-size: .86rem; }
.qxc-btn[disabled] { opacity: .55; cursor: not-allowed; }
.qxc-link { border: 0; background: none; padding: 2px 4px; color: var(--jade-2); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.qxc-link.danger { color: var(--grave); }
.qxc-x { border: 0; background: rgba(255, 255, 255, .15); color: inherit; width: 34px; height: 34px; border-radius: 8px; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.qxc-x.sm { width: 28px; height: 28px; font-size: 1.1rem; background: #f0f3f4; color: #6c7780; }
.qxc-x.sm:hover { background: var(--grave-l); color: var(--grave); }
.qxc-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.qxc-actions.sticky {
  position: sticky; bottom: 0; z-index: 5; background: rgba(255, 255, 255, .96);
  padding: 12px; border-top: 1px solid var(--line); margin: 16px -20px -20px; backdrop-filter: blur(4px);
}

/* ---------- Colores de estado ---------- */
.qxc .st-T { background: var(--jade-l); color: var(--jade-3); }
.qxc .st-X { background: linear-gradient(135deg, var(--jade) 0%, var(--jade-2) 100%); color: #fff; }
.qxc .st-D { background: var(--rest); color: #3f6b22; }
.qxc .st-V { background: var(--vac); color: #4a545b; }
.qxc .st-P { background: var(--perm); color: #3a4248; }
.qxc .st-F { background: var(--falta); color: #fff; }
.qxc .st-none { background: #fff; color: #9aa3aa; }
.qxc .st-future { background: #fafbfb; color: #c3cad0; }
.qxc .sv-1 { background: var(--leve); color: #5c3504; }
.qxc .sv-2 { background: var(--grave); color: #fff; }
.qxc .is-fer { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.qxc .is-swap::after { content: "⇄"; font-size: .7em; margin-left: 1px; }
.qxc .has-obs { position: relative; }
.qxc .has-obs::before {
  content: ""; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--plomo); box-shadow: 0 0 0 1px #fff;
}

.qxc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 12px; font-size: .82rem; color: #4a545b; }
.qxc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.qxc-legend i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .08); display: inline-block; }

/* ---------- Panel del día ---------- */
.qxc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.qxc-stats > div, .qxc-kpis > div {
  background: #fff; border-radius: var(--r); padding: 12px 14px; box-shadow: var(--sh); border-top: 4px solid var(--plata);
}
.qxc-stats b, .qxc-kpis b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; line-height: 1; color: var(--plomo); }
.qxc-stats span, .qxc-kpis span { font-size: .82rem; color: #5b656d; }
.qxc-stats .t, .qxc-kpis .t { border-top-color: var(--jade); }
.qxc-stats .d { border-top-color: #9ccf72; }
.qxc-stats .n { border-top-color: var(--leve); }
.qxc-stats .x, .qxc-kpis .x { border-top-color: var(--jade-3); background: linear-gradient(160deg, #fff 40%, var(--jade-xl)); }
.qxc-stats .x b, .qxc-kpis .x b { color: var(--jade-2); }
.qxc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 10px 0 14px; }

.qxc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.qxc-card {
  background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: var(--sh);
  display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--jade);
}
.qxc-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.qxc-card h4 { margin: 0; }
.qxc-card footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.qxc-card p { margin: 0; }
.qxc-unit { font-weight: 600; color: var(--plomo); }
.qxc-unit small { color: #6c7780; font-weight: 400; }
.qxc-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid rgba(0, 0, 0, .05); }
.qxc-bar { height: 9px; border-radius: 99px; background: #e9eef0; overflow: hidden; }
.qxc-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--jade-l), var(--jade)); transition: width .3s; }
.qxc-bar.over span { background: linear-gradient(90deg, var(--jade), var(--jade-3)); }
.qxc-count { font-size: .85rem; color: #5b656d; }
.qxc-count strong { font-size: 1.05rem; color: var(--plomo); }
.qxc-msg { font-size: .95rem; }
.qxc-msg b { color: var(--jade-2); }
.qxc-mini { font-size: .8rem; color: #6c7780; }
.qxc-obs { font-size: .85rem; background: #f6f8f8; border-left: 3px solid var(--plata); padding: 6px 8px; border-radius: 4px; }

/* ---------- Tablero mensual ---------- */
.qxc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 4px; }
.qxc-modes { display: inline-flex; flex-wrap: wrap; border: 1px solid #b9d9cd; border-radius: 9px; overflow: hidden; background: #fff; }
.qxc-mode { border: 0; background: none; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--jade-2); border-right: 1px solid #e1ece8; }
.qxc-mode:last-child { border-right: 0; }
.qxc-mode.on { background: linear-gradient(135deg, var(--jade), var(--jade-2)); color: #fff; }
.qxc-board-wrap { overflow: auto; max-height: 75vh; border-radius: var(--r); box-shadow: var(--sh); background: #fff; -webkit-overflow-scrolling: touch; }
.qxc-board { border-collapse: separate; border-spacing: 0; font-size: .78rem; min-width: 100%; }
.qxc-board th, .qxc-board td { border-right: 1px solid #edf1f2; border-bottom: 1px solid #edf1f2; padding: 0; text-align: center; }
.qxc-board thead th { position: sticky; top: 0; z-index: 3; background: var(--plomo); color: #fff; padding: 5px 2px; font-weight: 600; }
.qxc-board thead th small { display: block; font-weight: 400; color: #b8c2c7; font-size: .72rem; }
.qxc-board thead th.sun { background: #4a5358; }
.qxc-board thead th.today { background: var(--jade); }
.qxc-board thead th.tt { background: var(--jade-3); padding: 5px 6px; }
.qxc-board th.nm {
  position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: 5px 10px;
  min-width: 150px; max-width: 190px; box-shadow: 2px 0 4px rgba(0, 0, 0, .05);
}
.qxc-board thead th.nm { z-index: 4; background: var(--plomo); color: #fff; }
.qxc-board th.nm .qxc-link { padding: 0; text-align: left; color: var(--plomo); text-decoration: none; font-size: .86rem; }
.qxc-board th.nm .qxc-link:hover { color: var(--jade-2); text-decoration: underline; }
.qxc-board th.nm small { display: block; color: #8b95a0; font-weight: 400; }
.qxc-board td.c { width: 34px; min-width: 34px; height: 34px; cursor: pointer; font-weight: 700; font-size: .72rem; user-select: none; }
.qxc-board td.c:hover { box-shadow: inset 0 0 0 2px var(--plomo); }
.qxc-board td.c.busy { opacity: .4; cursor: progress; }
.qxc-board td.tt { padding: 4px 8px; white-space: nowrap; background: #f7faf9; }
.qxc-board td.tt.x { background: var(--jade-xl); color: var(--jade-2); font-weight: 700; }
.qxc-board tbody tr:hover th.nm { background: var(--jade-xl); }

/* ---------- Modal ---------- */
.qxc-modal-bg {
  position: fixed; inset: 0; z-index: 100000; background: rgba(28, 33, 37, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto;
}
.qxc-modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; max-height: 92vh; font-family: "Barlow", system-ui, sans-serif; color: var(--txt);
}
.qxc-modal.wide { max-width: 1000px; }
.qxc-modal-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
  background: linear-gradient(120deg, var(--plomo) 0%, var(--jade-3) 100%); color: #fff; border-radius: 14px 14px 0 0;
}
.qxc-modal-h h3 { color: #fff; margin: 0; }
.qxc-modal-b { padding: 16px; overflow-y: auto; }
.qxc-modal-f { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: #fafbfb; border-radius: 0 0 14px 14px; }
.qxc-day { display: flex; flex-direction: column; gap: 12px; }
.qxc-seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.qxc-seg-i { position: relative; cursor: pointer; }
.qxc-seg-i input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qxc-seg-i span { display: inline-block; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .86rem; border: 2px solid transparent; opacity: .7; }
.qxc-seg-i input:checked + span { opacity: 1; border-color: var(--plomo); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.qxc-seg-i input:focus-visible + span { outline: 3px solid rgba(31, 143, 116, .55); outline-offset: 2px; }
.qxc-seg-i.st-T, .qxc-seg-i.st-D, .qxc-seg-i.st-V, .qxc-seg-i.st-P, .qxc-seg-i.st-F { background: none; }
.qxc-seg-i.st-T span { background: var(--jade-l); color: var(--jade-3); }
.qxc-seg-i.st-D span { background: var(--rest); color: #3f6b22; }
.qxc-seg-i.st-V span { background: var(--vac); }
.qxc-seg-i.st-P span { background: var(--perm); }
.qxc-seg-i.st-F span { background: var(--falta); color: #fff; }

/* ---------- Toast ---------- */
.qxc-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100001;
  padding: 11px 18px; border-radius: 10px; color: #fff; font-weight: 600; max-width: 92vw;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); background: var(--jade-2); transition: opacity .3s, transform .3s;
  font-family: "Barlow", system-ui, sans-serif;
}
.qxc-toast.warn { background: #b86d0c; }
.qxc-toast.err { background: var(--grave); }
.qxc-toast.out { opacity: 0; transform: translate(-50%, 10px); }

/* ---------- Paneles, evaluaciones ---------- */
.qxc-panel { background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--sh); margin-bottom: 16px; }
.qxc-panel > h3 { border-bottom: 2px solid var(--jade-xl); padding-bottom: 6px; margin-bottom: 12px; }
.qxc-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.qxc-crits { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin: 14px 0; }
.qxc-cg { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; margin: 0; }
.qxc-cg legend { font-weight: 700; color: var(--plomo); padding: 0 6px; font-size: .9rem; }
.qxc-cg legend small { font-weight: 400; color: #6c7780; }
.qxc-crit { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.qxc-crit:hover { background: #f5f8f7; }
.qxc-crit span { flex: 1; }
.qxc-crit em { font-style: normal; font-weight: 700; font-size: .8rem; color: #6c7780; }
.qxc-crit.check input:not(:checked) ~ span { color: #b86d0c; text-decoration: line-through; }
.qxc-crit.falta input:checked ~ span { color: var(--grave); font-weight: 600; }
.qxc-crit.falta { accent-color: var(--grave); }
.qxc-crit.falta input { accent-color: var(--grave); }
.qxc-crit.merito input:checked ~ span { color: var(--jade-2); font-weight: 600; }
.qxc-stars { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.qxc-star { position: relative; cursor: pointer; }
.qxc-star input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.qxc-star span { font-size: 1.8rem; color: #d3d9dd; line-height: 1; padding: 0 1px; }
.qxc-stars:has(.qxc-star input:checked) .qxc-star span { color: #f2b544; }
.qxc-stars .qxc-star:has(input:checked) ~ .qxc-star span { color: #d3d9dd; }
.qxc-star input:focus-visible + span { outline: 2px solid var(--jade); border-radius: 4px; }
.qxc-preview { border-radius: 10px; padding: 12px; background: var(--jade-xl); border: 1px solid #c4e6d8; font-weight: 600; }
.qxc-preview.sv1 { background: var(--leve-l); border-color: #f3cf9b; }
.qxc-preview.sv2 { background: var(--grave-l); border-color: #efb3b1; }
.qxc-evlist { display: flex; flex-direction: column; gap: 10px; }
.qxc-ev { border-radius: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--jade); }
.qxc-ev.sv1 { border-left-color: var(--leve); background: #fffaf2; }
.qxc-ev.sv2 { border-left-color: var(--grave); background: #fff6f5; }
.qxc-ev-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.qxc-ev p { margin: 4px 0; font-size: .88rem; }
.qxc-ev-a { display: flex; gap: 8px; justify-content: flex-end; }
.qxc-pts { font-weight: 700; font-family: "Barlow Condensed", sans-serif; font-size: 1.15rem; }
.qxc-pts.pos { color: var(--jade-2); }
.qxc-pts.neg { color: var(--grave); }
.qxc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.qxc-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .76rem; font-weight: 600; font-style: normal; }
.qxc-tag.g { background: var(--grave-l); color: #9b2320; }
.qxc-tag.l { background: var(--leve-l); color: #8a4f06; }
.qxc-tag.m { background: var(--jade-xl); color: var(--jade-2); }

/* ---------- Ficha y calendario ---------- */
.qxc-ficha { display: flex; flex-direction: column; gap: 10px; }
.qxc-fm { font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; color: var(--jade-2); }
.qxc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.qxc-cal .h { text-align: center; font-weight: 700; font-size: .78rem; color: #fff; background: var(--plomo); border-radius: 6px; padding: 4px 0; }
.qxc-cal .e { min-height: 62px; }
.qxc-cal-d {
  min-height: 62px; border: 1px solid rgba(0, 0, 0, .06); border-radius: 8px; padding: 4px 5px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px; overflow: hidden;
}
.qxc-cal-d:hover { box-shadow: inset 0 0 0 2px var(--plomo); }
.qxc-cal-d .n { font-weight: 700; font-size: .95rem; }
.qxc-cal-d .l { font-size: .72rem; font-weight: 700; }
.qxc-cal-d .u { font-size: .66rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- Tablas ---------- */
.qxc-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; -webkit-overflow-scrolling: touch; }
.qxc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.qxc-table th { background: var(--plomo); color: #fff; text-align: left; padding: 8px 10px; font-weight: 600; white-space: nowrap; }
.qxc-table td { padding: 7px 10px; border-bottom: 1px solid #edf1f2; vertical-align: middle; }
.qxc-table tbody tr:nth-child(even) td { background: #fafcfb; }
.qxc-table tbody tr:hover td { background: var(--jade-xl); }
.qxc-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.qxc-table .ctr { text-align: center; }
.qxc-table .acts { white-space: nowrap; text-align: right; }
.qxc-table tr.off td { color: #9aa3aa; }
.qxc-table.qxc-edit td { padding: 4px; }
.qxc-table.qxc-edit input, .qxc-table.qxc-edit select { min-height: 36px; min-width: 90px; }
.qxc-table.qxc-edit input[type=checkbox] { min-width: 0; min-height: 0; width: 20px; height: 20px; accent-color: var(--jade); }

/* ---------- Liquidación ---------- */
.qxc-liqform { display: block; }
.qxc-liqform .qxc-inline { margin-top: 10px; }
.qxc-acc { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; }
.qxc-acc label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; color: #4a545b; }
.qxc-acc input { width: 72px !important; min-height: 34px !important; text-align: center; }
.qxc-totals { background: linear-gradient(160deg, #fff 45%, var(--jade-xl)); border: 1px solid #c4e6d8; }

/* ---------- Reportes, configuración ---------- */
.qxc-repout { overflow-x: auto; }
.qxc-doc { font-size: .88rem; }
.qxc-doc table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; }
.qxc-doc th { background: var(--plomo); color: #fff; padding: 6px 8px; text-align: left; font-weight: 600; }
.qxc-doc td { border-bottom: 1px solid #edf1f2; padding: 5px 8px; }
.qxc-doc h1, .qxc-doc h2 { font-family: "Barlow Condensed", sans-serif; color: var(--plomo); }
.qxc-ptrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.qxc-ptrow input { width: 90px !important; text-align: center; }
.qxc-users .qxc-table select { min-width: 150px; }
.qxc-drvform, .qxc-unitform { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Viáticos ---------- */
.qxc .has-via { box-shadow: inset 0 -5px 0 var(--plomo); }
.qxc .has-via.via-warn { box-shadow: inset 0 -5px 0 var(--falta), inset 0 0 0 2px var(--falta); }
.qxc-board td.c.has-via:hover, .qxc-cal-d.has-via:hover { box-shadow: inset 0 -5px 0 var(--plomo), inset 0 0 0 2px var(--plomo); }
.qxc-stats .v, .qxc-kpis .v { border-top-color: var(--plomo); background: linear-gradient(160deg, #fff 45%, #eef1f3); }
.qxc-stats .v span { display: block; }
.qxc-via { font-size: .85rem; padding: 6px 9px; border-radius: 6px; margin: 0; }
.qxc-via.ok { background: #eef1f3; border-left: 4px solid var(--plomo); color: var(--plomo); }
.qxc-via.ok small { color: #5b656d; }
.qxc-via.no { background: #fff; border: 1px dashed #c9d2d6; color: #6c7780; }
.qxc-day .qxc-via { margin-bottom: 2px; }
.qxc-viatsum {
  display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(160deg, #fff 30%, var(--jade-xl)); border: 1px solid #c4e6d8;
}
.qxc-viatsum b { font-family: "Barlow Condensed", sans-serif; font-size: 1.35rem; color: var(--jade-2); }
.qxc-viatsum small { color: #5b656d; }
.qxc-viatcheck .qxc-alert { margin: 10px 0 0; }
.qxc-alert.err { background: var(--grave-l); border-left-color: var(--grave); color: #7d1b18; }
.qxc-viatform input[readonly] { background: #f3f6f5; color: #4a545b; }
.qxc-cal-d .v { margin-top: auto; font-size: .66rem; font-weight: 700; background: var(--plomo); color: #fff; border-radius: 4px; padding: 0 4px; }
.qxc-table tfoot td { font-weight: 700; background: var(--jade-xl); border-top: 2px solid var(--jade); padding: 8px 10px; }
.qxc-table td.warn { color: #b86d0c; font-weight: 700; }
.qxc-table tbody tr.warn td { background: #fff6f5; }
.qxc-viatx .qxc-doc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 10px; overflow-x: auto; }
.qxc-doc .kp td { text-align: center; }
.qxc-doc .kp b { display: block; font-size: 1.3rem; color: var(--jade-2); }
.qxc-doc .firmas { margin-top: 30px; }
.qxc-doc .firmas td { border: 0; text-align: center; width: 50%; }
.qxc-doc .firmas .ln { border-top: 1px solid var(--txt); margin: 0 24px 4px; }
.qxc-btn[disabled], .qxc-btn[disabled]:hover { opacity: .5; cursor: not-allowed; filter: none; }

/* ---------- Liquidaciones pendientes ---------- */
.qxc .qxc-red { color: var(--falta); }
.qxc-chip.pend { background: var(--falta); color: #fff; }
.qxc-table tbody tr.pend td { background: #fdecea; }
.qxc-table tbody tr.pend:hover td { background: #fbdcd9; }
.qxc-table tbody tr.pend td:first-child { box-shadow: inset 4px 0 0 var(--falta); }
.qxc-pendbox { border: 2px solid #efb3b1; background: linear-gradient(160deg, #fff 50%, #fff3f2); }
.qxc-pendbox > h3 { border-bottom-color: #f6d2d0; }
.qxc-pend {
  display: block; width: 100%; text-align: left; cursor: pointer; font-size: .85rem; padding: 7px 9px; margin: 0;
  border: 0; border-left: 4px solid var(--falta); border-radius: 6px; background: #fdecea; color: #7d1b18;
}
.qxc-pend:hover { background: #fbdcd9; }
.qxc-pend small { color: #9b3b37; }
.qxc-stats .p.on { border-top-color: var(--falta); background: linear-gradient(160deg, #fff 40%, #fdecea); }
.qxc-stats .p.on b { color: var(--falta); }
.qxc-liqstate { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: .95rem; }
.qxc-liqstate.pend { background: #fdecea; border: 2px solid var(--falta); color: #7d1b18; }
.qxc-liqstate.pend b { letter-spacing: .03em; }
.qxc-liqstate.ok { background: var(--jade-xl); border: 2px solid var(--jade); color: var(--jade-3); }
.qxc-antadd { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); align-items: flex-end; }
.qxc-antadd label { flex-direction: column; align-items: stretch; gap: 3px; }
.qxc-antadd input[data-ant="monto"] { width: 120px; }
.qxc-antadd input[data-ant="nota"] { width: 240px; max-width: 100%; }

/* ---------- Orden editable ---------- */
.qxc-table .qxc-ord { white-space: nowrap; width: 1%; }
.qxc-ord span { display: inline-block; min-width: 22px; font-weight: 700; color: var(--plomo); }
.qxc-mv {
  width: 26px; height: 26px; margin-left: 2px; border: 1px solid #b9d9cd; border-radius: 6px; background: #fff;
  color: var(--jade-2); cursor: pointer; font-size: .7rem; line-height: 1; padding: 0;
}
.qxc-mv:hover:not([disabled]) { background: var(--jade-xl); }
.qxc-mv[disabled] { opacity: .3; cursor: default; }
.qxc-board td.tt.warn { color: #b86d0c; font-weight: 700; }

/* ---------- Acceso ---------- */
.qxc.qxc-login { max-width: 420px; margin: 30px auto; background: #fff; overflow: visible; padding: 24px; border-radius: 14px; box-shadow: var(--sh); border-top: 5px solid var(--jade); }
.qxc-login h2 { text-align: center; }
.qxc-login p { margin-bottom: 12px; }
.qxc-login label { display: block; font-weight: 600; margin-bottom: 4px; }
.qxc-login input[type=text], .qxc-login input[type=password] { width: 100%; }
.qxc-login input[type=submit], .qxc-login .button {
  width: 100%; min-height: 42px; border: 0; border-radius: 8px; cursor: pointer; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--jade), var(--jade-2));
}

/* ---------- Escritorio de WordPress ---------- */
.qxc-admin-wrap { margin: 10px 20px 0 2px; }
.qxc-admin-wrap .qxc { margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .qxc-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qxc-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .qxc { font-size: 14.5px; border-radius: 0; }
  .qxc-main { padding: 14px 10px; }
  .qxc-top { padding: 12px 12px 14px; }
  .qxc-brand img { width: 36px; height: 36px; }
  .qxc-brand strong { font-size: 1.15rem; }
  .qxc-who { font-size: .85rem; }
  .qxc-grid2, .qxc-grid3, .qxc-grid4 { grid-template-columns: 1fr; }
  .qxc .span2 { grid-column: auto; }
  .qxc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qxc-cards { grid-template-columns: 1fr; }
  .qxc-head h2 { font-size: 1.4rem; }
  .qxc-actions.sticky { margin: 14px -10px -14px; }
  .qxc-actions .qxc-btn { flex: 1 1 auto; }
  .qxc-board th.nm { min-width: 112px; max-width: 130px; padding: 4px 6px; }
  .qxc-board td.c { width: 30px; min-width: 30px; height: 32px; }
  .qxc-cal-d, .qxc-cal .e { min-height: 50px; }
  .qxc-cal-d .u { display: none; }
  .qxc-modal-bg { padding: 0; align-items: stretch; }
  .qxc-modal { max-height: 100vh; border-radius: 0; }
  .qxc-modal-h, .qxc-modal-f { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .qxc *, .qxc-toast { transition: none !important; animation: none !important; }
}
@media print {
  .qxc-tabs, .qxc-toolbar, .qxc-actions, .qxc-modes, .qxc-card footer { display: none !important; }
  .qxc { background: #fff; }
  .qxc .st-T, .qxc .st-X, .qxc .st-D, .qxc .sv-1, .qxc .sv-2, .qxc .st-F { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
