/* Crew mockups 2026-09-12 · marco compartido, calcado de CRM 2 (commit 88e033e3):
   tokens de packages/tokens/dist/tokens.css, bisel y vidrio receta H de globals.css,
   CrewHeader.module.css, hours-matrix.module.css, person-week.module.css y c6-pay.module.css.
   Solo mockup: nada de esto se porta tal cual al CRM. */
:root {
  --ff-surface-canvas: #0a0a0b; --ff-surface-card: #131315; --ff-surface-sunken: #0e0e10; --ff-surface-overlay: #171719;
  --ff-text-primary: #ecedee; --ff-text-secondary: #aaa8a4; --ff-text-muted: #8f8e8c;
  --ff-action-primary: #8e1e22; --ff-action-primary-hover: #c43a3f; --ff-action-primary-text: #f0dedb;
  --ff-border-hairline: rgba(255, 255, 255, .08); --ff-focus-ring: #c43a3f;
  --ff-filter-chip-inactive-surface: rgba(23, 22, 21, .62); --ff-filter-chip-inactive-border: rgba(74, 74, 74, .62);
  --ff-money-positive-surface: rgba(47, 125, 79, .14); --ff-money-positive-border: #2f7d4f; --ff-money-positive-text: #7fae93;
  --ff-money-negative-surface: rgba(142, 30, 34, .14); --ff-money-negative-border: rgba(196, 58, 63, .46); --ff-money-negative-text: #de4f54;
  --ff-brand-calderon-graphite: #4a4a4a;
  --ff-action-bevel: 0 4px 12px rgba(0, 0, 0, .3), inset 0 -6px 12px rgba(0, 0, 0, .16), inset 1.5px 1.5px 1px rgba(255, 255, 255, .1), inset -1px -1px 1px rgba(255, 255, 255, .06);
  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 45%);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ff-surface-canvas); color: var(--ff-text-primary); font: 16px/1.5 Franklin, system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.warn { flex: none; }

/* Fondo cósmico vino (DESIGN.md §1, quieto) */
.ambient { position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(1100px 700px at 18% 8%, rgba(126, 51, 42, .20), transparent 60%), radial-gradient(1300px 900px at 60% 105%, rgba(67, 26, 30, .22), transparent 65%); }
.ambient::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 620px at 85% 22%, rgba(110, 42, 46, .16), transparent 60%), radial-gradient(900px 700px at 35% 60%, rgba(58, 28, 26, .16), transparent 62%); }

/* Rail: dock flotante, vidrio receta H (único host .lg de la pantalla) */
.rail { position: fixed; z-index: 40; top: 20px; left: 18px; width: 68px; height: 860px; padding: 16px 0 31px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center;
  -webkit-backdrop-filter: blur(16px) saturate(1.8) brightness(1.06) contrast(1.03); backdrop-filter: blur(16px) saturate(1.8) brightness(1.06) contrast(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42), 0 3px 8px rgba(0, 0, 0, .28), inset 0 -12px 26px rgba(0, 0, 0, .16), inset 1.5px 1.5px 1px rgba(255, 255, 255, .16), inset -1px -1px 1px 1px rgba(255, 255, 255, .09), inset 0 -1px 0 rgba(0, 0, 0, .3); }
