/* ASL Caribe Access – Portal de reservas
   Diseño propio: minimalista, aireado, con la paleta de la marca. */
:root {
  --brand: #33cccc;          /* azul claro de la marca */
  --brand-hover: #2bb8b8;
  --brand-dark: #138a8c;     /* para texto/enlaces sobre blanco */
  --brand-soft: #e8f8f8;
  --ink: #3d3b4d;            /* gris oscuro del logo */
  --text: #2a2936;
  --muted: #7d7b8c;
  --line: #ebebf0;
  --bg: #f6f6f8;
  --surface: #ffffff;
  --danger: #e0394f;
  --ok: #1e9e63;
  --warn: #c48a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 28, 45, .04), 0 8px 24px rgba(30, 28, 45, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { letter-spacing: -.01em; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art img { width: 240px; max-width: 70%; }
.auth-art h2 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; font-weight: 600; max-width: 420px; }
.auth-art p { color: #c9c7d6; max-width: 400px; margin: 0; }
.auth-art .ring { position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 56px solid rgba(51, 204, 204, .12); }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; }
.switch { margin-top: 18px; text-align: center; color: var(--muted); }
.switch button { background: none; border: 0; color: var(--brand-dark); font-weight: 600; cursor: pointer; padding: 0; }

/* ---------- App shell ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.topbar-in { max-width: 1340px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 22px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-weight: 700; font-size: 15px; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); }
.topnav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.nav, .admin-only, .interp-only { display: flex; align-items: center; gap: 2px; }
.admin-only { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav a { padding: 8px 10px; border-radius: 99px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--bg); }
.nav a.active { color: var(--ink); background: var(--brand-soft); }
.nav-right { display: flex; align-items: center; gap: 10px; flex: none; }
.me { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); padding: 4px 10px 4px 4px; border-radius: 99px; }
.me:hover, .me.active { background: var(--bg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.icon-link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.icon-link:hover { color: var(--text); background: var(--bg); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; }

.page { max-width: 1240px; margin: 0 auto; padding: 28px 24px 48px; min-height: calc(100vh - 64px - 64px); }
.page-title { font-size: 26px; font-weight: 600; margin: 0 0 22px; color: var(--ink); }
.foot { max-width: 1240px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot b { color: var(--text); font-weight: 600; }

/* ---------- Forms ---------- */
.grid { display: grid; gap: 16px 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
label.f { display: block; font-size: 13px; font-weight: 500; color: #4c4a5a; }
label.f > input, label.f > select, label.f > textarea { display: block; margin-top: 6px; }
label.f > .hint { display: block; margin-top: 6px; }
label.f .req { color: var(--danger); }
input, select, textarea { border: 1px solid #dedde5; border-radius: 10px; padding: 10px 12px; background: var(--surface); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(51, 204, 204, .22); }
input:disabled { background: var(--bg); color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.hint.phi { color: #5a55c8; }
.block-title { margin: 30px 0 12px; font-size: 13px; font-weight: 600; color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--brand); background: var(--brand); color: var(--ink); border-radius: 10px; padding: 10px 18px; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { background: transparent; border-color: #dedde5; color: var(--text); }
.btn.ghost:hover { background: var(--bg); }
.btn.gray { background: var(--bg); border-color: var(--bg); color: #5d5b6c; }
.btn.danger { background: transparent; color: var(--danger); border-color: #f4c7ce; }
.btn.danger:hover { background: #fdeef0; }
.btn.sm { padding: 6px 12px; font-size: 13px; font-weight: 500; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.link-btn { background: none; border: 0; color: var(--brand-dark); font-weight: 600; cursor: pointer; padding: 8px 0; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--brand); color: var(--ink); font-size: 18px; cursor: pointer; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ---------- Nueva reserva ---------- */
.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 16px; }
.step { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.step-head h3 { margin: 3px 0 0; font-size: 16px; font-weight: 600; }
.step-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.step-body { padding-left: 42px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice svg { width: 26px; height: 26px; color: var(--muted); margin-bottom: 6px; }
.choice b { font-weight: 600; }
.choice span { font-size: 12.5px; color: var(--muted); }
.choice:hover { border-color: #cfcfda; }
.choice.active { border-color: var(--brand); background: var(--brand-soft); }
.choice.active svg { color: var(--brand-dark); }
.slots { display: flex; flex-direction: column; gap: 10px; }
.slot { display: grid; grid-template-columns: 1.3fr 1fr 1fr 36px; gap: 12px; align-items: end; padding: 14px; border-radius: 12px; background: var(--bg); }
.slot input, .slot select { background: var(--surface); }
.slot .x { width: 36px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; border-radius: 8px; }
.slot .x:hover { color: var(--danger); background: #fdeef0; }
.map { height: 200px; border-radius: 12px; margin-top: 14px; background: var(--bg); }
.summary { position: sticky; top: 88px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.summary h3 { margin: 0 0 4px; font-size: 16px; }
.summary dl { margin: 0 0 6px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 13px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.cost-box { border-radius: 12px; padding: 12px 14px; background: var(--bg); font-size: 13px; }
.cost-box p { margin: 6px 0 0; }
.cost-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.cost-row.total { color: var(--text); font-weight: 700; font-size: 16px; }
.cost-box.over { background: #fdeef0; color: #a3182c; }
.cost-box.low { background: #fff6dc; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--muted); }

/* ---------- Listas ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; min-width: 200px; }
.search { border-radius: 99px; padding-left: 16px; }
.tabs-pill { display: inline-flex; background: var(--surface); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); flex-wrap: wrap; }
.tabs-pill button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tabs-pill button span { font-size: 11.5px; opacity: .7; margin-left: 2px; }
.tabs-pill button.active { background: var(--ink); color: #fff; }
.booking-cards { display: flex; flex-direction: column; gap: 10px; }
.bcard { display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px 14px 14px; text-decoration: none; color: var(--text); transition: transform .12s; }
.bcard:hover { transform: translateY(-1px); }
.bdate { width: 64px; height: 64px; border-radius: 12px; background: var(--brand-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); }
.bdate b { font-size: 22px; line-height: 1; }
.bdate span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); margin-top: 2px; }
.btitle { font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bmeta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 4px; }
.bmeta .mod { display: inline-flex; align-items: center; gap: 5px; }
.bmeta svg { width: 15px; height: 15px; }
.bside { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-weight: 600; }
.empty-state { background: var(--surface); border-radius: var(--radius); padding: 48px 20px; text-align: center; color: var(--muted); box-shadow: var(--shadow); }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td input, td select { padding: 7px 10px; }
td select.role { min-width: 110px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafafb; }
.empty { color: var(--muted); padding: 22px 10px; text-align: center; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--bg); color: #66647a; white-space: nowrap; }
.pill.solicitada, .pill.pending { background: #fff4d6; color: #9a6c00; }
.pill.confirmada, .pill.approved { background: #e2f6ec; color: #17794c; }
.pill.cancelada, .pill.blocked { background: #fdeaed; color: #b4233a; }
.pill.completada { background: var(--brand-soft); color: var(--brand-dark); }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat b { display: block; font-size: 26px; font-weight: 700; color: var(--ink); }
.stat span { color: var(--muted); font-size: 12.5px; }
dl.kv { display: grid; grid-template-columns: 210px 1fr; gap: 10px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; white-space: pre-wrap; }
pre.log { background: var(--surface); box-shadow: var(--shadow); padding: 14px; border-radius: 12px; font-size: 12px; white-space: pre-wrap; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; min-width: 120px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.low > i { background: var(--danger); }

.msg { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; }
.msg.err { background: #fdeaed; color: #a3182c; }
.msg.ok { background: #e2f6ec; color: #146c3f; }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 1000; max-width: min(420px, calc(100vw - 32px)); }

/* ---------- Disponibilidad (intérpretes) ---------- */
.avail { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.avail input { display: none; }
.switch-ui { width: 34px; height: 20px; border-radius: 99px; background: #d8d7e0; position: relative; transition: background .15s; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.avail input:checked + .switch-ui { background: var(--ok); }
.avail input:checked + .switch-ui::after { transform: translateX(14px); }
.avail:has(input:checked) { color: var(--ok); }

/* ---------- Intérprete inmediato ---------- */
.sos { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--brand-soft); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sos:hover { background: var(--brand); color: var(--ink); }
.sos-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.sos:hover .sos-dot { background: var(--ink); }
label.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
label.check input { width: auto; margin-top: 3px; accent-color: var(--brand-dark); }
label.check .hint { display: block; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--brand-dark); color: #fff; font-size: 11px; text-align: center; margin-left: 2px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.call { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.call .tile { position: relative; background: var(--ink); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; display: grid; place-items: center; color: #c9c7d6; text-align: center; padding: 10px; }
.call .tile > div[id] { position: absolute; inset: 0; }
.call .tile .label { position: absolute; left: 12px; bottom: 10px; font-size: 12px; background: rgba(0,0,0,.4); color: #fff; padding: 3px 10px; border-radius: 99px; z-index: 2; }
.call-controls { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.waiting { font-size: 15px; }
.waiting .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-right: 8px; animation: pulse 1s infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .booking-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .menu-btn { display: block; }
  .topnav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; box-shadow: 0 12px 24px rgba(0,0,0,.06); }
  .topnav.open { display: flex; }
  .nav, .admin-only, .interp-only { flex-direction: column; align-items: stretch; }
  .admin-only { margin: 8px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .nav-right { justify-content: space-between; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 20px; gap: 24px; }
  .auth-art h2 { font-size: 24px; }
  .topbar-in, .page, .foot { padding-left: 16px; padding-right: 16px; }
  .page { padding-top: 20px; }
  .page-title { font-size: 22px; }
  .g2, .g3, .choices { grid-template-columns: 1fr; }
  .step { padding: 18px 16px; }
  .step-body { padding-left: 0; }
  .slot { grid-template-columns: 1fr 1fr 36px; }
  .slot label:first-child { grid-column: 1 / -1; }
  .bcard { grid-template-columns: 52px 1fr; padding: 12px; gap: 12px; }
  .bdate { width: 52px; height: 52px; }
  .bside { grid-column: 2; align-items: flex-start; }
  .call { grid-template-columns: 1fr; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { margin-top: 6px; }
  .toolbar input, .toolbar select { min-width: 0; flex: 1; }
}

/* ---------- Facturas ---------- */
.msg.info { background: var(--brand-soft); color: #1f5f60; }
label.f.inline { display: flex; align-items: center; gap: 8px; }
label.f.inline > input { margin-top: 0; }
.pill.inv-borrador { background: #fff4d6; color: #9a6c00; }
.pill.inv-emitida { background: #e2f6ec; color: #17794c; }
.pill.inv-anulada { background: #fdeaed; color: #b4233a; }
details.log { margin-bottom: 14px; font-size: 13px; color: var(--muted); }
details.log pre { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.invoice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 44px; max-width: 920px; margin: 0 auto; position: relative; }
.invoice.anulada::after { content: "ANULADA"; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 84px; font-weight: 700; color: rgba(224, 57, 79, .12); pointer-events: none; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 3px solid var(--brand); }
.inv-head > div:first-child { display: flex; gap: 14px; align-items: flex-start; }
.inv-head img { width: 54px; height: 54px; object-fit: contain; background: var(--ink); border-radius: 12px; padding: 6px; }
.inv-head > div:first-child div { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.inv-head > div:first-child b { font-size: 17px; color: var(--ink); }
.inv-meta { text-align: right; }
.inv-meta h2 { margin: 0 0 8px; font-size: 28px; color: var(--ink); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.inv-meta dl { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 0 0 8px; font-size: 13px; }
.inv-meta dt { color: var(--muted); } .inv-meta dd { margin: 0; font-weight: 600; }
.inv-to { padding: 20px 0; display: flex; flex-direction: column; gap: 2px; }
.inv-to b { font-size: 16px; color: var(--ink); }
.inv-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 22px; }
.inv-sum div { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.inv-sum span { font-size: 12px; color: var(--muted); } .inv-sum b { font-size: 18px; color: var(--ink); } .inv-sum small { color: var(--muted); }
.inv-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-lines th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 6px; }
.inv-lines td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.inv-lines .num, .inv-lines th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.inv-lines tfoot td { border: 0; padding-top: 16px; font-size: 18px; font-weight: 700; color: var(--ink); text-align: right; }
.inv-lines th:first-child { width: 58%; }
.inv-lines input.ed { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fcfcfd; margin: 0; }
.inv-lines input.ed.n { width: 90px; text-align: right; }
.inv-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .invoice { padding: 22px 16px; }
  .inv-head { flex-direction: column; } .inv-meta { text-align: left; } .inv-meta dl { justify-content: start; }
  .inv-lines { display: block; overflow-x: auto; }
}
@media print {
  @page { size: letter; margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .topbar, .foot, .no-print, .page-title, .toast { display: none !important; }
  .page { padding: 0; max-width: none; min-height: 0; }
  .invoice { box-shadow: none; border: 0; padding: 0; max-width: none; }
  .inv-sum div { border: 1px solid var(--line); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Selector de idioma ---------- */
.lang-switch { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600; flex: none; }
.lang-switch span { padding: 4px 9px; border-radius: 99px; color: var(--muted); }
.lang-switch span.on { background: var(--ink); color: #fff; }
.auth-form { position: relative; }
.auth-lang { position: absolute; top: 20px; right: 24px; }
@media print { .lang-switch { display: none !important; } }
@media (min-width: 1301px) { .role-admin #who-name { display: none; } .role-admin .me { padding-right: 4px; } .role-admin .avail-txt { display: none; } }

/* ---------- Llamada desde un código QR ---------- */
.kiosk .nav, .kiosk .me, .kiosk #logout, .kiosk #sos, .kiosk #avail, .kiosk .menu-btn { display: none !important; }
.kiosk .topnav { display: flex !important; position: static; justify-content: flex-end; box-shadow: none; border: 0; padding: 0; background: none; flex-direction: row; }
.kiosk .nav-right { border: 0; padding: 0; }
.kiosk-done { margin-top: 18px; max-width: 640px; }
.kiosk-done h3 { margin: 0 0 6px; color: var(--ink); }
.qr-page { background: var(--surface); min-height: 100vh; display: flex; flex-direction: column; }
.qr-head { background: var(--ink); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
.qr-head img { height: 44px; }
.qr-main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 24px 16px 32px; }
.qr-main h1 { font-size: 26px; line-height: 1.2; color: var(--ink); margin: 4px 0 8px; }
.qr-main .sub { color: var(--muted); margin: 0 0 22px; }
.qr-place { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; padding: 6px 12px; border-radius: 99px; margin: 0 0 10px; font-size: 13px; }
.qr-label { display: block; font-size: 13px; font-weight: 500; color: #4c4a5a; margin-bottom: 8px; }
.qr-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-choices button { flex: 1; min-width: 90px; padding: 14px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer; }
.qr-choices button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.qr-go { padding: 18px; font-size: 17px; }
.qr-foot { text-align: center; padding: 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- Cartel imprimible ---------- */
.poster { background: #fff; max-width: 680px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; }
.poster-top { background: var(--ink); padding: 26px; }
.poster-top img { height: 70px; }
.poster-body { padding: 28px 36px 30px; }
.poster h2 { font-size: 34px; line-height: 1.15; margin: 0; color: var(--ink); }
.poster h3 { font-size: 22px; margin: 4px 0 0; color: var(--brand-dark); font-weight: 600; }
.poster .qr-box { width: 300px; height: 300px; margin: 24px auto; padding: 12px; border: 4px solid var(--brand); border-radius: 18px; }
.poster .qr-box svg { width: 100%; height: 100%; display: block; }
.poster .place { font-weight: 700; font-size: 18px; color: var(--ink); }
.poster .steps { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: left; margin-top: 22px; font-size: 14px; }
.poster .steps ol { margin: 6px 0 0; padding-left: 18px; }
.poster .steps b { color: var(--ink); }
.poster-foot { background: var(--brand-soft); padding: 12px; font-size: 13px; color: var(--ink); }
.qr-thumb { width: 64px; height: 64px; }
.qr-thumb svg { width: 100%; height: 100%; }
@media print {
  .poster-mode .page > *:not(#view), .poster-mode #view > *:not(.poster) { display: none !important; }
  .poster { border: 0; max-width: none; }
}
.qr-card { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; }
.qr-card .stat { padding-right: 24px; }

/* De dónde viene una llamada por código QR */
.call-place { background: #e6f9f9; border-left: 4px solid var(--brand, #33cccc); padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; font-size: 16px; }
.geo { font-size: 13px; font-weight: 600; color: #6b6a78; margin-top: 4px; }
.geo span { font-weight: 400; }
.geo.ok { color: #17806f; }
.geo.bad { color: #b45309; }

/* Intérpretes conectados (Super Admin) */
.presence { margin-bottom: 16px; }
.presence-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.presence-head h3 { margin: 0; }
.pres-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0; }
.pres { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 12px; border: 1px solid #e5e5ea; border-radius: 10px; background: #fff; }
.pres .hint { width: 100%; padding-left: 18px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: #c7c7cf; flex: none; }
.pres.disponible .pdot { background: #1fb88a; }
.pres.en_llamada .pdot { background: #33cccc; box-shadow: 0 0 0 3px #33cccc44; }
.pres.conectado .pdot { background: #e0a800; }
.pres.desconectado { opacity: .7; }
@media (min-width: 1181px) and (max-width: 1480px) { .role-admin .nav a { padding: 8px 6px; font-size: 14px; } }

/* Cola de llamadas */
.next-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; background: var(--surface, #fff); border: 1px solid var(--line, #e5e5ea); border-radius: 12px; padding: 12px 16px; margin: 0 0 12px; }
.next-bar:empty { display: none; }
.qpos { font-size: 13px; margin-top: 4px; white-space: nowrap; }
.qpos .late { color: #b45309; font-weight: 600; }

/* Llamada ofrecida por turno */
.offer { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(360px, calc(100vw - 32px)); background: var(--surface, #fff); border: 2px solid var(--brand, #33cccc); border-radius: 14px; padding: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.18); display: grid; gap: 8px; animation: offer-in .2s ease-out; }
.offer-top { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.offer-left { margin-left: auto; min-width: 36px; height: 36px; border-radius: 50%; background: var(--brand, #33cccc); color: var(--ink, #3d3b4d); font-weight: 700; display: grid; place-items: center; }
.offer-actions { display: flex; gap: 8px; margin-top: 4px; }
.offer-actions .btn { flex: 1; }
@keyframes offer-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Intérprete de apoyo */
#sup { margin: 0 0 12px; }
.sup-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--brand-soft, #e6f9f9); border-radius: 10px; padding: 8px 12px; }
#remote.multi { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: 100%; }
.rbox { width: 100%; height: 100%; min-height: 160px; }

/* Directorio */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tab { border: 1px solid var(--line, #e5e5ea); background: var(--surface, #fff); color: var(--muted, #6b6a78); border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--ink, #3d3b4d); border-color: var(--ink, #3d3b4d); color: #fff; }
.tab .count { font-weight: 500; opacity: .75; margin-left: 2px; }
.dir-form { margin-bottom: 16px; }
.dir-form h3 { margin: 0 0 12px; }
.dir-form .span2 { grid-column: span 2; }
.dir-form textarea { width: 100%; font: inherit; }
tr.muted td { opacity: .6; }
.pres-inline { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c7c7cf; margin-right: 6px; vertical-align: 1px; }
.pres-inline.disponible { background: #1fb88a; } .pres-inline.en_llamada { background: #33cccc; } .pres-inline.conectado { background: #e0a800; }
.late { color: #b45309; font-weight: 600; }
@media (max-width: 760px) { .dir-form .span2 { grid-column: auto; } }
.table-wrap a[href^="tel:"], .table-wrap a[href^="https://wa.me"] { white-space: nowrap; }

/* Facturas de intérpretes */
.pill.bill-borrador { background: #eef0f3; color: #555; } .pill.bill-enviada { background: #fff4d6; color: #8a5a00; }
.pill.bill-aprobada { background: #e0f2ff; color: #075985; } .pill.bill-pagada { background: #dcfce7; color: #166534; } .pill.bill-anulada { background: #fde2e2; color: #9b1c1c; }
.invoice .inv-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.invoice input.ld { width: 100%; min-width: 220px; }

/* ---------- Evaluaciones ---------- */
.rate-box { max-width: 560px; margin-top: 16px; }
.rate-box h3 { margin: 0 0 8px; }
.stars { display: flex; gap: 6px; margin-bottom: 10px; }
.star { font-size: 38px; line-height: 1; background: none; border: 0; cursor: pointer; color: #d8d7e0; padding: 2px; transition: transform .1s; }
.star:hover { transform: scale(1.12); }
.star.on { color: #f5b301; }
.rate-box textarea { width: 100%; }
.stars-txt { color: #f5b301; letter-spacing: 1px; white-space: nowrap; }
.stars-txt span { color: #d8d7e0; }

/* ---------- Hoja de servicio ---------- */
.sheet { max-width: 820px; }
.sheet-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-head img { height: 46px; background: var(--ink); padding: 6px 10px; border-radius: 8px; }
.sheet-head h2 { margin: 0; }
.sig-pad { position: relative; border: 1.5px dashed var(--muted); border-radius: 10px; background: #fff; max-width: 700px; }
.sig-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 700 / 220; touch-action: none; cursor: crosshair; border-radius: 10px; }
.sig-pad .btn { position: absolute; top: 8px; right: 8px; }
.sig-done { display: flex; align-items: flex-end; gap: 18px; margin: 18px 0 8px; flex-wrap: wrap; }
.sig-done img { width: 320px; max-width: 100%; border-bottom: 1.5px solid var(--ink); }
.sig-done div { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Reportes ---------- */
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.rep-detail { margin-top: 18px; }
.rep-detail summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
@media (max-width: 900px) { .rep-grid { grid-template-columns: 1fr; } }
.cred-new input { width: 100%; min-width: 90px; }

/* ---------- Videos en señas ---------- */
.sv-slot:empty { display: none; }
.sv-slot { margin-bottom: 12px; }
.sv-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--brand); background: var(--brand-soft); color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 99px; cursor: pointer; }
.sv-btn:hover { background: var(--brand); color: #fff; }
.sv-modal { position: fixed; inset: 0; background: rgba(20, 19, 30, .78); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.sv-box { position: relative; width: min(900px, 100%); }
.sv-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.sv-frame iframe, .sv-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sv-close { position: absolute; top: -44px; right: 0; background: #fff; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.auth-lang { display: flex; align-items: center; gap: 10px; }
.qr-head-r { display: flex; align-items: center; gap: 10px; }
.qr-head .sv-btn { background: transparent; color: #fff; }
.v-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media print { .sig-pad .btn, .rep-detail summary { display: none; } .rep-detail { display: block; } }
.sheet .kv + .kv, .sheet .kv + .grid { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.card .rate-box { box-shadow: none; border: 0; padding: 0; margin-top: 14px; background: none; }
/* El menú del super admin tiene más secciones: pasa a menú desplegable antes */
@media (min-width: 1181px) and (max-width: 1300px) {
  .role-admin .menu-btn { display: block; }
  .role-admin .topnav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; box-shadow: 0 12px 24px rgba(0,0,0,.06); }
  .role-admin .topnav.open { display: flex; }
  .role-admin .nav, .role-admin .admin-only { flex-direction: column; align-items: stretch; }
  .role-admin .admin-only { margin: 8px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .role-admin .nav-right { justify-content: space-between; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
  .role-admin .nav a { padding: 10px 12px; font-size: 15px; }
  .role-admin #who-name, .role-admin .avail-txt { display: inline; }
}
.must-change .nav, .must-change #sos, .must-change #avail, .must-change .menu-btn { display: none !important; } .must-change .topnav { display: flex !important; position: static; box-shadow: none; border: 0; padding: 0; background: none; flex-direction: row; justify-content: flex-end; }
.link-btn.small, .forgot { font-size: 13px; }

/* ---------- App instalable (PWA) ---------- */
.app-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.app-banner span { flex: 1; min-width: 220px; }
.app-card { display: grid; gap: 14px; }
.app-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-row > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.app-row img { width: 44px; height: 44px; border-radius: 10px; }
.app-ico { width: 44px; text-align: center; font-size: 26px; }
.app-row .btn { margin-left: 4px; }
