/* =========================================================
   VEXUM Control — sistema visual de VEXUM Digital Studio
   (mismos tokens que vexum.site: negro, azul #0066FF, Plus Jakarta Sans)
   ========================================================= */
:root, :root:not([data-x]) {
  --black: #0b0b0b; --black-2: #111214; --black-3: #17181b;
  --gray-mid: #c9cdd3; --gray-mute: #8a8f98;
  --blue: #0066ff; --blue-soft: #3d85ff; --blue-deep: #0047b3;
  --line: rgba(255, 255, 255, .1); --line-soft: rgba(255, 255, 255, .06);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --bg: var(--black);
  --surface: rgba(17, 18, 20, .92);
  --surface-2: var(--black-3);
  --border: var(--line);
  --text: #ffffff;
  --muted: var(--gray-mute);
  --accent: var(--blue);
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 102, 255, .14);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --err: #f87171; --err-soft: rgba(248, 113, 113, .12);
  --info-soft: rgba(0, 102, 255, .12);
  --radius: 14px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --font: "Plus Jakarta Sans", "Inter", "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --sheet-band: #0b0b0b; --sheet-band-ink: #fff; --sheet-head: #17181b; --sheet-head-ink: var(--blue-soft);
  --sheet-calc: rgba(255, 255, 255, .03); --sheet-line: var(--line);
  color-scheme: dark;
}

html { background: var(--black); }
body { font-family: var(--font); background: transparent; color: var(--text); -webkit-font-smoothing: antialiased; }
/* Fondo de la marca: cuadrícula de 64px + resplandor azul */
body::after { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 1;
  background: radial-gradient(560px at 80% 0%, rgba(0, 102, 255, .22), transparent 60%),
              radial-gradient(900px at 0% 100%, rgba(0, 102, 255, .08), transparent 55%); }

h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); text-transform: uppercase; }
h2 { font-size: 1.05rem; }
a { color: var(--blue-soft); }
.muted { color: var(--gray-mute); }
p { color: var(--gray-mid); }

/* Etiqueta de sección estilo Vexum: ● TEXTO */
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-soft); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }

