/* Satrix · Gestión de avisos */
:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --ink-2: #3A3A3C;
  --muted: #6E6E73;
  --line: #ECECEF;
  --line-2: #F0F0F2;
  --soft: #F0F0F3;
  --blue: #0071E3; --blue-ink: #0059B8; --blue-bg: #E8F1FD;
  --green: #34A853; --green-ink: #1F7A35; --green-bg: #E8F5EC;
  --amber: #E8A317; --amber-ink: #8A5300; --amber-bg: #FFF4E0;
  --red: #D93025; --red-ink: #B3261E; --red-bg: #FDECEA;
  --violet: #8A5CD0; --violet-ink: #6A3FB5; --violet-bg: #F3EDFC;
  --grey: #8E8E93; --grey-bg: #EFEFF2;
  --radius: 18px;
  --shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: #0066CC; text-decoration: none; }
a:hover { color: #004C99; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* ── Cabecera ── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.88); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid rgba(0,0,0,0.07); padding: 10px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 7px 12px; border-radius: 9px; }
.nav a.on { background: #EDEDF0; color: var(--ink); font-weight: 600; }
.nav a:hover { background: #F2F2F5; }
.search { flex: 1 1 240px; max-width: 420px; display: flex; align-items: center; gap: 8px; background: #EDEDF0; border-radius: 10px; padding: 0 12px; height: 36px; }
.search input { border: 0; background: transparent; flex: 1; font: inherit; font-size: 14px; outline: none; min-width: 0; color: var(--ink); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #E8E8ED; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.me-name { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; font-weight: 600; }
.me-name span { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.linkbtn { border: 0; background: none; color: #0066CC; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }

.page { max-width: 1600px; margin: 0 auto; padding: 26px 28px 60px; }
.page.narrow { max-width: 1320px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-head p { margin-top: 4px; color: var(--muted); }

/* ── Tarjetas ── */
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card.tight { padding: 14px 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border-radius: 16px; padding: 15px 17px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px; color: var(--ink); }
.kpi .lbl { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .val { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.alerta { box-shadow: 0 0 0 1.5px #F4B4AE; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.azul { background: var(--blue); } .dot.verde { background: var(--green); } .dot.ambar { background: var(--amber); } .dot.rojo { background: var(--red); } .dot.gris { background: var(--grey); } .dot.violeta { background: var(--violet); }

/* ── Chips ── */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.azul { color: var(--blue-ink); background: var(--blue-bg); }
.chip.verde { color: var(--green-ink); background: var(--green-bg); }
.chip.ambar { color: var(--amber-ink); background: var(--amber-bg); }
.chip.rojo { color: var(--red-ink); background: var(--red-bg); }
.chip.gris { color: var(--ink-2); background: var(--grey-bg); }
.chip.violeta { color: var(--violet-ink); background: var(--violet-bg); }
.g { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; }
.g.verde { color: var(--green-ink); } .g.rojo { color: var(--red-ink); } .g.ambar { color: var(--amber-ink); }
.ia { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--violet-ink); background: var(--violet-bg); padding: 2px 6px; border-radius: 6px; }

/* ── Botones y formularios ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 15px; min-height: 38px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--blue); color: #fff; } .btn.primary:hover { background: #0062C4; color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.soft { background: var(--soft); color: var(--ink); font-weight: 500; } .btn.soft:hover { background: #E6E6EA; color: var(--ink); }
.btn.outline { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,0.12); font-weight: 500; }
.btn.danger { background: #fff; color: var(--red-ink); box-shadow: 0 0 0 1px rgba(0,0,0,0.12); font-weight: 500; }
.btn.wa { background: #fff; color: var(--green-ink); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn.sm { padding: 6px 11px; min-height: 32px; font-size: 13px; border-radius: 9px; }
.btn.lg { min-height: 52px; font-size: 16px; border-radius: 14px; width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: #F5F5F7; border: 0; border-radius: 10px; padding: 9px 12px; min-height: 40px; outline: none; width: 100%;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--blue); background: #fff; }
textarea { resize: vertical; min-height: 80px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.seg { display: inline-flex; background: #E8E8ED; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button, .seg label { border: 0; background: transparent; border-radius: 8px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg .on, .seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 0; background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.pill.on { background: var(--ink); color: #fff; font-weight: 600; box-shadow: none; }
.switch { width: 42px; height: 26px; border-radius: 999px; background: #D1D1D6; position: relative; display: inline-block; border: 0; cursor: pointer; flex-shrink: 0; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: left 0.15s; }
.switch.on { background: var(--green); } .switch.on::after { left: 19px; }

/* ── Flash ── */
.flash { max-width: 1600px; margin: 14px auto 0; padding: 0 28px; }
.flash div { border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 500; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flash .ok { background: var(--green-bg); color: var(--green-ink); }
.flash .error { background: var(--red-bg); color: var(--red-ink); }
.flash .aviso { background: var(--amber-bg); color: var(--amber-ink); }

/* ── Tablero ── */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; flex: 999 1 760px; min-width: 0; }
.lane { background: #EDEDF0; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.lane.rojo { background: #FBEDEB; }
.lane-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; }
.lane-head .t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lane-head .t b { font-size: 15px; }
.lane-head .t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; background: #fff; color: var(--ink-2); padding: 3px 9px; border-radius: 999px; }
.bar { height: 5px; border-radius: 999px; background: #E3E3E8; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.acard { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
a.acard:hover { box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 6px 18px rgba(0,0,0,0.07); color: var(--ink); }
.acard .t { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.acard .d { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.acard .m { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.nota { font-size: 12.5px; border-radius: 9px; padding: 7px 9px; line-height: 1.35; background: var(--bg); color: var(--ink-2); }
.nota.azul { background: var(--blue-bg); color: var(--blue-ink); } .nota.ambar { background: var(--amber-bg); color: var(--amber-ink); } .nota.verde { background: var(--green-bg); color: var(--green-ink); } .nota.rojo { background: var(--red-bg); color: var(--red-ink); } .nota.violeta { background: var(--violet-bg); color: var(--violet-ink); }

.alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; margin-bottom: 18px; }
.alert { background: #fff; border-radius: 16px; padding: 13px 15px; box-shadow: 0 0 0 1px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 13px; color: var(--ink); }
.alert.rojo { background: #FFF6F5; box-shadow: 0 0 0 1px #F6CFCB; } .alert.ambar { background: #FFF9EE; box-shadow: 0 0 0 1px #F3DDB0; }
.alert .n { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; background: var(--grey-bg); }
.alert.rojo .n { background: var(--red-bg); color: var(--red-ink); } .alert.ambar .n { background: var(--amber-bg); color: var(--amber-ink); }
.alert .tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.alert .tx b { font-size: 14.5px; } .alert .tx span { font-size: 12.5px; color: var(--muted); }

.feed-item { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.feed-item:first-of-type { border-top: 0; }
.feed-item .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.list-row:first-child { border-top: 0; }

/* ── Tablas ── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 10px; border-bottom: 1px solid #F3F3F5; vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #FAFAFB; }

/* ── Programar ── */
.agenda { display: grid; grid-template-columns: 170px repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 700px; }
.cell { border: 0; border-radius: 12px; padding: 10px; min-height: 96px; background: #F7F7F9; display: flex; flex-direction: column; gap: 5px; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.cell:hover { background: #F0F0F4; }
.cell.full, .cell.aus { background: #F2F2F4; opacity: 0.7; cursor: not-allowed; }
.cell.ofrecido { background: var(--blue-bg); box-shadow: inset 0 0 0 1.5px #7DB3F0; }
.cell.sel { background: var(--blue-bg); box-shadow: inset 0 0 0 2.5px var(--blue); }
.cell .n { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell .z { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .k { font-size: 12px; font-weight: 600; }
.k.cerca { color: var(--green-ink); } .k.medio { color: var(--muted); } .k.lejos { color: var(--amber-ink); }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 14px; padding: 11px 13px; box-shadow: var(--shadow); color: var(--ink); }
.pitem.on { box-shadow: 0 0 0 2px var(--blue); }

/* ── Fotos ── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.thumb { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.thumb img, .thumb .ph { width: 100%; height: 92px; object-fit: cover; border-radius: 11px; background: #EEEEF1; display: block; }
.thumb.ok img { box-shadow: 0 0 0 2px var(--green); }

/* ── Línea de estados ── */
.steps { display: flex; align-items: center; min-width: 720px; }
.step { display: flex; align-items: center; flex: 1; }
.step .b { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 92px; font-size: 12px; text-align: center; color: var(--grey); }
.step .c { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px #D1D1D6; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; background: #fff; }
.step.done .c { background: var(--green); box-shadow: none; } .step.done .b { color: var(--ink-2); }
.step.now .c { box-shadow: inset 0 0 0 2px var(--blue); } .step.now .b { color: var(--blue-ink); font-weight: 600; }
.step .ln { flex: 1; height: 2px; background: #E3E3E8; margin-bottom: 20px; }
.step.done .ln { background: var(--green); }

/* ── Móvil (técnico y cliente) ── */
body.movil { background: var(--bg); }
.app { max-width: 520px; margin: 0 auto; padding: 18px 16px 90px; display: flex; flex-direction: column; gap: 14px; }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 8px; }
.app-top small { font-size: 13px; color: var(--muted); font-weight: 500; }
.app-top h1 { font-size: 30px; }
.back { color: #0066CC; font-size: 16px; font-weight: 500; padding: 8px 0; display: inline-block; min-height: 44px; }
.mcard { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04); overflow: hidden; }
.mcard > summary, .mcard > .hd { list-style: none; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.mcard > summary::-webkit-details-marker { display: none; }
.mcard[open] { box-shadow: 0 0 0 2px var(--blue), 0 10px 28px rgba(0,113,227,0.14); }
.mcard .bd { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.num { width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.num.done { background: var(--green); }
.timer { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.timer .clock { font-family: var(--mono); font-size: 46px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer .btn.soft { background: rgba(255,255,255,0.14); color: #fff; }
.timer .btn.white { background: #fff; color: var(--ink); }
.photo-btn { border: 0; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 0 0 1.5px #D1D1D6; display: flex; flex-direction: column; gap: 8px; text-align: left; color: var(--ink); font: inherit; cursor: pointer; position: relative; }
.photo-btn.ok { box-shadow: 0 0 0 2px var(--green); }
.photo-btn .pv { height: 88px; border-radius: 11px; background: #EEEEF1 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #A1A1A6; font-size: 26px; }
.photo-btn .ck { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.photo-btn.ok .ck { display: flex; }
.radio-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 13px 15px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); cursor: pointer; min-height: 56px; }
.radio-card input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.radio-card:has(input:checked) { box-shadow: 0 0 0 2px var(--blue); background: #F7FAFF; }
.offline { background: var(--grey-bg); border-radius: 12px; padding: 9px 12px; font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.sticky-bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(245,245,247,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(0,0,0,0.06); }
.sticky-bottom .in { max-width: 520px; margin: 0 auto; }
.sig { width: 100%; height: 200px; background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1.5px #D1D1D6; touch-action: none; display: block; }
.tabs-m { display: grid; grid-template-columns: 1fr 1fr; background: #E8E8ED; border-radius: 12px; padding: 3px; }
.tabs-m a { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tabs-m a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
#map { height: 300px; border-radius: 18px; overflow: hidden; background: #EEF1F4; }

/* ── Login ── */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth .card { width: 100%; max-width: 400px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 760px) {
  .top { padding: 10px 16px; }
  .page { padding: 20px 16px 50px; }
  .flash { padding: 0 16px; }
  h1 { font-size: 26px; }
  .me-name { display: none; }
}
@media print { .top, .flash, .no-print { display: none !important; } body { background: #fff; } }

/* Barra de pruebas (modo beta y «ver como») */
.barra-pruebas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 16px; background: #1D1D1F; color: #F5F5F7; font-size: 12.5px; }
.barra-pruebas .bp-beta { background: #FF9F0A; color: #1D1D1F; font-weight: 700; letter-spacing: .04em; border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.barra-pruebas .bp-txt { color: #C7C7CC; }
.barra-pruebas .bp-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.barra-pruebas label { color: #C7C7CC; }
.barra-pruebas select { width: auto; min-height: 28px; padding: 2px 8px; font-size: 12.5px; background: #3A3A3C; color: #fff; border-radius: 7px; }
.barra-pruebas .bp-volver { border: 0; background: #0A84FF; color: #fff; border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.barra-pruebas label, .barra-pruebas .bp-volver { white-space: nowrap; }
@media (max-width: 600px) {
  .barra-pruebas { padding: 6px 12px; gap: 8px; }
  .barra-pruebas .bp-txt { display: none; }
  .barra-pruebas .bp-form { margin-left: 0; flex: 1; min-width: 0; }
  .barra-pruebas select { flex: 1; min-width: 0; }
}

.novedades { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.25); cursor: pointer; }

.thumb-wrap { position: relative; display: block; }
.thumb-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--red-ink, #C62828); color: #fff; font: 700 14px/1 system-ui; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }

.llevar { display: block; background: var(--amber-bg); color: var(--amber-ink); border-radius: 10px; padding: 7px 10px; font-size: 13.5px; }
.aviso-orden { background: var(--amber-bg); color: var(--amber-ink); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.aviso-orden .linkbtn { color: var(--amber-ink); text-decoration: underline; font-weight: 600; padding: 0; }
.hora-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.seg label:has(input:checked) { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.gear { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.gear:hover, .gear.on { background: #EDEDF0; color: var(--ink); }

/* ── Programar v2 ── */
.prog .prog-lista { max-width: 360px; gap: 10px; display: flex; flex-direction: column; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pitem[draggable] { cursor: grab; }
.arrastrando .cell:not([disabled]) { outline: 1.5px dashed #9BC4F0; outline-offset: -3px; }
.ficha-llamada { padding: 0; overflow: hidden; }
.fl-top { padding: 20px 24px 14px; display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: space-between; align-items: flex-start; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--muted); }
.fl-nombre { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.fl-tel { font-family: var(--mono); font-size: 21px; font-weight: 500; letter-spacing: .02em; }
.btn.big { min-height: 46px; padding: 11px 18px; font-size: 15px; border-radius: 12px; }
.fl-bloques { padding: 0 24px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fl-b { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fl-b b { font-size: 15px; }
.fl-notas { padding: 0 24px 14px; display: flex; flex-direction: column; gap: 8px; }
.fl-sugeridos { border-top: 1px solid var(--line-2, #EEE); background: #FBFBFC; padding: 14px 24px; display: flex; flex-direction: column; gap: 10px; }
.sug-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sug { border: 0; text-align: left; font: inherit; border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-height: 74px; }
.sug-dia { font-size: 17px; font-weight: 700; }
.sug-tec { font-size: 13.5px; font-weight: 500; }
.sug-mot { font-size: 12.5px; color: var(--muted); }
.sug.sel { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(0,113,227,.3); }
.sug.sel .sug-mot { color: rgba(255,255,255,.85); }
.fl-barra { border-top: 1px solid var(--line-2, #EEE); padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fl-barra.lista { background: #EEF5FE; }
.fl-barra .grow { flex: 1 1 240px; min-width: 0; font-size: 15px; }
.fl-nota { flex: 1 1 220px; width: auto; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.cell.sugerido { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.cell.sugerido .etq { color: var(--green-ink); }
.cell.full { background: var(--red-bg); }
.cell .bar > span { background: var(--grey, #8E8E93); }
.cell.full .bar > span { background: var(--red); }
.cell.sel { background: var(--blue) !important; color: #fff; box-shadow: 0 6px 16px rgba(0,113,227,.35) !important; }
.cell.sel .z, .cell.sel .k, .cell.sel .small, .cell.sel .etq { color: #fff !important; }
.cell.sel .bar > span { background: #fff; }
.cell.over { box-shadow: inset 0 0 0 3px var(--blue) !important; }
.cell .etq { font-size: 11px; font-weight: 700; color: var(--muted); min-height: 13px; }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
@media (max-width: 900px) { .fl-bloques, .sug-grid { grid-template-columns: 1fr; } }

/* ── Planificación ── */
.t-verde { background: #E7F6EC; box-shadow: inset 0 0 0 1px #9FD8B0; }
.t-ambar { background: #FFF4E0; box-shadow: inset 0 0 0 1px #F0C987; }
.t-rojo { background: #FDECEA; box-shadow: inset 0 0 0 1px #F2B8B3; }
.t-gris { background: #ECECEF; }
.t-txt-verde { color: #1F7A35; } .t-txt-ambar { color: #8A5300; } .t-txt-rojo { color: #B3261E; } .t-txt-gris { color: var(--muted); }
.t-verde .bar > span, .bar.t-verde > span { background: #34A853; }
.t-ambar .bar > span, .bar.t-ambar > span { background: #E8A33D; }
.t-rojo .bar > span, .bar.t-rojo > span { background: #D93025; }
.bar.t-verde, .bar.t-ambar, .bar.t-rojo, .bar.t-gris { box-shadow: none; background: #EDEDF0; }
.plan-sem { display: grid; grid-template-columns: 160px repeat(6, minmax(0, 1fr)); gap: 8px; min-width: 900px; }
.plan-cab { display: flex; flex-direction: column; gap: 3px; padding: 2px 4px 6px; color: var(--ink); }
.plan-cab b.hoy, .plan-dia b.hoy { color: #fff; background: var(--blue); border-radius: 999px; padding: 0 8px; align-self: flex-start; }
.plan-cel { border-radius: 12px; padding: 10px 11px; min-height: 84px; display: flex; flex-direction: column; gap: 5px; color: var(--ink); min-width: 0; }
.plan-cel .n { font-size: 17px; font-variant-numeric: tabular-nums; }
.plan-cel .bar, .plan-dia .bar { height: 5px; background: rgba(0,0,0,.08); }
.plan-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-width: 860px; }
.plan-dia { border-radius: 12px; padding: 9px 10px; min-height: 90px; display: flex; flex-direction: column; gap: 5px; color: var(--ink); }
.plan-dia.fuera { opacity: .45; }
.tec-chip { font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; box-shadow: none !important; }
.plan-diacols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.plan-av { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-2); color: var(--ink); }
.plan-av .num { width: 22px; height: 22px; border-radius: 50%; background: #F0F0F3; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hueco { border-radius: 10px; padding: 9px 11px; background: #E7F6EC; color: #1F7A35; font-size: 13px; font-weight: 600; }
.plan-cel, .plan-cel:visited, .plan-dia, .plan-dia:visited, .plan-cab, .plan-cab:visited { color: var(--ink); }

.t-pasado { background: #F7F7F9; box-shadow: inset 0 0 0 1px #EDEDF0; }
.t-pasado .bar > span { background: #AEAEB2; }
.plan-av, .plan-av:visited { color: var(--ink); }
.plan-av .num { color: var(--ink-2) !important; background: #E8E8ED !important; }

.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.25); max-width: 90vw; }
.toast.error { background: var(--red-ink); }
a.llamando { opacity: .6; pointer-events: none; }

/* ── Hoy v2 ── */
.tareas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tarea { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; color: var(--ink); min-height: 122px; }
.tarea:visited { color: var(--ink); }
.tarea.t-rojo-b { box-shadow: inset 0 0 0 1.5px #F2B8B3; }
.tarea.t-ambar-b { box-shadow: inset 0 0 0 1.5px #F0C987; }
.tarea .tt { font-size: 13.5px; font-weight: 600; }
.tarea .tn { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.tarea .td { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.tarea .ta { margin-top: auto; font-size: 13.5px; font-weight: 600; color: #0066CC; }
.tec-fila { display: grid; grid-template-columns: 220px minmax(0, 1fr) 230px; gap: 16px; align-items: center; padding: 14px 18px; }
.puntos { display: flex; gap: 3px; }
.puntos span, .leyenda i.p-hecho, .leyenda i.p-curso, .leyenda i.p-pieza, .leyenda i.p-pend { flex: 1; height: 8px; border-radius: 3px; }
.leyenda i.p-hecho, .leyenda i.p-curso, .leyenda i.p-pieza, .leyenda i.p-pend { width: 14px; flex: none; }
.p-hecho { background: #34A853; } .p-curso { background: var(--blue); } .p-pieza { background: #E8A33D; } .p-pend, .p-vacio { background: #E3E3E8; }
.semana5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.numeros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.numeros > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.numeros b { font-size: 22px; font-variant-numeric: tabular-nums; }
.numeros span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .tareas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tec-fila { grid-template-columns: 1fr; } }
/* Para subir a marcas */
table.t tr.grupo td { background: var(--grey-bg); padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
/* Teléfono web (Zadarma) */
.tel-led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C7C7CC; margin-right: 6px; vertical-align: middle; }
.tel-led.on { background: var(--green-ink); box-shadow: 0 0 0 3px var(--green-bg); }
body.telefono-win { background: var(--bg, #F5F5F7); }
/* Cabecera: que quepa en una línea con el botón de teléfono */
.top { gap: 10px 18px; }
.nav a { padding: 7px 10px; }
.search { flex: 1 1 180px; min-width: 150px; }
.search input[type=search] { background: transparent; box-shadow: none; padding: 0; height: 36px; border-radius: 0; }
.search input[type=search]:focus { background: transparent; box-shadow: none; }
.ico-btn { position: relative; width: 36px; height: 36px; border-radius: 10px; background: #EDEDF0; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico-btn:hover { background: #E3E3E8; }
.ico-btn .tel-led { position: absolute; top: 6px; right: 6px; margin: 0; width: 7px; height: 7px; }
@media (max-width: 1480px) { .me-name { display: none; } }
@media (max-width: 1260px) { .search { order: 10; flex-basis: 100%; max-width: none; } }
/* Aviso nuevo: buscador de clientes */
.buscador-cli { position: relative; }
.cli-resultados { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 30; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.cli-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; background: #fff; padding: 10px 12px; font: inherit; cursor: pointer; border-top: 1px solid var(--line-2, #eee); }
.cli-item:first-child { border-top: 0; }
.cli-item:hover, .cli-item:focus { background: #F2F2F5; outline: none; }
details.editar > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.editar > summary::-webkit-details-marker { display: none; }