.lg-body, .lg-edge { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.lg-body { background: rgba(11, 7, 13, .14); }
.lg-edge { padding: 1.25px; opacity: .55; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  -webkit-backdrop-filter: brightness(1.55) saturate(1.5) blur(.4px); backdrop-filter: brightness(1.55) saturate(1.5) blur(.4px); }
.rail > :not(.lg-body):not(.lg-edge) { position: relative; z-index: 3; }
.rail-brand { height: 34px; margin: 6px 0 40px; }
.rail-brand img { display: block; height: 34px; width: auto; }
.rail-nav, .rail-foot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.rail-foot { margin-top: auto; }
.tile { display: grid; place-items: center; width: 46px; height: 46px; border-radius: .9rem; color: var(--ff-text-primary); }
.tile .i { width: 21px; height: 21px; }
.tile.on { background: var(--ff-action-primary); box-shadow: var(--ff-action-bevel); }
.badge-a { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: linear-gradient(160deg, rgba(243, 240, 230, .24), rgba(142, 30, 34, .62) 58%, rgba(0, 0, 0, .34)); box-shadow: var(--ff-action-bevel);
  outline: 1px solid rgba(243, 240, 230, .16); outline-offset: -1px; }

/* Molde de página de Crew */
.main { position: relative; z-index: 1; margin-left: 82px; padding: 24px; }
.page { max-width: 1440px; margin: 0 auto; padding: 32px; }

/* CrewHeader */
.crew-head { display: flex; align-items: center; gap: 24px; padding: 0 0 12px; border-bottom: 1px solid var(--ff-border-hairline); }
.crew-head h1 { margin: 0; font-size: 32px; font-weight: 400; line-height: 1.1; }
.tabs { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(5.5rem, auto); padding: .18rem; border: 1px solid var(--ff-filter-chip-inactive-border); border-radius: 999px; background: var(--ff-filter-chip-inactive-surface); }
.tab { display: flex; align-items: center; justify-content: center; min-height: 2.25rem; padding: 0 1.1rem; border-radius: 999px; font-size: 14px; font-weight: 500; }
.tab.on { background: var(--ff-action-primary); color: var(--ff-action-primary-text); box-shadow: var(--ff-action-bevel); }
.head-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Botones (.page .button) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid var(--ff-border-hairline);
  border-radius: 12px; background: var(--ff-surface-card); color: var(--ff-text-primary); font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.btn-primary { border-color: transparent; background: var(--ff-action-primary); color: var(--ff-action-primary-text); box-shadow: var(--ff-action-bevel); font-weight: 600; }
.btn-locked { background: var(--ff-surface-overlay); color: var(--ff-text-muted); }
.btn-locked .i { width: 16px; height: 16px; }

/* Control de semana de hoy (flechas + rango + Custom) */
.week-nav { display: inline-flex; align-items: center; gap: 8px; }
.week-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 14px; }
.week-value { padding: 0 4px; font-size: 14px; font-weight: 600; }
.custom { min-height: 2.25rem; padding: 0 16px; margin-left: 8px; }

/* Tarjeta de totales (simpleTotals) */
.totals { display: flex; align-items: center; padding: 20px 24px; border: 1px solid var(--ff-border-hairline); border-radius: 24px; background: var(--ff-surface-card); }
.totals > div, .totals-row > div { min-width: 230px; padding-right: 36px; }
.totals > div + div, .totals-row > div + div { padding-left: 36px; border-left: 1px solid var(--ff-border-hairline); }
.lbl { display: block; margin-bottom: 5px; color: var(--ff-text-secondary); font-size: 12px; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; }
.val { display: block; font-size: 32px; font-weight: 400; line-height: 1.2; }
.meta { margin-left: auto; color: var(--ff-text-secondary); font-size: 14px; }