/* Barra superior */
.topbar { background: rgba(11, 11, 11, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); min-height: 64px; }
.brand { gap: .6rem; color: #fff; }
.vlogo { width: 26px; height: 26px; display: block; }
.vlogo.on-light { display: none !important; }
.vlogo.on-dark { display: block !important; }
.brand-text { display: flex; align-items: baseline; gap: .3rem; }
.brand-text strong { font-weight: 800; letter-spacing: .04em; }
.brand-text span { font-weight: 600; color: var(--blue-soft); }
.brand .biz { color: var(--gray-mute); font-weight: 600; font-size: .78rem; padding-left: .6rem; border-left: 1px solid var(--line); }
.nav a { color: var(--gray-mid); font-weight: 600; font-size: .92rem; border-radius: 999px; padding: .45rem .9rem; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.active { background: rgba(0, 102, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 102, 255, .35); }
.user .name { color: var(--gray-mute); }
@media (max-width: 760px) { .brand .biz { display: none; } }

/* Botones (píldora, como "Cotizar proyecto") */
.btn { border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: #fff; font-weight: 700; font-size: .85rem; padding: .55rem 1.1rem; transition: background .2s, box-shadow .2s, transform .2s var(--ease-out); }
.btn:hover { background: rgba(255, 255, 255, .07); }
.btn.primary { background: var(--blue); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -8px rgba(0, 102, 255, .55); }
.btn.primary:hover { background: var(--blue-soft); transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(0, 102, 255, .7); filter: none; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--err); }
.btn.small { padding: .32rem .75rem; font-size: .78rem; }

/* Campos */
input, select, textarea { background: var(--black-3); color: #fff; border: 1px solid var(--line); border-radius: 10px; }
input::placeholder { color: #5d626b; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 102, 255, .25); }
label.field { color: var(--gray-mute); font-weight: 600; font-size: .78rem; letter-spacing: .02em; }

/* Tarjetas y cifras */
.card, .kpi, .tile, .plist, .report-week, dialog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi .label { text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; color: var(--gray-mute); }
.kpi .value { font-weight: 800; letter-spacing: -.02em; }
.kpi .sub { color: var(--gray-mute); }
.kpi.good .value { color: #fff; }
.kpi.good { border-color: rgba(0, 102, 255, .45); background: linear-gradient(180deg, rgba(0, 102, 255, .16), rgba(17, 18, 20, .92)); }
.kpi.bad .value { color: var(--err); }
.live-cards .kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; width: auto; background: linear-gradient(90deg, var(--blue), transparent); }
.tile:hover { border-color: rgba(0, 102, 255, .5); }

/* Tablas */
th { background: transparent; color: var(--gray-mute); font-size: .68rem; letter-spacing: .1em; font-weight: 700; }
th, td { border-bottom-color: var(--line-soft); }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
tfoot td { border-top-color: var(--line); }

/* Pestañas */
.tabs { border-bottom-color: var(--line); gap: .35rem; }
.tabs button { color: var(--gray-mute); border-radius: 999px 999px 0 0; font-weight: 700; }
.tabs button.active { color: #fff; border-bottom-color: var(--blue); }

/* Pantalla Noche */
.bar-pills button { background: var(--black-2); border: 1px solid var(--line); color: var(--gray-mid); border-radius: 999px; padding: .6rem 1.2rem; font-weight: 700; }
.bar-pills button:hover { color: #fff; border-color: rgba(255, 255, 255, .2); }
.bar-pills button.active { background: var(--blue); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -8px rgba(0, 102, 255, .6); animation: none; }
.bar-pills button small { color: var(--gray-mute); }
.bar-pills button.active small { color: rgba(255, 255, 255, .85); }
.field-inline label { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--gray-mute); }
.prow { border-bottom-color: var(--line-soft); }
.prow.phead { background: transparent; color: var(--gray-mute); letter-spacing: .1em; font-size: .68rem; }
.prow.done { box-shadow: inset 3px 0 0 var(--blue); }
.prow.neg { background: rgba(248, 113, 113, .08); box-shadow: inset 3px 0 0 var(--err); }
.pin input { background: var(--black-3); }
.pin:nth-of-type(3) input { border-color: rgba(0, 102, 255, .6); }
.savebar { background: rgba(11, 11, 11, .85); backdrop-filter: blur(12px); border-top-color: var(--line); }
.dot.on { background: var(--blue); box-shadow: 0 0 0 3px rgba(0, 102, 255, .25); }
.badge { border-radius: 999px; background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--gray-mid); font-weight: 700; letter-spacing: .02em; }
.badge.ok { background: rgba(0, 102, 255, .14); color: var(--blue-soft); }
.alert { border: 1px solid var(--line); background: rgba(0, 102, 255, .08); color: var(--gray-mid); }
.alert.warn { background: var(--warn-soft); border-color: rgba(251, 191, 36, .25); color: #fde68a; }
.alert.error { background: var(--err-soft); border-color: rgba(248, 113, 113, .3); color: #fecaca; }
.alert.ok { background: rgba(0, 102, 255, .1); border-color: rgba(0, 102, 255, .3); color: #cfe0ff; }
.toast { background: var(--black-3); color: #fff; border: 1px solid var(--line); }
.toast.error { background: #3b1414; border-color: rgba(248, 113, 113, .4); }
.bars-chart .track { background: var(--black-3); border-color: var(--line); }
.bars-chart .fill { background: linear-gradient(90deg, var(--blue-deep), var(--blue-soft)); }

/* Hoja tipo planilla */
table.sheet thead th { background: var(--black-3); color: var(--blue-soft); }
table.sheet th.band, table.sheet th.corner { background: var(--black); color: #fff; letter-spacing: .08em; }
table.sheet th.calc { background: var(--black-2); color: var(--gray-mute); }
table.sheet th.prod { background: var(--black-2); }
table.sheet tfoot td, table.sheet tfoot th { background: var(--black-3); }

/* Login: como el hero de vexum.site */
.login { background: transparent; }
.login .card { background: rgba(17, 18, 20, .88); border-color: var(--line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 102, 255, .12); backdrop-filter: blur(10px); padding: 2rem 1.75rem; width: min(400px, 100%); }
.login .card input { background: var(--black-3); }
.login-brand { text-align: center; margin-bottom: 1.4rem; }
.login-logo { width: min(210px, 70%); height: auto; display: block; margin: 0 auto .9rem; }
.login-brand .eyebrow { justify-content: center; }
.login-foot { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; font-size: .76rem; color: var(--gray-mute); z-index: 1; margin: 0; }
.login-foot a { color: var(--gray-mid); text-decoration: none; font-weight: 700; }
.login-foot a:hover { color: #fff; }
.login .card { position: relative; z-index: 1; }
/* Fondo de código en el ingreso, con una sombra que despeja la tarjeta */
.login-code { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.login::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 420px 380px at 50% 50%, rgba(8, 9, 11, .82), rgba(8, 9, 11, .2) 70%, transparent); }
.toteat-upload { cursor: pointer; margin-left: .5rem; }
.toteat-upload.busy { opacity: .6; pointer-events: none; }
.toteat-upload.busy::after { content: " …"; }
/* Botón conector de Toteat */
.conector .conector-pasos { margin: .8rem 0 .4rem; padding-left: 1.2rem; display: grid; gap: .7rem; }
.conector .conector-pasos li::marker { color: var(--blue-soft, #3d85ff); font-weight: 700; }
.conector-boton { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0 .3rem; }
#bookmarklet { cursor: grab; box-shadow: 0 0 0 4px rgba(0, 102, 255, .18); }
#bookmarklet:active { cursor: grabbing; }
/* Resumen: todas las barras por día */
.month-nav { display: inline-flex; align-items: center; gap: .35rem; }
.month-nav input[type="month"] { width: auto; min-width: 150px; }
.resumen-wrap { max-height: none; }
table.sheet.resumen td.num { min-width: 92px; }
table.sheet.resumen th.prod a { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.35); }
table.sheet.resumen th.prod a:hover { color: var(--blue-soft); border-bottom-color: var(--blue-soft); }
table.sheet.resumen th.total-band { background: var(--blue); }
table.sheet.resumen tr.sin-noche td, table.sheet.resumen tr.sin-noche th { color: var(--gray-mute); }
table.sheet.resumen tbody tr:hover td, table.sheet.resumen tbody tr:hover th.prod { background: rgba(0, 102, 255, .08); }
table.sheet.resumen .badge { font-size: .65rem; padding: 0 .4rem; }
@media (max-width: 640px) {
  table.sheet.resumen th.prod, table.sheet.resumen th.corner { min-width: 128px; max-width: 140px; }
  .month-nav input[type="month"] { min-width: 0; }
}
/* Nombre propio de la instalación en el inicio de sesión (p. ej. "VEXUM x Club W") */
.login-wordmark { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 0 auto .9rem; }
.login-wordmark img { width: 46px; height: auto; }
.login-wordmark span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.login-wordmark strong { font-size: 1.95rem; font-weight: 800; letter-spacing: .03em; color: #fff; }
.login-wordmark em { font-style: normal; font-size: .95rem; font-weight: 700; letter-spacing: .14em; color: var(--blue-soft); margin-top: .35rem; }
/* Propinas */
.reparto-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; }
.reparto-row .field { max-width: 160px; }
.reparto-res { font-size: 1.05rem; padding-bottom: .45rem; }
.reparto-res strong { font-size: 1.5rem; color: var(--blue-soft); margin-right: .3rem; }
button.linklike { background: none; border: 0; padding: 0; color: var(--blue-soft); font: inherit; cursor: pointer; text-align: left; }
button.linklike:hover { text-decoration: underline; }
tr.sel td { background: rgba(0, 102, 255, .1); }