/* Buscador animado, estado cerrado */
.search { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 999px; background: #000; color: #fff; font-size: 14px; }

/* ---------------- Crew › Hours (matriz) ---------------- */
.hours { display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 12px; min-height: 42px; margin-top: 20px; }
.toolbar > .btn:last-child { margin-left: auto; }
.hours > .totals { margin-top: 24px; }
.filters { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 24px; }
.matrixCard { margin-top: 16px; overflow: hidden; border: 1px solid var(--ff-border-hairline); border-radius: 16px; background: var(--ff-surface-card); }
.matrix { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 15px; }
.matrix th { padding: 12px 38px 12px 16px; border-bottom: 1px solid var(--ff-border-hairline); background: var(--ff-surface-sunken); color: var(--ff-text-muted); font-size: 12px; font-weight: 500; line-height: 1.6; text-align: right; }
.matrix th:first-child, .matrix th.status { padding-right: 16px; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix td { padding: 12px 16px; border-bottom: 1px solid var(--ff-border-hairline); text-align: right; vertical-align: middle; }
.who { display: flex; align-items: center; gap: .65rem; }
.who strong { font-weight: 600; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--ff-border-hairline); border-radius: 999px; background: var(--ff-surface-sunken); color: var(--ff-text-secondary); font-size: 14px; font-weight: 600; }
.num { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 4px; }
.num b { font-weight: 400; text-align: right; white-space: nowrap; }
.num.attn b { color: var(--ff-money-negative-text); }
.num.total b { font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--ff-border-hairline); border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.pill .i { width: 15px; height: 15px; }
.pill-neutral { background: var(--ff-surface-overlay); color: var(--ff-text-secondary); }
.pill-negative { border-color: var(--ff-money-negative-border); background: var(--ff-money-negative-surface); color: var(--ff-money-negative-text); }
.pill-positive { border-color: var(--ff-money-positive-border); background: var(--ff-money-positive-surface); color: var(--ff-money-positive-text); }
.totalsRow td { border-bottom: 0; box-shadow: inset 0 1px 0 var(--ff-border-hairline); color: var(--ff-text-secondary); font-weight: 600; }
.totalsLabel { color: var(--ff-text-muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.matrixFoot { display: flex; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--ff-border-hairline); color: var(--ff-text-muted); font-size: 12px; }
.matrixFoot a { text-decoration: underline; }

/* ---------------- Crew › Pay ---------------- */
.pay { display: flex; flex-direction: column; font-size: 14px; }
.pay-title { margin: 22px 0 28px; font-size: 28px; font-weight: 600; line-height: 34px; }
.metrics { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.metric { min-height: 92px; padding: 8px 20px 10px; border: 1px solid var(--ff-border-hairline); border-radius: 14px; background: linear-gradient(180deg, #ffffff06, transparent 45%), var(--ff-surface-card); }
.metric.lead { border-color: var(--ff-money-positive-border); }
.metric > span { font-size: 12px; color: var(--ff-text-secondary); }
.metric > div { display: flex; align-items: baseline; gap: 12px; }
.metric strong { font-size: 32px; font-weight: 600; line-height: 43px; letter-spacing: -.6px; }
.metric div span { font-size: 13px; color: var(--ff-text-secondary); }
.metric small { display: block; margin-top: 2px; font-size: 12px; color: var(--ff-text-secondary); }
.paytabs { display: flex; align-items: center; gap: 28px; height: 36px; margin-bottom: 8px; border-bottom: 1px solid var(--ff-border-hairline); }
.paytabs button { height: 36px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ff-text-secondary); font-size: 13px; }
.paytabs button.on { color: var(--ff-text-primary); border-color: var(--ff-action-primary-hover); }
.tableWrap { overflow: hidden; border: 1px solid var(--ff-border-hairline); border-radius: 14px; background: var(--ff-surface-card); }
.ptable { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ptable th { height: 40px; padding: 8px 16px; border-bottom: 1px solid var(--ff-border-hairline); background: var(--ff-surface-sunken); color: var(--ff-text-muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.ptable td { height: 54px; padding: 8px 16px; border-bottom: 1px solid var(--ff-border-hairline); }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .right { text-align: right; }
.ptable small { display: block; margin-top: 2px; font-size: 12px; color: var(--ff-text-secondary); }
.worker { display: flex; align-items: center; gap: 10px; }
.worker strong { display: block; font-size: 13px; font-weight: 600; }
.pavatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--ff-border-hairline); border-radius: 50%; color: var(--ff-text-secondary); font-size: 12px; }
.amount { font-weight: 600; }
.rowActions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.rowActions a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Crew › Hours › persona ---------------- */
.person { display: flex; flex-direction: column; gap: 12px; }
.back { margin-bottom: -8px; color: var(--ff-text-secondary); }
.person-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.person-head h1 { margin: 0; font-size: 28px; font-weight: 500; line-height: 1.15; }
.rate { padding-left: 16px; border-left: 1px solid var(--ff-border-hairline); color: var(--ff-text-muted); }
.person > .totals { margin-bottom: 8px; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.week { display: grid; gap: 8px; min-width: 0; }
.dayCard, .emptyDay { border: 1px solid var(--ff-border-hairline); border-radius: 20px; background: var(--card-grad), var(--ff-surface-card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.dayCard { display: grid; grid-template-columns: 150px minmax(0, 1fr) 120px; grid-template-rows: auto auto; column-gap: 18px; padding: 14px 20px 12px; }
.dayCard.open { border-color: var(--ff-action-primary); background: var(--ff-surface-sunken); box-shadow: inset 3px 0 0 var(--ff-action-primary); }
.dayCard.attn { border-color: var(--ff-money-negative-text); }
.dayIdentity { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; gap: 8px; }
.dayName { font-size: 16px; font-weight: 600; }
.dayDate { font-size: 13px; color: var(--ff-text-secondary); }
.dayAttention { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 2px; align-self: center; }
.dayJob { grid-column: 1; grid-row: 2; display: grid; gap: 4px; min-width: 0; margin-top: 5px; align-content: start; }
.jobName { overflow: hidden; font-size: 12px; color: var(--ff-text-secondary); white-space: nowrap; text-overflow: ellipsis; }
.attentionText { display: inline-flex; align-items: center; gap: 4px; color: var(--ff-money-negative-text); font-size: 12px; font-weight: 600; }
.dayTrackArea { grid-column: 2; grid-row: 1 / span 2; min-width: 0; padding-top: 2px; }
.axis { display: flex; justify-content: space-between; margin-bottom: 14px; color: var(--ff-text-muted); font-size: 10px; line-height: 15px; }
.track { position: relative; height: 28px; border-right: 1px solid var(--ff-border-hairline);
  background: repeating-linear-gradient(to right, var(--ff-border-hairline) 0, var(--ff-border-hairline) 1px, transparent 1px, transparent 14.285714%); }
.segment { position: absolute; top: 0; height: 28px; border: 1px solid var(--ff-filter-chip-inactive-border); border-radius: 16px; background: var(--ff-text-secondary); color: var(--ff-surface-canvas); font-size: 11px; line-height: 26px; text-align: center; }
.grip { position: absolute; top: 3px; display: grid; place-items: center; width: 18px; height: 20px; border: 1px solid var(--ff-filter-chip-inactive-border); border-radius: 16px; background: var(--ff-text-muted); color: var(--ff-brand-calderon-graphite); }
.grip svg { width: 4px; height: 14px; fill: currentColor; }
.gripStart { left: 3px; } .gripEnd { right: 3px; }
.detailLine { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 7px 0 0; color: var(--ff-text-secondary); font-size: 11px; }
.detailLine em { margin-right: 3px; color: var(--ff-text-muted); font-style: normal; }
.dayTotal { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
.dayTotal strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; }
.dayTotal small { display: block; margin-top: 2px; color: var(--ff-text-secondary); font-size: 12px; }
.emptyDay { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 20px; }
.emptyDay .dayName { font-size: 14px; font-weight: 500; }
.emptyTrack { flex: 1; min-width: 0; height: 20px; border: 1px dashed var(--ff-border-hairline); border-radius: 16px; }
.addDay { display: grid; place-items: center; min-width: 34px; min-height: 30px; border: 1px solid var(--ff-border-hairline); border-radius: 10px; background: var(--ff-surface-overlay); color: var(--ff-text-secondary); }
.addDay .i { width: 14px; height: 14px; }
.panel { position: sticky; top: 16px; padding: 20px 22px 22px; border: 1px solid var(--ff-border-hairline); border-radius: 24px; background: var(--card-grad), var(--ff-surface-card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.panelHead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panelHead h2 { margin: 0; font-size: 18px; font-weight: 500; }
.panelHead strong { font-size: 18px; font-weight: 600; }
.panelField { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.panelField > span { flex: none; width: 58px; color: var(--ff-text-secondary); font-size: 13px; }
.panelField > i { color: var(--ff-text-muted); font-style: normal; }
.panelField input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border: 1px solid var(--ff-filter-chip-inactive-border); border-radius: 10px; background: var(--ff-surface-sunken); font-size: 18px; }
.panelField input::placeholder { color: var(--ff-text-muted); }
.panelField > div { position: relative; flex: 1; min-width: 0; }
.addBreak { display: block; margin: -6px 0 14px 72px; padding: 0; border: 0; background: none; color: var(--ff-text-secondary); font-size: 13px; text-decoration: underline; }
.editorActions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.editorActions > span { margin-right: auto; color: var(--ff-text-muted); font-size: 12px; }
.cancel { padding: 0; border: 0; background: none; color: var(--ff-text-secondary); font-size: 14px; }
.weekTotal { display: flex; align-items: center; gap: 20px; min-height: 64px; padding: 12px 20px; border: 1px solid var(--ff-border-hairline); border-radius: 20px; background: var(--card-grad), var(--ff-surface-card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.wt-label { color: var(--ff-text-secondary); font-size: 12px; }
.weekTotal strong { font-size: 19px; font-weight: 500; }
.payNow { margin-left: auto; min-width: 176px; }
.payHistory { margin-top: 24px; overflow: hidden; border: 1px solid var(--ff-border-hairline); border-radius: 16px; background: var(--ff-surface-card); }
.payHistory h2 { margin: 0; padding: 16px 20px; font-size: 18px; font-weight: 500; }
.payHistory table { width: 100%; border-collapse: collapse; }
.payHistory th, .payHistory td { padding: 10px 20px; border-top: 1px solid var(--ff-border-hairline); text-align: left; }
.payHistory th { color: var(--ff-text-secondary); font-size: 12px; font-weight: 500; }
